content stringlengths 5 1.04M | avg_line_length float64 1.75 12.9k | max_line_length int64 2 244k | alphanum_fraction float64 0 0.98 | licenses list | repository_name stringlengths 7 92 | path stringlengths 3 249 | size int64 5 1.04M | lang stringclasses 2
values |
|---|---|---|---|---|---|---|---|---|
using System.Collections.Generic;
namespace MOE.Common.Models.Repositories
{
public interface IRoutePhaseDirectionRepository
{
List<RoutePhaseDirection> GetAll();
RoutePhaseDirection GetByID(int routeID);
void DeleteByID(int id);
void Update(RoutePhaseDirection routePhaseDirection);
void Add(RoutePhaseDirection newRRoutePhaseDirection);
}
} | 30.461538 | 62 | 0.734848 | [
"Apache-2.0"
] | AndreRSanchez/ATSPM | MOE.Common/Models/Repositories/IRoutePhaseDirectionRepository.cs | 398 | C# |
using System.Collections.ObjectModel;
using System.Reflection;
using UnityEngine;
namespace DayNightCycle
{
public class EnvironmentManager : MonoBehaviour
{
/// <summary>
/// How much colder it is at night.
/// </summary>
public float nightTemperatureChangeAmount = 4.0f;
/// <summary>
/// How much more tired we should make guests at night.
/// </summary>
public float nightTirednessAddAmount = 0.06f;
/// <summary>
/// How much less tired we should make guests when it becomes day
/// </summary>
public float dayTirednessSubtractAmount = 0.05f;
/// <summary>
/// Whether we should change temperature at night.
/// </summary>
public bool changeTemperatureAtNight = true;
private float[] dayTemperatureMax;
private float[] nightTemperatureMax;
private void Start()
{
FieldInfo tempField = GetTemperatureMaxField();
dayTemperatureMax = (float[])tempField.GetValue(WeatherController.Instance);
nightTemperatureMax = new float[dayTemperatureMax.Length];
for (int i = 0; i < dayTemperatureMax.Length; i++)
{
nightTemperatureMax[i] = dayTemperatureMax[i] - nightTemperatureChangeAmount;
}
DayNight.Instance.OnSunsetStart += ChangeToNightTemps;
DayNight.Instance.OnSunriseStart += ChangeToDayTemps;
DayNight.Instance.OnDayStart += WakeGuestsUp;
DayNight.Instance.OnNightStart += MakeGuestsTired;
}
private void MakeGuestsTired()
{
ReadOnlyCollection<Guest> guests = GameController.Instance.park.getGuests();
foreach (Guest guest in guests)
{
guest.Tiredness += nightTirednessAddAmount;
}
}
private void WakeGuestsUp()
{
ReadOnlyCollection<Guest> guests = GameController.Instance.park.getGuests();
foreach (Guest guest in guests)
{
guest.Tiredness -= dayTirednessSubtractAmount;
}
}
private void ChangeToNightTemps()
{
if (!changeTemperatureAtNight)
{
return;
}
FieldInfo tempField = GetTemperatureMaxField();
tempField.SetValue(WeatherController.Instance, nightTemperatureMax);
// Force-update temperature info
FieldInfo monthField = GetLastWeatherCalculationMonth();
monthField.SetValue(WeatherController.Instance, -1);
WeatherController.Instance.getTemperature();
}
private void ChangeToDayTemps()
{
if (!changeTemperatureAtNight)
{
return;
}
FieldInfo tempField = GetTemperatureMaxField();
tempField.SetValue(WeatherController.Instance, dayTemperatureMax);
// Force-update temperature info
FieldInfo monthField = GetLastWeatherCalculationMonth();
monthField.SetValue(WeatherController.Instance, -1);
WeatherController.Instance.getTemperature();
}
private FieldInfo GetTemperatureMaxField()
{
BindingFlags flags = BindingFlags.GetField | BindingFlags.Static | BindingFlags.NonPublic;
FieldInfo tempField = typeof(WeatherController).GetField("temperatureMax", flags);
if (tempField == null)
{
throw new System.NullReferenceException("Temperature field was null!");
}
return tempField;
}
private FieldInfo GetLastWeatherCalculationMonth()
{
BindingFlags flags = BindingFlags.GetField | BindingFlags.Instance | BindingFlags.NonPublic;
FieldInfo monthField = typeof(WeatherController).GetField("lastWeatherCalculationMonth", flags);
if (monthField == null)
{
throw new System.NullReferenceException("Last weather calculation month was null!");
}
return monthField;
}
}
} | 30.327434 | 99 | 0.736796 | [
"MIT"
] | Jay2645/Parkitect-Day-Night-Cycle | EnvironmentManager.cs | 3,429 | C# |
using System;
using CoreGraphics;
using Foundation;
using UIKit;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
using NGraphics;
using TwinTechs;
using TwinTechs.iOS;
using Size = NGraphics.Size;
[assembly: ExportRenderer (typeof(SvgImage), typeof(SvgImageRenderer))]
namespace TwinTechs.iOS
{
/// <summary>
/// SVG Renderer
/// </summary>
[Preserve (AllMembers = true)]
public class SvgImageRenderer : ImageRenderer
{
/// <summary>
/// Used for registration with dependency service
/// </summary>
public new static void Init ()
{
var temp = DateTime.Now;
}
private SvgImage _formsControl {
get { return Element as SvgImage; }
}
static double ScreenScale = UIScreen.MainScreen.Scale;
public override void Draw (CGRect rect)
{
base.Draw (rect);
if (_formsControl != null) {
using (CGContext context = UIGraphics.GetCurrentContext ()) {
context.SetAllowsAntialiasing (true);
context.SetShouldAntialias (true);
context.SetShouldSmoothFonts (true);
var outputSize = new Size (rect.Width, rect.Height);
var finalCanvas = _formsControl.RenderSvgToCanvas (outputSize, ScreenScale, CreatePlatformImageCanvas);
var image = finalCanvas.GetImage ();
var uiImage = image.GetUIImage ();
Control.Image = uiImage;
}
}
}
static Func<Size, double, IImageCanvas> CreatePlatformImageCanvas = (size, scale) => new ApplePlatform ().CreateImageCanvas (size, scale);
protected override void OnElementChanged (ElementChangedEventArgs<Image> e)
{
base.OnElementChanged (e);
if (e.OldElement != null) {
(e.OldElement as SvgImage).OnInvalidate -= HandleInvalidate;
}
if (e.NewElement != null) {
(e.NewElement as SvgImage).OnInvalidate += HandleInvalidate;
}
SetNeedsDisplay ();
}
/// <summary>
/// Handles view invalidate.
/// </summary>
void HandleInvalidate (object sender, System.EventArgs args)
{
SetNeedsDisplay ();
}
}
} | 24.575 | 140 | 0.697864 | [
"Apache-2.0"
] | Emasoft/TwinTechsFormsLib | TwinTechsForms/TwinTechsForms.SvgImage/TwinTechsForms.SvgImage.iOS/SvgImageRenderer.cs | 1,968 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using FluentMigrator.Exceptions;
using FluentMigrator.Model;
using FluentMigrator.Runner.Generators.Base;
namespace FluentMigrator.Runner.Generators.Hana
{
internal class HanaColumn : ColumnBase
{
private const int HanaObjectNameMaxLength = 30;
public HanaColumn(IQuoter quoter)
: base(new HanaTypeMap(), quoter)
{
var a = ClauseOrder.IndexOf(FormatDefaultValue);
var b = ClauseOrder.IndexOf(FormatNullable);
// Hana requires DefaultValue before nullable
if (a <= b) return;
ClauseOrder[b] = FormatDefaultValue;
ClauseOrder[a] = FormatNullable;
}
protected override string FormatIdentity(ColumnDefinition column)
{
return column.IsIdentity ? "GENERATED ALWAYS AS IDENTITY" : string.Empty;
}
protected override string FormatNullable(ColumnDefinition column)
{
if (!(column.DefaultValue is ColumnDefinition.UndefinedDefaultValue))
return string.Empty;
return column.IsNullable.HasValue
? (column.IsNullable.Value ? "NULL" : "NOT NULL")
: string.Empty;
}
protected override string GetPrimaryKeyConstraintName(IEnumerable<ColumnDefinition> primaryKeyColumns, string tableName)
{
if (primaryKeyColumns == null)
throw new ArgumentNullException("primaryKeyColumns");
if (tableName == null)
throw new ArgumentNullException("tableName");
var primaryKeyName = primaryKeyColumns.First().PrimaryKeyName;
if (string.IsNullOrEmpty(primaryKeyName))
{
return string.Empty;
}
if (primaryKeyName.Length > HanaObjectNameMaxLength)
throw new DatabaseOperationNotSupportedException(
string.Format(
"Hana does not support length of primary key name greater than {0} characters. Reduce length of primary key name. ({1})",
HanaObjectNameMaxLength, primaryKeyName));
var result = string.Format("CONSTRAINT {0} ", Quoter.QuoteConstraintName(primaryKeyName));
return result;
}
public override string AddPrimaryKeyConstraint(string tableName, IEnumerable<ColumnDefinition> primaryKeyColumns)
{
var keyColumns = string.Join(", ", primaryKeyColumns.Select(x => Quoter.QuoteColumnName(x.Name)).ToArray());
return string.Format(", PRIMARY KEY ({0})", keyColumns);
}
}
}
| 34.987013 | 145 | 0.628062 | [
"Apache-2.0"
] | Alegrowin/fluentmigrator | src/FluentMigrator.Runner.Hana/Generators/Hana/HanaColumn.cs | 2,694 | C# |
using System;
using System.IO;
using Microsoft.AspNetCore.Hosting;
namespace TestTs
{
public class Program
{
public static void Main(string[] args)
{
var host = new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup<Startup>()
.Build();
host.Run();
}
}
}
| 20.909091 | 64 | 0.521739 | [
"MIT"
] | ConstYavorskiy/HeractJS | src/HeractJS/Program.cs | 462 | C# |
using Discord;
using Discord.Commands;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YuGiOh.Bot.Extensions;
using YuGiOh.Bot.Services;
namespace YuGiOh.Bot.Modules
{
public class Wikia : CustomBase
{
public Web Web { get; set; }
[Command("wikia")]
[Summary("Search for stuff on the yugioh wikia")]
public async Task WikiaCommand([Remainder]string search)
{
var dom = await Web.GetDom($"http://yugioh.wikia.com/wiki/Special:Search?query={search}");
var results = dom.GetElementsByClassName("Results").FirstOrDefault();
if (results is not null)
{
var children = results.Children.Where(element => !element.ClassList.Contains("video-addon-results"));
var count = dom.GetElementsByClassName("result-count").First();
var limit = children.Count() >= 10 ? 10 : children.Count();
var author = new EmbedAuthorBuilder()
.WithIconUrl("https://cdn3.iconfinder.com/data/icons/7-millennium-items/512/Milennium_Puzzle_Icon_Colored-512.png")
.WithName("YuGiOh Wikia");
var footer = new EmbedFooterBuilder()
.WithText(count.TextContent);
var body = new EmbedBuilder()
.WithRandomColor()
.WithAuthor(author)
.WithFooter(footer);
var builder = new StringBuilder();
for(int i = 1; i <= limit; i++)
{
var topic = children.ElementAt(i - 1) .GetElementsByTagName("a").First();
var title = topic.TextContent;
var link = topic.GetAttribute("href").Replace("(", "%28").Replace(")", "%29");
//discord keeps cutting off the parentheses at the end of links, cause it thinks the links end there
builder.AppendLine($"**{i}**. [{title}]({link})");
}
body.WithDescription(builder.ToString());
await SendEmbedAsync(body);
}
else
await NoResultError("search results", search);
}
}
}
| 33.666667 | 135 | 0.551873 | [
"MIT"
] | MeLikeChoco/YuGiOhBot | YuGiOh.Bot/Modules/Wikia.cs | 2,325 | C# |
using System;
using System.Linq;
using EntitiesBT.Core;
using EntitiesBT.Entities;
using EntitiesBT.Nodes;
using UnityEngine;
namespace EntitiesBT.DebugView
{
[AddComponentMenu("")] // hide from component menu
public class BTDebugWeightRandomSelector : BTDebugView<WeightRandomSelectorNode>
{
public float[] DefaultWeights;
public float[] RuntimeWeights;
public override void Init()
{
var blob = Blob;
ref var runtime = ref blob.GetNodeData<WeightRandomSelectorNode, NodeBlobRef>(Index).Weights;
RuntimeWeights = runtime.ToArray();
ref var @default = ref blob.GetNodeDefaultData<WeightRandomSelectorNode, NodeBlobRef>(Index).Weights;
DefaultWeights = @default.ToArray();
}
public override void Tick()
{
var blob = Blob;
ref var runtime = ref blob.GetNodeData<WeightRandomSelectorNode, NodeBlobRef>(Index).Weights;
RuntimeWeights = runtime.ToArray();
}
protected override void OnValidate()
{
if (!IsValid) return;
var blob = Blob;
ref var @default = ref blob.GetNodeDefaultData<WeightRandomSelectorNode, NodeBlobRef>(Index);
SetData(ref @default, DefaultWeights);
ref var runtime = ref blob.GetNodeData<WeightRandomSelectorNode, NodeBlobRef>(Index);
SetData(ref runtime, RuntimeWeights);
void SetData(ref WeightRandomSelectorNode data, float[] array)
{
Array.Resize(ref array, data.Weights.Length);
for (var i = 0; i < array.Length; i++)
{
if (array[i] < 0) array[i] = 0;
data.Weights[i] = array[i];
}
data.Sum = array.Sum();
}
}
}
}
| 33.210526 | 113 | 0.585843 | [
"MIT"
] | r2d2m/EntitiesBT | Packages/debug.component-viewer/Runtime/BTDebugWeightRandomSelector.cs | 1,893 | C# |
// <auto-generated />
namespace IronJS.Tests.UnitTests.IE9.chapter15._15_4._15_4_4
{
using System;
using NUnit.Framework;
[TestFixture]
public class _15_4_4_15_Tests : IE9TestFixture
{
public _15_4_4_15_Tests() : base(@"chapter15\15.4\15.4.4\15.4.4.15") { }
[Test(Description = "Array.prototype.lastIndexOf must exist as a function")] public void _15_4_4_15__0__1() { RunFile(@"15.4.4.15-0-1.js"); }
[Test(Description = "Array.prototype.lastIndexOf has a length property whose value is 1.")] public void _15_4_4_15__0__2() { RunFile(@"15.4.4.15-0-2.js"); }
[Test(Description = "Array.prototype.lastIndexOf applied to undefined throws a TypeError")] public void _15_4_4_15__1__1() { RunFile(@"15.4.4.15-1-1.js"); }
[Test(Description = "Array.prototype.lastIndexOf applied to the Math object")] public void _15_4_4_15__1__10() { RunFile(@"15.4.4.15-1-10.js"); }
[Test(Description = "Array.prototype.lastIndexOf applied to Date object")] public void _15_4_4_15__1__11() { RunFile(@"15.4.4.15-1-11.js"); }
[Test(Description = "Array.prototype.lastIndexOf applied to RegExp object")] public void _15_4_4_15__1__12() { RunFile(@"15.4.4.15-1-12.js"); }
[Test(Description = "Array.prototype.lastIndexOf applied to the JSON object")] public void _15_4_4_15__1__13() { RunFile(@"15.4.4.15-1-13.js"); }
[Test(Description = "Array.prototype.lastIndexOf applied to Error object")] public void _15_4_4_15__1__14() { RunFile(@"15.4.4.15-1-14.js"); }
[Test(Description = "Array.prototype.lastIndexOf applied to the Arguments object")] public void _15_4_4_15__1__15() { RunFile(@"15.4.4.15-1-15.js"); }
[Test(Description = "Array.prototype.lastIndexOf applied to the global object")] public void _15_4_4_15__1__17() { RunFile(@"15.4.4.15-1-17.js"); }
[Test(Description = "Array.prototype.lastIndexOf applied to null throws a TypeError")] public void _15_4_4_15__1__2() { RunFile(@"15.4.4.15-1-2.js"); }
[Test(Description = "Array.prototype.lastIndexOf applied to boolean primitive")] public void _15_4_4_15__1__3() { RunFile(@"15.4.4.15-1-3.js"); }
[Test(Description = "Array.prototype.lastIndexOf applied to Boolean object")] public void _15_4_4_15__1__4() { RunFile(@"15.4.4.15-1-4.js"); }
[Test(Description = "Array.prototype.lastIndexOf applied to number primitive")] public void _15_4_4_15__1__5() { RunFile(@"15.4.4.15-1-5.js"); }
[Test(Description = "Array.prototype.lastIndexOf applied to Number object")] public void _15_4_4_15__1__6() { RunFile(@"15.4.4.15-1-6.js"); }
[Test(Description = "Array.prototype.lastIndexOf applied to string primitive")] public void _15_4_4_15__1__7() { RunFile(@"15.4.4.15-1-7.js"); }
[Test(Description = "Array.prototype.lastIndexOf applied to String object")] public void _15_4_4_15__1__8() { RunFile(@"15.4.4.15-1-8.js"); }
[Test(Description = "Array.prototype.lastIndexOf applied to Function object")] public void _15_4_4_15__1__9() { RunFile(@"15.4.4.15-1-9.js"); }
[Test(Description = "Array.prototype.lastIndexOf - \'length\' is own data property on an Array-like object")] public void _15_4_4_15__2__1() { RunFile(@"15.4.4.15-2-1.js"); }
[Test(Description = "Array.prototype.lastIndexOf - \'length\' is inherited accessor property on an Array-like object")] public void _15_4_4_15__2__10() { RunFile(@"15.4.4.15-2-10.js"); }
[Test(Description = "Array.prototype.lastIndexOf - \'length\' is own accessor property without a get function on an Array-like object")] public void _15_4_4_15__2__11() { RunFile(@"15.4.4.15-2-11.js"); }
[Test(Description = "Array.prototype.lastIndexOf - \'length\' is own accessor property without a get function that overrides an inherited accessor property on an Array-like object")] public void _15_4_4_15__2__12() { RunFile(@"15.4.4.15-2-12.js"); }
[Test(Description = "Array.prototype.lastIndexOf - \'length\' is inherited accessor property without a get function on an Array-like object")] public void _15_4_4_15__2__13() { RunFile(@"15.4.4.15-2-13.js"); }
[Test(Description = "Array.prototype.lastIndexOf - \'length\' is undefined property on an Array-like object")] public void _15_4_4_15__2__14() { RunFile(@"15.4.4.15-2-14.js"); }
[Test(Description = "Array.prototype.lastIndexOf - \'length\' is property of the global object")] public void _15_4_4_15__2__15() { RunFile(@"15.4.4.15-2-15.js"); }
[Test(Description = "Array.prototype.lastIndexOf applied to Arguments object which implements its own property get method")] public void _15_4_4_15__2__17() { RunFile(@"15.4.4.15-2-17.js"); }
[Test(Description = "Array.prototype.lastIndexOf applied to String object which implements its own property get method")] public void _15_4_4_15__2__18() { RunFile(@"15.4.4.15-2-18.js"); }
[Test(Description = "Array.prototype.lastIndexOf applied to String object which implements its own property get method")] public void _15_4_4_15__2__19() { RunFile(@"15.4.4.15-2-19.js"); }
[Test(Description = "Array.prototype.lastIndexOf - \'length\' is own data property on an Array")] public void _15_4_4_15__2__2() { RunFile(@"15.4.4.15-2-2.js"); }
[Test(Description = "Array.prototype.lastIndexOf - \'length\' is own data property that overrides an inherited data property on an Array-like object")] public void _15_4_4_15__2__3() { RunFile(@"15.4.4.15-2-3.js"); }
[Test(Description = "Array.prototype.lastIndexOf when \'length\' is own data property that overrides an inherited data property on an Array")] public void _15_4_4_15__2__4() { RunFile(@"15.4.4.15-2-4.js"); }
[Test(Description = "Array.prototype.lastIndexOf - \'length\' is own data property that overrides an inherited accessor property on an Array-like object")] public void _15_4_4_15__2__5() { RunFile(@"15.4.4.15-2-5.js"); }
[Test(Description = "Array.prototype.lastIndexOf - \'length\' is an inherited data property on an Array-like object")] public void _15_4_4_15__2__6() { RunFile(@"15.4.4.15-2-6.js"); }
[Test(Description = "Array.prototype.lastIndexOf - \'length\' is own accessor property on an Array-like object")] public void _15_4_4_15__2__7() { RunFile(@"15.4.4.15-2-7.js"); }
[Test(Description = "Array.prototype.lastIndexOf - \'length\' is own accessor property that overrides an inherited data property on an Array-like object")] public void _15_4_4_15__2__8() { RunFile(@"15.4.4.15-2-8.js"); }
[Test(Description = "Array.prototype.lastIndexOf - \'length\' is own accessor property that overrides an inherited accessor property on an Array-like object")] public void _15_4_4_15__2__9() { RunFile(@"15.4.4.15-2-9.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'length\' is undefined")] public void _15_4_4_15__3__1() { RunFile(@"15.4.4.15-3-1.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'length\' is a number (value is NaN)")] public void _15_4_4_15__3__10() { RunFile(@"15.4.4.15-3-10.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'length\' is a string containing positive number")] public void _15_4_4_15__3__11() { RunFile(@"15.4.4.15-3-11.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'length\' is a string containing negative number")] public void _15_4_4_15__3__12() { RunFile(@"15.4.4.15-3-12.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'length\' is a string containing a decimal number")] public void _15_4_4_15__3__13() { RunFile(@"15.4.4.15-3-13.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'length\' is a string containing +/-Infinity")] public void _15_4_4_15__3__14() { RunFile(@"15.4.4.15-3-14.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'length\' is a string containing an exponential number")] public void _15_4_4_15__3__15() { RunFile(@"15.4.4.15-3-15.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'length\' is a string which is able to be converted into hex number")] public void _15_4_4_15__3__16() { RunFile(@"15.4.4.15-3-16.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'length\' is a string containing a number with leading zeros")] public void _15_4_4_15__3__17() { RunFile(@"15.4.4.15-3-17.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'length\' is a string that can\'t convert to a number")] public void _15_4_4_15__3__18() { RunFile(@"15.4.4.15-3-18.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'length\' is an Object which has an own toString method")] public void _15_4_4_15__3__19() { RunFile(@"15.4.4.15-3-19.js"); }
[Test(Description = "Array.prototype.lastIndexOf return -1 when value of \'length\' is a boolean (value is true)")] public void _15_4_4_15__3__2() { RunFile(@"15.4.4.15-3-2.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'length\' is an Object which has an own valueOf method")] public void _15_4_4_15__3__20() { RunFile(@"15.4.4.15-3-20.js"); }
[Test(Description = "Array.prototype.lastIndexOf - \'length\' is an object that has an own valueOf method that returns an object and toString method that returns a string")] public void _15_4_4_15__3__21() { RunFile(@"15.4.4.15-3-21.js"); }
[Test(Description = "Array.prototype.lastIndexOf throws TypeError exception when \'length\' is an object with toString and valueOf methods that don\uFFFDt return primitive values")] public void _15_4_4_15__3__22() { RunFile(@"15.4.4.15-3-22.js"); }
[Test(Description = "Array.prototype.lastIndexOf uses inherited valueOf method when \'length\' is an object with an own toString and an inherited valueOf methods")] public void _15_4_4_15__3__23() { RunFile(@"15.4.4.15-3-23.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'length\' is a positive non-integer, ensure truncation occurs in the proper direction")] public void _15_4_4_15__3__24() { RunFile(@"15.4.4.15-3-24.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'length\' is a negative non-integer, ensure truncation occurs in the proper direction")] public void _15_4_4_15__3__25() { RunFile(@"15.4.4.15-3-25.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'length\' is boundary value (2^32)")] public void _15_4_4_15__3__28() { RunFile(@"15.4.4.15-3-28.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'length\' is boundary value (2^32 + 1)")] public void _15_4_4_15__3__29() { RunFile(@"15.4.4.15-3-29.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'length\' is a number (value is 0)")] public void _15_4_4_15__3__3() { RunFile(@"15.4.4.15-3-3.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'length\' is a number (value is -0)")] public void _15_4_4_15__3__4() { RunFile(@"15.4.4.15-3-4.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'length\' is a number (value is +0)")] public void _15_4_4_15__3__5() { RunFile(@"15.4.4.15-3-5.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'length\' is a number (value is a positive number)")] public void _15_4_4_15__3__6() { RunFile(@"15.4.4.15-3-6.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'length\' is a number (value is a negative number)")] public void _15_4_4_15__3__7() { RunFile(@"15.4.4.15-3-7.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'length\' is a number (value is Infinity)")] public void _15_4_4_15__3__8() { RunFile(@"15.4.4.15-3-8.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'length\' is a number (value is -Infinity)")] public void _15_4_4_15__3__9() { RunFile(@"15.4.4.15-3-9.js"); }
[Test(Description = "Array.prototype.lastIndexOf returns -1 if \'length\' is 0 (empty array)")] public void _15_4_4_15__4__1() { RunFile(@"15.4.4.15-4-1.js"); }
[Test(Description = "Array.prototype.lastIndexOf - \'length\' is a number of value -6e-1")] public void _15_4_4_15__4__10() { RunFile(@"15.4.4.15-4-10.js"); }
[Test(Description = "Array.prototype.lastIndexOf - \'length\' is an empty string")] public void _15_4_4_15__4__11() { RunFile(@"15.4.4.15-4-11.js"); }
[Test(Description = "Array.prototype.lastIndexOf returns -1 if \'length\' is 0 ( length overridden to null (type conversion))")] public void _15_4_4_15__4__2() { RunFile(@"15.4.4.15-4-2.js"); }
[Test(Description = "Array.prototype.lastIndexOf returns -1 if \'length\' is 0 (length overridden to false (type conversion))")] public void _15_4_4_15__4__3() { RunFile(@"15.4.4.15-4-3.js"); }
[Test(Description = "Array.prototype.lastIndexOf returns -1 if \'length\' is 0 (generic \'array\' with length 0 )")] public void _15_4_4_15__4__4() { RunFile(@"15.4.4.15-4-4.js"); }
[Test(Description = "Array.prototype.lastIndexOf returns -1 if \'length\' is 0 ( length overridden to \'0\' (type conversion))")] public void _15_4_4_15__4__5() { RunFile(@"15.4.4.15-4-5.js"); }
[Test(Description = "Array.prototype.lastIndexOf returns -1 if \'length\' is 0 (subclassed Array, length overridden with obj with valueOf)")] public void _15_4_4_15__4__6() { RunFile(@"15.4.4.15-4-6.js"); }
[Test(Description = "Array.prototype.lastIndexOf returns -1 if \'length\' is 0 ( length is object overridden with obj w/o valueOf (toString))")] public void _15_4_4_15__4__7() { RunFile(@"15.4.4.15-4-7.js"); }
[Test(Description = "Array.prototype.lastIndexOf returns -1 if \'length\' is 0 (length is an empty array)")] public void _15_4_4_15__4__8() { RunFile(@"15.4.4.15-4-8.js"); }
[Test(Description = "Array.prototype.lastIndexOf - \'length\' is a number of value 0.1")] public void _15_4_4_15__4__9() { RunFile(@"15.4.4.15-4-9.js"); }
[Test(Description = "Array.prototype.lastIndexOf when fromIndex is string")] public void _15_4_4_15__5__1() { RunFile(@"15.4.4.15-5-1.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'fromIndex\' is a number (value is positive number)")] public void _15_4_4_15__5__10() { RunFile(@"15.4.4.15-5-10.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'fromIndex\' is a number (value is negative number)")] public void _15_4_4_15__5__11() { RunFile(@"15.4.4.15-5-11.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'fromIndex\' is a number (value is Infinity)")] public void _15_4_4_15__5__12() { RunFile(@"15.4.4.15-5-12.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'fromIndex\' is a number (value is -Infinity)")] public void _15_4_4_15__5__13() { RunFile(@"15.4.4.15-5-13.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'fromIndex\' is a number (value is NaN)")] public void _15_4_4_15__5__14() { RunFile(@"15.4.4.15-5-14.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'fromIndex\' is a string containing a negative number")] public void _15_4_4_15__5__15() { RunFile(@"15.4.4.15-5-15.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'fromIndex\' is a string containing Infinity")] public void _15_4_4_15__5__16() { RunFile(@"15.4.4.15-5-16.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'fromIndex\' is a string containing -Infinity")] public void _15_4_4_15__5__17() { RunFile(@"15.4.4.15-5-17.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'fromIndex\' is a string containing an exponential number")] public void _15_4_4_15__5__18() { RunFile(@"15.4.4.15-5-18.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'fromIndex\' is a string containing a hex number")] public void _15_4_4_15__5__19() { RunFile(@"15.4.4.15-5-19.js"); }
[Test(Description = "Array.prototype.lastIndexOf when fromIndex is floating point number")] public void _15_4_4_15__5__2() { RunFile(@"15.4.4.15-5-2.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'fromIndex\' which is a string containing a number with leading zeros")] public void _15_4_4_15__5__20() { RunFile(@"15.4.4.15-5-20.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'fromIndex\' which is an Object, and has an own toString method")] public void _15_4_4_15__5__21() { RunFile(@"15.4.4.15-5-21.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'fromIndex\' which is an object, and has an own valueOf method")] public void _15_4_4_15__5__22() { RunFile(@"15.4.4.15-5-22.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'fromIndex\' is an object that has an own valueOf method that returns an object and toString method that returns a string")] public void _15_4_4_15__5__23() { RunFile(@"15.4.4.15-5-23.js"); }
[Test(Description = "Array.prototype.lastIndexOf throws TypeError exception when value of \'fromIndex\' is an object that both toString and valueOf methods than don\'t return primitive value")] public void _15_4_4_15__5__24() { RunFile(@"15.4.4.15-5-24.js"); }
[Test(Description = "Array.prototype.lastIndexOf use inherited valueOf method when value of \'fromIndex\' is an object with an own toString and inherited valueOf methods")] public void _15_4_4_15__5__25() { RunFile(@"15.4.4.15-5-25.js"); }
[Test(Description = "Array.prototype.lastIndexOf - side effects produced by step 2 are visible when an exception occurs")] public void _15_4_4_15__5__26() { RunFile(@"15.4.4.15-5-26.js"); }
[Test(Description = "Array.prototype.lastIndexOf - side effects produced by step 3 are visible when an exception occurs")] public void _15_4_4_15__5__27() { RunFile(@"15.4.4.15-5-27.js"); }
[Test(Description = "Array.prototype.lastIndexOf - side effects produced by step 1 are visible when an exception occurs")] public void _15_4_4_15__5__28() { RunFile(@"15.4.4.15-5-28.js"); }
[Test(Description = "Array.prototype.lastIndexOf - side effects produced by step 2 are visible when an exception occurs")] public void _15_4_4_15__5__29() { RunFile(@"15.4.4.15-5-29.js"); }
[Test(Description = "Array.prototype.lastIndexOf when fromIndex is boolean")] public void _15_4_4_15__5__3() { RunFile(@"15.4.4.15-5-3.js"); }
[Test(Description = "Array.prototype.lastIndexOf - side effects produced by step 3 are visible when an exception occurs")] public void _15_4_4_15__5__30() { RunFile(@"15.4.4.15-5-30.js"); }
[Test(Description = "Array.prototype.lastIndexOf - \'fromIndex\' is a positive non-integer, verify truncation occurs in the proper direction")] public void _15_4_4_15__5__31() { RunFile(@"15.4.4.15-5-31.js"); }
[Test(Description = "Array.prototype.lastIndexOf - \'fromIndex\' is a negative non-integer, verify truncation occurs in the proper direction")] public void _15_4_4_15__5__32() { RunFile(@"15.4.4.15-5-32.js"); }
[Test(Description = "Array.prototype.lastIndexOf - match on the first element, a middle element and the last element when \'fromIndex\' is passed")] public void _15_4_4_15__5__33() { RunFile(@"15.4.4.15-5-33.js"); }
[Test(Description = "Array.prototype.lastIndexOf when fromIndex is undefined")] public void _15_4_4_15__5__4() { RunFile(@"15.4.4.15-5-4.js"); }
[Test(Description = "Array.prototype.lastIndexOf when fromIndex is null")] public void _15_4_4_15__5__5() { RunFile(@"15.4.4.15-5-5.js"); }
[Test(Description = "Array.prototype.lastIndexOf when \'fromIndex\' isn\'t passed")] public void _15_4_4_15__5__6() { RunFile(@"15.4.4.15-5-6.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'fromIndex\' is a number (value is 0)")] public void _15_4_4_15__5__7() { RunFile(@"15.4.4.15-5-7.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'fromIndex\' is a number (value is +0)")] public void _15_4_4_15__5__8() { RunFile(@"15.4.4.15-5-8.js"); }
[Test(Description = "Array.prototype.lastIndexOf - value of \'fromIndex\' is a number (value is -0)")] public void _15_4_4_15__5__9() { RunFile(@"15.4.4.15-5-9.js"); }
[Test(Description = "Array.prototype.lastIndexOf when fromIndex greater than Array.length")] public void _15_4_4_15__6__1() { RunFile(@"15.4.4.15-6-1.js"); }
[Test(Description = "Array.prototype.lastIndexOf returns correct index when \'fromIndex\' is length of array - 1")] public void _15_4_4_15__6__2() { RunFile(@"15.4.4.15-6-2.js"); }
[Test(Description = "Array.prototype.lastIndexOf returns -1 when \'fromIndex\' is length of array - 1")] public void _15_4_4_15__6__3() { RunFile(@"15.4.4.15-6-3.js"); }
[Test(Description = "Array.prototype.lastIndexOf returns -1 when \'fromIndex\' and \'length\' are both 0")] public void _15_4_4_15__6__4() { RunFile(@"15.4.4.15-6-4.js"); }
[Test(Description = "Array.prototype.lastIndexOf returns -1 when \'fromIndex\' is 1")] public void _15_4_4_15__6__5() { RunFile(@"15.4.4.15-6-5.js"); }
[Test(Description = "Array.prototype.lastIndexOf returns correct index when \'fromIndex\' is 1")] public void _15_4_4_15__6__6() { RunFile(@"15.4.4.15-6-6.js"); }
[Test(Description = "Array.prototype.lastIndexOf with negative fromIndex ")] public void _15_4_4_15__7__1() { RunFile(@"15.4.4.15-7-1.js"); }
[Test(Description = "Array.prototype.lastIndexOf returns correct index when \'fromIndex\' is -1")] public void _15_4_4_15__7__2() { RunFile(@"15.4.4.15-7-2.js"); }
[Test(Description = "Array.prototype.lastIndexOf returns -1 when abs(\'fromIndex\') is length of array - 1")] public void _15_4_4_15__7__3() { RunFile(@"15.4.4.15-7-3.js"); }
[Test(Description = "Array.prototype.lastIndexOf returns -1 when abs(\'fromIndex\') is length of array")] public void _15_4_4_15__7__4() { RunFile(@"15.4.4.15-7-4.js"); }
[Test(Description = "Array.prototype.lastIndexOf must return correct index(boolean)")] public void _15_4_4_15__8__1() { RunFile(@"15.4.4.15-8-1.js"); }
[Test(Description = "Array.prototype.lastIndexOf must return correct index (NaN)")] public void _15_4_4_15__8__10() { RunFile(@"15.4.4.15-8-10.js"); }
[Test(Description = "Array.prototype.lastIndexOf - the length of iteration isn\'t changed by adding elements to the array during iteration")] public void _15_4_4_15__8__11() { RunFile(@"15.4.4.15-8-11.js"); }
[Test(Description = "Array.prototype.lastIndexOf must return correct index(Number)")] public void _15_4_4_15__8__2() { RunFile(@"15.4.4.15-8-2.js"); }
[Test(Description = "Array.prototype.lastIndexOf must return correct index(string)")] public void _15_4_4_15__8__3() { RunFile(@"15.4.4.15-8-3.js"); }
[Test(Description = "Array.prototype.lastIndexOf must return correct index(undefined)")] public void _15_4_4_15__8__4() { RunFile(@"15.4.4.15-8-4.js"); }
[Test(Description = "Array.prototype.lastIndexOf must return correct index(Object)")] public void _15_4_4_15__8__5() { RunFile(@"15.4.4.15-8-5.js"); }
[Test(Description = "Array.prototype.lastIndexOf must return correct index(null)")] public void _15_4_4_15__8__6() { RunFile(@"15.4.4.15-8-6.js"); }
[Test(Description = "Array.prototype.lastIndexOf must return correct index (self reference)")] public void _15_4_4_15__8__7() { RunFile(@"15.4.4.15-8-7.js"); }
[Test(Description = "Array.prototype.lastIndexOf must return correct index (Array)")] public void _15_4_4_15__8__8() { RunFile(@"15.4.4.15-8-8.js"); }
[Test(Description = "Array.prototype.lastIndexOf must return correct index (Sparse Array)")] public void _15_4_4_15__8__9() { RunFile(@"15.4.4.15-8-9.js"); }
[Test(Description = "Array.prototype.lastIndexOf - added properties in step 2 are visible here")] public void _15_4_4_15__8__a__1() { RunFile(@"15.4.4.15-8-a-1.js"); }
[Test(Description = "Array.prototype.lastIndexOf - properties can be added to prototype after current position are visited on an Array")] public void _15_4_4_15__8__a__10() { RunFile(@"15.4.4.15-8-a-10.js"); }
[Test(Description = "Array.prototype.lastIndexOf - deleting own property causes index property not to be visited on an Array-like object")] public void _15_4_4_15__8__a__11() { RunFile(@"15.4.4.15-8-a-11.js"); }
[Test(Description = "Array.prototype.lastIndexOf - deleting own property causes index property not to be visited on an Array")] public void _15_4_4_15__8__a__12() { RunFile(@"15.4.4.15-8-a-12.js"); }
[Test(Description = "Array.prototype.lastIndexOf - deleting property of prototype causes prototype index property not to be visited on an Array-like Object")] public void _15_4_4_15__8__a__13() { RunFile(@"15.4.4.15-8-a-13.js"); }
[Test(Description = "Array.prototype.lastIndexOf - deleting property of prototype causes prototype index property not to be visited on an Array")] public void _15_4_4_15__8__a__14() { RunFile(@"15.4.4.15-8-a-14.js"); }
[Test(Description = "Array.prototype.lastIndexOf - deleting own property with prototype property causes prototype index property to be visited on an Array-like object")] public void _15_4_4_15__8__a__15() { RunFile(@"15.4.4.15-8-a-15.js"); }
[Test(Description = "Array.prototype.lastIndexOf - deleting own property with prototype property causes prototype index property to be visited on an Array")] public void _15_4_4_15__8__a__16() { RunFile(@"15.4.4.15-8-a-16.js"); }
[Test(Description = "Array.prototype.lastIndexOf - decreasing length of array causes index property not to be visited")] public void _15_4_4_15__8__a__17() { RunFile(@"15.4.4.15-8-a-17.js"); }
[Test(Description = "Array.prototype.lastIndexOf - decreasing length of array with prototype property causes prototype index property to be visited")] public void _15_4_4_15__8__a__18() { RunFile(@"15.4.4.15-8-a-18.js"); }
[Test(Description = "Array.prototype.lastIndexOf - decreasing length of array does not delete non-configurable properties")] public void _15_4_4_15__8__a__19() { RunFile(@"15.4.4.15-8-a-19.js"); }
[Test(Description = "Array.prototype.lastIndexOf - added properties in step 5 are visible here on an Array-like object")] public void _15_4_4_15__8__a__2() { RunFile(@"15.4.4.15-8-a-2.js"); }
[Test(Description = "Array.prototype.lastIndexOf - added properties in step 5 are visible here on an Array")] public void _15_4_4_15__8__a__3() { RunFile(@"15.4.4.15-8-a-3.js"); }
[Test(Description = "Array.prototype.lastIndexOf - deleted properties in step 2 are visible here")] public void _15_4_4_15__8__a__4() { RunFile(@"15.4.4.15-8-a-4.js"); }
[Test(Description = "Array.prototype.lastIndexOf - deleted properties of step 5 are visible here on an Array-like object")] public void _15_4_4_15__8__a__5() { RunFile(@"15.4.4.15-8-a-5.js"); }
[Test(Description = "Array.prototype.lastIndexOf - deleted properties of step 5 are visible here on an Array")] public void _15_4_4_15__8__a__6() { RunFile(@"15.4.4.15-8-a-6.js"); }
[Test(Description = "Array.prototype.lastIndexOf - properties added into own object after current position are visited on an Array-like object")] public void _15_4_4_15__8__a__7() { RunFile(@"15.4.4.15-8-a-7.js"); }
[Test(Description = "Array.prototype.lastIndexOf - properties added into own object after current position are visited on an Array")] public void _15_4_4_15__8__a__8() { RunFile(@"15.4.4.15-8-a-8.js"); }
[Test(Description = "Array.prototype.lastIndexOf - properties can be added to prototype after current position are visited on an Array-like object")] public void _15_4_4_15__8__a__9() { RunFile(@"15.4.4.15-8-a-9.js"); }
[Test(Description = "Array.prototype.lastIndexOf - undefined property wouldn\'t be called")] public void _15_4_4_15__8__b__1() { RunFile(@"15.4.4.15-8-b-1.js"); }
[Test(Description = "Array.prototype.lastIndexOf - element to be retrieved is own data property on an Array-like object")] public void _15_4_4_15__8__b__i__1() { RunFile(@"15.4.4.15-8-b-i-1.js"); }
[Test(Description = "Array.prototype.lastIndexOf - element to be retrieved is own accessor property on an Array-like object")] public void _15_4_4_15__8__b__i__10() { RunFile(@"15.4.4.15-8-b-i-10.js"); }
[Test(Description = "Array.prototype.lastIndexOf - element to be retrieved is own accessor property that overrides an inherited data property on an Array")] public void _15_4_4_15__8__b__i__11() { RunFile(@"15.4.4.15-8-b-i-11.js"); }
[Test(Description = "Array.prototype.lastIndexOf - element to be retrieved is own accessor property that overrides an inherited data property on an Array-like object")] public void _15_4_4_15__8__b__i__12() { RunFile(@"15.4.4.15-8-b-i-12.js"); }
[Test(Description = "Array.prototype.lastIndexOf - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array")] public void _15_4_4_15__8__b__i__13() { RunFile(@"15.4.4.15-8-b-i-13.js"); }
[Test(Description = "Array.prototype.lastIndexOf - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array-like object")] public void _15_4_4_15__8__b__i__14() { RunFile(@"15.4.4.15-8-b-i-14.js"); }
[Test(Description = "Array.prototype.lastIndexOf - element to be retrieved is inherited accessor property on an Array")] public void _15_4_4_15__8__b__i__15() { RunFile(@"15.4.4.15-8-b-i-15.js"); }
[Test(Description = "Array.prototype.lastIndexOf - element to be retrieved is inherited accessor property on an Array-like object")] public void _15_4_4_15__8__b__i__16() { RunFile(@"15.4.4.15-8-b-i-16.js"); }
[Test(Description = "Array.prototype.lastIndexOf - element to be retrieved is own accessor property without a get function on an Array")] public void _15_4_4_15__8__b__i__17() { RunFile(@"15.4.4.15-8-b-i-17.js"); }
[Test(Description = "Array.prototype.lastIndexOf - element to be retrieved is own accessor property without a get function on an Array-like object")] public void _15_4_4_15__8__b__i__18() { RunFile(@"15.4.4.15-8-b-i-18.js"); }
[Test(Description = "Array.prototype.lastIndexOf - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array-like object")] public void _15_4_4_15__8__b__i__19() { RunFile(@"15.4.4.15-8-b-i-19.js"); }
[Test(Description = "Array.prototype.lastIndexOf - element to be retrieved is own data property on an Array")] public void _15_4_4_15__8__b__i__2() { RunFile(@"15.4.4.15-8-b-i-2.js"); }
[Test(Description = "Array.prototype.lastIndexOf - element to be retrieved is an own accessor property without a get function that overrides an inherited accessor property on an Array")] public void _15_4_4_15__8__b__i__20() { RunFile(@"15.4.4.15-8-b-i-20.js"); }
[Test(Description = "Array.prototype.lastIndexOf - element to be retrieved is inherited accessor property without a get function on an Array")] public void _15_4_4_15__8__b__i__21() { RunFile(@"15.4.4.15-8-b-i-21.js"); }
[Test(Description = "Array.prototype.lastIndexOf - element to be retrieved is inherited accessor property without a get function on an Array-like object")] public void _15_4_4_15__8__b__i__22() { RunFile(@"15.4.4.15-8-b-i-22.js"); }
[Test(Description = "Array.prototype.lastIndexOf - This object is the global object")] public void _15_4_4_15__8__b__i__23() { RunFile(@"15.4.4.15-8-b-i-23.js"); }
[Test(Description = "Array.prototype.lastIndexOf applied to Arguments object which implements its own property get method (number of arguments is less than number of parameters)")] public void _15_4_4_15__8__b__i__25() { RunFile(@"15.4.4.15-8-b-i-25.js"); }
[Test(Description = "Array.prototype.lastIndexOf applied to Arguments object which implements its own property get method (number of arguments equals to number of parameters)")] public void _15_4_4_15__8__b__i__26() { RunFile(@"15.4.4.15-8-b-i-26.js"); }
[Test(Description = "Array.prototype.lastIndexOf applied to Arguments object which implements its own property get method (number of arguments is greater than number of parameters)")] public void _15_4_4_15__8__b__i__27() { RunFile(@"15.4.4.15-8-b-i-27.js"); }
[Test(Description = "Array.prototype.lastIndexOf - side-effects are visible in subsequent iterations on an Array")] public void _15_4_4_15__8__b__i__28() { RunFile(@"15.4.4.15-8-b-i-28.js"); }
[Test(Description = "Array.prototype.lastIndexOf - side-effects are visible in subsequent iterations on an Array-like object")] public void _15_4_4_15__8__b__i__29() { RunFile(@"15.4.4.15-8-b-i-29.js"); }
[Test(Description = "Array.prototype.lastIndexOf - element to be retrieved is own data property that overrides an inherited data property on an Array")] public void _15_4_4_15__8__b__i__3() { RunFile(@"15.4.4.15-8-b-i-3.js"); }
[Test(Description = "Array.prototype.lastIndexOf terminates iteration on unhandled exception on an Array")] public void _15_4_4_15__8__b__i__30() { RunFile(@"15.4.4.15-8-b-i-30.js"); }
[Test(Description = "Array.prototype.lastIndexOf terminates iteration on unhandled exception on an Array-like object")] public void _15_4_4_15__8__b__i__31() { RunFile(@"15.4.4.15-8-b-i-31.js"); }
[Test(Description = "Array.prototype.lastIndexOf - element to be retrieved is own data property that overrides an inherited data property on an Array-like object")] public void _15_4_4_15__8__b__i__4() { RunFile(@"15.4.4.15-8-b-i-4.js"); }
[Test(Description = "Array.prototype.lastIndexOf - element to be retrieved is own data property that overrides an inherited accessor property on an Array")] public void _15_4_4_15__8__b__i__5() { RunFile(@"15.4.4.15-8-b-i-5.js"); }
[Test(Description = "Array.prototype.lastIndexOf - element to be retrieved is own data property that overrides an inherited accessor property on an Array-like object")] public void _15_4_4_15__8__b__i__6() { RunFile(@"15.4.4.15-8-b-i-6.js"); }
[Test(Description = "Array.prototype.lastIndexOf - element to be retrieved is inherited data property on an Array")] public void _15_4_4_15__8__b__i__7() { RunFile(@"15.4.4.15-8-b-i-7.js"); }
[Test(Description = "Array.prototype.lastIndexOf - element to be retrieved is inherited data property on an Array-like object")] public void _15_4_4_15__8__b__i__8() { RunFile(@"15.4.4.15-8-b-i-8.js"); }
[Test(Description = "Array.prototype.lastIndexOf - element to be retrieved is own accessor property on an Array")] public void _15_4_4_15__8__b__i__9() { RunFile(@"15.4.4.15-8-b-i-9.js"); }
[Test(Description = "Array.prototype.lastIndexOf - type of array element is different from type of search element")] public void _15_4_4_15__8__b__ii__1() { RunFile(@"15.4.4.15-8-b-ii-1.js"); }
[Test(Description = "Array.prototype.lastIndexOf - both array element and search element are booleans, and they have same value")] public void _15_4_4_15__8__b__ii__10() { RunFile(@"15.4.4.15-8-b-ii-10.js"); }
[Test(Description = "Array.prototype.lastIndexOf - both array element and search element are Objects, and they refer to the same object")] public void _15_4_4_15__8__b__ii__11() { RunFile(@"15.4.4.15-8-b-ii-11.js"); }
[Test(Description = "Array.prototype.lastIndexOf - both type of array element and type of search element are Undefined")] public void _15_4_4_15__8__b__ii__2() { RunFile(@"15.4.4.15-8-b-ii-2.js"); }
[Test(Description = "Array.prototype.lastIndexOf - both type of array element and type of search element are Null")] public void _15_4_4_15__8__b__ii__3() { RunFile(@"15.4.4.15-8-b-ii-3.js"); }
[Test(Description = "Array.prototype.lastIndexOf - search element is NaN")] public void _15_4_4_15__8__b__ii__4() { RunFile(@"15.4.4.15-8-b-ii-4.js"); }
[Test(Description = "Array.prototype.lastIndexOf - search element is -NaN")] public void _15_4_4_15__8__b__ii__5() { RunFile(@"15.4.4.15-8-b-ii-5.js"); }
[Test(Description = "Array.prototype.lastIndexOf - array element is +0 and search element is -0")] public void _15_4_4_15__8__b__ii__6() { RunFile(@"15.4.4.15-8-b-ii-6.js"); }
[Test(Description = "Array.prototype.lastIndexOf - array element is -0 and search element is +0")] public void _15_4_4_15__8__b__ii__7() { RunFile(@"15.4.4.15-8-b-ii-7.js"); }
[Test(Description = "Array.prototype.lastIndexOf - both array element and search element are numbers, and they have same value")] public void _15_4_4_15__8__b__ii__8() { RunFile(@"15.4.4.15-8-b-ii-8.js"); }
[Test(Description = "Array.prototype.lastIndexOf - both array element and search element are strings, and they have exactly the same sequence of characters")] public void _15_4_4_15__8__b__ii__9() { RunFile(@"15.4.4.15-8-b-ii-9.js"); }
[Test(Description = "Array.prototype.lastIndexOf returns index of last one when more than two elements in array are eligible")] public void _15_4_4_15__8__b__iii__1() { RunFile(@"15.4.4.15-8-b-iii-1.js"); }
[Test(Description = "Array.prototype.lastIndexOf returns without visiting subsequent element once search value is found")] public void _15_4_4_15__8__b__iii__2() { RunFile(@"15.4.4.15-8-b-iii-2.js"); }
[Test(Description = "Array.prototype.lastIndexOf returns -1 for elements not present")] public void _15_4_4_15__9__1() { RunFile(@"15.4.4.15-9-1.js"); }
[Test(Description = "Array.prototype.lastIndexOf returns -1 if \'length\' is 0 and does not access any other properties")] public void _15_4_4_15__9__2() { RunFile(@"15.4.4.15-9-2.js"); }
}
} | 185.063107 | 280 | 0.70687 | [
"Apache-2.0"
] | Varshit07/IronJS | Src/Tests/UnitTests/IE9/chapter15/_15_4/_15_4_4/_15_4_4_15_Tests.cs | 38,123 | C# |
using UnityEngine;
using System.Collections;
public class CameraController : MonoBehaviour
{
public GameObject floor;
Vector3 offset;
float highest;
// Use this for initialization
void Start()
{
highest = -15.0f;
}
// Update is called once per frame
void Update()
{
GameObject[] allTetros = GameObject.FindGameObjectsWithTag("Tetro"); //returns GameObject[]
float height = 0;
highest = -15.0f;
foreach (GameObject o in allTetros)
{
if (o.GetComponent<Rigidbody2D>().velocity.y < -4.0f)
{
}
else {
height = o.transform.position.y;
if (height > highest)
{
highest = height - 1.0f;
}
}
}
}
void LateUpdate()
{
if (transform.position.y - 5.0f < highest)
{
transform.position += new Vector3(0, 0.01f, 0);
}
else if (transform.position.y - 15.0f > highest)
{
transform.position -= new Vector3(0, 0.01f, 0);
}
}
} | 22.92 | 100 | 0.499127 | [
"Apache-2.0"
] | RutgersMobileAppClass/Tetwis | Assets/Scripts/CameraController.cs | 1,148 | C# |
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.EntityFrameworkCore.TestUtilities;
using Xunit;
namespace Microsoft.EntityFrameworkCore.Query
{
public class MappingQuerySqliteTest : MappingQueryTestBase<MappingQuerySqliteTest.MappingQuerySqliteFixture>
{
public MappingQuerySqliteTest(MappingQuerySqliteFixture fixture)
: base(fixture)
{
}
public override void All_customers()
{
base.All_customers();
Assert.Contains(
@"SELECT ""c"".""CustomerID"", ""c"".""CompanyName""" + EOL +
@"FROM ""Customers"" AS ""c""",
Sql);
}
public override void All_employees()
{
base.All_employees();
Assert.Contains(
@"SELECT ""e"".""EmployeeID"", ""e"".""City""" + EOL +
@"FROM ""Employees"" AS ""e""",
Sql);
}
public override void All_orders()
{
base.All_orders();
Assert.Contains(
@"SELECT ""o"".""OrderID"", ""o"".""ShipVia""" + EOL +
@"FROM ""Orders"" AS ""o""",
Sql);
}
public override void Project_nullable_enum()
{
base.Project_nullable_enum();
Assert.Contains(
@"SELECT ""o"".""ShipVia""" + EOL +
@"FROM ""Orders"" AS ""o""",
Sql);
}
private static readonly string EOL = Environment.NewLine;
private string Sql => Fixture.TestSqlLoggerFactory.Sql;
public class MappingQuerySqliteFixture : MappingQueryFixtureBase
{
protected override ITestStoreFactory TestStoreFactory => SqliteNorthwindTestStoreFactory.Instance;
protected override string DatabaseSchema { get; } = null;
protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext context)
{
base.OnModelCreating(modelBuilder, context);
modelBuilder.Entity<MappedCustomer>(
e =>
{
e.Property(c => c.CompanyName2).Metadata.SetColumnName("CompanyName");
e.Metadata.SetTableName("Customers");
});
}
}
}
}
| 30.82716 | 112 | 0.54185 | [
"Apache-2.0"
] | CharlieRoseMarie/EntityFrameworkCore | test/EFCore.Sqlite.FunctionalTests/Query/MappingQuerySqliteTest.cs | 2,497 | C# |
using System;
using RestSharp;
using Newtonsoft.Json;
namespace Rave.NET.Models.Subscriptions
{
public class ListSubscriptions
{
public ListSubscriptions()
{
}
public string doListSubscriptions(String seckey)
{
var client = new RestClient("https://api.ravepay.co/v2/gpx/subscriptions/query?seckey="+ seckey + "");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("content-type", "application/json");
IRestResponse response = client.Execute(request);
return response.Content;
}
}
}
| 27.041667 | 114 | 0.613251 | [
"MIT"
] | DaraOladapo/Rave.NET | Rave.NET/Models/Subscriptions/ListSubscriptions.cs | 651 | C# |
using Android.App;
using Android.Content.PM;
using Android.OS;
namespace QRManager.Droid
{
[Activity(Label = "QRManager", Icon = "@drawable/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
protected override void OnCreate(Bundle bundle)
{
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;
base.OnCreate(bundle);
global::Xamarin.Forms.Forms.Init(this, bundle);
LoadApplication(new App());
}
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, Permission[] grantResults)
{
global::ZXing.Net.Mobile.Android.PermissionsHandler.OnRequestPermissionsResult(requestCode, permissions, grantResults);
}
}
}
| 36.555556 | 186 | 0.691996 | [
"MIT"
] | MohaSalem/QRManager | QRManager/QRManager/QRManager.Android/MainActivity.cs | 989 | C# |
//---------------------------------------------------------------------
// <copyright file="NativeMethods.cs" company="Microsoft Corporation">
// Copyright (c) 1999, Microsoft Corporation. All rights reserved.
// </copyright>
// <summary>
// Part of the Deployment Tools Foundation project.
// </summary>
//---------------------------------------------------------------------
namespace Microsoft.PackageManagement.Archivers.Internal.Compression.Cab
{
using System;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.InteropServices;
using System.Security;
#if !CORECLR
using System.Security.Permissions;
#endif
/// <summary>
/// Native DllImport methods and related structures and constants used for
/// cabinet creation and extraction via cabinet.dll.
/// </summary>
internal static class NativeMethods
{
/// <summary>
/// A direct import of constants, enums, structures, delegates, and functions from fci.h.
/// Refer to comments in fci.h for documentation.
/// </summary>
internal static class FCI
{
internal const int MIN_DISK = 32768;
internal const int MAX_DISK = Int32.MaxValue;
internal const int MAX_FOLDER = 0x7FFF8000;
internal const int MAX_FILENAME = 256;
internal const int MAX_CABINET_NAME = 256;
internal const int MAX_CAB_PATH = 256;
internal const int MAX_DISK_NAME = 256;
internal const int CPU_80386 = 1;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] internal delegate IntPtr PFNALLOC(int cb);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] internal delegate void PFNFREE(IntPtr pv);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] internal delegate int PFNOPEN(string path, int oflag, int pmode, out int err, IntPtr pv);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] internal delegate int PFNREAD(int fileHandle, IntPtr memory, int cb, out int err, IntPtr pv);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] internal delegate int PFNWRITE(int fileHandle, IntPtr memory, int cb, out int err, IntPtr pv);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] internal delegate int PFNCLOSE(int fileHandle, out int err, IntPtr pv);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] internal delegate int PFNSEEK(int fileHandle, int dist, int seekType, out int err, IntPtr pv);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] internal delegate int PFNDELETE(string path, out int err, IntPtr pv);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] internal delegate int PFNGETNEXTCABINET(IntPtr pccab, uint cbPrevCab, IntPtr pv);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] internal delegate int PFNFILEPLACED(IntPtr pccab, string path, long fileSize, int continuation, IntPtr pv);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] internal delegate int PFNGETOPENINFO(string path, out short date, out short time, out short pattribs, out int err, IntPtr pv);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] internal delegate int PFNSTATUS(STATUS typeStatus, uint cb1, uint cb2, IntPtr pv);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] internal delegate int PFNGETTEMPFILE(IntPtr tempNamePtr, int tempNameSize, IntPtr pv);
/// <summary>
/// Error codes that can be returned by FCI.
/// </summary>
internal enum ERROR : int
{
NONE,
OPEN_SRC,
READ_SRC,
ALLOC_FAIL,
TEMP_FILE,
BAD_COMPR_TYPE,
CAB_FILE,
USER_ABORT,
MCI_FAIL,
}
/// <summary>
/// FCI compression algorithm types and parameters.
/// </summary>
internal enum TCOMP : ushort
{
MASK_TYPE = 0x000F,
TYPE_NONE = 0x0000,
TYPE_MSZIP = 0x0001,
TYPE_QUANTUM = 0x0002,
TYPE_LZX = 0x0003,
BAD = 0x000F,
MASK_LZX_WINDOW = 0x1F00,
LZX_WINDOW_LO = 0x0F00,
LZX_WINDOW_HI = 0x1500,
SHIFT_LZX_WINDOW = 0x0008,
MASK_QUANTUM_LEVEL = 0x00F0,
QUANTUM_LEVEL_LO = 0x0010,
QUANTUM_LEVEL_HI = 0x0070,
SHIFT_QUANTUM_LEVEL = 0x0004,
MASK_QUANTUM_MEM = 0x1F00,
QUANTUM_MEM_LO = 0x0A00,
QUANTUM_MEM_HI = 0x1500,
SHIFT_QUANTUM_MEM = 0x0008,
MASK_RESERVED = 0xE000,
}
/// <summary>
/// Reason for FCI status callback.
/// </summary>
internal enum STATUS : uint
{
FILE = 0,
FOLDER = 1,
CABINET = 2,
}
[SuppressMessage("Microsoft.Globalization", "CA2101:SpecifyMarshalingForPInvokeStringArguments")]
[DllImport("cabinet.dll", EntryPoint = "FCICreate", CharSet = CharSet.Ansi, BestFitMapping = false, ThrowOnUnmappableChar = true, CallingConvention = CallingConvention.Cdecl)]
internal static extern Handle Create(IntPtr perf, PFNFILEPLACED pfnfcifp, PFNALLOC pfna, PFNFREE pfnf, PFNOPEN pfnopen, PFNREAD pfnread, PFNWRITE pfnwrite, PFNCLOSE pfnclose, PFNSEEK pfnseek, PFNDELETE pfndelete, PFNGETTEMPFILE pfnfcigtf, [MarshalAs(UnmanagedType.LPStruct)] CCAB pccab, IntPtr pv);
[DllImport("cabinet.dll", EntryPoint = "FCIAddFile", CharSet = CharSet.Ansi, BestFitMapping = false, ThrowOnUnmappableChar = true, CallingConvention = CallingConvention.Cdecl)]
internal static extern int AddFile(Handle hfci, string pszSourceFile, IntPtr pszFileName, [MarshalAs(UnmanagedType.Bool)] bool fExecute, PFNGETNEXTCABINET pfnfcignc, PFNSTATUS pfnfcis, PFNGETOPENINFO pfnfcigoi, TCOMP typeCompress);
[DllImport("cabinet.dll", EntryPoint = "FCIFlushCabinet", CharSet = CharSet.Ansi, BestFitMapping = false, ThrowOnUnmappableChar = true, CallingConvention = CallingConvention.Cdecl)]
internal static extern int FlushCabinet(Handle hfci, [MarshalAs(UnmanagedType.Bool)] bool fGetNextCab, PFNGETNEXTCABINET pfnfcignc, PFNSTATUS pfnfcis);
[DllImport("cabinet.dll", EntryPoint = "FCIFlushFolder", CharSet = CharSet.Ansi, BestFitMapping = false, ThrowOnUnmappableChar = true, CallingConvention = CallingConvention.Cdecl)]
internal static extern int FlushFolder(Handle hfci, PFNGETNEXTCABINET pfnfcignc, PFNSTATUS pfnfcis);
#if !CORECLR
[SuppressUnmanagedCodeSecurity]
#endif
[DllImport("cabinet.dll", EntryPoint = "FCIDestroy", CharSet = CharSet.Ansi, BestFitMapping = false, ThrowOnUnmappableChar = true, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.Bool)]
internal static extern bool Destroy(IntPtr hfci);
/// <summary>
/// Cabinet information structure used for FCI initialization and GetNextCabinet callback.
/// </summary>
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
internal class CCAB
{
internal int cb = MAX_DISK;
internal int cbFolderThresh = MAX_FOLDER;
internal int cbReserveCFHeader;
internal int cbReserveCFFolder;
internal int cbReserveCFData;
internal int iCab;
internal int iDisk;
internal int fFailOnIncompressible;
internal short setID;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = MAX_DISK_NAME)] internal string szDisk = String.Empty;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = MAX_CABINET_NAME)] internal string szCab = String.Empty;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = MAX_CAB_PATH)] internal string szCabPath = String.Empty;
}
/// <summary>
/// Ensures that the FCI handle is safely released.
/// </summary>
internal class Handle : SafeHandle
{
/// <summary>
/// Creates a new uninitialized handle. The handle will be initialized
/// when it is marshalled back from native code.
/// </summary>
internal Handle()
: base(IntPtr.Zero, true)
{
}
/// <summary>
/// Checks if the handle is invalid. An FCI handle is invalid when it is zero.
/// </summary>
public override bool IsInvalid
{
get
{
return this.handle == IntPtr.Zero;
}
}
/// <summary>
/// Releases the handle by calling FDIDestroy().
/// </summary>
/// <returns>True if the release succeeded.</returns>
#if !CORECLR
[SecurityPermission(SecurityAction.Assert, UnmanagedCode = true)]
#endif
protected override bool ReleaseHandle()
{
return FCI.Destroy(this.handle);
}
}
}
/// <summary>
/// A direct import of constants, enums, structures, delegates, and functions from fdi.h.
/// Refer to comments in fdi.h for documentation.
/// </summary>
internal static class FDI
{
internal const int MAX_DISK = Int32.MaxValue;
internal const int MAX_FILENAME = 256;
internal const int MAX_CABINET_NAME = 256;
internal const int MAX_CAB_PATH = 256;
internal const int MAX_DISK_NAME = 256;
internal const int CPU_80386 = 1;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] internal delegate IntPtr PFNALLOC(int cb);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] internal delegate void PFNFREE(IntPtr pv);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] internal delegate int PFNOPEN(string path, int oflag, int pmode);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] internal delegate int PFNREAD(int hf, IntPtr pv, int cb);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] internal delegate int PFNWRITE(int hf, IntPtr pv, int cb);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] internal delegate int PFNCLOSE(int hf);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] internal delegate int PFNSEEK(int hf, int dist, int seektype);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] internal delegate int PFNNOTIFY(NOTIFICATIONTYPE fdint, NOTIFICATION fdin);
/// <summary>
/// Error codes that can be returned by FDI.
/// </summary>
internal enum ERROR : int
{
NONE,
CABINET_NOT_FOUND,
NOT_A_CABINET,
UNKNOWN_CABINET_VERSION,
CORRUPT_CABINET,
ALLOC_FAIL,
BAD_COMPR_TYPE,
MDI_FAIL,
TARGET_FILE,
RESERVE_MISMATCH,
WRONG_CABINET,
USER_ABORT,
}
/// <summary>
/// Type of notification message for the FDI Notify callback.
/// </summary>
internal enum NOTIFICATIONTYPE : int
{
CABINET_INFO,
PARTIAL_FILE,
COPY_FILE,
CLOSE_FILE_INFO,
NEXT_CABINET,
ENUMERATE,
}
[DllImport("cabinet.dll", EntryPoint = "FDICreate", CharSet = CharSet.Ansi, BestFitMapping = false, ThrowOnUnmappableChar = true, CallingConvention = CallingConvention.Cdecl)]
internal static extern Handle Create([MarshalAs(UnmanagedType.FunctionPtr)] PFNALLOC pfnalloc, [MarshalAs(UnmanagedType.FunctionPtr)] PFNFREE pfnfree, PFNOPEN pfnopen, PFNREAD pfnread, PFNWRITE pfnwrite, PFNCLOSE pfnclose, PFNSEEK pfnseek, int cpuType, IntPtr perf);
[DllImport("cabinet.dll", EntryPoint = "FDICopy", CharSet = CharSet.Ansi, BestFitMapping = false, ThrowOnUnmappableChar = true, CallingConvention = CallingConvention.Cdecl)]
internal static extern int Copy(Handle hfdi, string pszCabinet, string pszCabPath, int flags, PFNNOTIFY pfnfdin, IntPtr pfnfdid, IntPtr pvUser);
#if !CORECLR
[SuppressUnmanagedCodeSecurity]
#endif
[DllImport("cabinet.dll", EntryPoint = "FDIDestroy", CharSet = CharSet.Ansi, BestFitMapping = false, ThrowOnUnmappableChar = true, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.Bool)]
internal static extern bool Destroy(IntPtr hfdi);
[DllImport("cabinet.dll", EntryPoint = "FDIIsCabinet", CharSet = CharSet.Ansi, BestFitMapping = false, ThrowOnUnmappableChar = true, CallingConvention = CallingConvention.Cdecl)]
[SuppressMessage("Microsoft.Portability", "CA1901:PInvokeDeclarationsShouldBePortable", Justification = "FDI file handles definitely remain 4 bytes on 64bit platforms.")]
internal static extern int IsCabinet(Handle hfdi, int hf, out CABINFO pfdici);
/// <summary>
/// Cabinet information structure filled in by FDI IsCabinet.
/// </summary>
[StructLayout(LayoutKind.Sequential)]
internal struct CABINFO
{
internal int cbCabinet;
internal short cFolders;
internal short cFiles;
internal short setID;
internal short iCabinet;
internal int fReserve;
internal int hasprev;
internal int hasnext;
}
/// <summary>
/// Cabinet notification details passed to the FDI Notify callback.
/// </summary>
[SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses")]
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
internal class NOTIFICATION
{
internal int cb;
internal IntPtr psz1;
internal IntPtr psz2;
internal IntPtr psz3;
internal IntPtr pv;
internal IntPtr hf_ptr;
internal short date;
internal short time;
internal short attribs;
internal short setID;
internal short iCabinet;
internal short iFolder;
internal int fdie;
// Unlike all the other file handles in FCI/FDI, this one is
// actually pointer-sized. Use a property to pretend it isn't.
internal int hf
{
get { return (int)this.hf_ptr; }
}
}
/// <summary>
/// Ensures that the FDI handle is safely released.
/// </summary>
internal class Handle : SafeHandle
{
/// <summary>
/// Creates a new uninitialized handle. The handle will be initialized
/// when it is marshalled back from native code.
/// </summary>
internal Handle()
: base(IntPtr.Zero, true)
{
}
/// <summary>
/// Checks if the handle is invalid. An FDI handle is invalid when it is zero.
/// </summary>
public override bool IsInvalid
{
get
{
return this.handle == IntPtr.Zero;
}
}
/// <summary>
/// Releases the handle by calling FDIDestroy().
/// </summary>
/// <returns>True if the release succeeded.</returns>
protected override bool ReleaseHandle()
{
return FDI.Destroy(this.handle);
}
}
}
/// <summary>
/// Error info structure for FCI and FDI.
/// </summary>
/// <remarks>Before being passed to FCI or FDI, this structure is
/// pinned in memory via a GCHandle. The pinning is necessary
/// to be able to read the results, since the ERF structure doesn't
/// get marshalled back out after an error.</remarks>
[StructLayout(LayoutKind.Sequential)]
internal class ERF
{
private int erfOper;
private int erfType;
private int fError;
/// <summary>
/// Gets or sets the cabinet error code.
/// </summary>
internal int Oper
{
get
{
return this.erfOper;
}
set
{
this.erfOper = value;
}
}
/// <summary>
/// Gets or sets the Win32 error code.
/// </summary>
internal int Type
{
get
{
return this.erfType;
}
set
{
this.erfType = value;
}
}
/// <summary>
/// GCHandle doesn't like the bool type, so use an int underneath.
/// </summary>
internal bool Error
{
get
{
return this.fError != 0;
}
set
{
this.fError = value ? 1 : 0;
}
}
/// <summary>
/// Clears the error information.
/// </summary>
internal void Clear()
{
this.Oper = 0;
this.Type = 0;
this.Error = false;
}
}
}
}
| 44.761792 | 311 | 0.55593 | [
"MIT"
] | DalavanCloud/oneget | src/Microsoft.PackageManagement.ArchiverProviders/Compression/Cab/NativeMethods.cs | 18,979 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Helpers;
namespace VigenereCipher {
public abstract class BaseVigenere {
public string Encode(string plainText, string keyword) {
// Convert text values to corresponding integer values.
IEnumerable<int> textValues = Utilities.GetValueArray(plainText);
IEnumerable<int> keywordValues = Utilities.GetValueArray(keyword);
// Obtain cipher values from appling an operation between text values and keyword value.
// Different ciphers apply different operations.
// Vigenere: C = (P + K) % 26
// Beaufort: C = (K - P) % 26
// Variant: C = (P - K) % 26
int[] cipherValues = new int[plainText.Length];
for (int i = 0; i < plainText.Length; i++) {
cipherValues[i] = CalculateEncodeValue(textValues.ElementAt(i), keywordValues.ElementAt(i % keyword.Length));
}
// Convert cipher values to text.
return Utilities.GetString(cipherValues);
}
public string Decode(string cipherText, string keyword) {
// Convert text values to corresponding integer values.
IEnumerable<int> textValues = Utilities.GetValueArray(cipherText);
IEnumerable<int> keywordValues = Utilities.GetValueArray(keyword);
// Obtain plain text values from appling an operation between cipher values and keyword value.
// Different ciphers apply different operations.
// Vigenere: P = (C - K) % 26
// Beaufort: P = (K - C) % 26
// Variant: P = (C + K) % 26
int[] plainTextValues = new int[cipherText.Length];
for (int i = 0; i < cipherText.Length; i++) {
plainTextValues[i] = CalculateDecodeValue(textValues.ElementAt(i), keywordValues.ElementAt(i % keyword.Length));
}
// Convert plain text values to text.
return Utilities.GetString(plainTextValues);
}
// These abstract functions are implemented in Vigenere, Beaufort and Variant classes.
protected abstract int CalculateEncodeValue(int plainTextValue, int keywordValue);
protected abstract int CalculateDecodeValue(int cipherTextValue, int keywordValue);
}
}
| 45.849057 | 128 | 0.62716 | [
"MIT"
] | qua11q7/Cryptography | Vigenere/BaseVigenere.cs | 2,432 | C# |
namespace Seal
{
partial class ServerManager
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ServerManager));
this.mainMenuStrip = new System.Windows.Forms.MenuStrip();
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.dataSourceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.noSQLdataSourceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.emailOutputDeviceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.fileServerDeviceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.openSourceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.openDeviceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.reloadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.saveAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.closeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.configurationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.mainTreeView = new System.Windows.Forms.TreeView();
this.treeContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
this.addToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.removeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.addFromToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.copyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.removeRootToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.sortColumnAlphaOrderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.sortColumnSQLOrderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.mainImageList = new System.Windows.Forms.ImageList(this.components);
this.mainSplitContainer = new System.Windows.Forms.SplitContainer();
this.mainPropertyGrid = new System.Windows.Forms.PropertyGrid();
this.mainToolStrip = new System.Windows.Forms.ToolStrip();
this.saveToolStripButton = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
this.openFolderToolStripButton = new System.Windows.Forms.ToolStripButton();
this.openTasksToolStripButton = new System.Windows.Forms.ToolStripButton();
this.openEventsToolStripButton = new System.Windows.Forms.ToolStripButton();
this.mainMenuStrip.SuspendLayout();
this.treeContextMenuStrip.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.mainSplitContainer)).BeginInit();
this.mainSplitContainer.Panel1.SuspendLayout();
this.mainSplitContainer.Panel2.SuspendLayout();
this.mainSplitContainer.SuspendLayout();
this.mainToolStrip.SuspendLayout();
this.SuspendLayout();
//
// mainMenuStrip
//
this.mainMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.fileToolStripMenuItem,
this.configurationToolStripMenuItem,
this.toolsToolStripMenuItem,
this.helpToolStripMenuItem});
this.mainMenuStrip.Location = new System.Drawing.Point(0, 0);
this.mainMenuStrip.Name = "mainMenuStrip";
this.mainMenuStrip.Padding = new System.Windows.Forms.Padding(7, 2, 0, 2);
this.mainMenuStrip.Size = new System.Drawing.Size(1423, 24);
this.mainMenuStrip.TabIndex = 0;
this.mainMenuStrip.Text = "mainMenuStrip";
//
// fileToolStripMenuItem
//
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.newToolStripMenuItem,
this.openSourceToolStripMenuItem,
this.openDeviceToolStripMenuItem,
this.reloadToolStripMenuItem,
this.saveToolStripMenuItem,
this.saveAsToolStripMenuItem,
this.closeToolStripMenuItem,
this.toolStripSeparator1,
this.exitToolStripMenuItem});
this.fileToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.White;
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
this.fileToolStripMenuItem.Text = "File";
//
// newToolStripMenuItem
//
this.newToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.dataSourceToolStripMenuItem,
this.noSQLdataSourceToolStripMenuItem,
this.toolStripSeparator2,
this.emailOutputDeviceToolStripMenuItem,
this.fileServerDeviceToolStripMenuItem});
this.newToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("newToolStripMenuItem.Image")));
this.newToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Fuchsia;
this.newToolStripMenuItem.Name = "newToolStripMenuItem";
this.newToolStripMenuItem.Size = new System.Drawing.Size(182, 22);
this.newToolStripMenuItem.Text = "New";
//
// dataSourceToolStripMenuItem
//
this.dataSourceToolStripMenuItem.Image = global::Seal.Properties.Resources.database;
this.dataSourceToolStripMenuItem.Name = "dataSourceToolStripMenuItem";
this.dataSourceToolStripMenuItem.Size = new System.Drawing.Size(206, 22);
this.dataSourceToolStripMenuItem.Text = "SQL Data Source";
this.dataSourceToolStripMenuItem.Click += new System.EventHandler(this.newToolStripMenuItem_Click);
//
// noSQLdataSourceToolStripMenuItem
//
this.noSQLdataSourceToolStripMenuItem.Image = global::Seal.Properties.Resources.nosql;
this.noSQLdataSourceToolStripMenuItem.Name = "noSQLdataSourceToolStripMenuItem";
this.noSQLdataSourceToolStripMenuItem.Size = new System.Drawing.Size(206, 22);
this.noSQLdataSourceToolStripMenuItem.Text = "LINQ Data Source";
this.noSQLdataSourceToolStripMenuItem.Click += new System.EventHandler(this.newToolStripMenuItem_Click);
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(203, 6);
//
// emailOutputDeviceToolStripMenuItem
//
this.emailOutputDeviceToolStripMenuItem.Image = global::Seal.Properties.Resources.device;
this.emailOutputDeviceToolStripMenuItem.Name = "emailOutputDeviceToolStripMenuItem";
this.emailOutputDeviceToolStripMenuItem.Size = new System.Drawing.Size(206, 22);
this.emailOutputDeviceToolStripMenuItem.Text = "Email Output Device";
this.emailOutputDeviceToolStripMenuItem.Click += new System.EventHandler(this.newToolStripMenuItem_Click);
//
// fileServerDeviceToolStripMenuItem
//
this.fileServerDeviceToolStripMenuItem.Image = global::Seal.Properties.Resources.fileserver;
this.fileServerDeviceToolStripMenuItem.Name = "fileServerDeviceToolStripMenuItem";
this.fileServerDeviceToolStripMenuItem.Size = new System.Drawing.Size(206, 22);
this.fileServerDeviceToolStripMenuItem.Text = "File Server Output Device";
this.fileServerDeviceToolStripMenuItem.Click += new System.EventHandler(this.newToolStripMenuItem_Click);
//
// openSourceToolStripMenuItem
//
this.openSourceToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("openSourceToolStripMenuItem.Image")));
this.openSourceToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Fuchsia;
this.openSourceToolStripMenuItem.Name = "openSourceToolStripMenuItem";
this.openSourceToolStripMenuItem.Size = new System.Drawing.Size(182, 22);
this.openSourceToolStripMenuItem.Text = "Open Data Source";
//
// openDeviceToolStripMenuItem
//
this.openDeviceToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("openDeviceToolStripMenuItem.Image")));
this.openDeviceToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Fuchsia;
this.openDeviceToolStripMenuItem.Name = "openDeviceToolStripMenuItem";
this.openDeviceToolStripMenuItem.Size = new System.Drawing.Size(182, 22);
this.openDeviceToolStripMenuItem.Text = "Open Output Device";
//
// reloadToolStripMenuItem
//
this.reloadToolStripMenuItem.Name = "reloadToolStripMenuItem";
this.reloadToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.R)));
this.reloadToolStripMenuItem.Size = new System.Drawing.Size(182, 22);
this.reloadToolStripMenuItem.Text = "Reload";
this.reloadToolStripMenuItem.Click += new System.EventHandler(this.reloadToolStripMenuItem_Click);
//
// saveToolStripMenuItem
//
this.saveToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("saveToolStripMenuItem.Image")));
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
this.saveToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));
this.saveToolStripMenuItem.Size = new System.Drawing.Size(182, 22);
this.saveToolStripMenuItem.Text = "Save";
this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click);
//
// saveAsToolStripMenuItem
//
this.saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem";
this.saveAsToolStripMenuItem.ShortcutKeyDisplayString = "";
this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(182, 22);
this.saveAsToolStripMenuItem.Text = "Save As...";
this.saveAsToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click);
//
// closeToolStripMenuItem
//
this.closeToolStripMenuItem.Name = "closeToolStripMenuItem";
this.closeToolStripMenuItem.Size = new System.Drawing.Size(182, 22);
this.closeToolStripMenuItem.Text = "Close";
this.closeToolStripMenuItem.Click += new System.EventHandler(this.closeToolStripMenuItem_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(179, 6);
//
// exitToolStripMenuItem
//
this.exitToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("exitToolStripMenuItem.Image")));
this.exitToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Fuchsia;
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
this.exitToolStripMenuItem.Size = new System.Drawing.Size(182, 22);
this.exitToolStripMenuItem.Text = "Exit";
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
//
// configurationToolStripMenuItem
//
this.configurationToolStripMenuItem.Name = "configurationToolStripMenuItem";
this.configurationToolStripMenuItem.Size = new System.Drawing.Size(93, 20);
this.configurationToolStripMenuItem.Text = "Configuration";
//
// toolsToolStripMenuItem
//
this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem";
this.toolsToolStripMenuItem.Size = new System.Drawing.Size(46, 20);
this.toolsToolStripMenuItem.Text = "Tools";
//
// helpToolStripMenuItem
//
this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.aboutToolStripMenuItem});
this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
this.helpToolStripMenuItem.Text = "Help";
//
// aboutToolStripMenuItem
//
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(116, 22);
this.aboutToolStripMenuItem.Text = "About...";
this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);
//
// mainTreeView
//
this.mainTreeView.AllowDrop = true;
this.mainTreeView.ContextMenuStrip = this.treeContextMenuStrip;
this.mainTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
this.mainTreeView.FullRowSelect = true;
this.mainTreeView.HideSelection = false;
this.mainTreeView.ImageIndex = 0;
this.mainTreeView.ImageList = this.mainImageList;
this.mainTreeView.Location = new System.Drawing.Point(0, 0);
this.mainTreeView.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.mainTreeView.Name = "mainTreeView";
this.mainTreeView.SelectedImageIndex = 0;
this.mainTreeView.Size = new System.Drawing.Size(285, 721);
this.mainTreeView.TabIndex = 1;
this.mainTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.mainTreeView_AfterSelect);
this.mainTreeView.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.mainTreeView_NodeMouseClick);
this.mainTreeView.MouseUp += new System.Windows.Forms.MouseEventHandler(this.mainTreeView_MouseUp);
this.mainTreeView.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.mainTreeView_ItemDrag);
this.mainTreeView.DragDrop += new System.Windows.Forms.DragEventHandler(this.mainTreeView_DragDrop);
this.mainTreeView.DragEnter += new System.Windows.Forms.DragEventHandler(this.mainTreeView_DragEnter);
this.mainTreeView.DragOver += new System.Windows.Forms.DragEventHandler(this.mainTreeView_DragOver);
//
// treeContextMenuStrip
//
this.treeContextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.addToolStripMenuItem,
this.removeToolStripMenuItem,
this.addFromToolStripMenuItem,
this.copyToolStripMenuItem,
this.removeRootToolStripMenuItem,
this.sortColumnAlphaOrderToolStripMenuItem,
this.sortColumnSQLOrderToolStripMenuItem});
this.treeContextMenuStrip.Name = "treeContextMenuStrip";
this.treeContextMenuStrip.Size = new System.Drawing.Size(233, 158);
this.treeContextMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(this.treeContextMenuStrip_Opening);
//
// addToolStripMenuItem
//
this.addToolStripMenuItem.Name = "addToolStripMenuItem";
this.addToolStripMenuItem.Size = new System.Drawing.Size(232, 22);
this.addToolStripMenuItem.Text = "Add";
this.addToolStripMenuItem.Click += new System.EventHandler(this.addToolStripMenuItem_Click);
//
// removeToolStripMenuItem
//
this.removeToolStripMenuItem.Name = "removeToolStripMenuItem";
this.removeToolStripMenuItem.Size = new System.Drawing.Size(232, 22);
this.removeToolStripMenuItem.Text = "Remove...";
this.removeToolStripMenuItem.Click += new System.EventHandler(this.removeToolStripMenuItem_Click);
//
// addFromToolStripMenuItem
//
this.addFromToolStripMenuItem.Name = "addFromToolStripMenuItem";
this.addFromToolStripMenuItem.Size = new System.Drawing.Size(232, 22);
this.addFromToolStripMenuItem.Text = "Add from Catalog...";
this.addFromToolStripMenuItem.Click += new System.EventHandler(this.addFromToolStripMenuItem_Click);
//
// copyToolStripMenuItem
//
this.copyToolStripMenuItem.Name = "copyToolStripMenuItem";
this.copyToolStripMenuItem.Size = new System.Drawing.Size(232, 22);
this.copyToolStripMenuItem.Text = "Copy";
this.copyToolStripMenuItem.Click += new System.EventHandler(this.copyToolStripMenuItem_Click);
//
// removeRootToolStripMenuItem
//
this.removeRootToolStripMenuItem.Name = "removeRootToolStripMenuItem";
this.removeRootToolStripMenuItem.Size = new System.Drawing.Size(232, 22);
this.removeRootToolStripMenuItem.Text = "Remove Root";
this.removeRootToolStripMenuItem.Click += new System.EventHandler(this.removeRootToolStripMenuItem_Click);
//
// sortColumnAlphaOrderToolStripMenuItem
//
this.sortColumnAlphaOrderToolStripMenuItem.Name = "sortColumnAlphaOrderToolStripMenuItem";
this.sortColumnAlphaOrderToolStripMenuItem.Size = new System.Drawing.Size(232, 22);
this.sortColumnAlphaOrderToolStripMenuItem.Text = "Sort Columns by Name ";
this.sortColumnAlphaOrderToolStripMenuItem.Click += new System.EventHandler(this.sortColumnsToolStripMenuItem_Click);
//
// sortColumnSQLOrderToolStripMenuItem
//
this.sortColumnSQLOrderToolStripMenuItem.Name = "sortColumnSQLOrderToolStripMenuItem";
this.sortColumnSQLOrderToolStripMenuItem.Size = new System.Drawing.Size(232, 22);
this.sortColumnSQLOrderToolStripMenuItem.Text = "Sort Columns by SQL position";
this.sortColumnSQLOrderToolStripMenuItem.Click += new System.EventHandler(this.sortColumnsToolStripMenuItem_Click);
//
// mainImageList
//
this.mainImageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit;
this.mainImageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("mainImageList.ImageStream")));
this.mainImageList.TransparentColor = System.Drawing.Color.Transparent;
this.mainImageList.Images.SetKeyName(0, "database.png");
this.mainImageList.Images.SetKeyName(1, "connection.png");
this.mainImageList.Images.SetKeyName(2, "folder.png");
this.mainImageList.Images.SetKeyName(3, "label.png");
this.mainImageList.Images.SetKeyName(4, "table.png");
this.mainImageList.Images.SetKeyName(5, "join.png");
this.mainImageList.Images.SetKeyName(6, "enum.png");
this.mainImageList.Images.SetKeyName(7, "element.png");
this.mainImageList.Images.SetKeyName(8, "device.png");
this.mainImageList.Images.SetKeyName(9, "nosql.png");
this.mainImageList.Images.SetKeyName(10, "fileserver.png");
this.mainImageList.Images.SetKeyName(11, "link.png");
//
// mainSplitContainer
//
this.mainSplitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.mainSplitContainer.Location = new System.Drawing.Point(0, 60);
this.mainSplitContainer.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.mainSplitContainer.Name = "mainSplitContainer";
//
// mainSplitContainer.Panel1
//
this.mainSplitContainer.Panel1.Controls.Add(this.mainTreeView);
//
// mainSplitContainer.Panel2
//
this.mainSplitContainer.Panel2.Controls.Add(this.mainPropertyGrid);
this.mainSplitContainer.Size = new System.Drawing.Size(1423, 721);
this.mainSplitContainer.SplitterDistance = 285;
this.mainSplitContainer.SplitterWidth = 5;
this.mainSplitContainer.TabIndex = 3;
//
// mainPropertyGrid
//
this.mainPropertyGrid.Dock = System.Windows.Forms.DockStyle.Fill;
this.mainPropertyGrid.Location = new System.Drawing.Point(0, 0);
this.mainPropertyGrid.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.mainPropertyGrid.Name = "mainPropertyGrid";
this.mainPropertyGrid.Size = new System.Drawing.Size(1133, 721);
this.mainPropertyGrid.TabIndex = 0;
this.mainPropertyGrid.ToolbarVisible = false;
this.mainPropertyGrid.PropertyValueChanged += new System.Windows.Forms.PropertyValueChangedEventHandler(this.mainPropertyGrid_PropertyValueChanged);
//
// mainToolStrip
//
this.mainToolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.saveToolStripButton,
this.toolStripSeparator8,
this.openFolderToolStripButton,
this.openTasksToolStripButton,
this.openEventsToolStripButton});
this.mainToolStrip.Location = new System.Drawing.Point(0, 24);
this.mainToolStrip.Name = "mainToolStrip";
this.mainToolStrip.Size = new System.Drawing.Size(1423, 25);
this.mainToolStrip.TabIndex = 32;
//
// saveToolStripButton
//
this.saveToolStripButton.Image = global::Seal.Properties.Resources.save;
this.saveToolStripButton.ImageTransparentColor = System.Drawing.Color.Black;
this.saveToolStripButton.Name = "saveToolStripButton";
this.saveToolStripButton.Size = new System.Drawing.Size(51, 22);
this.saveToolStripButton.Text = "Save";
this.saveToolStripButton.Click += new System.EventHandler(this.saveToolStripMenuItem_Click);
//
// toolStripSeparator8
//
this.toolStripSeparator8.Name = "toolStripSeparator8";
this.toolStripSeparator8.Size = new System.Drawing.Size(6, 25);
//
// openFolderToolStripButton
//
this.openFolderToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("openFolderToolStripButton.Image")));
this.openFolderToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.openFolderToolStripButton.Name = "openFolderToolStripButton";
this.openFolderToolStripButton.Size = new System.Drawing.Size(92, 22);
this.openFolderToolStripButton.Text = "Open Folder";
this.openFolderToolStripButton.ToolTipText = "Open Repository Folder in Windows Explorer";
this.openFolderToolStripButton.Click += new System.EventHandler(this.openFolderToolStripButton_Click);
//
// openTasksToolStripButton
//
this.openTasksToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("openTasksToolStripButton.Image")));
this.openTasksToolStripButton.ImageTransparentColor = System.Drawing.Color.White;
this.openTasksToolStripButton.Name = "openTasksToolStripButton";
this.openTasksToolStripButton.Size = new System.Drawing.Size(107, 22);
this.openTasksToolStripButton.Text = " Task Scheduler";
this.openTasksToolStripButton.ToolTipText = "Run the Task Scheduler Microsoft Management Console";
this.openTasksToolStripButton.Click += new System.EventHandler(this.openTasksToolStripButton_Click);
//
// openEventsToolStripButton
//
this.openEventsToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("openEventsToolStripButton.Image")));
this.openEventsToolStripButton.ImageTransparentColor = System.Drawing.Color.White;
this.openEventsToolStripButton.Name = "openEventsToolStripButton";
this.openEventsToolStripButton.Size = new System.Drawing.Size(94, 22);
this.openEventsToolStripButton.Text = "Event Viewer";
this.openEventsToolStripButton.ToolTipText = "Run the Event Viewer Microsoft Management Console";
this.openEventsToolStripButton.Click += new System.EventHandler(this.openTasksToolStripButton_Click);
//
// ServerManager
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1423, 781);
this.Controls.Add(this.mainToolStrip);
this.Controls.Add(this.mainSplitContainer);
this.Controls.Add(this.mainMenuStrip);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.mainMenuStrip;
this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.Name = "ServerManager";
this.Text = "Seal Server Manager";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ServerManager_FormClosing);
this.Load += new System.EventHandler(this.ServerManager_Load);
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ServerManager_KeyDown);
this.mainMenuStrip.ResumeLayout(false);
this.mainMenuStrip.PerformLayout();
this.treeContextMenuStrip.ResumeLayout(false);
this.mainSplitContainer.Panel1.ResumeLayout(false);
this.mainSplitContainer.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.mainSplitContainer)).EndInit();
this.mainSplitContainer.ResumeLayout(false);
this.mainToolStrip.ResumeLayout(false);
this.mainToolStrip.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.MenuStrip mainMenuStrip;
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem saveAsToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
private System.Windows.Forms.TreeView mainTreeView;
private System.Windows.Forms.SplitContainer mainSplitContainer;
private System.Windows.Forms.ContextMenuStrip treeContextMenuStrip;
private System.Windows.Forms.ToolStripMenuItem addToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem removeToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem openSourceToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem closeToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem openDeviceToolStripMenuItem;
private System.Windows.Forms.PropertyGrid mainPropertyGrid;
private System.Windows.Forms.ImageList mainImageList;
private System.Windows.Forms.ToolStrip mainToolStrip;
private System.Windows.Forms.ToolStripButton saveToolStripButton;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator8;
private System.Windows.Forms.ToolStripMenuItem addFromToolStripMenuItem;
private System.Windows.Forms.ToolStripButton openFolderToolStripButton;
private System.Windows.Forms.ToolStripMenuItem newToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem dataSourceToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem emailOutputDeviceToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
private System.Windows.Forms.ToolStripMenuItem copyToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem toolsToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;
private System.Windows.Forms.ToolStripButton openEventsToolStripButton;
private System.Windows.Forms.ToolStripMenuItem configurationToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem removeRootToolStripMenuItem;
private System.Windows.Forms.ToolStripButton openTasksToolStripButton;
private System.Windows.Forms.ToolStripMenuItem sortColumnAlphaOrderToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem sortColumnSQLOrderToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem noSQLdataSourceToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem fileServerDeviceToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem reloadToolStripMenuItem;
}
}
| 61.729207 | 167 | 0.67848 | [
"Apache-2.0"
] | Superdrug-innovation/Seal-Report | Projects/SealServerManager/ServerManager.Designer.cs | 31,916 | C# |
#region License
// Copyright (c) 2007 James Newton-King
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
namespace Newtonsoft.Json.Tests.TestObjects
{
public class GetOnlyPropertyClass
{
public string Field = "Field";
public string GetOnlyProperty
{
get { return "GetOnlyProperty"; }
}
}
} | 37.648649 | 68 | 0.732233 | [
"MIT"
] | 0xced/Newtonsoft.Json | Src/Newtonsoft.Json.Tests/TestObjects/GetOnlyPropertyClass.cs | 1,393 | C# |
// <auto-generated />
using System;
using MusicHub.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace MusicHub.Data.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20200730210401_AddImageCollIntoSongTable")]
partial class AddImageCollIntoSongTable
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "3.1.5")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("MusicHub.Data.Models.ApplicationUser", b =>
{
b.Property<string>("Id")
.HasColumnType("nvarchar(450)");
b.Property<int>("AccessFailedCount")
.HasColumnType("int");
b.Property<string>("Avatar")
.HasColumnType("nvarchar(max)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreatedOn")
.HasColumnType("datetime2");
b.Property<DateTime?>("DeletedOn")
.HasColumnType("datetime2");
b.Property<string>("Email")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<bool>("EmailConfirmed")
.HasColumnType("bit");
b.Property<string>("Family")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<bool>("LockoutEnabled")
.HasColumnType("bit");
b.Property<DateTimeOffset?>("LockoutEnd")
.HasColumnType("datetimeoffset");
b.Property<DateTime?>("ModifiedOn")
.HasColumnType("datetime2");
b.Property<string>("Name")
.HasColumnType("nvarchar(max)");
b.Property<string>("NormalizedEmail")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("NormalizedUserName")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("PasswordHash")
.HasColumnType("nvarchar(max)");
b.Property<string>("PhoneNumber")
.HasColumnType("nvarchar(max)");
b.Property<bool>("PhoneNumberConfirmed")
.HasColumnType("bit");
b.Property<string>("SecurityStamp")
.HasColumnType("nvarchar(max)");
b.Property<bool>("TwoFactorEnabled")
.HasColumnType("bit");
b.Property<string>("UserName")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("IsDeleted");
b.HasIndex("NormalizedEmail")
.HasName("EmailIndex");
b.HasIndex("NormalizedUserName")
.IsUnique()
.HasName("UserNameIndex")
.HasFilter("[NormalizedUserName] IS NOT NULL");
b.ToTable("AspNetUsers");
});
modelBuilder.Entity("MusicHub.Data.Models.Category", b =>
{
b.Property<string>("Id")
.HasColumnType("nvarchar(450)");
b.Property<DateTime>("CreatedOn")
.HasColumnType("datetime2");
b.Property<DateTime?>("DeletedOn")
.HasColumnType("datetime2");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<DateTime?>("ModifiedOn")
.HasColumnType("datetime2");
b.Property<string>("Name")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("IsDeleted");
b.ToTable("Categories");
});
modelBuilder.Entity("MusicHub.Data.Models.Commentar", b =>
{
b.Property<string>("Id")
.HasColumnType("nvarchar(450)");
b.Property<long>("CountDisLikes")
.HasColumnType("bigint");
b.Property<long>("CountLikes")
.HasColumnType("bigint");
b.Property<DateTime>("CreatedOn")
.HasColumnType("datetime2");
b.Property<DateTime?>("DeletedOn")
.HasColumnType("datetime2");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<DateTime?>("ModifiedOn")
.HasColumnType("datetime2");
b.Property<string>("MusicId")
.HasColumnType("nvarchar(450)");
b.Property<string>("Text")
.HasColumnType("nvarchar(max)");
b.Property<string>("UserId")
.HasColumnType("nvarchar(450)");
b.HasKey("Id");
b.HasIndex("IsDeleted");
b.HasIndex("MusicId");
b.HasIndex("UserId");
b.ToTable("Commentars");
});
modelBuilder.Entity("MusicHub.Data.Models.Order", b =>
{
b.Property<string>("Id")
.HasColumnType("nvarchar(450)");
b.Property<DateTime>("CreatedOn")
.HasColumnType("datetime2");
b.Property<DateTime?>("DeletedOn")
.HasColumnType("datetime2");
b.Property<DateTime>("EndTime")
.HasColumnType("datetime2");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<DateTime?>("ModifiedOn")
.HasColumnType("datetime2");
b.Property<string>("PlanId")
.HasColumnType("nvarchar(450)");
b.Property<string>("UserId")
.HasColumnType("nvarchar(450)");
b.Property<string>("VaucherId")
.HasColumnType("nvarchar(450)");
b.HasKey("Id");
b.HasIndex("IsDeleted");
b.HasIndex("PlanId");
b.HasIndex("UserId");
b.HasIndex("VaucherId");
b.ToTable("Orders");
});
modelBuilder.Entity("MusicHub.Data.Models.Plan", b =>
{
b.Property<string>("Id")
.HasColumnType("nvarchar(450)");
b.Property<DateTime>("CreatedOn")
.HasColumnType("datetime2");
b.Property<DateTime?>("DeletedOn")
.HasColumnType("datetime2");
b.Property<int>("DurationDays")
.HasColumnType("int");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<DateTime?>("ModifiedOn")
.HasColumnType("datetime2");
b.Property<string>("Name")
.HasColumnType("nvarchar(max)");
b.Property<double>("Price")
.HasColumnType("float");
b.Property<string>("Text")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("IsDeleted");
b.ToTable("Plans");
});
modelBuilder.Entity("MusicHub.Data.Models.Playlist", b =>
{
b.Property<string>("Id")
.HasColumnType("nvarchar(450)");
b.Property<string>("ApplicationUserId")
.HasColumnType("nvarchar(450)");
b.Property<string>("CategoryId")
.HasColumnType("nvarchar(450)");
b.Property<DateTime>("CreatedOn")
.HasColumnType("datetime2");
b.Property<DateTime?>("DeletedOn")
.HasColumnType("datetime2");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<DateTime?>("ModifiedOn")
.HasColumnType("datetime2");
b.Property<string>("Name")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("ApplicationUserId");
b.HasIndex("CategoryId");
b.HasIndex("IsDeleted");
b.ToTable("Playlists");
});
modelBuilder.Entity("MusicHub.Data.Models.PlaylistSong", b =>
{
b.Property<string>("Id")
.HasColumnType("nvarchar(450)");
b.Property<DateTime>("CreatedOn")
.HasColumnType("datetime2");
b.Property<DateTime?>("DeletedOn")
.HasColumnType("datetime2");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<DateTime?>("ModifiedOn")
.HasColumnType("datetime2");
b.Property<string>("PlaylistId")
.HasColumnType("nvarchar(450)");
b.Property<string>("SongId")
.HasColumnType("nvarchar(450)");
b.HasKey("Id");
b.HasIndex("IsDeleted");
b.HasIndex("PlaylistId");
b.HasIndex("SongId");
b.ToTable("PlaylistSongs");
});
modelBuilder.Entity("MusicHub.Data.Models.Setting", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<DateTime>("CreatedOn")
.HasColumnType("datetime2");
b.Property<DateTime?>("DeletedOn")
.HasColumnType("datetime2");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<DateTime?>("ModifiedOn")
.HasColumnType("datetime2");
b.Property<string>("Name")
.HasColumnType("nvarchar(max)");
b.Property<string>("Value")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("IsDeleted");
b.ToTable("Settings");
});
modelBuilder.Entity("MusicHub.Data.Models.Song", b =>
{
b.Property<string>("Id")
.HasColumnType("nvarchar(450)");
b.Property<long>("CountDisLikes")
.HasColumnType("bigint");
b.Property<long>("CountLikes")
.HasColumnType("bigint");
b.Property<long>("CountViews")
.HasColumnType("bigint");
b.Property<DateTime>("CreatedOn")
.HasColumnType("datetime2");
b.Property<DateTime?>("DeletedOn")
.HasColumnType("datetime2");
b.Property<string>("Image")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<DateTime?>("ModifiedOn")
.HasColumnType("datetime2");
b.Property<string>("MusicCategoryId")
.HasColumnType("nvarchar(450)");
b.Property<string>("Name")
.HasColumnType("nvarchar(max)");
b.Property<string>("Path")
.HasColumnType("nvarchar(max)");
b.Property<string>("Text")
.HasColumnType("nvarchar(max)");
b.Property<string>("UserId")
.HasColumnType("nvarchar(450)");
b.HasKey("Id");
b.HasIndex("IsDeleted");
b.HasIndex("MusicCategoryId");
b.HasIndex("UserId");
b.ToTable("Songs");
});
modelBuilder.Entity("MusicHub.Data.Models.Vaucher", b =>
{
b.Property<string>("Id")
.HasColumnType("nvarchar(450)");
b.Property<string>("Code")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreatedOn")
.HasColumnType("datetime2");
b.Property<DateTime?>("DeletedOn")
.HasColumnType("datetime2");
b.Property<DateTime>("EndTime")
.HasColumnType("datetime2");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<DateTime?>("ModifiedOn")
.HasColumnType("datetime2");
b.Property<string>("Name")
.HasColumnType("nvarchar(max)");
b.Property<int>("ProcentDiscount")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("IsDeleted");
b.ToTable("Vauchers");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
{
b.Property<string>("Id")
.HasColumnType("nvarchar(450)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("nvarchar(max)");
b.Property<string>("Name")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("NormalizedName")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("NormalizedName")
.IsUnique()
.HasName("RoleNameIndex")
.HasFilter("[NormalizedName] IS NOT NULL");
b.ToTable("AspNetRoles");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<string>("ClaimType")
.HasColumnType("nvarchar(max)");
b.Property<string>("ClaimValue")
.HasColumnType("nvarchar(max)");
b.Property<string>("RoleId")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("AspNetRoleClaims");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<string>("ClaimType")
.HasColumnType("nvarchar(max)");
b.Property<string>("ClaimValue")
.HasColumnType("nvarchar(max)");
b.Property<string>("UserId")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("AspNetUserClaims");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
{
b.Property<string>("LoginProvider")
.HasColumnType("nvarchar(450)");
b.Property<string>("ProviderKey")
.HasColumnType("nvarchar(450)");
b.Property<string>("ProviderDisplayName")
.HasColumnType("nvarchar(max)");
b.Property<string>("UserId")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.HasKey("LoginProvider", "ProviderKey");
b.HasIndex("UserId");
b.ToTable("AspNetUserLogins");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
{
b.Property<string>("UserId")
.HasColumnType("nvarchar(450)");
b.Property<string>("RoleId")
.HasColumnType("nvarchar(450)");
b.HasKey("UserId", "RoleId");
b.HasIndex("RoleId");
b.ToTable("AspNetUserRoles");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
{
b.Property<string>("UserId")
.HasColumnType("nvarchar(450)");
b.Property<string>("LoginProvider")
.HasColumnType("nvarchar(450)");
b.Property<string>("Name")
.HasColumnType("nvarchar(450)");
b.Property<string>("Value")
.HasColumnType("nvarchar(max)");
b.HasKey("UserId", "LoginProvider", "Name");
b.ToTable("AspNetUserTokens");
});
modelBuilder.Entity("MusicHub.Data.Models.Commentar", b =>
{
b.HasOne("MusicHub.Data.Models.Song", "Music")
.WithMany("Commentars")
.HasForeignKey("MusicId");
b.HasOne("MusicHub.Data.Models.ApplicationUser", "User")
.WithMany()
.HasForeignKey("UserId");
});
modelBuilder.Entity("MusicHub.Data.Models.Order", b =>
{
b.HasOne("MusicHub.Data.Models.Plan", "Plan")
.WithMany()
.HasForeignKey("PlanId");
b.HasOne("MusicHub.Data.Models.ApplicationUser", "User")
.WithMany("Orders")
.HasForeignKey("UserId");
b.HasOne("MusicHub.Data.Models.Vaucher", "Vaucher")
.WithMany()
.HasForeignKey("VaucherId");
});
modelBuilder.Entity("MusicHub.Data.Models.Playlist", b =>
{
b.HasOne("MusicHub.Data.Models.ApplicationUser", null)
.WithMany("Playlists")
.HasForeignKey("ApplicationUserId");
b.HasOne("MusicHub.Data.Models.Category", "Category")
.WithMany()
.HasForeignKey("CategoryId");
});
modelBuilder.Entity("MusicHub.Data.Models.PlaylistSong", b =>
{
b.HasOne("MusicHub.Data.Models.Playlist", "Playlist")
.WithMany()
.HasForeignKey("PlaylistId");
b.HasOne("MusicHub.Data.Models.Song", "Song")
.WithMany()
.HasForeignKey("SongId");
});
modelBuilder.Entity("MusicHub.Data.Models.Song", b =>
{
b.HasOne("MusicHub.Data.Models.Category", "MusicCategory")
.WithMany()
.HasForeignKey("MusicCategoryId");
b.HasOne("MusicHub.Data.Models.ApplicationUser", "User")
.WithMany("Songs")
.HasForeignKey("UserId");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
{
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
.WithMany()
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
{
b.HasOne("MusicHub.Data.Models.ApplicationUser", null)
.WithMany("Claims")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
{
b.HasOne("MusicHub.Data.Models.ApplicationUser", null)
.WithMany("Logins")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
{
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
.WithMany()
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("MusicHub.Data.Models.ApplicationUser", null)
.WithMany("Roles")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
{
b.HasOne("MusicHub.Data.Models.ApplicationUser", null)
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
});
#pragma warning restore 612, 618
}
}
}
| 35.23639 | 125 | 0.440943 | [
"MIT"
] | dimitarkole/MusicHub | Project/Data/MusicHub.Data/Migrations/20200730210401_AddImageCollIntoSongTable.Designer.cs | 24,597 | C# |
namespace RadSViseFormi
{
partial class FormUnosNovogStudenta
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.textBoxIme = new System.Windows.Forms.TextBox();
this.textBoxPrezime = new System.Windows.Forms.TextBox();
this.textBoxBrojIndeksa = new System.Windows.Forms.TextBox();
this.comboBoxSmjer = new System.Windows.Forms.ComboBox();
this.dateTimePickerDatumRodjenja = new System.Windows.Forms.DateTimePicker();
this.buttonSnimi = new System.Windows.Forms.Button();
this.buttonOtkaz = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// textBoxIme
//
this.textBoxIme.Location = new System.Drawing.Point(80, 39);
this.textBoxIme.Name = "textBoxIme";
this.textBoxIme.Size = new System.Drawing.Size(200, 23);
this.textBoxIme.TabIndex = 0;
this.textBoxIme.TextChanged += new System.EventHandler(this.textBoxIme_TextChanged);
//
// textBoxPrezime
//
this.textBoxPrezime.Location = new System.Drawing.Point(80, 135);
this.textBoxPrezime.Name = "textBoxPrezime";
this.textBoxPrezime.Size = new System.Drawing.Size(200, 23);
this.textBoxPrezime.TabIndex = 1;
this.textBoxPrezime.TextChanged += new System.EventHandler(this.textBoxPrezime_TextChanged);
//
// textBoxBrojIndeksa
//
this.textBoxBrojIndeksa.Location = new System.Drawing.Point(402, 39);
this.textBoxBrojIndeksa.Name = "textBoxBrojIndeksa";
this.textBoxBrojIndeksa.Size = new System.Drawing.Size(200, 23);
this.textBoxBrojIndeksa.TabIndex = 2;
this.textBoxBrojIndeksa.TextChanged += new System.EventHandler(this.textBoxBrojIndeksa_TextChanged);
//
// comboBoxSmjer
//
this.comboBoxSmjer.FormattingEnabled = true;
this.comboBoxSmjer.Location = new System.Drawing.Point(80, 227);
this.comboBoxSmjer.Name = "comboBoxSmjer";
this.comboBoxSmjer.Size = new System.Drawing.Size(200, 23);
this.comboBoxSmjer.TabIndex = 3;
this.comboBoxSmjer.SelectedIndexChanged += new System.EventHandler(this.comboBoxSmjer_SelectedIndexChanged);
//
// dateTimePickerDatumRodjenja
//
this.dateTimePickerDatumRodjenja.Location = new System.Drawing.Point(402, 135);
this.dateTimePickerDatumRodjenja.Name = "dateTimePickerDatumRodjenja";
this.dateTimePickerDatumRodjenja.Size = new System.Drawing.Size(200, 23);
this.dateTimePickerDatumRodjenja.TabIndex = 4;
this.dateTimePickerDatumRodjenja.ValueChanged += new System.EventHandler(this.dateTimePicker1_ValueChanged);
//
// buttonSnimi
//
this.buttonSnimi.Location = new System.Drawing.Point(80, 305);
this.buttonSnimi.Name = "buttonSnimi";
this.buttonSnimi.Size = new System.Drawing.Size(75, 23);
this.buttonSnimi.TabIndex = 5;
this.buttonSnimi.Text = "Snimi";
this.buttonSnimi.UseVisualStyleBackColor = true;
this.buttonSnimi.Click += new System.EventHandler(this.buttonSnimi_Click);
//
// buttonOtkaz
//
this.buttonOtkaz.Location = new System.Drawing.Point(527, 305);
this.buttonOtkaz.Name = "buttonOtkaz";
this.buttonOtkaz.Size = new System.Drawing.Size(75, 23);
this.buttonOtkaz.TabIndex = 6;
this.buttonOtkaz.Text = "Otkazi";
this.buttonOtkaz.UseVisualStyleBackColor = true;
this.buttonOtkaz.Click += new System.EventHandler(this.buttonOtkaz_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(80, 13);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(27, 15);
this.label1.TabIndex = 7;
this.label1.Text = "Ime";
this.label1.Click += new System.EventHandler(this.label1_Click);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(80, 114);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(49, 15);
this.label2.TabIndex = 8;
this.label2.Text = "Prezime";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(80, 206);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(37, 15);
this.label3.TabIndex = 9;
this.label3.Text = "Smjer";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(402, 13);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(71, 15);
this.label4.TabIndex = 10;
this.label4.Text = "Broj indeksa";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(402, 114);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(89, 15);
this.label5.TabIndex = 11;
this.label5.Text = "Datum rodjenja";
//
// FormUnosNovogStudenta
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.label5);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.buttonOtkaz);
this.Controls.Add(this.buttonSnimi);
this.Controls.Add(this.dateTimePickerDatumRodjenja);
this.Controls.Add(this.comboBoxSmjer);
this.Controls.Add(this.textBoxBrojIndeksa);
this.Controls.Add(this.textBoxPrezime);
this.Controls.Add(this.textBoxIme);
this.Name = "FormUnosNovogStudenta";
this.Text = "FormUnosNovogStudenta";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox textBoxIme;
private System.Windows.Forms.TextBox textBoxPrezime;
private System.Windows.Forms.TextBox textBoxBrojIndeksa;
private System.Windows.Forms.ComboBox comboBoxSmjer;
private System.Windows.Forms.DateTimePicker dateTimePickerDatumRodjenja;
private System.Windows.Forms.Button buttonSnimi;
private System.Windows.Forms.Button buttonOtkaz;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
}
} | 45.953125 | 121 | 0.578601 | [
"MIT"
] | AnteUjcic/RadSViseFormi | RadSViseFormi/RadSViseFormi/FormUnosNovogStudenta.Designer.cs | 8,825 | C# |
using System;
using System.Collections.Generic;
using System.Text;
namespace CorePixelEngine
{
public class PGEX
{
public static PixelGameEngine pge;
}
}
| 14.666667 | 42 | 0.704545 | [
"BSD-3-Clause"
] | jvandervelden/CorePixelEngine | CorePixelEngine.Core/PGEX.cs | 178 | C# |
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
namespace Microsoft.Zelig.Runtime
{
using System;
using System.Collections;
using System.Runtime.CompilerServices;
using Microsoft.Llilum.Devices.Spi;
//--//
public class SpiChannelInfoUwp : ISpiChannelInfoUwp
{
public int ChipSelectLines { get; set; }
public int MaxFreq { get; set; }
public int MinFreq { get; set; }
public bool Supports16 { get; set; }
// In order for the Board assemblies to not take a dependency on the framework,
// we need to set the channel info through a class-specific property and
// expose it through the regular interface
public SpiChannelInfo ChannelInfoKernel { get; set; }
public ISpiChannelInfo ChannelInfo
{
get
{
return ChannelInfoKernel;
}
}
}
[ImplicitInstance]
[ForceDevirtualization]
public abstract class SpiProviderUwp
{
private sealed class EmptySpiProviderUwp : SpiProviderUwp
{
public override SpiChannelInfoUwp GetSpiChannelInfo(string busId)
{
throw new NotImplementedException();
}
public override string[] GetSpiChannels()
{
throw new NotImplementedException();
}
}
public abstract SpiChannelInfoUwp GetSpiChannelInfo(string busId);
public abstract string[] GetSpiChannels();
public static extern SpiProviderUwp Instance
{
[SingletonFactory(Fallback = typeof(EmptySpiProviderUwp))]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
}
}
}
| 28 | 87 | 0.608844 | [
"MIT"
] | NETMF/llilum | Zelig/Zelig/RunTime/Zelig/Kernel/FrameworkOverrides_Windows/Devices/Spi/SpiProviderUwp.cs | 1,766 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace CIMOB_IPS.Views.Application
{
public class IndexModel : PageModel
{
public void OnGet()
{
}
}
} | 19.625 | 42 | 0.710191 | [
"Apache-2.0"
] | TheSevenDev/ESW---Projecto | CIMOB_IPS/Views/Application/New.cshtml.cs | 314 | C# |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[System.Serializable] //allows this to show up in the inspector so we can edit it
public class Dialogue
{
public string name; //displays in editor box to input NPC name
[TextArea(3, 10)] //changes the textArea box size to make it easier to type sentences
public string[] sentences; //displays in editor the text box to input text and store sentences in an array
} | 45.181818 | 114 | 0.698189 | [
"Unlicense"
] | sag754/UI_Assignment | UI Text Game/Assets/Scripts/Dialgoue.cs | 499 | C# |
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Runtime.Serialization.Json;
using System.Threading.Tasks;
using Microsoft.Extensions.Configuration;
namespace Kodj.ServiceDiscovery
{
public class ConsulServiceDiscovery : IServiceDiscovery
{
public IConfigurationRoot Configuration { get; set; }
public ConsulServiceDiscovery()
{
var builder = new ConfigurationBuilder()
.AddJsonFile("consul.json");
Configuration = builder.Build();
}
public async Task<List<ServiceMetadata>> GetService(string serviceName)
{
using (var httpClient = new HttpClient())
{
var url = string.Format("http://{0}:{1}/v1/catalog/service/{2}"
, Configuration["server:address"]
, Configuration["server:port"]
, serviceName);
System.Console.WriteLine("Fetching data from: {0}", url);
var result = await httpClient.GetStringAsync(url);
return JsonConvert.DeserializeObject<List<ServiceMetadata>>(result);
}
}
public async Task RegisterService(string serviceName, string endpoint, int port)
{
}
public async Task RemoveService(string serviceName, string endpoint, int port)
{
}
}
} | 30.979592 | 89 | 0.57444 | [
"MIT"
] | kodj/kodj | src/Kodj.ServiceDiscovery/ConsulServiceDiscovery.cs | 1,518 | C# |
namespace Culinary.Cookware
{
using Culinary.Ingredients;
public class Bowl
{
public void Add(Vegetable vegetable)
{
}
}
}
| 13.75 | 44 | 0.575758 | [
"MIT"
] | Vyara/Telerik-High-Quality-Code-Homeworks | 06. ControlFlowConditionalStatementsLoops/Culinary/Cookware/Bowl.cs | 167 | C# |
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using Python.Runtime;
using QuantConnect.Data;
using QuantConnect.Data.Market;
using QuantConnect.Util;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
namespace QuantConnect.Python
{
/// <summary>
/// Organizes a list of data to create pandas.DataFrames
/// </summary>
public class PandasData
{
private static dynamic _pandas;
private readonly static HashSet<string> _baseDataProperties = typeof(BaseData).GetProperties().ToHashSet(x => x.Name.ToLower());
private readonly int _levels;
private readonly bool _isCustomData;
private readonly Symbol _symbol;
private readonly Dictionary<string, Tuple<List<DateTime>, List<object>>> _series;
private readonly IEnumerable<MemberInfo> _members;
/// <summary>
/// Gets true if this is a custom data request, false for normal QC data
/// </summary>
public bool IsCustomData => _isCustomData;
/// <summary>
/// Implied levels of a multi index pandas.Series (depends on the security type)
/// </summary>
public int Levels => _levels;
/// <summary>
/// Initializes an instance of <see cref="PandasData"/>
/// </summary>
public PandasData(object data)
{
if (_pandas == null)
{
using (Py.GIL())
{
_pandas = Py.Import("pandas");
}
}
var enumerable = data as IEnumerable;
if (enumerable != null)
{
foreach (var item in enumerable)
{
data = item;
}
}
var type = data.GetType() as Type;
_isCustomData = type.Namespace != "QuantConnect.Data.Market";
_members = Enumerable.Empty<MemberInfo>();
_symbol = (data as IBaseData)?.Symbol;
_levels = 2;
if (_symbol.SecurityType == SecurityType.Future) _levels = 3;
if (_symbol.SecurityType == SecurityType.Option) _levels = 5;
var columns = new List<string>
{
"open", "high", "low", "close", "lastprice", "volume",
"askopen", "askhigh", "asklow", "askclose", "askprice", "asksize", "quantity", "suspicious",
"bidopen", "bidhigh", "bidlow", "bidclose", "bidprice", "bidsize", "exchange", "openinterest"
};
if (_isCustomData)
{
var keys = (data as DynamicData)?.GetStorageDictionary().Select(x => x.Key);
// C# types that are not DynamicData type
if (keys == null)
{
var members = type.GetMembers().Where(x => x.MemberType == MemberTypes.Field || x.MemberType == MemberTypes.Property);
var duplicateKeys = members.GroupBy(x => x.Name.ToLower()).Where(x => x.Count() > 1).Select(x => x.Key);
foreach (var duplicateKey in duplicateKeys)
{
throw new ArgumentException($"PandasData.ctor(): More than one \'{duplicateKey}\' member was found in \'{type.FullName}\' class.");
}
keys = members.Select(x => x.Name.ToLower()).Except(_baseDataProperties).Concat(new[] { "value" });
_members = members.Where(x => keys.Contains(x.Name.ToLower()));
}
columns.Add("value");
columns.AddRange(keys);
}
_series = columns.Distinct().ToDictionary(k => k, v => Tuple.Create(new List<DateTime>(), new List<object>()));
}
/// <summary>
/// Adds security data object to the end of the lists
/// </summary>
/// <param name="baseData"><see cref="IBaseData"/> object that contains security data</param>
public void Add(object baseData)
{
foreach (var member in _members)
{
var key = member.Name.ToLower();
var endTime = (baseData as IBaseData).EndTime;
AddToSeries(key, endTime, (member as FieldInfo)?.GetValue(baseData));
AddToSeries(key, endTime, (member as PropertyInfo)?.GetValue(baseData));
}
var storage = (baseData as DynamicData)?.GetStorageDictionary();
if (storage != null)
{
var endTime = (baseData as IBaseData).EndTime;
var value = (baseData as IBaseData).Value;
AddToSeries("value", endTime, value);
foreach (var kvp in storage)
{
AddToSeries(kvp.Key, endTime, kvp.Value);
}
}
else
{
var ticks = new List<Tick> { baseData as Tick };
var tradeBar = baseData as TradeBar;
var quoteBar = baseData as QuoteBar;
Add(ticks, tradeBar, quoteBar);
}
}
/// <summary>
/// Adds Lean data objects to the end of the lists
/// </summary>
/// <param name="ticks">List of <see cref="Tick"/> object that contains tick information of the security</param>
/// <param name="tradeBar"><see cref="TradeBar"/> object that contains trade bar information of the security</param>
/// <param name="quoteBar"><see cref="QuoteBar"/> object that contains quote bar information of the security</param>
public void Add(IEnumerable<Tick> ticks, TradeBar tradeBar, QuoteBar quoteBar)
{
if (tradeBar != null)
{
var time = tradeBar.EndTime;
AddToSeries("open", time, tradeBar.Open);
AddToSeries("high", time, tradeBar.High);
AddToSeries("low", time, tradeBar.Low);
AddToSeries("close", time, tradeBar.Close);
AddToSeries("volume", time, tradeBar.Volume);
}
if (quoteBar != null)
{
var time = quoteBar.EndTime;
if (tradeBar == null)
{
AddToSeries("open", time, quoteBar.Open);
AddToSeries("high", time, quoteBar.High);
AddToSeries("low", time, quoteBar.Low);
AddToSeries("close", time, quoteBar.Close);
}
if (quoteBar.Ask != null)
{
AddToSeries("askopen", time, quoteBar.Ask.Open);
AddToSeries("askhigh", time, quoteBar.Ask.High);
AddToSeries("asklow", time, quoteBar.Ask.Low);
AddToSeries("askclose", time, quoteBar.Ask.Close);
AddToSeries("asksize", time, quoteBar.LastAskSize);
}
if (quoteBar.Bid != null)
{
AddToSeries("bidopen", time, quoteBar.Bid.Open);
AddToSeries("bidhigh", time, quoteBar.Bid.High);
AddToSeries("bidlow", time, quoteBar.Bid.Low);
AddToSeries("bidclose", time, quoteBar.Bid.Close);
AddToSeries("bidsize", time, quoteBar.LastBidSize);
}
}
if (ticks != null)
{
foreach (var tick in ticks)
{
if (tick == null) continue;
var time = tick.EndTime;
var column = tick.GetType() == typeof(OpenInterest)
? "openinterest"
: "lastprice";
if (tick.TickType == TickType.Quote)
{
AddToSeries("askprice", time, tick.AskPrice);
AddToSeries("asksize", time, tick.AskSize);
AddToSeries("bidprice", time, tick.BidPrice);
AddToSeries("bidsize", time, tick.BidSize);
}
AddToSeries("exchange", time, tick.Exchange);
AddToSeries("suspicious", time, tick.Suspicious);
AddToSeries("quantity", time, tick.Quantity);
AddToSeries(column, time, tick.LastPrice);
}
}
}
/// <summary>
/// Get the pandas.DataFrame of the current <see cref="PandasData"/> state
/// </summary>
/// <param name="levels">Number of levels of the multi index</param>
/// <returns>pandas.DataFrame object</returns>
public PyObject ToPandasDataFrame(int levels = 2)
{
var empty = new PyString(string.Empty);
var list = Enumerable.Repeat<PyObject>(empty, 5).ToList();
list[3] = _symbol.ToString().ToPython();
if (_symbol.SecurityType == SecurityType.Future)
{
list[0] = _symbol.ID.Date.ToPython();
list[3] = _symbol.Value.ToPython();
}
if (_symbol.SecurityType == SecurityType.Option)
{
list[0] = _symbol.ID.Date.ToPython();
list[1] = _symbol.ID.StrikePrice.ToPython();
list[2] = _symbol.ID.OptionRight.ToString().ToPython();
list[3] = _symbol.Value.ToPython();
}
// Create the index labels
var names = "expiry,strike,type,symbol,time";
if (levels == 2)
{
names = "symbol,time";
list.RemoveRange(0, 3);
}
if (levels == 3)
{
names = "expiry,symbol,time";
list.RemoveRange(1, 2);
}
Func<object, bool> filter = x =>
{
var isNaNOrZero = x is double && ((double)x).IsNaNOrZero();
var isNullOrWhiteSpace = x is string && string.IsNullOrWhiteSpace((string)x);
var isFalse = x is bool && !(bool)x;
return x == null || isNaNOrZero || isNullOrWhiteSpace || isFalse;
};
Func<DateTime, PyTuple> selector = x =>
{
list[list.Count - 1] = x.ToPython();
return new PyTuple(list.ToArray());
};
using (Py.GIL())
{
// Returns a dictionary keyed by column name where values are pandas.Series objects
var pyDict = new PyDict();
foreach (var kvp in _series)
{
var values = kvp.Value.Item2;
if (values.All(filter)) continue;
var tuples = kvp.Value.Item1.Select(selector).ToArray();
var index = _pandas.MultiIndex.from_tuples(tuples, names: names.Split(','));
pyDict.SetItem(kvp.Key, _pandas.Series(values, index));
}
_series.Clear();
return _pandas.DataFrame(pyDict);
}
}
/// <summary>
/// Adds data to dictionary
/// </summary>
/// <param name="key">The key of the value to get</param>
/// <param name="time"><see cref="DateTime"/> object to add to the value associated with the specific key</param>
/// <param name="input"><see cref="Object"/> to add to the value associated with the specific key</param>
private void AddToSeries(string key, DateTime time, object input)
{
if (input == null) return;
Tuple<List<DateTime>, List<object>> value;
if (_series.TryGetValue(key, out value))
{
value.Item1.Add(time);
value.Item2.Add(input is decimal ? Convert.ToDouble(input) : input);
}
else
{
throw new ArgumentException($"PandasData.AddToSeries(): {key} key does not exist in series dictionary.");
}
}
}
} | 40.719745 | 155 | 0.522681 | [
"Apache-2.0"
] | Bimble/Lean | Common/Python/PandasData.cs | 12,788 | C# |
using CSUWPAppCommandBindInDT.ViewModel;
using System;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409
namespace CSUWPAppCommandBindInDT
{
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class MainPage : Page
{
private CustomerViewModel m_cusViewModel;
public MainPage()
{
m_cusViewModel = new CustomerViewModel();
this.InitializeComponent();
CustomerGridView.DataContext = m_cusViewModel;
}
private async void Footer_Click(object sender, RoutedEventArgs e)
{
HyperlinkButton hyperlinkButton = sender as HyperlinkButton;
if (hyperlinkButton != null)
{
await Windows.System.Launcher.LaunchUriAsync(new Uri(hyperlinkButton.Tag.ToString()));
}
}
private void Page_SizeChanged(object sender, SizeChangedEventArgs e)
{
if (e.NewSize.Width < 800.0)
{
VisualStateManager.GoToState(this, "MinimalLayout", true);
}
else if (e.NewSize.Width < e.NewSize.Height)
{
VisualStateManager.GoToState(this, "PortraitLayout", true);
}
else
{
VisualStateManager.GoToState(this, "DefaultLayout", true);
}
}
}
}
| 31.02 | 107 | 0.598968 | [
"MIT"
] | Ranin26/msdn-code-gallery-microsoft | OneCodeTeam/How to bind commands to a button in the DataTemplate in UWP apps/[C#]-How to bind commands to a button in the DataTemplate in UWP apps/C#/CSUWPAppCommandBindInDT/MainPage.xaml.cs | 1,553 | C# |
using System;
namespace Cave
{
/// <summary>Gets access to a selected IStopWatch implementation for the current platform.</summary>
public static class StopWatch
{
#region Static
/// <summary>Checks the resolution.</summary>
/// <param name="watch">The IStopWatch to check.</param>
/// <param name="samples">The samples.</param>
/// <returns>The resolution.</returns>
/// <exception cref="ArgumentNullException">watch.</exception>
public static TimeSpan CheckResolution(IStopWatch watch, int samples = 50)
{
if (watch == null)
{
throw new ArgumentNullException(nameof(watch));
}
if (!watch.IsRunning)
{
watch.Start();
}
var best = TimeSpan.MaxValue;
for (var i = 0; i < samples; i++)
{
var start = watch.Elapsed;
var next = watch.Elapsed;
while (next == start)
{
next = watch.Elapsed;
}
var res = next - start;
if (res < best)
{
best = res;
}
}
return best;
}
/// <summary>Sets the type.</summary>
/// <param name="type">The type.</param>
public static void SetType(Type type)
{
var watch = (IStopWatch)Activator.CreateInstance(type);
watch.Start();
SelectedType = type;
}
/// <summary>Gets a new started IStopWatch object.</summary>
/// <returns>The started stopwatch.</returns>
public static IStopWatch StartNew()
{
var watch = (IStopWatch)Activator.CreateInstance(SelectedType);
watch.Start();
return watch;
}
/// <summary>Gets the type of the selected stop watch.</summary>
/// <value>The type of the selected.</value>
public static Type SelectedType { get; private set; } = typeof(DateTimeStopWatch);
#endregion
}
}
| 29.875 | 104 | 0.508136 | [
"MIT"
] | CaveSystems/cave-extensions | Cave.Extensions/StopWatch.cs | 2,151 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using EventOrganizer.DAL.Models;
using Microsoft.AspNetCore.Mvc;
using EventOrganizer.ViewModels;
using EventOrganizer.BLL.Interfaces;
using Microsoft.AspNetCore.Identity;
// For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
namespace EventOrganizer.Controllers
{
public class UserPageController : Controller
{
private readonly IEventService _eventService;
private readonly UserManager<User> _userManager;
public UserPageController(IEventService eventService, UserManager<User> userManager)
{
_eventService = eventService;
_userManager = userManager;
}
// GET: /<controller>/
public IActionResult Index()
{
ViewBag.UserEvents = _eventService.GetEventsByUserId(_userManager.GetUserId(User));
return View();
}
}
}
| 29.588235 | 112 | 0.710736 | [
"MIT"
] | lnupmi11/EventOrganizer | EventOrganizer/EventOrganizer/Controllers/UserPageController.cs | 1,008 | C# |
using System.Net.Mail;
namespace ConsoleWorkflows.DomainClasses
{
class EmailService
{
public void Send(MailMessage email)
{
}
}
}
| 13.923077 | 43 | 0.569061 | [
"MIT"
] | MortenChristiansen/Overflow.net | examples/DataFlow/DomainClasses/EmailService.cs | 181 | C# |
using System.Linq;
using ConvNetSharp.Volume.GPU.Single;
using ConvNetSharp.Volume.Tests;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace ConvNetSharp.Volume.GPU.Tests
{
[TestClass]
public class SingleVolumeTests : VolumeTests<float>
{
public SingleVolumeTests()
{
BuilderInstance<float>.Volume = new VolumeBuilder();
}
protected override Volume<float> NewVolume(double[] values, Shape shape)
{
var converted = values.Select(i => (float)i).ToArray();
return BuilderInstance.Volume.From(converted, shape);
}
}
} | 29.809524 | 80 | 0.664537 | [
"MIT"
] | NickStrupat/ConvNetSharp | src/ConvNetSharp.Volume.GPU.Tests/SingleVolumeTests.cs | 628 | C# |
using System;
namespace Zektor.Shared.DataSources {
public enum ConnectionState {
Disconnected = 0,
Connecting = 1,
Connected = 2
}
public interface IConnectable {
ConnectionState State { get; }
event EventHandler Connected;
event EventHandler Connecting;
event EventHandler Disconnected;
void OnConnected();
void OnConnecting();
void OnDisconnected();
}
public abstract class BaseConnectable : IConnectable {
private readonly object _stateLock = new object();
public virtual ConnectionState State { get; protected set; }
public event EventHandler Connected;
public event EventHandler Connecting;
public event EventHandler Disconnected;
public virtual void OnConnected() {
lock (_stateLock) {
State = ConnectionState.Connected;
}
Connected?.Invoke(this, EventArgs.Empty);
}
public virtual void OnConnecting() {
lock (_stateLock) {
State = ConnectionState.Connecting;
}
Connecting?.Invoke(this, EventArgs.Empty);
}
public virtual void OnDisconnected() {
lock (_stateLock) {
State = ConnectionState.Disconnected;
}
Disconnected?.Invoke(this, EventArgs.Empty);
}
}
public static class ExtensionMethods {
public static void ReceiveConnectionStateEvents(this IConnectable to, IConnectable from) {
from.Connected += (sender, args) => to.OnConnected();
from.Connecting += (sender, args) => to.OnConnecting();
from.Disconnected += (sender, args) => to.OnDisconnected();
}
}
} | 30.271186 | 98 | 0.597984 | [
"MIT"
] | zzattack/zektor | Zektor.Shared/DataSources/BaseConnectable.cs | 1,788 | C# |
namespace Ayy_Hook
{
partial class Form3
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form3));
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.timer2 = new System.Windows.Forms.Timer(this.components);
this.label1 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// timer1
//
this.timer1.Enabled = true;
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// timer2
//
this.timer2.Enabled = true;
this.timer2.Interval = 2000;
this.timer2.Tick += new System.EventHandler(this.timer2_Tick);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(632, 43);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(35, 13);
this.label1.TabIndex = 0;
this.label1.Text = "label1";
this.label1.Visible = false;
//
// Form3
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(383, 101);
this.Controls.Add(this.label1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.Name = "Form3";
this.Resizable = false;
this.Style = MetroFramework.MetroColorStyle.Green;
this.Text = "Injecting, Please wait...";
this.Load += new System.EventHandler(this.Form3_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.Timer timer2;
private System.Windows.Forms.Label label1;
}
} | 38.190476 | 138 | 0.544888 | [
"MIT"
] | GermanKingYT/AyyHook-Loader | Ayyhook Loader/Ayy Hook/Form3.Designer.cs | 3,210 | C# |
using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Ordering.Application.Features.Orders.Commands.CheckoutOrder;
using Ordering.Application.Features.Orders.Commands.DeleteOrder;
using Ordering.Application.Features.Orders.Commands.UpdateOrder;
using Ordering.Application.Features.Orders.Queries.GetOrdersList;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
namespace Ordering.API.Controllers
{
[Route("api/v1/[controller]")]
[ApiController]
public class OrderController : Controller
{
private readonly IMediator mediator;
public OrderController(IMediator mediator)
{
this.mediator = mediator ?? throw new ArgumentNullException(nameof(mediator));
}
[HttpGet("{userName}", Name = "GetOrder")]
[ProducesResponseType(typeof(IEnumerable<OrdersVm>), (int)HttpStatusCode.OK)]
public async Task<ActionResult<IEnumerable<OrdersVm>>> GetOrdersByUserName(string userName)
{
var query = new GetOrdersListQuery(userName);
var orders = await mediator.Send(query);
return Ok(orders);
}
[HttpPost(Name = "CheckoutOrder")]
[ProducesResponseType((int)HttpStatusCode.OK)]
public async Task<ActionResult<int>> CheckoutOrder([FromBody] CheckoutOrderCommand command)
{
var result = await mediator.Send(command);
return Ok(result);
}
[HttpPut(Name = "UpdateOrder")]
[ProducesResponseType(StatusCodes.Status204NoContent)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
[ProducesDefaultResponseType]
public async Task<ActionResult> UpdateOrder([FromBody] UpdateOrderCommand command)
{
await mediator.Send(command);
return NoContent();
}
[HttpDelete("{id}", Name = "DeleteOrder")]
[ProducesResponseType(StatusCodes.Status204NoContent)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
[ProducesDefaultResponseType]
public async Task<ActionResult> DeleteOrder(int id)
{
var command = new DeleteOrderCommand() { Id = id };
await mediator.Send(command);
return NoContent();
}
}
}
| 35.044776 | 99 | 0.677172 | [
"MIT"
] | rprsatyendra/AspnetMicroservices | src/Services/Ordering/Ordering.API/Controllers/OrderController.cs | 2,350 | C# |
using System;
using UnityEngine;
namespace FPS.ItemSystem
{
[System.Serializable]
public class AmmoNSData : NSData, IUIEditor
{
#region IUIEditor Interface implementation
public override void OnUIEditorGUI(BaseItem item)
{
base.OnUIEditorGUI(item);
}
#endregion IUIEditor Interface implementation
}
} | 20.666667 | 57 | 0.66129 | [
"MIT"
] | JeffDev74/ItemSystem | Assets/JeffDev#ItemSystem/Items/ItemTypes/Ammo/Data/AmmoNSData.cs | 374 | C# |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#nullable disable
using System;
using System.Linq;
using System.Security;
using System.Threading;
using System.Threading.Tasks;
using System.Xml.Linq;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Test.Utilities;
using Microsoft.CodeAnalysis.Editor.UnitTests.QuickInfo;
using Microsoft.CodeAnalysis.Editor.UnitTests.Workspaces;
using Microsoft.CodeAnalysis.QuickInfo;
using Microsoft.CodeAnalysis.Test.Utilities;
using Roslyn.Test.Utilities;
using Roslyn.Utilities;
using Xunit;
using static Microsoft.CodeAnalysis.Editor.UnitTests.Classification.FormattedClassifications;
namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.QuickInfo
{
public class SemanticQuickInfoSourceTests : AbstractSemanticQuickInfoSourceTests
{
private static async Task TestWithOptionsAsync(CSharpParseOptions options, string markup, params Action<QuickInfoItem>[] expectedResults)
{
using var workspace = TestWorkspace.CreateCSharp(markup, options);
await TestWithOptionsAsync(workspace, expectedResults);
}
private static async Task TestWithOptionsAsync(CSharpCompilationOptions options, string markup, params Action<QuickInfoItem>[] expectedResults)
{
using var workspace = TestWorkspace.CreateCSharp(markup, compilationOptions: options);
await TestWithOptionsAsync(workspace, expectedResults);
}
private static async Task TestWithOptionsAsync(TestWorkspace workspace, params Action<QuickInfoItem>[] expectedResults)
{
var testDocument = workspace.DocumentWithCursor;
var position = testDocument.CursorPosition.GetValueOrDefault();
var documentId = workspace.GetDocumentId(testDocument);
var document = workspace.CurrentSolution.GetDocument(documentId);
var service = QuickInfoService.GetService(document);
await TestWithOptionsAsync(document, service, position, expectedResults);
// speculative semantic model
if (await CanUseSpeculativeSemanticModelAsync(document, position))
{
var buffer = testDocument.GetTextBuffer();
using (var edit = buffer.CreateEdit())
{
var currentSnapshot = buffer.CurrentSnapshot;
edit.Replace(0, currentSnapshot.Length, currentSnapshot.GetText());
edit.Apply();
}
await TestWithOptionsAsync(document, service, position, expectedResults);
}
}
private static async Task TestWithOptionsAsync(Document document, QuickInfoService service, int position, Action<QuickInfoItem>[] expectedResults)
{
var info = await service.GetQuickInfoAsync(document, position, cancellationToken: CancellationToken.None);
if (expectedResults.Length == 0)
{
Assert.Null(info);
}
else
{
Assert.NotNull(info);
foreach (var expected in expectedResults)
{
expected(info);
}
}
}
private static async Task VerifyWithMscorlib45Async(string markup, Action<QuickInfoItem>[] expectedResults)
{
var xmlString = string.Format(@"
<Workspace>
<Project Language=""C#"" CommonReferencesNet45=""true"">
<Document FilePath=""SourceDocument"">
{0}
</Document>
</Project>
</Workspace>", SecurityElement.Escape(markup));
using var workspace = TestWorkspace.Create(xmlString);
var position = workspace.Documents.Single(d => d.Name == "SourceDocument").CursorPosition.Value;
var documentId = workspace.Documents.Where(d => d.Name == "SourceDocument").Single().Id;
var document = workspace.CurrentSolution.GetDocument(documentId);
var service = QuickInfoService.GetService(document);
var info = await service.GetQuickInfoAsync(document, position, cancellationToken: CancellationToken.None);
if (expectedResults.Length == 0)
{
Assert.Null(info);
}
else
{
Assert.NotNull(info);
foreach (var expected in expectedResults)
{
expected(info);
}
}
}
protected override async Task TestAsync(string markup, params Action<QuickInfoItem>[] expectedResults)
{
await TestWithOptionsAsync(Options.Regular, markup, expectedResults);
await TestWithOptionsAsync(Options.Script, markup, expectedResults);
}
private async Task TestWithUsingsAsync(string markup, params Action<QuickInfoItem>[] expectedResults)
{
var markupWithUsings =
@"using System;
using System.Collections.Generic;
using System.Linq;
" + markup;
await TestAsync(markupWithUsings, expectedResults);
}
private Task TestInClassAsync(string markup, params Action<QuickInfoItem>[] expectedResults)
{
var markupInClass = "class C { " + markup + " }";
return TestWithUsingsAsync(markupInClass, expectedResults);
}
private Task TestInMethodAsync(string markup, params Action<QuickInfoItem>[] expectedResults)
{
var markupInMethod = "class C { void M() { " + markup + " } }";
return TestWithUsingsAsync(markupInMethod, expectedResults);
}
private static async Task TestWithReferenceAsync(string sourceCode,
string referencedCode,
string sourceLanguage,
string referencedLanguage,
params Action<QuickInfoItem>[] expectedResults)
{
await TestWithMetadataReferenceHelperAsync(sourceCode, referencedCode, sourceLanguage, referencedLanguage, expectedResults);
await TestWithProjectReferenceHelperAsync(sourceCode, referencedCode, sourceLanguage, referencedLanguage, expectedResults);
// Multi-language projects are not supported.
if (sourceLanguage == referencedLanguage)
{
await TestInSameProjectHelperAsync(sourceCode, referencedCode, sourceLanguage, expectedResults);
}
}
private static async Task TestWithMetadataReferenceHelperAsync(
string sourceCode,
string referencedCode,
string sourceLanguage,
string referencedLanguage,
params Action<QuickInfoItem>[] expectedResults)
{
var xmlString = string.Format(@"
<Workspace>
<Project Language=""{0}"" CommonReferences=""true"">
<Document FilePath=""SourceDocument"">
{1}
</Document>
<MetadataReferenceFromSource Language=""{2}"" CommonReferences=""true"" IncludeXmlDocComments=""true"">
<Document FilePath=""ReferencedDocument"">
{3}
</Document>
</MetadataReferenceFromSource>
</Project>
</Workspace>", sourceLanguage, SecurityElement.Escape(sourceCode),
referencedLanguage, SecurityElement.Escape(referencedCode));
await VerifyWithReferenceWorkerAsync(xmlString, expectedResults);
}
private static async Task TestWithProjectReferenceHelperAsync(
string sourceCode,
string referencedCode,
string sourceLanguage,
string referencedLanguage,
params Action<QuickInfoItem>[] expectedResults)
{
var xmlString = string.Format(@"
<Workspace>
<Project Language=""{0}"" CommonReferences=""true"">
<ProjectReference>ReferencedProject</ProjectReference>
<Document FilePath=""SourceDocument"">
{1}
</Document>
</Project>
<Project Language=""{2}"" CommonReferences=""true"" AssemblyName=""ReferencedProject"">
<Document FilePath=""ReferencedDocument"">
{3}
</Document>
</Project>
</Workspace>", sourceLanguage, SecurityElement.Escape(sourceCode),
referencedLanguage, SecurityElement.Escape(referencedCode));
await VerifyWithReferenceWorkerAsync(xmlString, expectedResults);
}
private static async Task TestInSameProjectHelperAsync(
string sourceCode,
string referencedCode,
string sourceLanguage,
params Action<QuickInfoItem>[] expectedResults)
{
var xmlString = string.Format(@"
<Workspace>
<Project Language=""{0}"" CommonReferences=""true"">
<Document FilePath=""SourceDocument"">
{1}
</Document>
<Document FilePath=""ReferencedDocument"">
{2}
</Document>
</Project>
</Workspace>", sourceLanguage, SecurityElement.Escape(sourceCode), SecurityElement.Escape(referencedCode));
await VerifyWithReferenceWorkerAsync(xmlString, expectedResults);
}
private static async Task VerifyWithReferenceWorkerAsync(string xmlString, params Action<QuickInfoItem>[] expectedResults)
{
using var workspace = TestWorkspace.Create(xmlString);
var position = workspace.Documents.First(d => d.Name == "SourceDocument").CursorPosition.Value;
var documentId = workspace.Documents.First(d => d.Name == "SourceDocument").Id;
var document = workspace.CurrentSolution.GetDocument(documentId);
var service = QuickInfoService.GetService(document);
var info = await service.GetQuickInfoAsync(document, position, cancellationToken: CancellationToken.None);
if (expectedResults.Length == 0)
{
Assert.Null(info);
}
else
{
Assert.NotNull(info);
foreach (var expected in expectedResults)
{
expected(info);
}
}
}
protected async Task TestInvalidTypeInClassAsync(string code)
{
var codeInClass = "class C { " + code + " }";
await TestAsync(codeInClass);
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestNamespaceInUsingDirective()
{
await TestAsync(
@"using $$System;",
MainDescription("namespace System"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestNamespaceInUsingDirective2()
{
await TestAsync(
@"using System.Coll$$ections.Generic;",
MainDescription("namespace System.Collections"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestNamespaceInUsingDirective3()
{
await TestAsync(
@"using System.L$$inq;",
MainDescription("namespace System.Linq"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestNamespaceInUsingDirectiveWithAlias()
{
await TestAsync(
@"using Goo = Sys$$tem.Console;",
MainDescription("namespace System"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestTypeInUsingDirectiveWithAlias()
{
await TestAsync(
@"using Goo = System.Con$$sole;",
MainDescription("class System.Console"));
}
[WorkItem(991466, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/991466")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestDocumentationInUsingDirectiveWithAlias()
{
var markup =
@"using I$$ = IGoo;
///<summary>summary for interface IGoo</summary>
interface IGoo { }";
await TestAsync(markup,
MainDescription("interface IGoo"),
Documentation("summary for interface IGoo"));
}
[WorkItem(991466, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/991466")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestDocumentationInUsingDirectiveWithAlias2()
{
var markup =
@"using I = IGoo;
///<summary>summary for interface IGoo</summary>
interface IGoo { }
class C : I$$ { }";
await TestAsync(markup,
MainDescription("interface IGoo"),
Documentation("summary for interface IGoo"));
}
[WorkItem(991466, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/991466")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestDocumentationInUsingDirectiveWithAlias3()
{
var markup =
@"using I = IGoo;
///<summary>summary for interface IGoo</summary>
interface IGoo
{
void Goo();
}
class C : I$$ { }";
await TestAsync(markup,
MainDescription("interface IGoo"),
Documentation("summary for interface IGoo"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestThis()
{
var markup =
@"
///<summary>summary for Class C</summary>
class C { string M() { return thi$$s.ToString(); } }";
await TestWithUsingsAsync(markup,
MainDescription("class C"),
Documentation("summary for Class C"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestClassWithDocComment()
{
var markup =
@"
///<summary>Hello!</summary>
class C { void M() { $$C obj; } }";
await TestAsync(markup,
MainDescription("class C"),
Documentation("Hello!"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestSingleLineDocComments()
{
// Tests chosen to maximize code coverage in DocumentationCommentCompiler.WriteFormattedSingleLineComment
// SingleLine doc comment with leading whitespace
await TestAsync(
@"///<summary>Hello!</summary>
class C
{
void M()
{
$$C obj;
}
}",
MainDescription("class C"),
Documentation("Hello!"));
// SingleLine doc comment with space before opening tag
await TestAsync(
@"/// <summary>Hello!</summary>
class C
{
void M()
{
$$C obj;
}
}",
MainDescription("class C"),
Documentation("Hello!"));
// SingleLine doc comment with space before opening tag and leading whitespace
await TestAsync(
@"/// <summary>Hello!</summary>
class C
{
void M()
{
$$C obj;
}
}",
MainDescription("class C"),
Documentation("Hello!"));
// SingleLine doc comment with leading whitespace and blank line
await TestAsync(
@"///<summary>Hello!
///</summary>
class C
{
void M()
{
$$C obj;
}
}",
MainDescription("class C"),
Documentation("Hello!"));
// SingleLine doc comment with '\r' line separators
await TestAsync("///<summary>Hello!\r///</summary>\rclass C { void M() { $$C obj; } }",
MainDescription("class C"),
Documentation("Hello!"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestMultiLineDocComments()
{
// Tests chosen to maximize code coverage in DocumentationCommentCompiler.WriteFormattedMultiLineComment
// Multiline doc comment with leading whitespace
await TestAsync(
@"/**<summary>Hello!</summary>*/
class C
{
void M()
{
$$C obj;
}
}",
MainDescription("class C"),
Documentation("Hello!"));
// Multiline doc comment with space before opening tag
await TestAsync(
@"/** <summary>Hello!</summary>
**/
class C
{
void M()
{
$$C obj;
}
}",
MainDescription("class C"),
Documentation("Hello!"));
// Multiline doc comment with space before opening tag and leading whitespace
await TestAsync(
@"/**
** <summary>Hello!</summary>
**/
class C
{
void M()
{
$$C obj;
}
}",
MainDescription("class C"),
Documentation("Hello!"));
// Multiline doc comment with no per-line prefix
await TestAsync(
@"/**
<summary>
Hello!
</summary>
*/
class C
{
void M()
{
$$C obj;
}
}",
MainDescription("class C"),
Documentation("Hello!"));
// Multiline doc comment with inconsistent per-line prefix
await TestAsync(
@"/**
** <summary>
Hello!</summary>
**
**/
class C
{
void M()
{
$$C obj;
}
}",
MainDescription("class C"),
Documentation("Hello!"));
// Multiline doc comment with closing comment on final line
await TestAsync(
@"/**
<summary>Hello!
</summary>*/
class C
{
void M()
{
$$C obj;
}
}",
MainDescription("class C"),
Documentation("Hello!"));
// Multiline doc comment with '\r' line separators
await TestAsync("/**\r* <summary>\r* Hello!\r* </summary>\r*/\rclass C { void M() { $$C obj; } }",
MainDescription("class C"),
Documentation("Hello!"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestMethodWithDocComment()
{
var markup =
@"
///<summary>Hello!</summary>
void M() { M$$() }";
await TestInClassAsync(markup,
MainDescription("void C.M()"),
Documentation("Hello!"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestInt32()
{
await TestInClassAsync(
@"$$Int32 i;",
MainDescription("struct System.Int32"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestBuiltInInt()
{
await TestInClassAsync(
@"$$int i;",
MainDescription("struct System.Int32"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestString()
{
await TestInClassAsync(
@"$$String s;",
MainDescription("class System.String"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestBuiltInString()
{
await TestInClassAsync(
@"$$string s;",
MainDescription("class System.String"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestBuiltInStringAtEndOfToken()
{
await TestInClassAsync(
@"string$$ s;",
MainDescription("class System.String"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestBoolean()
{
await TestInClassAsync(
@"$$Boolean b;",
MainDescription("struct System.Boolean"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestBuiltInBool()
{
await TestInClassAsync(
@"$$bool b;",
MainDescription("struct System.Boolean"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestSingle()
{
await TestInClassAsync(
@"$$Single s;",
MainDescription("struct System.Single"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestBuiltInFloat()
{
await TestInClassAsync(
@"$$float f;",
MainDescription("struct System.Single"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestVoidIsInvalid()
{
await TestInvalidTypeInClassAsync(
@"$$void M()
{
}");
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestInvalidPointer1_931958()
{
await TestInvalidTypeInClassAsync(
@"$$T* i;");
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestInvalidPointer2_931958()
{
await TestInvalidTypeInClassAsync(
@"T$$* i;");
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestInvalidPointer3_931958()
{
await TestInvalidTypeInClassAsync(
@"T*$$ i;");
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestListOfString()
{
await TestInClassAsync(
@"$$List<string> l;",
MainDescription("class System.Collections.Generic.List<T>"),
TypeParameterMap($"\r\nT {FeaturesResources.is_} string"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestListOfSomethingFromSource()
{
var markup =
@"
///<summary>Generic List</summary>
public class GenericList<T> { Generic$$List<int> t; }";
await TestAsync(markup,
MainDescription("class GenericList<T>"),
Documentation("Generic List"),
TypeParameterMap($"\r\nT {FeaturesResources.is_} int"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestListOfT()
{
await TestInMethodAsync(
@"class C<T>
{
$$List<T> l;
}",
MainDescription("class System.Collections.Generic.List<T>"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestDictionaryOfIntAndString()
{
await TestInClassAsync(
@"$$Dictionary<int, string> d;",
MainDescription("class System.Collections.Generic.Dictionary<TKey, TValue>"),
TypeParameterMap(
Lines($"\r\nTKey {FeaturesResources.is_} int",
$"TValue {FeaturesResources.is_} string")));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestDictionaryOfTAndU()
{
await TestInMethodAsync(
@"class C<T, U>
{
$$Dictionary<T, U> d;
}",
MainDescription("class System.Collections.Generic.Dictionary<TKey, TValue>"),
TypeParameterMap(
Lines($"\r\nTKey {FeaturesResources.is_} T",
$"TValue {FeaturesResources.is_} U")));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestIEnumerableOfInt()
{
await TestInClassAsync(
@"$$IEnumerable<int> M()
{
yield break;
}",
MainDescription("interface System.Collections.Generic.IEnumerable<out T>"),
TypeParameterMap($"\r\nT {FeaturesResources.is_} int"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestEventHandler()
{
await TestInClassAsync(
@"event $$EventHandler e;",
MainDescription("delegate void System.EventHandler(object sender, System.EventArgs e)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestTypeParameter()
{
await TestAsync(
@"class C<T>
{
$$T t;
}",
MainDescription($"T {FeaturesResources.in_} C<T>"));
}
[WorkItem(538636, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/538636")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestTypeParameterWithDocComment()
{
var markup =
@"
///<summary>Hello!</summary>
///<typeparam name=""T"">T is Type Parameter</typeparam>
class C<T> { $$T t; }";
await TestAsync(markup,
MainDescription($"T {FeaturesResources.in_} C<T>"),
Documentation("T is Type Parameter"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestTypeParameter1_Bug931949()
{
await TestAsync(
@"class T1<T11>
{
$$T11 t;
}",
MainDescription($"T11 {FeaturesResources.in_} T1<T11>"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestTypeParameter2_Bug931949()
{
await TestAsync(
@"class T1<T11>
{
T$$11 t;
}",
MainDescription($"T11 {FeaturesResources.in_} T1<T11>"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestTypeParameter3_Bug931949()
{
await TestAsync(
@"class T1<T11>
{
T1$$1 t;
}",
MainDescription($"T11 {FeaturesResources.in_} T1<T11>"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestTypeParameter4_Bug931949()
{
await TestAsync(
@"class T1<T11>
{
T11$$ t;
}",
MainDescription($"T11 {FeaturesResources.in_} T1<T11>"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestNullableOfInt()
{
await TestInClassAsync(@"$$Nullable<int> i; }",
MainDescription("struct System.Nullable<T> where T : struct"),
TypeParameterMap($"\r\nT {FeaturesResources.is_} int"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestGenericTypeDeclaredOnMethod1_Bug1946()
{
await TestAsync(
@"class C
{
static void Meth1<T1>($$T1 i) where T1 : struct
{
T1 i;
}
}",
MainDescription($"T1 {FeaturesResources.in_} C.Meth1<T1> where T1 : struct"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestGenericTypeDeclaredOnMethod2_Bug1946()
{
await TestAsync(
@"class C
{
static void Meth1<T1>(T1 i) where $$T1 : struct
{
T1 i;
}
}",
MainDescription($"T1 {FeaturesResources.in_} C.Meth1<T1> where T1 : struct"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestGenericTypeDeclaredOnMethod3_Bug1946()
{
await TestAsync(
@"class C
{
static void Meth1<T1>(T1 i) where T1 : struct
{
$$T1 i;
}
}",
MainDescription($"T1 {FeaturesResources.in_} C.Meth1<T1> where T1 : struct"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestGenericTypeParameterConstraint_Class()
{
await TestAsync(
@"class C<T> where $$T : class
{
}",
MainDescription($"T {FeaturesResources.in_} C<T> where T : class"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestGenericTypeParameterConstraint_Struct()
{
await TestAsync(
@"struct S<T> where $$T : class
{
}",
MainDescription($"T {FeaturesResources.in_} S<T> where T : class"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestGenericTypeParameterConstraint_Interface()
{
await TestAsync(
@"interface I<T> where $$T : class
{
}",
MainDescription($"T {FeaturesResources.in_} I<T> where T : class"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestGenericTypeParameterConstraint_Delegate()
{
await TestAsync(
@"delegate void D<T>() where $$T : class;",
MainDescription($"T {FeaturesResources.in_} D<T> where T : class"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestMinimallyQualifiedConstraint()
{
await TestAsync(@"class C<T> where $$T : IEnumerable<int>",
MainDescription($"T {FeaturesResources.in_} C<T> where T : IEnumerable<int>"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task FullyQualifiedConstraint()
{
await TestAsync(@"class C<T> where $$T : System.Collections.Generic.IEnumerable<int>",
MainDescription($"T {FeaturesResources.in_} C<T> where T : System.Collections.Generic.IEnumerable<int>"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestMethodReferenceInSameMethod()
{
await TestAsync(
@"class C
{
void M()
{
M$$();
}
}",
MainDescription("void C.M()"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestMethodReferenceInSameMethodWithDocComment()
{
var markup =
@"
///<summary>Hello World</summary>
void M() { M$$(); }";
await TestInClassAsync(markup,
MainDescription("void C.M()"),
Documentation("Hello World"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestFieldInMethodBuiltIn()
{
var markup =
@"int field;
void M()
{
field$$
}";
await TestInClassAsync(markup,
MainDescription($"({FeaturesResources.field}) int C.field"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestFieldInMethodBuiltIn2()
{
await TestInClassAsync(
@"int field;
void M()
{
int f = field$$;
}",
MainDescription($"({FeaturesResources.field}) int C.field"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestFieldInMethodBuiltInWithFieldInitializer()
{
await TestInClassAsync(
@"int field = 1;
void M()
{
int f = field $$;
}");
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestOperatorBuiltIn()
{
await TestInMethodAsync(
@"int x;
x = x$$+1;",
MainDescription("int int.operator +(int left, int right)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestOperatorBuiltIn1()
{
await TestInMethodAsync(
@"int x;
x = x$$ + 1;",
MainDescription($"({FeaturesResources.local_variable}) int x"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestOperatorBuiltIn2()
{
await TestInMethodAsync(
@"int x;
x = x+$$x;",
MainDescription($"({FeaturesResources.local_variable}) int x"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestOperatorBuiltIn3()
{
await TestInMethodAsync(
@"int x;
x = x +$$ x;",
MainDescription("int int.operator +(int left, int right)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestOperatorBuiltIn4()
{
await TestInMethodAsync(
@"int x;
x = x + $$x;",
MainDescription($"({FeaturesResources.local_variable}) int x"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestOperatorCustomTypeBuiltIn()
{
var markup =
@"class C
{
static void M() { C c; c = c +$$ c; }
}";
await TestAsync(markup);
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestOperatorCustomTypeOverload()
{
var markup =
@"class C
{
static void M() { C c; c = c +$$ c; }
static C operator+(C a, C b) { return a; }
}";
await TestAsync(markup,
MainDescription("C C.operator +(C a, C b)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestFieldInMethodMinimal()
{
var markup =
@"DateTime field;
void M()
{
field$$
}";
await TestInClassAsync(markup,
MainDescription($"({FeaturesResources.field}) DateTime C.field"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestFieldInMethodQualified()
{
var markup =
@"System.IO.FileInfo file;
void M()
{
file$$
}";
await TestInClassAsync(markup,
MainDescription($"({FeaturesResources.field}) System.IO.FileInfo C.file"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestMemberOfStructFromSource()
{
var markup =
@"struct MyStruct {
public static int SomeField; }
static class Test { int a = MyStruct.Some$$Field; }";
await TestAsync(markup,
MainDescription($"({FeaturesResources.field}) static int MyStruct.SomeField"));
}
[WorkItem(538638, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/538638")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestMemberOfStructFromSourceWithDocComment()
{
var markup =
@"struct MyStruct {
///<summary>My Field</summary>
public static int SomeField; }
static class Test { int a = MyStruct.Some$$Field; }";
await TestAsync(markup,
MainDescription($"({FeaturesResources.field}) static int MyStruct.SomeField"),
Documentation("My Field"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestMemberOfStructInsideMethodFromSource()
{
var markup =
@"struct MyStruct {
public static int SomeField; }
static class Test { static void Method() { int a = MyStruct.Some$$Field; } }";
await TestAsync(markup,
MainDescription($"({FeaturesResources.field}) static int MyStruct.SomeField"));
}
[WorkItem(538638, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/538638")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestMemberOfStructInsideMethodFromSourceWithDocComment()
{
var markup =
@"struct MyStruct {
///<summary>My Field</summary>
public static int SomeField; }
static class Test { static void Method() { int a = MyStruct.Some$$Field; } }";
await TestAsync(markup,
MainDescription($"({FeaturesResources.field}) static int MyStruct.SomeField"),
Documentation("My Field"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestMetadataFieldMinimal()
{
await TestInMethodAsync(@"DateTime dt = DateTime.MaxValue$$",
MainDescription($"({FeaturesResources.field}) static readonly DateTime DateTime.MaxValue"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestMetadataFieldQualified1()
{
// NOTE: we qualify the field type, but not the type that contains the field in Dev10
var markup =
@"class C {
void M()
{
DateTime dt = System.DateTime.MaxValue$$
}
}";
await TestAsync(markup,
MainDescription($"({FeaturesResources.field}) static readonly System.DateTime System.DateTime.MaxValue"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestMetadataFieldQualified2()
{
await TestAsync(
@"class C
{
void M()
{
DateTime dt = System.DateTime.MaxValue$$
}
}",
MainDescription($"({FeaturesResources.field}) static readonly System.DateTime System.DateTime.MaxValue"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestMetadataFieldQualified3()
{
await TestAsync(
@"using System;
class C
{
void M()
{
DateTime dt = System.DateTime.MaxValue$$
}
}",
MainDescription($"({FeaturesResources.field}) static readonly DateTime DateTime.MaxValue"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task ConstructedGenericField()
{
await TestAsync(
@"class C<T>
{
public T Field;
}
class D
{
void M()
{
new C<int>().Fi$$eld.ToString();
}
}",
MainDescription($"({FeaturesResources.field}) int C<int>.Field"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task UnconstructedGenericField()
{
await TestAsync(
@"class C<T>
{
public T Field;
void M()
{
Fi$$eld.ToString();
}
}",
MainDescription($"({FeaturesResources.field}) T C<T>.Field"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestIntegerLiteral()
{
await TestInMethodAsync(@"int f = 37$$",
MainDescription("struct System.Int32"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestTrueKeyword()
{
await TestInMethodAsync(@"bool f = true$$",
MainDescription("struct System.Boolean"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestFalseKeyword()
{
await TestInMethodAsync(@"bool f = false$$",
MainDescription("struct System.Boolean"));
}
[WorkItem(26027, "https://github.com/dotnet/roslyn/issues/26027")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestNullLiteral()
{
await TestInMethodAsync(@"string f = null$$",
MainDescription("class System.String"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestNullLiteralWithVar()
=> await TestInMethodAsync(@"var f = null$$");
[WorkItem(26027, "https://github.com/dotnet/roslyn/issues/26027")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestDefaultLiteral()
{
await TestInMethodAsync(@"string f = default$$",
MainDescription("class System.String"));
}
[WorkItem(756226, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/756226")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestAwaitKeywordOnGenericTaskReturningAsync()
{
var markup = @"using System.Threading.Tasks;
class C
{
public async Task<int> Calc()
{
aw$$ait Calc();
return 5;
}
}";
await TestAsync(markup, MainDescription(string.Format(FeaturesResources.Awaited_task_returns_0, "struct System.Int32")));
}
[WorkItem(756226, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/756226")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestAwaitKeywordInDeclarationStatement()
{
var markup = @"using System.Threading.Tasks;
class C
{
public async Task<int> Calc()
{
var x = $$await Calc();
return 5;
}
}";
await TestAsync(markup, MainDescription(string.Format(FeaturesResources.Awaited_task_returns_0, "struct System.Int32")));
}
[WorkItem(756226, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/756226")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestAwaitKeywordOnTaskReturningAsync()
{
var markup = @"using System.Threading.Tasks;
class C
{
public async void Calc()
{
aw$$ait Task.Delay(100);
}
}";
await TestAsync(markup, MainDescription(FeaturesResources.Awaited_task_returns_no_value));
}
[WorkItem(756226, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/756226"), WorkItem(756337, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/756337")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestNestedAwaitKeywords1()
{
var markup = @"using System;
using System.Threading.Tasks;
class AsyncExample2
{
async Task<Task<int>> AsyncMethod()
{
return NewMethod();
}
private static Task<int> NewMethod()
{
int hours = 24;
return hours;
}
async Task UseAsync()
{
Func<Task<int>> lambda = async () =>
{
return await await AsyncMethod();
};
int result = await await AsyncMethod();
Task<Task<int>> resultTask = AsyncMethod();
result = await awa$$it resultTask;
result = await lambda();
}
}";
await TestAsync(markup, MainDescription(string.Format(FeaturesResources.Awaited_task_returns_0, $"({CSharpFeaturesResources.awaitable}) class System.Threading.Tasks.Task<TResult>")),
TypeParameterMap($"\r\nTResult {FeaturesResources.is_} int"));
}
[WorkItem(756226, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/756226")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestNestedAwaitKeywords2()
{
var markup = @"using System;
using System.Threading.Tasks;
class AsyncExample2
{
async Task<Task<int>> AsyncMethod()
{
return NewMethod();
}
private static Task<int> NewMethod()
{
int hours = 24;
return hours;
}
async Task UseAsync()
{
Func<Task<int>> lambda = async () =>
{
return await await AsyncMethod();
};
int result = await await AsyncMethod();
Task<Task<int>> resultTask = AsyncMethod();
result = awa$$it await resultTask;
result = await lambda();
}
}";
await TestAsync(markup, MainDescription(string.Format(FeaturesResources.Awaited_task_returns_0, "struct System.Int32")));
}
[WorkItem(756226, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/756226"), WorkItem(756337, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/756337")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestAwaitablePrefixOnCustomAwaiter()
{
var markup = @"using System;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using Z = $$C;
class C
{
public MyAwaiter GetAwaiter() { throw new NotImplementedException(); }
}
class MyAwaiter : INotifyCompletion
{
public void OnCompleted(Action continuation)
{
throw new NotImplementedException();
}
public bool IsCompleted { get { throw new NotImplementedException(); } }
public void GetResult() { }
}";
await TestAsync(markup, MainDescription($"({CSharpFeaturesResources.awaitable}) class C"));
}
[WorkItem(756226, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/756226"), WorkItem(756337, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/756337")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestTaskType()
{
var markup = @"using System.Threading.Tasks;
class C
{
public void Calc()
{
Task$$ v1;
}
}";
await TestAsync(markup, MainDescription($"({CSharpFeaturesResources.awaitable}) class System.Threading.Tasks.Task"));
}
[WorkItem(756226, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/756226"), WorkItem(756337, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/756337")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestTaskOfTType()
{
var markup = @"using System;
using System.Threading.Tasks;
class C
{
public void Calc()
{
Task$$<int> v1;
}
}";
await TestAsync(markup, MainDescription($"({CSharpFeaturesResources.awaitable}) class System.Threading.Tasks.Task<TResult>"),
TypeParameterMap($"\r\nTResult {FeaturesResources.is_} int"));
}
[WorkItem(7100, "https://github.com/dotnet/roslyn/issues/7100")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestDynamicIsntAwaitable()
{
var markup = @"
class C
{
dynamic D() { return null; }
void M()
{
D$$();
}
}
";
await TestAsync(markup, MainDescription("dynamic C.D()"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestStringLiteral()
{
await TestInMethodAsync(@"string f = ""Goo""$$",
MainDescription("class System.String"));
}
[WorkItem(1280, "https://github.com/dotnet/roslyn/issues/1280")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestVerbatimStringLiteral()
{
await TestInMethodAsync(@"string f = @""cat""$$",
MainDescription("class System.String"));
}
[WorkItem(1280, "https://github.com/dotnet/roslyn/issues/1280")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestInterpolatedStringLiteral()
{
await TestInMethodAsync(@"string f = $""cat""$$", MainDescription("class System.String"));
await TestInMethodAsync(@"string f = $""c$$at""", MainDescription("class System.String"));
await TestInMethodAsync(@"string f = $""$$cat""", MainDescription("class System.String"));
await TestInMethodAsync(@"string f = $""cat {1$$ + 2} dog""", MainDescription("struct System.Int32"));
}
[WorkItem(1280, "https://github.com/dotnet/roslyn/issues/1280")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestVerbatimInterpolatedStringLiteral()
{
await TestInMethodAsync(@"string f = $@""cat""$$", MainDescription("class System.String"));
await TestInMethodAsync(@"string f = $@""c$$at""", MainDescription("class System.String"));
await TestInMethodAsync(@"string f = $@""$$cat""", MainDescription("class System.String"));
await TestInMethodAsync(@"string f = $@""cat {1$$ + 2} dog""", MainDescription("struct System.Int32"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestCharLiteral()
{
await TestInMethodAsync(@"string f = 'x'$$",
MainDescription("struct System.Char"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task DynamicKeyword()
{
await TestInMethodAsync(
@"dyn$$amic dyn;",
MainDescription("dynamic"),
Documentation(FeaturesResources.Represents_an_object_whose_operations_will_be_resolved_at_runtime));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task DynamicField()
{
await TestInClassAsync(
@"dynamic dyn;
void M()
{
d$$yn.Goo();
}",
MainDescription($"({FeaturesResources.field}) dynamic C.dyn"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task LocalProperty_Minimal()
{
await TestInClassAsync(
@"DateTime Prop { get; set; }
void M()
{
P$$rop.ToString();
}",
MainDescription("DateTime C.Prop { get; set; }"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task LocalProperty_Minimal_PrivateSet()
{
await TestInClassAsync(
@"public DateTime Prop { get; private set; }
void M()
{
P$$rop.ToString();
}",
MainDescription("DateTime C.Prop { get; private set; }"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task LocalProperty_Minimal_PrivateSet1()
{
await TestInClassAsync(
@"protected internal int Prop { get; private set; }
void M()
{
P$$rop.ToString();
}",
MainDescription("int C.Prop { get; private set; }"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task LocalProperty_Qualified()
{
await TestInClassAsync(
@"System.IO.FileInfo Prop { get; set; }
void M()
{
P$$rop.ToString();
}",
MainDescription("System.IO.FileInfo C.Prop { get; set; }"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task NonLocalProperty_Minimal()
{
await TestInMethodAsync(@"DateTime.No$$w.ToString();",
MainDescription("DateTime DateTime.Now { get; }"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task NonLocalProperty_Qualified()
{
await TestInMethodAsync(
@"System.IO.FileInfo f;
f.Att$$ributes.ToString();",
MainDescription("System.IO.FileAttributes System.IO.FileSystemInfo.Attributes { get; set; }"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task ConstructedGenericProperty()
{
await TestAsync(
@"class C<T>
{
public T Property { get; set }
}
class D
{
void M()
{
new C<int>().Pro$$perty.ToString();
}
}",
MainDescription("int C<int>.Property { get; set; }"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task UnconstructedGenericProperty()
{
await TestAsync(
@"class C<T>
{
public T Property { get; set}
void M()
{
Pro$$perty.ToString();
}
}",
MainDescription("T C<T>.Property { get; set; }"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task ValueInProperty()
{
await TestInClassAsync(
@"public DateTime Property
{
set
{
goo = val$$ue;
}
}",
MainDescription($"({FeaturesResources.parameter}) DateTime value"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task EnumTypeName()
{
await TestInMethodAsync(@"Consol$$eColor c",
MainDescription("enum System.ConsoleColor"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(52490, "https://github.com/dotnet/roslyn/issues/52490")]
public async Task EnumNonDefaultUnderlyingType_Definition()
{
await TestInClassAsync(@"enum E$$ : byte { A, B }",
MainDescription("enum C.E : byte"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(52490, "https://github.com/dotnet/roslyn/issues/52490")]
public async Task EnumNonDefaultUnderlyingType_AsField()
{
await TestInClassAsync(@"
enum E : byte { A, B }
private E$$ _E;
",
MainDescription("enum C.E : byte"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(52490, "https://github.com/dotnet/roslyn/issues/52490")]
public async Task EnumNonDefaultUnderlyingType_AsProperty()
{
await TestInClassAsync(@"
enum E : byte { A, B }
private E$$ E{ get; set; };
",
MainDescription("enum C.E : byte"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(52490, "https://github.com/dotnet/roslyn/issues/52490")]
public async Task EnumNonDefaultUnderlyingType_AsParameter()
{
await TestInClassAsync(@"
enum E : byte { A, B }
private void M(E$$ e) { }
",
MainDescription("enum C.E : byte"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(52490, "https://github.com/dotnet/roslyn/issues/52490")]
public async Task EnumNonDefaultUnderlyingType_AsReturnType()
{
await TestInClassAsync(@"
enum E : byte { A, B }
private E$$ M() { }
",
MainDescription("enum C.E : byte"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(52490, "https://github.com/dotnet/roslyn/issues/52490")]
public async Task EnumNonDefaultUnderlyingType_AsLocal()
{
await TestInClassAsync(@"
enum E : byte { A, B }
private void M()
{
E$$ e = default;
}
",
MainDescription("enum C.E : byte"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(52490, "https://github.com/dotnet/roslyn/issues/52490")]
public async Task EnumNonDefaultUnderlyingType_OnMemberAccessOnType()
{
await TestInClassAsync(@"
enum E : byte { A, B }
private void M()
{
var ea = E$$.A;
}
",
MainDescription("enum C.E : byte"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(52490, "https://github.com/dotnet/roslyn/issues/52490")]
public async Task EnumNonDefaultUnderlyingType_NotOnMemberAccessOnMember()
{
await TestInClassAsync(@"
enum E : byte { A, B }
private void M()
{
var ea = E.A$$;
}
",
MainDescription("E.A = 0"));
}
[Theory, WorkItem(52490, "https://github.com/dotnet/roslyn/issues/52490")]
[InlineData("byte", "byte")]
[InlineData("byte", "System.Byte")]
[InlineData("sbyte", "sbyte")]
[InlineData("sbyte", "System.SByte")]
[InlineData("short", "short")]
[InlineData("short", "System.Int16")]
[InlineData("ushort", "ushort")]
[InlineData("ushort", "System.UInt16")]
// int is the default type and is not shown
[InlineData("uint", "uint")]
[InlineData("uint", "System.UInt32")]
[InlineData("long", "long")]
[InlineData("long", "System.Int64")]
[InlineData("ulong", "ulong")]
[InlineData("ulong", "System.UInt64")]
public async Task EnumNonDefaultUnderlyingType_ShowForNonDefaultTypes(string displayTypeName, string underlyingTypeName)
{
await TestInClassAsync(@$"
enum E$$ : {underlyingTypeName}
{{
A, B
}}",
MainDescription($"enum C.E : {displayTypeName}"));
}
[Theory, WorkItem(52490, "https://github.com/dotnet/roslyn/issues/52490")]
[InlineData("")]
[InlineData(": int")]
[InlineData(": System.Int32")]
public async Task EnumNonDefaultUnderlyingType_DontShowForDefaultType(string defaultType)
{
await TestInClassAsync(@$"
enum E$$ {defaultType}
{{
A, B
}}",
MainDescription("enum C.E"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task EnumMemberNameFromMetadata()
{
await TestInMethodAsync(@"ConsoleColor c = ConsoleColor.Bla$$ck",
MainDescription("ConsoleColor.Black = 0"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task FlagsEnumMemberNameFromMetadata1()
{
await TestInMethodAsync(@"AttributeTargets a = AttributeTargets.Cl$$ass",
MainDescription("AttributeTargets.Class = 4"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task FlagsEnumMemberNameFromMetadata2()
{
await TestInMethodAsync(@"AttributeTargets a = AttributeTargets.A$$ll",
MainDescription("AttributeTargets.All = AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Parameter | AttributeTargets.Delegate | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task EnumMemberNameFromSource1()
{
await TestAsync(
@"enum E
{
A = 1 << 0,
B = 1 << 1,
C = 1 << 2
}
class C
{
void M()
{
var e = E.B$$;
}
}",
MainDescription("E.B = 1 << 1"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task EnumMemberNameFromSource2()
{
await TestAsync(
@"enum E
{
A,
B,
C
}
class C
{
void M()
{
var e = E.B$$;
}
}",
MainDescription("E.B = 1"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Parameter_InMethod_Minimal()
{
await TestInClassAsync(
@"void M(DateTime dt)
{
d$$t.ToString();",
MainDescription($"({FeaturesResources.parameter}) DateTime dt"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Parameter_InMethod_Qualified()
{
await TestInClassAsync(
@"void M(System.IO.FileInfo fileInfo)
{
file$$Info.ToString();",
MainDescription($"({FeaturesResources.parameter}) System.IO.FileInfo fileInfo"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Parameter_FromReferenceToNamedParameter()
{
await TestInMethodAsync(@"Console.WriteLine(va$$lue: ""Hi"");",
MainDescription($"({FeaturesResources.parameter}) string value"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Parameter_DefaultValue()
{
// NOTE: Dev10 doesn't show the default value, but it would be nice if we did.
// NOTE: The "DefaultValue" property isn't implemented yet.
await TestInClassAsync(
@"void M(int param = 42)
{
para$$m.ToString();
}",
MainDescription($"({FeaturesResources.parameter}) int param = 42"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Parameter_Params()
{
await TestInClassAsync(
@"void M(params DateTime[] arg)
{
ar$$g.ToString();
}",
MainDescription($"({FeaturesResources.parameter}) params DateTime[] arg"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Parameter_Ref()
{
await TestInClassAsync(
@"void M(ref DateTime arg)
{
ar$$g.ToString();
}",
MainDescription($"({FeaturesResources.parameter}) ref DateTime arg"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Parameter_Out()
{
await TestInClassAsync(
@"void M(out DateTime arg)
{
ar$$g.ToString();
}",
MainDescription($"({FeaturesResources.parameter}) out DateTime arg"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Local_Minimal()
{
await TestInMethodAsync(
@"DateTime dt;
d$$t.ToString();",
MainDescription($"({FeaturesResources.local_variable}) DateTime dt"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Local_Qualified()
{
await TestInMethodAsync(
@"System.IO.FileInfo fileInfo;
file$$Info.ToString();",
MainDescription($"({FeaturesResources.local_variable}) System.IO.FileInfo fileInfo"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Method_MetadataOverload()
{
await TestInMethodAsync("Console.Write$$Line();",
MainDescription($"void Console.WriteLine() (+ 18 {FeaturesResources.overloads_})"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Method_SimpleWithOverload()
{
await TestInClassAsync(
@"void Method()
{
Met$$hod();
}
void Method(int i)
{
}",
MainDescription($"void C.Method() (+ 1 {FeaturesResources.overload})"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Method_MoreOverloads()
{
await TestInClassAsync(
@"void Method()
{
Met$$hod(null);
}
void Method(int i)
{
}
void Method(DateTime dt)
{
}
void Method(System.IO.FileInfo fileInfo)
{
}",
MainDescription($"void C.Method(System.IO.FileInfo fileInfo) (+ 3 {FeaturesResources.overloads_})"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Method_SimpleInSameClass()
{
await TestInClassAsync(
@"DateTime GetDate(System.IO.FileInfo ft)
{
Get$$Date(null);
}",
MainDescription("DateTime C.GetDate(System.IO.FileInfo ft)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Method_OptionalParameter()
{
await TestInClassAsync(
@"void M()
{
Met$$hod();
}
void Method(int i = 0)
{
}",
MainDescription("void C.Method([int i = 0])"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Method_OptionalDecimalParameter()
{
await TestInClassAsync(
@"void Goo(decimal x$$yz = 10)
{
}",
MainDescription($"({FeaturesResources.parameter}) decimal xyz = 10"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Method_Generic()
{
// Generic method don't get the instantiation info yet. NOTE: We don't display
// constraint info in Dev10. Should we?
await TestInClassAsync(
@"TOut Goo<TIn, TOut>(TIn arg) where TIn : IEquatable<TIn>
{
Go$$o<int, DateTime>(37);
}",
MainDescription("DateTime C.Goo<int, DateTime>(int arg)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Method_UnconstructedGeneric()
{
await TestInClassAsync(
@"TOut Goo<TIn, TOut>(TIn arg)
{
Go$$o<TIn, TOut>(default(TIn);
}",
MainDescription("TOut C.Goo<TIn, TOut>(TIn arg)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Method_Inferred()
{
await TestInClassAsync(
@"void Goo<TIn>(TIn arg)
{
Go$$o(42);
}",
MainDescription("void C.Goo<int>(int arg)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Method_MultipleParams()
{
await TestInClassAsync(
@"void Goo(DateTime dt, System.IO.FileInfo fi, int number)
{
Go$$o(DateTime.Now, null, 32);
}",
MainDescription("void C.Goo(DateTime dt, System.IO.FileInfo fi, int number)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Method_OptionalParam()
{
// NOTE - Default values aren't actually returned by symbols yet.
await TestInClassAsync(
@"void Goo(int num = 42)
{
Go$$o();
}",
MainDescription("void C.Goo([int num = 42])"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Method_ParameterModifiers()
{
// NOTE - Default values aren't actually returned by symbols yet.
await TestInClassAsync(
@"void Goo(ref DateTime dt, out System.IO.FileInfo fi, params int[] numbers)
{
Go$$o(DateTime.Now, null, 32);
}",
MainDescription("void C.Goo(ref DateTime dt, out System.IO.FileInfo fi, params int[] numbers)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Constructor()
{
await TestInClassAsync(
@"public C()
{
}
void M()
{
new C$$().ToString();
}",
MainDescription("C.C()"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Constructor_Overloads()
{
await TestInClassAsync(
@"public C()
{
}
public C(DateTime dt)
{
}
public C(int i)
{
}
void M()
{
new C$$(DateTime.MaxValue).ToString();
}",
MainDescription($"C.C(DateTime dt) (+ 2 {FeaturesResources.overloads_})"));
}
/// <summary>
/// Regression for 3923
/// </summary>
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Constructor_OverloadFromStringLiteral()
{
await TestInMethodAsync(
@"new InvalidOperatio$$nException("""");",
MainDescription($"InvalidOperationException.InvalidOperationException(string message) (+ 2 {FeaturesResources.overloads_})"));
}
/// <summary>
/// Regression for 3923
/// </summary>
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Constructor_UnknownType()
{
await TestInvalidTypeInClassAsync(
@"void M()
{
new G$$oo();
}");
}
/// <summary>
/// Regression for 3923
/// </summary>
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Constructor_OverloadFromProperty()
{
await TestInMethodAsync(
@"new InvalidOperatio$$nException(this.GetType().Name);",
MainDescription($"InvalidOperationException.InvalidOperationException(string message) (+ 2 {FeaturesResources.overloads_})"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Constructor_Metadata()
{
await TestInMethodAsync(
@"new Argument$$NullException();",
MainDescription($"ArgumentNullException.ArgumentNullException() (+ 3 {FeaturesResources.overloads_})"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Constructor_MetadataQualified()
{
await TestInMethodAsync(@"new System.IO.File$$Info(null);",
MainDescription("System.IO.FileInfo.FileInfo(string fileName)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task InterfaceProperty()
{
await TestInMethodAsync(
@"interface I
{
string Name$$ { get; set; }
}",
MainDescription("string I.Name { get; set; }"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task ExplicitInterfacePropertyImplementation()
{
await TestInMethodAsync(
@"interface I
{
string Name { get; set; }
}
class C : I
{
string IEmployee.Name$$
{
get
{
return """";
}
set
{
}
}
}",
MainDescription("string C.Name { get; set; }"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Operator()
{
await TestInClassAsync(
@"public static C operator +(C left, C right)
{
return null;
}
void M(C left, C right)
{
return left +$$ right;
}",
MainDescription("C C.operator +(C left, C right)"));
}
#pragma warning disable CA2243 // Attribute string literals should parse correctly
[WorkItem(792629, "generic type parameter constraints for methods in quick info")]
#pragma warning restore CA2243 // Attribute string literals should parse correctly
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task GenericMethodWithConstraintsAtDeclaration()
{
await TestInClassAsync(
@"TOut G$$oo<TIn, TOut>(TIn arg) where TIn : IEquatable<TIn>
{
}",
MainDescription("TOut C.Goo<TIn, TOut>(TIn arg) where TIn : IEquatable<TIn>"));
}
#pragma warning disable CA2243 // Attribute string literals should parse correctly
[WorkItem(792629, "generic type parameter constraints for methods in quick info")]
#pragma warning restore CA2243 // Attribute string literals should parse correctly
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task GenericMethodWithMultipleConstraintsAtDeclaration()
{
await TestInClassAsync(
@"TOut Goo<TIn, TOut>(TIn arg) where TIn : Employee, new()
{
Go$$o<TIn, TOut>(default(TIn);
}",
MainDescription("TOut C.Goo<TIn, TOut>(TIn arg) where TIn : Employee, new()"));
}
#pragma warning disable CA2243 // Attribute string literals should parse correctly
[WorkItem(792629, "generic type parameter constraints for methods in quick info")]
#pragma warning restore CA2243 // Attribute string literals should parse correctly
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task UnConstructedGenericMethodWithConstraintsAtInvocation()
{
await TestInClassAsync(
@"TOut Goo<TIn, TOut>(TIn arg) where TIn : Employee
{
Go$$o<TIn, TOut>(default(TIn);
}",
MainDescription("TOut C.Goo<TIn, TOut>(TIn arg) where TIn : Employee"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task GenericTypeWithConstraintsAtDeclaration()
{
await TestAsync(
@"public class Employee : IComparable<Employee>
{
public int CompareTo(Employee other)
{
throw new NotImplementedException();
}
}
class Emplo$$yeeList<T> : IEnumerable<T> where T : Employee, System.IComparable<T>, new()
{
}",
MainDescription("class EmployeeList<T> where T : Employee, System.IComparable<T>, new()"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task GenericType()
{
await TestAsync(
@"class T1<T11>
{
$$T11 i;
}",
MainDescription($"T11 {FeaturesResources.in_} T1<T11>"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task GenericMethod()
{
await TestInClassAsync(
@"static void Meth1<T1>(T1 i) where T1 : struct
{
$$T1 i;
}",
MainDescription($"T1 {FeaturesResources.in_} C.Meth1<T1> where T1 : struct"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Var()
{
await TestInMethodAsync(
@"var x = new Exception();
var y = $$x;",
MainDescription($"({FeaturesResources.local_variable}) Exception x"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task NullableReference()
{
await TestWithOptionsAsync(
Options.Regular.WithLanguageVersion(LanguageVersion.CSharp8),
@"class A<T>
{
}
class B
{
static void M()
{
A<B?>? x = null!;
var y = x;
$$y.ToString();
}
}",
// https://github.com/dotnet/roslyn/issues/26198 public API should show inferred nullability
MainDescription($"({FeaturesResources.local_variable}) A<B?> y"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(26648, "https://github.com/dotnet/roslyn/issues/26648")]
public async Task NullableReference_InMethod()
{
var code = @"
class G
{
void M()
{
C c;
c.Go$$o();
}
}
public class C
{
public string? Goo(IEnumerable<object?> arg)
{
}
}";
await TestWithOptionsAsync(
Options.Regular.WithLanguageVersion(LanguageVersion.CSharp8),
code, MainDescription("string? C.Goo(IEnumerable<object?> arg)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task NestedInGeneric()
{
await TestInMethodAsync(
@"List<int>.Enu$$merator e;",
MainDescription("struct System.Collections.Generic.List<T>.Enumerator"),
TypeParameterMap($"\r\nT {FeaturesResources.is_} int"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task NestedGenericInGeneric()
{
await TestAsync(
@"class Outer<T>
{
class Inner<U>
{
}
static void M()
{
Outer<int>.I$$nner<string> e;
}
}",
MainDescription("class Outer<T>.Inner<U>"),
TypeParameterMap(
Lines($"\r\nT {FeaturesResources.is_} int",
$"U {FeaturesResources.is_} string")));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task ObjectInitializer1()
{
await TestInClassAsync(
@"void M()
{
var x = new test() { $$z = 5 };
}
class test
{
public int z;
}",
MainDescription($"({FeaturesResources.field}) int test.z"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task ObjectInitializer2()
{
await TestInMethodAsync(
@"class C
{
void M()
{
var x = new test() { z = $$5 };
}
class test
{
public int z;
}
}",
MainDescription("struct System.Int32"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(537880, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/537880")]
public async Task TypeArgument()
{
await TestAsync(
@"class C<T, Y>
{
void M()
{
C<int, DateTime> variable;
$$variable = new C<int, DateTime>();
}
}",
MainDescription($"({FeaturesResources.local_variable}) C<int, DateTime> variable"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task ForEachLoop_1()
{
await TestInMethodAsync(
@"int bb = 555;
bb = bb + 1;
foreach (int cc in new int[]{ 1,2,3}){
c$$c = 1;
bb = bb + 21;
}",
MainDescription($"({FeaturesResources.local_variable}) int cc"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TryCatchFinally_1()
{
await TestInMethodAsync(
@"try
{
int aa = 555;
a$$a = aa + 1;
}
catch (Exception ex)
{
}
finally
{
}",
MainDescription($"({FeaturesResources.local_variable}) int aa"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TryCatchFinally_2()
{
await TestInMethodAsync(
@"try
{
}
catch (Exception ex)
{
var y = e$$x;
var z = y;
}
finally
{
}",
MainDescription($"({FeaturesResources.local_variable}) Exception ex"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TryCatchFinally_3()
{
await TestInMethodAsync(
@"try
{
}
catch (Exception ex)
{
var aa = 555;
aa = a$$a + 1;
}
finally
{
}",
MainDescription($"({FeaturesResources.local_variable}) int aa"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TryCatchFinally_4()
{
await TestInMethodAsync(
@"try
{
}
catch (Exception ex)
{
}
finally
{
int aa = 555;
aa = a$$a + 1;
}",
MainDescription($"({FeaturesResources.local_variable}) int aa"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task GenericVariable()
{
await TestAsync(
@"class C<T, Y>
{
void M()
{
C<int, DateTime> variable;
var$$iable = new C<int, DateTime>();
}
}",
MainDescription($"({FeaturesResources.local_variable}) C<int, DateTime> variable"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestInstantiation()
{
await TestAsync(
@"using System.Collections.Generic;
class Program<T>
{
static void Main(string[] args)
{
var p = new Dictio$$nary<int, string>();
}
}",
MainDescription($"Dictionary<int, string>.Dictionary() (+ 5 {FeaturesResources.overloads_})"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestUsingAlias_Bug4141()
{
await TestAsync(
@"using X = A.C;
class A
{
public class C
{
}
}
class D : X$$
{
}",
MainDescription(@"class A.C"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestFieldOnDeclaration()
{
await TestInClassAsync(
@"DateTime fie$$ld;",
MainDescription($"({FeaturesResources.field}) DateTime C.field"));
}
[WorkItem(538767, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/538767")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestGenericErrorFieldOnDeclaration()
{
await TestInClassAsync(
@"NonExistentType<int> fi$$eld;",
MainDescription($"({FeaturesResources.field}) NonExistentType<int> C.field"));
}
[WorkItem(538822, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/538822")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestDelegateType()
{
await TestInClassAsync(
@"Fun$$c<int, string> field;",
MainDescription("delegate TResult System.Func<in T, out TResult>(T arg)"),
TypeParameterMap(
Lines($"\r\nT {FeaturesResources.is_} int",
$"TResult {FeaturesResources.is_} string")));
}
[WorkItem(538824, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/538824")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestOnDelegateInvocation()
{
await TestAsync(
@"class Program
{
delegate void D1();
static void Main()
{
D1 d = Main;
$$d();
}
}",
MainDescription($"({FeaturesResources.local_variable}) D1 d"));
}
[WorkItem(539240, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/539240")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestOnArrayCreation1()
{
await TestAsync(
@"class Program
{
static void Main()
{
int[] a = n$$ew int[0];
}
}", MainDescription("int[]"));
}
[WorkItem(539240, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/539240")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestOnArrayCreation2()
{
await TestAsync(
@"class Program
{
static void Main()
{
int[] a = new i$$nt[0];
}
}",
MainDescription("struct System.Int32"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Constructor_ImplicitObjectCreation()
{
await TestAsync(
@"class C
{
static void Main()
{
C c = ne$$w();
}
}
",
MainDescription("C.C()"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Constructor_ImplicitObjectCreation_WithParameters()
{
await TestAsync(
@"class C
{
C(int i) { }
C(string s) { }
static void Main()
{
C c = ne$$w(1);
}
}
",
MainDescription($"C.C(int i) (+ 1 {FeaturesResources.overload})"));
}
[WorkItem(539841, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/539841")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestIsNamedTypeAccessibleForErrorTypes()
{
await TestAsync(
@"sealed class B<T1, T2> : A<B<T1, T2>>
{
protected sealed override B<A<T>, A$$<T>> N()
{
}
}
internal class A<T>
{
}",
MainDescription("class A<T>"));
}
[WorkItem(540075, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/540075")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestErrorType()
{
await TestAsync(
@"using Goo = Goo;
class C
{
void Main()
{
$$Goo
}
}",
MainDescription("Goo"));
}
[WorkItem(16662, "https://github.com/dotnet/roslyn/issues/16662")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestShortDiscardInAssignment()
{
await TestAsync(
@"class C
{
int M()
{
$$_ = M();
}
}",
MainDescription($"({FeaturesResources.discard}) int _"));
}
[WorkItem(16662, "https://github.com/dotnet/roslyn/issues/16662")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestUnderscoreLocalInAssignment()
{
await TestAsync(
@"class C
{
int M()
{
var $$_ = M();
}
}",
MainDescription($"({FeaturesResources.local_variable}) int _"));
}
[WorkItem(16662, "https://github.com/dotnet/roslyn/issues/16662")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestShortDiscardInOutVar()
{
await TestAsync(
@"class C
{
void M(out int i)
{
M(out $$_);
i = 0;
}
}",
MainDescription($"({FeaturesResources.discard}) int _"));
}
[WorkItem(16667, "https://github.com/dotnet/roslyn/issues/16667")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestDiscardInOutVar()
{
await TestAsync(
@"class C
{
void M(out int i)
{
M(out var $$_);
i = 0;
}
}"); // No quick info (see issue #16667)
}
[WorkItem(16667, "https://github.com/dotnet/roslyn/issues/16667")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestDiscardInIsPattern()
{
await TestAsync(
@"class C
{
void M()
{
if (3 is int $$_) { }
}
}"); // No quick info (see issue #16667)
}
[WorkItem(16667, "https://github.com/dotnet/roslyn/issues/16667")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestDiscardInSwitchPattern()
{
await TestAsync(
@"class C
{
void M()
{
switch (3)
{
case int $$_:
return;
}
}
}"); // No quick info (see issue #16667)
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestLambdaDiscardParameter_FirstDiscard()
{
await TestAsync(
@"class C
{
void M()
{
System.Func<string, int, int> f = ($$_, _) => 1;
}
}",
MainDescription($"({FeaturesResources.discard}) string _"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestLambdaDiscardParameter_SecondDiscard()
{
await TestAsync(
@"class C
{
void M()
{
System.Func<string, int, int> f = (_, $$_) => 1;
}
}",
MainDescription($"({FeaturesResources.discard}) int _"));
}
[WorkItem(540871, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/540871")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestLiterals()
{
await TestAsync(
@"class MyClass
{
MyClass() : this($$10)
{
intI = 2;
}
public MyClass(int i)
{
}
static int intI = 1;
public static int Main()
{
return 1;
}
}",
MainDescription("struct System.Int32"));
}
[WorkItem(541444, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/541444")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestErrorInForeach()
{
await TestAsync(
@"class C
{
void Main()
{
foreach (int cc in null)
{
$$cc = 1;
}
}
}",
MainDescription($"({FeaturesResources.local_variable}) int cc"));
}
[WorkItem(541678, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/541678")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestQuickInfoOnEvent()
{
await TestAsync(
@"using System;
public class SampleEventArgs
{
public SampleEventArgs(string s)
{
Text = s;
}
public String Text { get; private set; }
}
public class Publisher
{
public delegate void SampleEventHandler(object sender, SampleEventArgs e);
public event SampleEventHandler SampleEvent;
protected virtual void RaiseSampleEvent()
{
if (Sam$$pleEvent != null)
SampleEvent(this, new SampleEventArgs(""Hello""));
}
}",
MainDescription("SampleEventHandler Publisher.SampleEvent"));
}
[WorkItem(542157, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542157")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestEvent()
{
await TestInMethodAsync(@"System.Console.CancelKeyPres$$s += null;",
MainDescription("ConsoleCancelEventHandler Console.CancelKeyPress"));
}
[WorkItem(542157, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542157")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestEventPlusEqualsOperator()
{
await TestInMethodAsync(@"System.Console.CancelKeyPress +$$= null;",
MainDescription("void Console.CancelKeyPress.add"));
}
[WorkItem(542157, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542157")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestEventMinusEqualsOperator()
{
await TestInMethodAsync(@"System.Console.CancelKeyPress -$$= null;",
MainDescription("void Console.CancelKeyPress.remove"));
}
[WorkItem(541885, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/541885")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestQuickInfoOnExtensionMethod()
{
await TestWithOptionsAsync(Options.Regular,
@"using System;
using System.Collections.Generic;
using System.Linq;
class Program
{
static void Main(string[] args)
{
int[] values = {
1
};
bool isArray = 7.I$$n(values);
}
}
public static class MyExtensions
{
public static bool In<T>(this T o, IEnumerable<T> items)
{
return true;
}
}",
MainDescription($"({CSharpFeaturesResources.extension}) bool int.In<int>(IEnumerable<int> items)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestQuickInfoOnExtensionMethodOverloads()
{
await TestWithOptionsAsync(Options.Regular,
@"using System;
using System.Linq;
class Program
{
static void Main(string[] args)
{
""1"".Test$$Ext();
}
}
public static class Ex
{
public static void TestExt<T>(this T ex)
{
}
public static void TestExt<T>(this T ex, T arg)
{
}
public static void TestExt(this string ex, int arg)
{
}
}",
MainDescription($"({CSharpFeaturesResources.extension}) void string.TestExt<string>() (+ 2 {FeaturesResources.overloads_})"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestQuickInfoOnExtensionMethodOverloads2()
{
await TestWithOptionsAsync(Options.Regular,
@"using System;
using System.Linq;
class Program
{
static void Main(string[] args)
{
""1"".Test$$Ext();
}
}
public static class Ex
{
public static void TestExt<T>(this T ex)
{
}
public static void TestExt<T>(this T ex, T arg)
{
}
public static void TestExt(this int ex, int arg)
{
}
}",
MainDescription($"({CSharpFeaturesResources.extension}) void string.TestExt<string>() (+ 1 {FeaturesResources.overload})"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Query1()
{
await TestAsync(
@"using System.Linq;
class C
{
void M()
{
var q = from n in new int[] { 1, 2, 3, 4, 5 }
select $$n;
}
}",
MainDescription($"({FeaturesResources.range_variable}) int n"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Query2()
{
await TestAsync(
@"using System.Linq;
class C
{
void M()
{
var q = from n$$ in new int[] { 1, 2, 3, 4, 5 }
select n;
}
}",
MainDescription($"({FeaturesResources.range_variable}) int n"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Query3()
{
await TestAsync(
@"class C
{
void M()
{
var q = from n in new int[] { 1, 2, 3, 4, 5 }
select $$n;
}
}",
MainDescription($"({FeaturesResources.range_variable}) ? n"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Query4()
{
await TestAsync(
@"class C
{
void M()
{
var q = from n$$ in new int[] { 1, 2, 3, 4, 5 }
select n;
}
}",
MainDescription($"({FeaturesResources.range_variable}) ? n"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Query5()
{
await TestAsync(
@"using System.Collections.Generic;
using System.Linq;
class C
{
void M()
{
var q = from n in new List<object>()
select $$n;
}
}",
MainDescription($"({FeaturesResources.range_variable}) object n"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Query6()
{
await TestAsync(
@"using System.Collections.Generic;
using System.Linq;
class C
{
void M()
{
var q = from n$$ in new List<object>()
select n;
}
}",
MainDescription($"({FeaturesResources.range_variable}) object n"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Query7()
{
await TestAsync(
@"using System.Collections.Generic;
using System.Linq;
class C
{
void M()
{
var q = from int n in new List<object>()
select $$n;
}
}",
MainDescription($"({FeaturesResources.range_variable}) int n"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Query8()
{
await TestAsync(
@"using System.Collections.Generic;
using System.Linq;
class C
{
void M()
{
var q = from int n$$ in new List<object>()
select n;
}
}",
MainDescription($"({FeaturesResources.range_variable}) int n"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Query9()
{
await TestAsync(
@"using System.Collections.Generic;
using System.Linq;
class C
{
void M()
{
var q = from x$$ in new List<List<int>>()
from y in x
select y;
}
}",
MainDescription($"({FeaturesResources.range_variable}) List<int> x"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Query10()
{
await TestAsync(
@"using System.Collections.Generic;
using System.Linq;
class C
{
void M()
{
var q = from x in new List<List<int>>()
from y in $$x
select y;
}
}",
MainDescription($"({FeaturesResources.range_variable}) List<int> x"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Query11()
{
await TestAsync(
@"using System.Collections.Generic;
using System.Linq;
class C
{
void M()
{
var q = from x in new List<List<int>>()
from y$$ in x
select y;
}
}",
MainDescription($"({FeaturesResources.range_variable}) int y"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Query12()
{
await TestAsync(
@"using System.Collections.Generic;
using System.Linq;
class C
{
void M()
{
var q = from x in new List<List<int>>()
from y in x
select $$y;
}
}",
MainDescription($"({FeaturesResources.range_variable}) int y"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoSelectMappedEnumerable()
{
await TestInMethodAsync(
@"
var q = from i in new int[0]
$$select i;
",
MainDescription($"({CSharpFeaturesResources.extension}) IEnumerable<int> IEnumerable<int>.Select<int, int>(Func<int, int> selector)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoSelectMappedQueryable()
{
await TestInMethodAsync(
@"
var q = from i in new int[0].AsQueryable()
$$select i;
",
MainDescription($"({CSharpFeaturesResources.extension}) IQueryable<int> IQueryable<int>.Select<int, int>(System.Linq.Expressions.Expression<Func<int, int>> selector)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoSelectMappedCustom()
{
await TestAsync(
@"
using System;
using System.Linq;
namespace N {
public static class LazyExt
{
public static Lazy<U> Select<T, U>(this Lazy<T> source, Func<T, U> selector) => new Lazy<U>(() => selector(source.Value));
}
public class C
{
public void M()
{
var lazy = new Lazy<object>();
var q = from i in lazy
$$select i;
}
}
}
",
MainDescription($"({CSharpFeaturesResources.extension}) Lazy<object> Lazy<object>.Select<object, object>(Func<object, object> selector)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoSelectNotMapped()
{
await TestInMethodAsync(
@"
var q = from i in new int[0]
where true
$$select i;
");
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoLet()
{
await TestInMethodAsync(
@"
var q = from i in new int[0]
$$let j = true
select i;
",
MainDescription($"({CSharpFeaturesResources.extension}) IEnumerable<'a> IEnumerable<int>.Select<int, 'a>(Func<int, 'a> selector)"),
AnonymousTypes($@"
{FeaturesResources.Anonymous_Types_colon}
'a {FeaturesResources.is_} new {{ int i, bool j }}"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoWhere()
{
await TestInMethodAsync(
@"
var q = from i in new int[0]
$$where true
select i;
",
MainDescription($"({CSharpFeaturesResources.extension}) IEnumerable<int> IEnumerable<int>.Where<int>(Func<int, bool> predicate)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoOrderByOneProperty()
{
await TestInMethodAsync(
@"
var q = from i in new int[0]
$$orderby i
select i;
",
MainDescription($"({CSharpFeaturesResources.extension}) IOrderedEnumerable<int> IEnumerable<int>.OrderBy<int, int>(Func<int, int> keySelector)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoOrderByOnePropertyWithOrdering1()
{
await TestInMethodAsync(
@"
var q = from i in new int[0]
orderby i $$ascending
select i;
",
MainDescription($"({CSharpFeaturesResources.extension}) IOrderedEnumerable<int> IEnumerable<int>.OrderBy<int, int>(Func<int, int> keySelector)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoOrderByOnePropertyWithOrdering2()
{
await TestInMethodAsync(
@"
var q = from i in new int[0]
$$orderby i ascending
select i;
");
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoOrderByTwoPropertiesWithComma1()
{
await TestInMethodAsync(
@"
var q = from i in new int[0]
orderby i$$, i
select i;
",
MainDescription($"({CSharpFeaturesResources.extension}) IOrderedEnumerable<int> IOrderedEnumerable<int>.ThenBy<int, int>(Func<int, int> keySelector)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoOrderByTwoPropertiesWithComma2()
{
await TestInMethodAsync(
@"
var q = from i in new int[0]
$$orderby i, i
select i;
",
MainDescription($"({CSharpFeaturesResources.extension}) IOrderedEnumerable<int> IEnumerable<int>.OrderBy<int, int>(Func<int, int> keySelector)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoOrderByTwoPropertiesWithOrdering1()
{
await TestInMethodAsync(
@"
var q = from i in new int[0]
$$orderby i, i ascending
select i;
",
MainDescription($"({CSharpFeaturesResources.extension}) IOrderedEnumerable<int> IEnumerable<int>.OrderBy<int, int>(Func<int, int> keySelector)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoOrderByTwoPropertiesWithOrdering2()
{
await TestInMethodAsync(
@"
var q = from i in new int[0]
orderby i,$$ i ascending
select i;
");
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoOrderByTwoPropertiesWithOrdering3()
{
await TestInMethodAsync(
@"
var q = from i in new int[0]
orderby i, i $$ascending
select i;
",
MainDescription($"({CSharpFeaturesResources.extension}) IOrderedEnumerable<int> IOrderedEnumerable<int>.ThenBy<int, int>(Func<int, int> keySelector)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoOrderByTwoPropertiesWithOrderingOnEach1()
{
await TestInMethodAsync(
@"
var q = from i in new int[0]
$$orderby i ascending, i ascending
select i;
");
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoOrderByTwoPropertiesWithOrderingOnEach2()
{
await TestInMethodAsync(
@"
var q = from i in new int[0]
orderby i $$ascending, i ascending
select i;
",
MainDescription($"({CSharpFeaturesResources.extension}) IOrderedEnumerable<int> IEnumerable<int>.OrderBy<int, int>(Func<int, int> keySelector)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoOrderByTwoPropertiesWithOrderingOnEach3()
{
await TestInMethodAsync(
@"
var q = from i in new int[0]
orderby i ascending ,$$ i ascending
select i;
");
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoOrderByTwoPropertiesWithOrderingOnEach4()
{
await TestInMethodAsync(
@"
var q = from i in new int[0]
orderby i ascending, i $$ascending
select i;
",
MainDescription($"({CSharpFeaturesResources.extension}) IOrderedEnumerable<int> IOrderedEnumerable<int>.ThenBy<int, int>(Func<int, int> keySelector)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoOrderByIncomplete()
{
await TestInMethodAsync(
@"
var q = from i in new int[0]
where i > 0
orderby$$
",
MainDescription($"({CSharpFeaturesResources.extension}) IOrderedEnumerable<int> IEnumerable<int>.OrderBy<int, ?>(Func<int, ?> keySelector)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoSelectMany1()
{
await TestInMethodAsync(
@"
var q = from i1 in new int[0]
$$from i2 in new int[0]
select i1;
",
MainDescription($"({CSharpFeaturesResources.extension}) IEnumerable<int> IEnumerable<int>.SelectMany<int, int, int>(Func<int, IEnumerable<int>> collectionSelector, Func<int, int, int> resultSelector)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoSelectMany2()
{
await TestInMethodAsync(
@"
var q = from i1 in new int[0]
from i2 $$in new int[0]
select i1;
",
MainDescription($"({CSharpFeaturesResources.extension}) IEnumerable<int> IEnumerable<int>.SelectMany<int, int, int>(Func<int, IEnumerable<int>> collectionSelector, Func<int, int, int> resultSelector)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoGroupBy1()
{
await TestInMethodAsync(
@"
var q = from i in new int[0]
$$group i by i;
",
MainDescription($"({CSharpFeaturesResources.extension}) IEnumerable<IGrouping<int, int>> IEnumerable<int>.GroupBy<int, int>(Func<int, int> keySelector)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoGroupBy2()
{
await TestInMethodAsync(
@"
var q = from i in new int[0]
group i $$by i;
",
MainDescription($"({CSharpFeaturesResources.extension}) IEnumerable<IGrouping<int, int>> IEnumerable<int>.GroupBy<int, int>(Func<int, int> keySelector)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoGroupByInto()
{
await TestInMethodAsync(
@"
var q = from i in new int[0]
$$group i by i into g
select g;
",
MainDescription($"({CSharpFeaturesResources.extension}) IEnumerable<IGrouping<int, int>> IEnumerable<int>.GroupBy<int, int>(Func<int, int> keySelector)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoJoin1()
{
await TestInMethodAsync(
@"
var q = from i1 in new int[0]
$$join i2 in new int[0] on i1 equals i2
select i1;
",
MainDescription($"({CSharpFeaturesResources.extension}) IEnumerable<int> IEnumerable<int>.Join<int, int, int, int>(IEnumerable<int> inner, Func<int, int> outerKeySelector, Func<int, int> innerKeySelector, Func<int, int, int> resultSelector)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoJoin2()
{
await TestInMethodAsync(
@"
var q = from i1 in new int[0]
join i2 $$in new int[0] on i1 equals i2
select i1;
",
MainDescription($"({CSharpFeaturesResources.extension}) IEnumerable<int> IEnumerable<int>.Join<int, int, int, int>(IEnumerable<int> inner, Func<int, int> outerKeySelector, Func<int, int> innerKeySelector, Func<int, int, int> resultSelector)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoJoin3()
{
await TestInMethodAsync(
@"
var q = from i1 in new int[0]
join i2 in new int[0] $$on i1 equals i2
select i1;
",
MainDescription($"({CSharpFeaturesResources.extension}) IEnumerable<int> IEnumerable<int>.Join<int, int, int, int>(IEnumerable<int> inner, Func<int, int> outerKeySelector, Func<int, int> innerKeySelector, Func<int, int, int> resultSelector)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoJoin4()
{
await TestInMethodAsync(
@"
var q = from i1 in new int[0]
join i2 in new int[0] on i1 $$equals i2
select i1;
",
MainDescription($"({CSharpFeaturesResources.extension}) IEnumerable<int> IEnumerable<int>.Join<int, int, int, int>(IEnumerable<int> inner, Func<int, int> outerKeySelector, Func<int, int> innerKeySelector, Func<int, int, int> resultSelector)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoJoinInto1()
{
await TestInMethodAsync(
@"
var q = from i1 in new int[0]
$$join i2 in new int[0] on i1 equals i2 into g
select g;
",
MainDescription($"({CSharpFeaturesResources.extension}) IEnumerable<IEnumerable<int>> IEnumerable<int>.GroupJoin<int, int, int, IEnumerable<int>>(IEnumerable<int> inner, Func<int, int> outerKeySelector, Func<int, int> innerKeySelector, Func<int, IEnumerable<int>, IEnumerable<int>> resultSelector)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoJoinInto2()
{
await TestInMethodAsync(
@"
var q = from i1 in new int[0]
join i2 in new int[0] on i1 equals i2 $$into g
select g;
");
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoFromMissing()
{
await TestInMethodAsync(
@"
var q = $$from i in new int[0]
select i;
");
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoRangeVariableSimple1()
{
await TestInMethodAsync(
@"
var q = $$from double i in new int[0]
select i;
",
MainDescription($"({CSharpFeaturesResources.extension}) IEnumerable<double> System.Collections.IEnumerable.Cast<double>()"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoRangeVariableSimple2()
{
await TestInMethodAsync(
@"
var q = from double i $$in new int[0]
select i;
",
MainDescription($"({CSharpFeaturesResources.extension}) IEnumerable<double> System.Collections.IEnumerable.Cast<double>()"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoRangeVariableSelectMany1()
{
await TestInMethodAsync(
@"
var q = from i in new int[0]
$$from double d in new int[0]
select i;
",
MainDescription($"({CSharpFeaturesResources.extension}) IEnumerable<int> IEnumerable<int>.SelectMany<int, double, int>(Func<int, IEnumerable<double>> collectionSelector, Func<int, double, int> resultSelector)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoRangeVariableSelectMany2()
{
await TestInMethodAsync(
@"
var q = from i in new int[0]
from double d $$in new int[0]
select i;
",
MainDescription($"({CSharpFeaturesResources.extension}) IEnumerable<double> System.Collections.IEnumerable.Cast<double>()"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoRangeVariableJoin1()
{
await TestInMethodAsync(
@"
var q = from i1 in new int[0]
$$join int i2 in new double[0] on i1 equals i2
select i1;
",
MainDescription($"({CSharpFeaturesResources.extension}) IEnumerable<int> IEnumerable<int>.Join<int, int, int, int>(IEnumerable<int> inner, Func<int, int> outerKeySelector, Func<int, int> innerKeySelector, Func<int, int, int> resultSelector)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoRangeVariableJoin2()
{
await TestInMethodAsync(
@"
var q = from i1 in new int[0]
join int i2 $$in new double[0] on i1 equals i2
select i1;
",
MainDescription($"({CSharpFeaturesResources.extension}) IEnumerable<int> System.Collections.IEnumerable.Cast<int>()"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoRangeVariableJoin3()
{
await TestInMethodAsync(
@"
var q = from i1 in new int[0]
join int i2 in new double[0] $$on i1 equals i2
select i1;
",
MainDescription($"({CSharpFeaturesResources.extension}) IEnumerable<int> IEnumerable<int>.Join<int, int, int, int>(IEnumerable<int> inner, Func<int, int> outerKeySelector, Func<int, int> innerKeySelector, Func<int, int, int> resultSelector)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23394, "https://github.com/dotnet/roslyn/issues/23394")]
public async Task QueryMethodinfoRangeVariableJoin4()
{
await TestInMethodAsync(
@"
var q = from i1 in new int[0]
join int i2 in new double[0] on i1 $$equals i2
select i1;
",
MainDescription($"({CSharpFeaturesResources.extension}) IEnumerable<int> IEnumerable<int>.Join<int, int, int, int>(IEnumerable<int> inner, Func<int, int> outerKeySelector, Func<int, int> innerKeySelector, Func<int, int, int> resultSelector)"));
}
[WorkItem(543205, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/543205")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestErrorGlobal()
{
await TestAsync(
@"extern alias global;
class myClass
{
static int Main()
{
$$global::otherClass oc = new global::otherClass();
return 0;
}
}",
MainDescription("<global namespace>"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task DontRemoveAttributeSuffixAndProduceInvalidIdentifier1()
{
await TestAsync(
@"using System;
class classAttribute : Attribute
{
private classAttribute x$$;
}",
MainDescription($"({FeaturesResources.field}) classAttribute classAttribute.x"));
}
[WorkItem(544026, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/544026")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task DontRemoveAttributeSuffix2()
{
await TestAsync(
@"using System;
class class1Attribute : Attribute
{
private class1Attribute x$$;
}",
MainDescription($"({FeaturesResources.field}) class1Attribute class1Attribute.x"));
}
[WorkItem(1696, "https://github.com/dotnet/roslyn/issues/1696")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task AttributeQuickInfoBindsToClassTest()
{
await TestAsync(
@"using System;
/// <summary>
/// class comment
/// </summary>
[Some$$]
class SomeAttribute : Attribute
{
/// <summary>
/// ctor comment
/// </summary>
public SomeAttribute()
{
}
}",
Documentation("class comment"));
}
[WorkItem(1696, "https://github.com/dotnet/roslyn/issues/1696")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task AttributeConstructorQuickInfo()
{
await TestAsync(
@"using System;
/// <summary>
/// class comment
/// </summary>
class SomeAttribute : Attribute
{
/// <summary>
/// ctor comment
/// </summary>
public SomeAttribute()
{
var s = new Some$$Attribute();
}
}",
Documentation("ctor comment"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestLabel()
{
await TestInClassAsync(
@"void M()
{
Goo:
int Goo;
goto Goo$$;
}",
MainDescription($"({FeaturesResources.label}) Goo"));
}
[WorkItem(542613, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542613")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestUnboundGeneric()
{
await TestAsync(
@"using System;
using System.Collections.Generic;
class C
{
void M()
{
Type t = typeof(L$$ist<>);
}
}",
MainDescription("class System.Collections.Generic.List<T>"),
NoTypeParameterMap);
}
[WorkItem(543113, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/543113")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestAnonymousTypeNew1()
{
await TestAsync(
@"class C
{
void M()
{
var v = $$new { };
}
}",
MainDescription(@"AnonymousType 'a"),
NoTypeParameterMap,
AnonymousTypes(
$@"
{FeaturesResources.Anonymous_Types_colon}
'a {FeaturesResources.is_} new {{ }}"));
}
[WorkItem(543873, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/543873")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestNestedAnonymousType()
{
// verify nested anonymous types are listed in the same order for different properties
// verify first property
await TestInMethodAsync(
@"var x = new[] { new { Name = ""BillG"", Address = new { Street = ""1 Microsoft Way"", Zip = ""98052"" } } };
x[0].$$Address",
MainDescription(@"'b 'a.Address { get; }"),
NoTypeParameterMap,
AnonymousTypes(
$@"
{FeaturesResources.Anonymous_Types_colon}
'a {FeaturesResources.is_} new {{ string Name, 'b Address }}
'b {FeaturesResources.is_} new {{ string Street, string Zip }}"));
// verify second property
await TestInMethodAsync(
@"var x = new[] { new { Name = ""BillG"", Address = new { Street = ""1 Microsoft Way"", Zip = ""98052"" } } };
x[0].$$Name",
MainDescription(@"string 'a.Name { get; }"),
NoTypeParameterMap,
AnonymousTypes(
$@"
{FeaturesResources.Anonymous_Types_colon}
'a {FeaturesResources.is_} new {{ string Name, 'b Address }}
'b {FeaturesResources.is_} new {{ string Street, string Zip }}"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(543183, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/543183")]
public async Task TestAssignmentOperatorInAnonymousType()
{
await TestAsync(
@"class C
{
void M()
{
var a = new { A $$= 0 };
}
}");
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(10731, "DevDiv_Projects/Roslyn")]
public async Task TestErrorAnonymousTypeDoesntShow()
{
await TestInMethodAsync(
@"var a = new { new { N = 0 }.N, new { } }.$$N;",
MainDescription(@"int 'a.N { get; }"),
NoTypeParameterMap,
AnonymousTypes(
$@"
{FeaturesResources.Anonymous_Types_colon}
'a {FeaturesResources.is_} new {{ int N }}"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(543553, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/543553")]
public async Task TestArrayAssignedToVar()
{
await TestAsync(
@"class C
{
static void M(string[] args)
{
v$$ar a = args;
}
}",
MainDescription("string[]"));
}
[WorkItem(529139, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/529139")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task ColorColorRangeVariable()
{
await TestAsync(
@"using System.Collections.Generic;
using System.Linq;
namespace N1
{
class yield
{
public static IEnumerable<yield> Bar()
{
foreach (yield yield in from yield in new yield[0]
select y$$ield)
{
yield return yield;
}
}
}
}",
MainDescription($"({FeaturesResources.range_variable}) N1.yield yield"));
}
[WorkItem(543550, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/543550")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task QuickInfoOnOperator()
{
await TestAsync(
@"using System.Collections.Generic;
class Program
{
static void Main(string[] args)
{
var v = new Program() $$+ string.Empty;
}
public static implicit operator Program(string s)
{
return null;
}
public static IEnumerable<Program> operator +(Program p1, Program p2)
{
yield return p1;
yield return p2;
}
}",
MainDescription("IEnumerable<Program> Program.operator +(Program p1, Program p2)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestConstantField()
{
await TestAsync(
@"class C
{
const int $$F = 1;",
MainDescription($"({FeaturesResources.constant}) int C.F = 1"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestMultipleConstantFields()
{
await TestAsync(
@"class C
{
public const double X = 1.0, Y = 2.0, $$Z = 3.5;",
MainDescription($"({FeaturesResources.constant}) double C.Z = 3.5"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestConstantDependencies()
{
await TestAsync(
@"class A
{
public const int $$X = B.Z + 1;
public const int Y = 10;
}
class B
{
public const int Z = A.Y + 1;
}",
MainDescription($"({FeaturesResources.constant}) int A.X = B.Z + 1"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestConstantCircularDependencies()
{
await TestAsync(
@"class A
{
public const int X = B.Z + 1;
}
class B
{
public const int Z$$ = A.X + 1;
}",
MainDescription($"({FeaturesResources.constant}) int B.Z = A.X + 1"));
}
[WorkItem(544620, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/544620")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestConstantOverflow()
{
await TestAsync(
@"class B
{
public const int Z$$ = int.MaxValue + 1;
}",
MainDescription($"({FeaturesResources.constant}) int B.Z = int.MaxValue + 1"));
}
[WorkItem(544620, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/544620")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestConstantOverflowInUncheckedContext()
{
await TestAsync(
@"class B
{
public const int Z$$ = unchecked(int.MaxValue + 1);
}",
MainDescription($"({FeaturesResources.constant}) int B.Z = unchecked(int.MaxValue + 1)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestEnumInConstantField()
{
await TestAsync(
@"public class EnumTest
{
enum Days
{
Sun,
Mon,
Tue,
Wed,
Thu,
Fri,
Sat
};
static void Main()
{
const int $$x = (int)Days.Sun;
}
}",
MainDescription($"({FeaturesResources.local_constant}) int x = (int)Days.Sun"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestConstantInDefaultExpression()
{
await TestAsync(
@"public class EnumTest
{
enum Days
{
Sun,
Mon,
Tue,
Wed,
Thu,
Fri,
Sat
};
static void Main()
{
const Days $$x = default(Days);
}
}",
MainDescription($"({FeaturesResources.local_constant}) Days x = default(Days)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestConstantParameter()
{
await TestAsync(
@"class C
{
void Bar(int $$b = 1);
}",
MainDescription($"({FeaturesResources.parameter}) int b = 1"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestConstantLocal()
{
await TestAsync(
@"class C
{
void Bar()
{
const int $$loc = 1;
}",
MainDescription($"({FeaturesResources.local_constant}) int loc = 1"));
}
[WorkItem(544416, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/544416")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestErrorType1()
{
await TestInMethodAsync(
@"var $$v1 = new Goo();",
MainDescription($"({FeaturesResources.local_variable}) Goo v1"));
}
[WorkItem(544416, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/544416")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestErrorType2()
{
await TestInMethodAsync(
@"var $$v1 = v1;",
MainDescription($"({FeaturesResources.local_variable}) var v1"));
}
[WorkItem(544416, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/544416")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestErrorType3()
{
await TestInMethodAsync(
@"var $$v1 = new Goo<Bar>();",
MainDescription($"({FeaturesResources.local_variable}) Goo<Bar> v1"));
}
[WorkItem(544416, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/544416")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestErrorType4()
{
await TestInMethodAsync(
@"var $$v1 = &(x => x);",
MainDescription($"({FeaturesResources.local_variable}) ?* v1"));
}
[WorkItem(544416, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/544416")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestErrorType5()
{
await TestInMethodAsync("var $$v1 = &v1",
MainDescription($"({FeaturesResources.local_variable}) var* v1"));
}
[WorkItem(544416, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/544416")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestErrorType6()
{
await TestInMethodAsync("var $$v1 = new Goo[1]",
MainDescription($"({FeaturesResources.local_variable}) Goo[] v1"));
}
[WorkItem(544416, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/544416")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestErrorType7()
{
await TestInClassAsync(
@"class C
{
void Method()
{
}
void Goo()
{
var $$v1 = MethodGroup;
}
}",
MainDescription($"({FeaturesResources.local_variable}) ? v1"));
}
[WorkItem(544416, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/544416")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestErrorType8()
{
await TestInMethodAsync("var $$v1 = Unknown",
MainDescription($"({FeaturesResources.local_variable}) ? v1"));
}
[WorkItem(545072, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/545072")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestDelegateSpecialTypes()
{
await TestAsync(
@"delegate void $$F(int x);",
MainDescription("delegate void F(int x)"));
}
[WorkItem(545108, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/545108")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestNullPointerParameter()
{
await TestAsync(
@"class C
{
unsafe void $$Goo(int* x = null)
{
}
}",
MainDescription("void C.Goo([int* x = null])"));
}
[WorkItem(545098, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/545098")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestLetIdentifier1()
{
await TestInMethodAsync("var q = from e in \"\" let $$y = 1 let a = new { y } select a;",
MainDescription($"({FeaturesResources.range_variable}) int y"));
}
[WorkItem(545295, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/545295")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestNullableDefaultValue()
{
await TestAsync(
@"class Test
{
void $$Method(int? t1 = null)
{
}
}",
MainDescription("void Test.Method([int? t1 = null])"));
}
[WorkItem(529586, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/529586")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestInvalidParameterInitializer()
{
await TestAsync(
@"class Program
{
void M1(float $$j1 = ""Hello""
+
""World"")
{
}
}",
MainDescription($@"({FeaturesResources.parameter}) float j1 = ""Hello"" + ""World"""));
}
[WorkItem(545230, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/545230")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestComplexConstLocal()
{
await TestAsync(
@"class Program
{
void Main()
{
const int MEGABYTE = 1024 *
1024 + true;
Blah($$MEGABYTE);
}
}",
MainDescription($@"({FeaturesResources.local_constant}) int MEGABYTE = 1024 * 1024 + true"));
}
[WorkItem(545230, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/545230")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestComplexConstField()
{
await TestAsync(
@"class Program
{
const int a = true
-
false;
void Main()
{
Goo($$a);
}
}",
MainDescription($"({FeaturesResources.constant}) int Program.a = true - false"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestTypeParameterCrefDoesNotHaveQuickInfo()
{
await TestAsync(
@"class C<T>
{
/// <see cref=""C{X$$}""/>
static void Main(string[] args)
{
}
}");
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestCref1()
{
await TestAsync(
@"class Program
{
/// <see cref=""Mai$$n""/>
static void Main(string[] args)
{
}
}",
MainDescription(@"void Program.Main(string[] args)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestCref2()
{
await TestAsync(
@"class Program
{
/// <see cref=""$$Main""/>
static void Main(string[] args)
{
}
}",
MainDescription(@"void Program.Main(string[] args)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestCref3()
{
await TestAsync(
@"class Program
{
/// <see cref=""Main""$$/>
static void Main(string[] args)
{
}
}");
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestCref4()
{
await TestAsync(
@"class Program
{
/// <see cref=""Main$$""/>
static void Main(string[] args)
{
}
}");
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestCref5()
{
await TestAsync(
@"class Program
{
/// <see cref=""Main""$$/>
static void Main(string[] args)
{
}
}");
}
[WorkItem(546849, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/546849")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestIndexedProperty()
{
var markup = @"class Program
{
void M()
{
CCC c = new CCC();
c.Index$$Prop[0] = ""s"";
}
}";
// Note that <COMImport> is required by compiler. Bug 17013 tracks enabling indexed property for non-COM types.
var referencedCode = @"Imports System.Runtime.InteropServices
<ComImport()>
<GuidAttribute(CCC.ClassId)>
Public Class CCC
#Region ""COM GUIDs""
Public Const ClassId As String = ""9d965fd2-1514-44f6-accd-257ce77c46b0""
Public Const InterfaceId As String = ""a9415060-fdf0-47e3-bc80-9c18f7f39cf6""
Public Const EventsId As String = ""c6a866a5-5f97-4b53-a5df-3739dc8ff1bb""
# End Region
''' <summary>
''' An index property from VB
''' </summary>
''' <param name=""p1"">p1 is an integer index</param>
''' <returns>A string</returns>
Public Property IndexProp(ByVal p1 As Integer, Optional ByVal p2 As Integer = 0) As String
Get
Return Nothing
End Get
Set(ByVal value As String)
End Set
End Property
End Class";
await TestWithReferenceAsync(sourceCode: markup,
referencedCode: referencedCode,
sourceLanguage: LanguageNames.CSharp,
referencedLanguage: LanguageNames.VisualBasic,
expectedResults: MainDescription("string CCC.IndexProp[int p1, [int p2 = 0]] { get; set; }"));
}
[WorkItem(546918, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/546918")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestUnconstructedGeneric()
{
await TestAsync(
@"class A<T>
{
enum SortOrder
{
Ascending,
Descending,
None
}
void Goo()
{
var b = $$SortOrder.Ascending;
}
}",
MainDescription(@"enum A<T>.SortOrder"));
}
[WorkItem(546970, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/546970")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestUnconstructedGenericInCRef()
{
await TestAsync(
@"/// <see cref=""$$C{T}"" />
class C<T>
{
}",
MainDescription(@"class C<T>"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestAwaitableMethod()
{
var markup = @"using System.Threading.Tasks;
class C
{
async Task Goo()
{
Go$$o();
}
}";
var description = $"({CSharpFeaturesResources.awaitable}) Task C.Goo()";
await VerifyWithMscorlib45Async(markup, new[] { MainDescription(description) });
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task ObsoleteItem()
{
var markup = @"
using System;
class Program
{
[Obsolete]
public void goo()
{
go$$o();
}
}";
await TestAsync(markup, MainDescription($"[{CSharpFeaturesResources.deprecated}] void Program.goo()"));
}
[WorkItem(751070, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/751070")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task DynamicOperator()
{
var markup = @"
public class Test
{
public delegate void NoParam();
static int Main()
{
dynamic x = new object();
if (((System.Func<dynamic>)(() => (x =$$= null)))())
return 0;
return 1;
}
}";
await TestAsync(markup, MainDescription("dynamic dynamic.operator ==(dynamic left, dynamic right)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TextOnlyDocComment()
{
await TestAsync(
@"/// <summary>
///goo
/// </summary>
class C$$
{
}", Documentation("goo"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestTrimConcatMultiLine()
{
await TestAsync(
@"/// <summary>
/// goo
/// bar
/// </summary>
class C$$
{
}", Documentation("goo bar"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestCref()
{
await TestAsync(
@"/// <summary>
/// <see cref=""C""/>
/// <seealso cref=""C""/>
/// </summary>
class C$$
{
}", Documentation("C C"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task ExcludeTextOutsideSummaryBlock()
{
await TestAsync(
@"/// red
/// <summary>
/// green
/// </summary>
/// yellow
class C$$
{
}", Documentation("green"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task NewlineAfterPara()
{
await TestAsync(
@"/// <summary>
/// <para>goo</para>
/// </summary>
class C$$
{
}", Documentation("goo"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TextOnlyDocComment_Metadata()
{
var referenced = @"
/// <summary>
///goo
/// </summary>
public class C
{
}";
var code = @"
class G
{
void goo()
{
C$$ c;
}
}";
await TestWithMetadataReferenceHelperAsync(code, referenced, "C#", "C#", Documentation("goo"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestTrimConcatMultiLine_Metadata()
{
var referenced = @"
/// <summary>
/// goo
/// bar
/// </summary>
public class C
{
}";
var code = @"
class G
{
void goo()
{
C$$ c;
}
}";
await TestWithMetadataReferenceHelperAsync(code, referenced, "C#", "C#", Documentation("goo bar"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestCref_Metadata()
{
var code = @"
class G
{
void goo()
{
C$$ c;
}
}";
var referenced = @"/// <summary>
/// <see cref=""C""/>
/// <seealso cref=""C""/>
/// </summary>
public class C
{
}";
await TestWithMetadataReferenceHelperAsync(code, referenced, "C#", "C#", Documentation("C C"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task ExcludeTextOutsideSummaryBlock_Metadata()
{
var code = @"
class G
{
void goo()
{
C$$ c;
}
}";
var referenced = @"
/// red
/// <summary>
/// green
/// </summary>
/// yellow
public class C
{
}";
await TestWithMetadataReferenceHelperAsync(code, referenced, "C#", "C#", Documentation("green"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Param()
{
await TestAsync(
@"/// <summary></summary>
public class C
{
/// <typeparam name=""T"">A type parameter of <see cref=""goo{ T} (string[], T)""/></typeparam>
/// <param name=""args"">First parameter of <see cref=""Goo{T} (string[], T)""/></param>
/// <param name=""otherParam"">Another parameter of <see cref=""Goo{T}(string[], T)""/></param>
public void Goo<T>(string[] arg$$s, T otherParam)
{
}
}", Documentation("First parameter of C.Goo<T>(string[], T)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Param_Metadata()
{
var code = @"
class G
{
void goo()
{
C c;
c.Goo<int>(arg$$s: new string[] { }, 1);
}
}";
var referenced = @"
/// <summary></summary>
public class C
{
/// <typeparam name=""T"">A type parameter of <see cref=""goo{ T} (string[], T)""/></typeparam>
/// <param name=""args"">First parameter of <see cref=""Goo{T} (string[], T)""/></param>
/// <param name=""otherParam"">Another parameter of <see cref=""Goo{T}(string[], T)""/></param>
public void Goo<T>(string[] args, T otherParam)
{
}
}";
await TestWithMetadataReferenceHelperAsync(code, referenced, "C#", "C#", Documentation("First parameter of C.Goo<T>(string[], T)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Param2()
{
await TestAsync(
@"/// <summary></summary>
public class C
{
/// <typeparam name=""T"">A type parameter of <see cref=""goo{ T} (string[], T)""/></typeparam>
/// <param name=""args"">First parameter of <see cref=""Goo{T} (string[], T)""/></param>
/// <param name=""otherParam"">Another parameter of <see cref=""Goo{T}(string[], T)""/></param>
public void Goo<T>(string[] args, T oth$$erParam)
{
}
}", Documentation("Another parameter of C.Goo<T>(string[], T)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task Param2_Metadata()
{
var code = @"
class G
{
void goo()
{
C c;
c.Goo<int>(args: new string[] { }, other$$Param: 1);
}
}";
var referenced = @"
/// <summary></summary>
public class C
{
/// <typeparam name=""T"">A type parameter of <see cref=""goo{ T} (string[], T)""/></typeparam>
/// <param name=""args"">First parameter of <see cref=""Goo{T} (string[], T)""/></param>
/// <param name=""otherParam"">Another parameter of <see cref=""Goo{T}(string[], T)""/></param>
public void Goo<T>(string[] args, T otherParam)
{
}
}";
await TestWithMetadataReferenceHelperAsync(code, referenced, "C#", "C#", Documentation("Another parameter of C.Goo<T>(string[], T)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TypeParam()
{
await TestAsync(
@"/// <summary></summary>
public class C
{
/// <typeparam name=""T"">A type parameter of <see cref=""Goo{T} (string[], T)""/></typeparam>
/// <param name=""args"">First parameter of <see cref=""Goo{T} (string[], T)""/></param>
/// <param name=""otherParam"">Another parameter of <see cref=""Goo{T}(string[], T)""/></param>
public void Goo<T$$>(string[] args, T otherParam)
{
}
}", Documentation("A type parameter of C.Goo<T>(string[], T)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task UnboundCref()
{
await TestAsync(
@"/// <summary></summary>
public class C
{
/// <typeparam name=""T"">A type parameter of <see cref=""goo{T}(string[], T)""/></typeparam>
/// <param name=""args"">First parameter of <see cref=""Goo{T} (string[], T)""/></param>
/// <param name=""otherParam"">Another parameter of <see cref=""Goo{T}(string[], T)""/></param>
public void Goo<T$$>(string[] args, T otherParam)
{
}
}", Documentation("A type parameter of goo<T>(string[], T)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task CrefInConstructor()
{
await TestAsync(
@"public class TestClass
{
/// <summary>
/// This sample shows how to specify the <see cref=""TestClass""/> constructor as a cref attribute.
/// </summary>
public TestClass$$()
{
}
}", Documentation("This sample shows how to specify the TestClass constructor as a cref attribute."));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task CrefInConstructorOverloaded()
{
await TestAsync(
@"public class TestClass
{
/// <summary>
/// This sample shows how to specify the <see cref=""TestClass""/> constructor as a cref attribute.
/// </summary>
public TestClass()
{
}
/// <summary>
/// This sample shows how to specify the <see cref=""TestClass(int)""/> constructor as a cref attribute.
/// </summary>
public TestC$$lass(int value)
{
}
}", Documentation("This sample shows how to specify the TestClass(int) constructor as a cref attribute."));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task CrefInGenericMethod1()
{
await TestAsync(
@"public class TestClass
{
/// <summary>
/// The GetGenericValue method.
/// <para>This sample shows how to specify the <see cref=""GetGenericValue""/> method as a cref attribute.</para>
/// </summary>
public static T GetGenericVa$$lue<T>(T para)
{
return para;
}
}", Documentation("The GetGenericValue method.\r\n\r\nThis sample shows how to specify the TestClass.GetGenericValue<T>(T) method as a cref attribute."));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task CrefInGenericMethod2()
{
await TestAsync(
@"public class TestClass
{
/// <summary>
/// The GetGenericValue method.
/// <para>This sample shows how to specify the <see cref=""GetGenericValue{T}(T)""/> method as a cref attribute.</para>
/// </summary>
public static T GetGenericVa$$lue<T>(T para)
{
return para;
}
}", Documentation("The GetGenericValue method.\r\n\r\nThis sample shows how to specify the TestClass.GetGenericValue<T>(T) method as a cref attribute."));
}
[WorkItem(813350, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/813350")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task CrefInMethodOverloading1()
{
await TestAsync(
@"public class TestClass
{
public static int GetZero()
{
GetGenericValu$$e();
GetGenericValue(5);
}
/// <summary>
/// This sample shows how to call the <see cref=""GetGenericValue{T}(T)""/> method
/// </summary>
public static T GetGenericValue<T>(T para)
{
return para;
}
/// <summary>
/// This sample shows how to specify the <see cref=""GetGenericValue""/> method as a cref attribute.
/// </summary>
public static void GetGenericValue()
{
}
}", Documentation("This sample shows how to specify the TestClass.GetGenericValue() method as a cref attribute."));
}
[WorkItem(813350, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/813350")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task CrefInMethodOverloading2()
{
await TestAsync(
@"public class TestClass
{
public static int GetZero()
{
GetGenericValue();
GetGenericVal$$ue(5);
}
/// <summary>
/// This sample shows how to call the <see cref=""GetGenericValue{T}(T)""/> method
/// </summary>
public static T GetGenericValue<T>(T para)
{
return para;
}
/// <summary>
/// This sample shows how to specify the <see cref=""GetGenericValue""/> method as a cref attribute.
/// </summary>
public static void GetGenericValue()
{
}
}", Documentation("This sample shows how to call the TestClass.GetGenericValue<T>(T) method"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task CrefInGenericType()
{
await TestAsync(
@"/// <summary>
/// <remarks>This example shows how to specify the <see cref=""GenericClass{T}""/> cref.</remarks>
/// </summary>
class Generic$$Class<T>
{
}",
Documentation("This example shows how to specify the GenericClass<T> cref.",
ExpectedClassifications(
Text("This example shows how to specify the"),
WhiteSpace(" "),
Class("GenericClass"),
Punctuation.OpenAngle,
TypeParameter("T"),
Punctuation.CloseAngle,
WhiteSpace(" "),
Text("cref."))));
}
[WorkItem(812720, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/812720")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task ClassificationOfCrefsFromMetadata()
{
var code = @"
class G
{
void goo()
{
C c;
c.Go$$o();
}
}";
var referenced = @"
/// <summary></summary>
public class C
{
/// <summary>
/// See <see cref=""Goo""/> method
/// </summary>
public void Goo()
{
}
}";
await TestWithMetadataReferenceHelperAsync(code, referenced, "C#", "C#",
Documentation("See C.Goo() method",
ExpectedClassifications(
Text("See"),
WhiteSpace(" "),
Class("C"),
Punctuation.Text("."),
Identifier("Goo"),
Punctuation.OpenParen,
Punctuation.CloseParen,
WhiteSpace(" "),
Text("method"))));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task FieldAvailableInBothLinkedFiles()
{
var markup = @"<Workspace>
<Project Language=""C#"" CommonReferences=""true"" AssemblyName=""Proj1"">
<Document FilePath=""SourceDocument""><![CDATA[
class C
{
int x;
void goo()
{
x$$
}
}
]]>
</Document>
</Project>
<Project Language=""C#"" CommonReferences=""true"" AssemblyName=""Proj2"">
<Document IsLinkFile=""true"" LinkAssemblyName=""Proj1"" LinkFilePath=""SourceDocument""/>
</Project>
</Workspace>";
await VerifyWithReferenceWorkerAsync(markup, new[] { MainDescription($"({FeaturesResources.field}) int C.x"), Usage("") });
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task FieldUnavailableInOneLinkedFile()
{
var markup = @"<Workspace>
<Project Language=""C#"" CommonReferences=""true"" AssemblyName=""Proj1"" PreprocessorSymbols=""GOO"">
<Document FilePath=""SourceDocument""><![CDATA[
class C
{
#if GOO
int x;
#endif
void goo()
{
x$$
}
}
]]>
</Document>
</Project>
<Project Language=""C#"" CommonReferences=""true"" AssemblyName=""Proj2"">
<Document IsLinkFile=""true"" LinkAssemblyName=""Proj1"" LinkFilePath=""SourceDocument""/>
</Project>
</Workspace>";
var expectedDescription = Usage($"\r\n{string.Format(FeaturesResources._0_1, "Proj1", FeaturesResources.Available)}\r\n{string.Format(FeaturesResources._0_1, "Proj2", FeaturesResources.Not_Available)}\r\n\r\n{FeaturesResources.You_can_use_the_navigation_bar_to_switch_contexts}", expectsWarningGlyph: true);
await VerifyWithReferenceWorkerAsync(markup, new[] { expectedDescription });
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(37097, "https://github.com/dotnet/roslyn/issues/37097")]
public async Task BindSymbolInOtherFile()
{
var markup = @"<Workspace>
<Project Language=""C#"" CommonReferences=""true"" AssemblyName=""Proj1"">
<Document FilePath=""SourceDocument""><![CDATA[
class C
{
#if GOO
int x;
#endif
void goo()
{
x$$
}
}
]]>
</Document>
</Project>
<Project Language=""C#"" CommonReferences=""true"" AssemblyName=""Proj2"" PreprocessorSymbols=""GOO"">
<Document IsLinkFile=""true"" LinkAssemblyName=""Proj1"" LinkFilePath=""SourceDocument""/>
</Project>
</Workspace>";
var expectedDescription = Usage($"\r\n{string.Format(FeaturesResources._0_1, "Proj1", FeaturesResources.Not_Available)}\r\n{string.Format(FeaturesResources._0_1, "Proj2", FeaturesResources.Available)}\r\n\r\n{FeaturesResources.You_can_use_the_navigation_bar_to_switch_contexts}", expectsWarningGlyph: true);
await VerifyWithReferenceWorkerAsync(markup, new[] { expectedDescription });
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task FieldUnavailableInTwoLinkedFiles()
{
var markup = @"<Workspace>
<Project Language=""C#"" CommonReferences=""true"" AssemblyName=""Proj1"" PreprocessorSymbols=""GOO"">
<Document FilePath=""SourceDocument""><![CDATA[
class C
{
#if GOO
int x;
#endif
void goo()
{
x$$
}
}
]]>
</Document>
</Project>
<Project Language=""C#"" CommonReferences=""true"" AssemblyName=""Proj2"">
<Document IsLinkFile=""true"" LinkAssemblyName=""Proj1"" LinkFilePath=""SourceDocument""/>
</Project>
<Project Language=""C#"" CommonReferences=""true"" AssemblyName=""Proj3"">
<Document IsLinkFile=""true"" LinkAssemblyName=""Proj1"" LinkFilePath=""SourceDocument""/>
</Project>
</Workspace>";
var expectedDescription = Usage(
$"\r\n{string.Format(FeaturesResources._0_1, "Proj1", FeaturesResources.Available)}\r\n{string.Format(FeaturesResources._0_1, "Proj2", FeaturesResources.Not_Available)}\r\n{string.Format(FeaturesResources._0_1, "Proj3", FeaturesResources.Not_Available)}\r\n\r\n{FeaturesResources.You_can_use_the_navigation_bar_to_switch_contexts}",
expectsWarningGlyph: true);
await VerifyWithReferenceWorkerAsync(markup, new[] { expectedDescription });
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task ExcludeFilesWithInactiveRegions()
{
var markup = @"<Workspace>
<Project Language=""C#"" CommonReferences=""true"" AssemblyName=""Proj1"" PreprocessorSymbols=""GOO,BAR"">
<Document FilePath=""SourceDocument""><![CDATA[
class C
{
#if GOO
int x;
#endif
#if BAR
void goo()
{
x$$
}
#endif
}
]]>
</Document>
</Project>
<Project Language=""C#"" CommonReferences=""true"" AssemblyName=""Proj2"">
<Document IsLinkFile=""true"" LinkAssemblyName=""Proj1"" LinkFilePath=""SourceDocument"" />
</Project>
<Project Language=""C#"" CommonReferences=""true"" AssemblyName=""Proj3"" PreprocessorSymbols=""BAR"">
<Document IsLinkFile=""true"" LinkAssemblyName=""Proj1"" LinkFilePath=""SourceDocument""/>
</Project>
</Workspace>";
var expectedDescription = Usage($"\r\n{string.Format(FeaturesResources._0_1, "Proj1", FeaturesResources.Available)}\r\n{string.Format(FeaturesResources._0_1, "Proj3", FeaturesResources.Not_Available)}\r\n\r\n{FeaturesResources.You_can_use_the_navigation_bar_to_switch_contexts}", expectsWarningGlyph: true);
await VerifyWithReferenceWorkerAsync(markup, new[] { expectedDescription });
}
[WorkItem(962353, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/962353")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task NoValidSymbolsInLinkedDocuments()
{
var markup = @"<Workspace>
<Project Language=""C#"" CommonReferences=""true"" AssemblyName=""Proj1"">
<Document FilePath=""SourceDocument""><![CDATA[
class C
{
void goo()
{
B$$ar();
}
#if B
void Bar() { }
#endif
}
]]>
</Document>
</Project>
<Project Language=""C#"" CommonReferences=""true"" AssemblyName=""Proj2"">
<Document IsLinkFile=""true"" LinkAssemblyName=""Proj1"" LinkFilePath=""SourceDocument""/>
</Project>
</Workspace>";
await VerifyWithReferenceWorkerAsync(markup);
}
[WorkItem(1020944, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/1020944")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task LocalsValidInLinkedDocuments()
{
var markup = @"<Workspace>
<Project Language=""C#"" CommonReferences=""true"" AssemblyName=""Proj1"">
<Document FilePath=""SourceDocument""><![CDATA[
class C
{
void M()
{
int x$$;
}
}
]]>
</Document>
</Project>
<Project Language=""C#"" CommonReferences=""true"" AssemblyName=""Proj2"">
<Document IsLinkFile=""true"" LinkAssemblyName=""Proj1"" LinkFilePath=""SourceDocument""/>
</Project>
</Workspace>";
await VerifyWithReferenceWorkerAsync(markup, new[] { MainDescription($"({FeaturesResources.local_variable}) int x"), Usage("") });
}
[WorkItem(1020944, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/1020944")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task LocalWarningInLinkedDocuments()
{
var markup = @"<Workspace>
<Project Language=""C#"" CommonReferences=""true"" AssemblyName=""Proj1"" PreprocessorSymbols=""PROJ1"">
<Document FilePath=""SourceDocument""><![CDATA[
class C
{
void M()
{
#if PROJ1
int x;
#endif
int y = x$$;
}
}
]]>
</Document>
</Project>
<Project Language=""C#"" CommonReferences=""true"" AssemblyName=""Proj2"">
<Document IsLinkFile=""true"" LinkAssemblyName=""Proj1"" LinkFilePath=""SourceDocument""/>
</Project>
</Workspace>";
await VerifyWithReferenceWorkerAsync(markup, new[] { MainDescription($"({FeaturesResources.local_variable}) int x"), Usage($"\r\n{string.Format(FeaturesResources._0_1, "Proj1", FeaturesResources.Available)}\r\n{string.Format(FeaturesResources._0_1, "Proj2", FeaturesResources.Not_Available)}\r\n\r\n{FeaturesResources.You_can_use_the_navigation_bar_to_switch_contexts}", expectsWarningGlyph: true) });
}
[WorkItem(1020944, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/1020944")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task LabelsValidInLinkedDocuments()
{
var markup = @"<Workspace>
<Project Language=""C#"" CommonReferences=""true"" AssemblyName=""Proj1"">
<Document FilePath=""SourceDocument""><![CDATA[
class C
{
void M()
{
$$LABEL: goto LABEL;
}
}
]]>
</Document>
</Project>
<Project Language=""C#"" CommonReferences=""true"" AssemblyName=""Proj2"">
<Document IsLinkFile=""true"" LinkAssemblyName=""Proj1"" LinkFilePath=""SourceDocument""/>
</Project>
</Workspace>";
await VerifyWithReferenceWorkerAsync(markup, new[] { MainDescription($"({FeaturesResources.label}) LABEL"), Usage("") });
}
[WorkItem(1020944, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/1020944")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task RangeVariablesValidInLinkedDocuments()
{
var markup = @"<Workspace>
<Project Language=""C#"" CommonReferences=""true"" AssemblyName=""Proj1"">
<Document FilePath=""SourceDocument""><![CDATA[
using System.Linq;
class C
{
void M()
{
var x = from y in new[] {1, 2, 3} select $$y;
}
}
]]>
</Document>
</Project>
<Project Language=""C#"" CommonReferences=""true"" AssemblyName=""Proj2"">
<Document IsLinkFile=""true"" LinkAssemblyName=""Proj1"" LinkFilePath=""SourceDocument""/>
</Project>
</Workspace>";
await VerifyWithReferenceWorkerAsync(markup, new[] { MainDescription($"({FeaturesResources.range_variable}) int y"), Usage("") });
}
[WorkItem(1019766, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/1019766")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task PointerAccessibility()
{
var markup = @"class C
{
unsafe static void Main()
{
void* p = null;
void* q = null;
dynamic d = true;
var x = p =$$= q == d;
}
}";
await TestAsync(markup, MainDescription("bool void*.operator ==(void* left, void* right)"));
}
[WorkItem(1114300, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/1114300")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task AwaitingTaskOfArrayType()
{
var markup = @"
using System.Threading.Tasks;
class Program
{
async Task<int[]> M()
{
awa$$it M();
}
}";
await TestAsync(markup, MainDescription(string.Format(FeaturesResources.Awaited_task_returns_0, "int[]")));
}
[WorkItem(1114300, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/1114300")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task AwaitingTaskOfDynamic()
{
var markup = @"
using System.Threading.Tasks;
class Program
{
async Task<dynamic> M()
{
awa$$it M();
}
}";
await TestAsync(markup, MainDescription(string.Format(FeaturesResources.Awaited_task_returns_0, "dynamic")));
}
[Fact, Trait(Traits.Feature, Traits.Features.Completion)]
public async Task MethodOverloadDifferencesIgnored()
{
var markup = @"<Workspace>
<Project Language=""C#"" CommonReferences=""true"" AssemblyName=""Proj1"" PreprocessorSymbols=""ONE"">
<Document FilePath=""SourceDocument""><![CDATA[
class C
{
#if ONE
void Do(int x){}
#endif
#if TWO
void Do(string x){}
#endif
void Shared()
{
this.Do$$
}
}]]></Document>
</Project>
<Project Language=""C#"" CommonReferences=""true"" AssemblyName=""Proj2"" PreprocessorSymbols=""TWO"">
<Document IsLinkFile=""true"" LinkAssemblyName=""Proj1"" LinkFilePath=""SourceDocument""/>
</Project>
</Workspace>";
var expectedDescription = $"void C.Do(int x)";
await VerifyWithReferenceWorkerAsync(markup, MainDescription(expectedDescription));
}
[Fact, Trait(Traits.Feature, Traits.Features.Completion)]
public async Task MethodOverloadDifferencesIgnored_ContainingType()
{
var markup = @"<Workspace>
<Project Language=""C#"" CommonReferences=""true"" AssemblyName=""Proj1"" PreprocessorSymbols=""ONE"">
<Document FilePath=""SourceDocument""><![CDATA[
class C
{
void Shared()
{
var x = GetThing().Do$$();
}
#if ONE
private Methods1 GetThing()
{
return new Methods1();
}
#endif
#if TWO
private Methods2 GetThing()
{
return new Methods2();
}
#endif
}
#if ONE
public class Methods1
{
public void Do(string x) { }
}
#endif
#if TWO
public class Methods2
{
public void Do(string x) { }
}
#endif
]]>
</Document>
</Project>
<Project Language=""C#"" CommonReferences=""true"" AssemblyName=""Proj2"" PreprocessorSymbols=""TWO"">
<Document IsLinkFile=""true"" LinkAssemblyName=""Proj1"" LinkFilePath=""SourceDocument""/>
</Project>
</Workspace>";
var expectedDescription = $"void Methods1.Do(string x)";
await VerifyWithReferenceWorkerAsync(markup, MainDescription(expectedDescription));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(4868, "https://github.com/dotnet/roslyn/issues/4868")]
public async Task QuickInfoExceptions()
{
await TestAsync(
@"using System;
namespace MyNs
{
class MyException1 : Exception
{
}
class MyException2 : Exception
{
}
class TestClass
{
/// <exception cref=""MyException1""></exception>
/// <exception cref=""T:MyNs.MyException2""></exception>
/// <exception cref=""System.Int32""></exception>
/// <exception cref=""double""></exception>
/// <exception cref=""Not_A_Class_But_Still_Displayed""></exception>
void M()
{
M$$();
}
}
}",
Exceptions($"\r\n{WorkspacesResources.Exceptions_colon}\r\n MyException1\r\n MyException2\r\n int\r\n double\r\n Not_A_Class_But_Still_Displayed"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23307, "https://github.com/dotnet/roslyn/issues/23307")]
public async Task QuickInfoCapturesOnLocalFunction()
{
await TestAsync(@"
class C
{
void M()
{
int i;
local$$();
void local() { i++; this.M(); }
}
}",
Captures($"\r\n{WorkspacesResources.Variables_captured_colon} this, i"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23307, "https://github.com/dotnet/roslyn/issues/23307")]
public async Task QuickInfoCapturesOnLocalFunction2()
{
await TestAsync(@"
class C
{
void M()
{
int i;
local$$(i);
void local(int j) { j++; M(); }
}
}",
Captures($"\r\n{WorkspacesResources.Variables_captured_colon} this"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23307, "https://github.com/dotnet/roslyn/issues/23307")]
public async Task QuickInfoCapturesOnLocalFunction3()
{
await TestAsync(@"
class C
{
public void M(int @this)
{
int i = 0;
local$$();
void local()
{
M(1);
i++;
@this++;
}
}
}",
Captures($"\r\n{WorkspacesResources.Variables_captured_colon} this, @this, i"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(26101, "https://github.com/dotnet/roslyn/issues/26101")]
public async Task QuickInfoCapturesOnLocalFunction4()
{
await TestAsync(@"
class C
{
int field;
void M()
{
void OuterLocalFunction$$()
{
int local = 0;
int InnerLocalFunction()
{
field++;
return local;
}
}
}
}",
Captures($"\r\n{WorkspacesResources.Variables_captured_colon} this"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(26101, "https://github.com/dotnet/roslyn/issues/26101")]
public async Task QuickInfoCapturesOnLocalFunction5()
{
await TestAsync(@"
class C
{
int field;
void M()
{
void OuterLocalFunction()
{
int local = 0;
int InnerLocalFunction$$()
{
field++;
return local;
}
}
}
}",
Captures($"\r\n{WorkspacesResources.Variables_captured_colon} this, local"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(26101, "https://github.com/dotnet/roslyn/issues/26101")]
public async Task QuickInfoCapturesOnLocalFunction6()
{
await TestAsync(@"
class C
{
int field;
void M()
{
int local1 = 0;
int local2 = 0;
void OuterLocalFunction$$()
{
_ = local1;
void InnerLocalFunction()
{
_ = local2;
}
}
}
}",
Captures($"\r\n{WorkspacesResources.Variables_captured_colon} local1, local2"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(26101, "https://github.com/dotnet/roslyn/issues/26101")]
public async Task QuickInfoCapturesOnLocalFunction7()
{
await TestAsync(@"
class C
{
int field;
void M()
{
int local1 = 0;
int local2 = 0;
void OuterLocalFunction()
{
_ = local1;
void InnerLocalFunction$$()
{
_ = local2;
}
}
}
}",
Captures($"\r\n{WorkspacesResources.Variables_captured_colon} local2"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23307, "https://github.com/dotnet/roslyn/issues/23307")]
public async Task QuickInfoCapturesOnLambda()
{
await TestAsync(@"
class C
{
void M()
{
int i;
System.Action a = () =$$> { i++; M(); };
}
}",
Captures($"\r\n{WorkspacesResources.Variables_captured_colon} this, i"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23307, "https://github.com/dotnet/roslyn/issues/23307")]
public async Task QuickInfoCapturesOnLambda2()
{
await TestAsync(@"
class C
{
void M()
{
int i;
System.Action<int> a = j =$$> { i++; j++; M(); };
}
}",
Captures($"\r\n{WorkspacesResources.Variables_captured_colon} this, i"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23307, "https://github.com/dotnet/roslyn/issues/23307")]
public async Task QuickInfoCapturesOnLambda2_DifferentOrder()
{
await TestAsync(@"
class C
{
void M(int j)
{
int i;
System.Action a = () =$$> { M(); i++; j++; };
}
}",
Captures($"\r\n{WorkspacesResources.Variables_captured_colon} this, j, i"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23307, "https://github.com/dotnet/roslyn/issues/23307")]
public async Task QuickInfoCapturesOnLambda3()
{
await TestAsync(@"
class C
{
void M()
{
int i;
int @this;
N(() =$$> { M(); @this++; }, () => { i++; });
}
void N(System.Action x, System.Action y) { }
}",
Captures($"\r\n{WorkspacesResources.Variables_captured_colon} this, @this"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23307, "https://github.com/dotnet/roslyn/issues/23307")]
public async Task QuickInfoCapturesOnLambda4()
{
await TestAsync(@"
class C
{
void M()
{
int i;
N(() => { M(); }, () =$$> { i++; });
}
void N(System.Action x, System.Action y) { }
}",
Captures($"\r\n{WorkspacesResources.Variables_captured_colon} i"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(26101, "https://github.com/dotnet/roslyn/issues/26101")]
public async Task QuickInfoCapturesOnLambda5()
{
await TestAsync(@"
class C
{
int field;
void M()
{
System.Action a = () =$$>
{
int local = 0;
System.Func<int> b = () =>
{
field++;
return local;
};
};
}
}",
Captures($"\r\n{WorkspacesResources.Variables_captured_colon} this"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(26101, "https://github.com/dotnet/roslyn/issues/26101")]
public async Task QuickInfoCapturesOnLambda6()
{
await TestAsync(@"
class C
{
int field;
void M()
{
System.Action a = () =>
{
int local = 0;
System.Func<int> b = () =$$>
{
field++;
return local;
};
};
}
}",
Captures($"\r\n{WorkspacesResources.Variables_captured_colon} this, local"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(26101, "https://github.com/dotnet/roslyn/issues/26101")]
public async Task QuickInfoCapturesOnLambda7()
{
await TestAsync(@"
class C
{
int field;
void M()
{
int local1 = 0;
int local2 = 0;
System.Action a = () =$$>
{
_ = local1;
System.Action b = () =>
{
_ = local2;
};
};
}
}",
Captures($"\r\n{WorkspacesResources.Variables_captured_colon} local1, local2"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(26101, "https://github.com/dotnet/roslyn/issues/26101")]
public async Task QuickInfoCapturesOnLambda8()
{
await TestAsync(@"
class C
{
int field;
void M()
{
int local1 = 0;
int local2 = 0;
System.Action a = () =>
{
_ = local1;
System.Action b = () =$$>
{
_ = local2;
};
};
}
}",
Captures($"\r\n{WorkspacesResources.Variables_captured_colon} local2"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(23307, "https://github.com/dotnet/roslyn/issues/23307")]
public async Task QuickInfoCapturesOnDelegate()
{
await TestAsync(@"
class C
{
void M()
{
int i;
System.Func<bool, int> f = dele$$gate(bool b) { i++; return 1; };
}
}",
Captures($"\r\n{WorkspacesResources.Variables_captured_colon} i"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(1516, "https://github.com/dotnet/roslyn/issues/1516")]
public async Task QuickInfoWithNonStandardSeeAttributesAppear()
{
await TestAsync(
@"class C
{
/// <summary>
/// <see cref=""System.String"" />
/// <see href=""http://microsoft.com"" />
/// <see langword=""null"" />
/// <see unsupported-attribute=""cat"" />
/// </summary>
void M()
{
M$$();
}
}",
Documentation(@"string http://microsoft.com null cat"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(6657, "https://github.com/dotnet/roslyn/issues/6657")]
public async Task OptionalParameterFromPreviousSubmission()
{
const string workspaceDefinition = @"
<Workspace>
<Submission Language=""C#"" CommonReferences=""true"">
void M(int x = 1) { }
</Submission>
<Submission Language=""C#"" CommonReferences=""true"">
M(x$$: 2)
</Submission>
</Workspace>
";
using var workspace = TestWorkspace.Create(XElement.Parse(workspaceDefinition), workspaceKind: WorkspaceKind.Interactive);
await TestWithOptionsAsync(workspace, MainDescription($"({ FeaturesResources.parameter }) int x = 1"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TupleProperty()
{
await TestInMethodAsync(
@"interface I
{
(int, int) Name { get; set; }
}
class C : I
{
(int, int) I.Name$$
{
get
{
throw new System.Exception();
}
set
{
}
}
}",
MainDescription("(int, int) C.Name { get; set; }"));
}
[WorkItem(18311, "https://github.com/dotnet/roslyn/issues/18311")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task ValueTupleWithArity0VariableName()
{
await TestAsync(
@"
using System;
public class C
{
void M()
{
var y$$ = ValueTuple.Create();
}
}
",
MainDescription($"({ FeaturesResources.local_variable }) ValueTuple y"));
}
[WorkItem(18311, "https://github.com/dotnet/roslyn/issues/18311")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task ValueTupleWithArity0ImplicitVar()
{
await TestAsync(
@"
using System;
public class C
{
void M()
{
var$$ y = ValueTuple.Create();
}
}
",
MainDescription("struct System.ValueTuple"));
}
[WorkItem(18311, "https://github.com/dotnet/roslyn/issues/18311")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task ValueTupleWithArity1VariableName()
{
await TestAsync(
@"
using System;
public class C
{
void M()
{
var y$$ = ValueTuple.Create(1);
}
}
",
MainDescription($"({ FeaturesResources.local_variable }) ValueTuple<int> y"));
}
[WorkItem(18311, "https://github.com/dotnet/roslyn/issues/18311")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task ValueTupleWithArity1ImplicitVar()
{
await TestAsync(
@"
using System;
public class C
{
void M()
{
var$$ y = ValueTuple.Create(1);
}
}
",
MainDescription("struct System.ValueTuple<System.Int32>"));
}
[WorkItem(18311, "https://github.com/dotnet/roslyn/issues/18311")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task ValueTupleWithArity2VariableName()
{
await TestAsync(
@"
using System;
public class C
{
void M()
{
var y$$ = ValueTuple.Create(1, 1);
}
}
",
MainDescription($"({ FeaturesResources.local_variable }) (int, int) y"));
}
[WorkItem(18311, "https://github.com/dotnet/roslyn/issues/18311")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task ValueTupleWithArity2ImplicitVar()
{
await TestAsync(
@"
using System;
public class C
{
void M()
{
var$$ y = ValueTuple.Create(1, 1);
}
}
",
MainDescription("(System.Int32, System.Int32)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestRefMethod()
{
await TestInMethodAsync(
@"using System;
class Program
{
static void Main(string[] args)
{
ref int i = ref $$goo();
}
private static ref int goo()
{
throw new NotImplementedException();
}
}",
MainDescription("ref int Program.goo()"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestRefLocal()
{
await TestInMethodAsync(
@"using System;
class Program
{
static void Main(string[] args)
{
ref int $$i = ref goo();
}
private static ref int goo()
{
throw new NotImplementedException();
}
}",
MainDescription($"({FeaturesResources.local_variable}) ref int i"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(410932, "https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_workitems?id=410932")]
public async Task TestGenericMethodInDocComment()
{
await TestAsync(
@"
class Test
{
T F<T>()
{
F<T>();
}
/// <summary>
/// <see cref=""F$${T}()""/>
/// </summary>
void S()
{ }
}
",
MainDescription("T Test.F<T>()"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(403665, "https://devdiv.visualstudio.com/DevDiv/_workitems?id=403665&_a=edit")]
public async Task TestExceptionWithCrefToConstructorDoesNotCrash()
{
await TestAsync(
@"
class Test
{
/// <summary>
/// </summary>
/// <exception cref=""Test.Test""/>
public Test$$() {}
}
",
MainDescription("Test.Test()"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestRefStruct()
{
var markup = "ref struct X$$ {}";
await TestAsync(markup, MainDescription("ref struct X"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestRefStruct_Nested()
{
var markup = @"
namespace Nested
{
ref struct X$$ {}
}";
await TestAsync(markup, MainDescription("ref struct Nested.X"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestReadOnlyStruct()
{
var markup = "readonly struct X$$ {}";
await TestAsync(markup, MainDescription("readonly struct X"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestReadOnlyStruct_Nested()
{
var markup = @"
namespace Nested
{
readonly struct X$$ {}
}";
await TestAsync(markup, MainDescription("readonly struct Nested.X"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestReadOnlyRefStruct()
{
var markup = "readonly ref struct X$$ {}";
await TestAsync(markup, MainDescription("readonly ref struct X"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestReadOnlyRefStruct_Nested()
{
var markup = @"
namespace Nested
{
readonly ref struct X$$ {}
}";
await TestAsync(markup, MainDescription("readonly ref struct Nested.X"));
}
[WorkItem(22450, "https://github.com/dotnet/roslyn/issues/22450")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestRefLikeTypesNoDeprecated()
{
var xmlString = @"
<Workspace>
<Project Language=""C#"" LanguageVersion=""7.2"" CommonReferences=""true"">
<MetadataReferenceFromSource Language=""C#"" LanguageVersion=""7.2"" CommonReferences=""true"">
<Document FilePath=""ReferencedDocument"">
public ref struct TestRef
{
}
</Document>
</MetadataReferenceFromSource>
<Document FilePath=""SourceDocument"">
ref struct Test
{
private $$TestRef _field;
}
</Document>
</Project>
</Workspace>";
// There should be no [deprecated] attribute displayed.
await VerifyWithReferenceWorkerAsync(xmlString, MainDescription($"ref struct TestRef"));
}
[WorkItem(2644, "https://github.com/dotnet/roslyn/issues/2644")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task PropertyWithSameNameAsOtherType()
{
await TestAsync(
@"namespace ConsoleApplication1
{
class Program
{
static A B { get; set; }
static B A { get; set; }
static void Main(string[] args)
{
B = ConsoleApplication1.B$$.F();
}
}
class A { }
class B
{
public static A F() => null;
}
}",
MainDescription($"ConsoleApplication1.A ConsoleApplication1.B.F()"));
}
[WorkItem(2644, "https://github.com/dotnet/roslyn/issues/2644")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task PropertyWithSameNameAsOtherType2()
{
await TestAsync(
@"using System.Collections.Generic;
namespace ConsoleApplication1
{
class Program
{
public static List<Bar> Bar { get; set; }
static void Main(string[] args)
{
Tes$$t<Bar>();
}
static void Test<T>() { }
}
class Bar
{
}
}",
MainDescription($"void Program.Test<Bar>()"));
}
[WorkItem(23883, "https://github.com/dotnet/roslyn/issues/23883")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task InMalformedEmbeddedStatement_01()
{
await TestAsync(
@"
class Program
{
void method1()
{
if (method2())
.Any(b => b.Content$$Type, out var chars)
{
}
}
}
");
}
[WorkItem(23883, "https://github.com/dotnet/roslyn/issues/23883")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task InMalformedEmbeddedStatement_02()
{
await TestAsync(
@"
class Program
{
void method1()
{
if (method2())
.Any(b => b$$.ContentType, out var chars)
{
}
}
}
",
MainDescription($"({ FeaturesResources.parameter }) ? b"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task EnumConstraint()
{
await TestInMethodAsync(
@"
class X<T> where T : System.Enum
{
private $$T x;
}",
MainDescription($"T {FeaturesResources.in_} X<T> where T : Enum"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task DelegateConstraint()
{
await TestInMethodAsync(
@"
class X<T> where T : System.Delegate
{
private $$T x;
}",
MainDescription($"T {FeaturesResources.in_} X<T> where T : Delegate"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task MulticastDelegateConstraint()
{
await TestInMethodAsync(
@"
class X<T> where T : System.MulticastDelegate
{
private $$T x;
}",
MainDescription($"T {FeaturesResources.in_} X<T> where T : MulticastDelegate"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task UnmanagedConstraint_Type()
{
await TestAsync(
@"
class $$X<T> where T : unmanaged
{
}",
MainDescription("class X<T> where T : unmanaged"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task UnmanagedConstraint_Method()
{
await TestAsync(
@"
class X
{
void $$M<T>() where T : unmanaged { }
}",
MainDescription("void X.M<T>() where T : unmanaged"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task UnmanagedConstraint_Delegate()
{
await TestAsync(
"delegate void $$D<T>() where T : unmanaged;",
MainDescription("delegate void D<T>() where T : unmanaged"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task UnmanagedConstraint_LocalFunction()
{
await TestAsync(
@"
class X
{
void N()
{
void $$M<T>() where T : unmanaged { }
}
}",
MainDescription("void M<T>() where T : unmanaged"));
}
[WorkItem(29703, "https://github.com/dotnet/roslyn/issues/29703")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestGetAccessorDocumentation()
{
await TestAsync(
@"
class X
{
/// <summary>Summary for property Goo</summary>
int Goo { g$$et; set; }
}",
Documentation("Summary for property Goo"));
}
[WorkItem(29703, "https://github.com/dotnet/roslyn/issues/29703")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestSetAccessorDocumentation()
{
await TestAsync(
@"
class X
{
/// <summary>Summary for property Goo</summary>
int Goo { get; s$$et; }
}",
Documentation("Summary for property Goo"));
}
[WorkItem(29703, "https://github.com/dotnet/roslyn/issues/29703")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestEventAddDocumentation1()
{
await TestAsync(
@"
using System;
class X
{
/// <summary>Summary for event Goo</summary>
event EventHandler<EventArgs> Goo
{
a$$dd => throw null;
remove => throw null;
}
}",
Documentation("Summary for event Goo"));
}
[WorkItem(29703, "https://github.com/dotnet/roslyn/issues/29703")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestEventAddDocumentation2()
{
await TestAsync(
@"
using System;
class X
{
/// <summary>Summary for event Goo</summary>
event EventHandler<EventArgs> Goo;
void M() => Goo +$$= null;
}",
Documentation("Summary for event Goo"));
}
[WorkItem(29703, "https://github.com/dotnet/roslyn/issues/29703")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestEventRemoveDocumentation1()
{
await TestAsync(
@"
using System;
class X
{
/// <summary>Summary for event Goo</summary>
event EventHandler<EventArgs> Goo
{
add => throw null;
r$$emove => throw null;
}
}",
Documentation("Summary for event Goo"));
}
[WorkItem(29703, "https://github.com/dotnet/roslyn/issues/29703")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestEventRemoveDocumentation2()
{
await TestAsync(
@"
using System;
class X
{
/// <summary>Summary for event Goo</summary>
event EventHandler<EventArgs> Goo;
void M() => Goo -$$= null;
}",
Documentation("Summary for event Goo"));
}
[WorkItem(30642, "https://github.com/dotnet/roslyn/issues/30642")]
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task BuiltInOperatorWithUserDefinedEquivalent()
{
await TestAsync(
@"
class X
{
void N(string a, string b)
{
var v = a $$== b;
}
}",
MainDescription("bool string.operator ==(string a, string b)"),
SymbolGlyph(Glyph.Operator));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task NotNullConstraint_Type()
{
await TestAsync(
@"
class $$X<T> where T : notnull
{
}",
MainDescription("class X<T> where T : notnull"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task NotNullConstraint_Method()
{
await TestAsync(
@"
class X
{
void $$M<T>() where T : notnull { }
}",
MainDescription("void X.M<T>() where T : notnull"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task NotNullConstraint_Delegate()
{
await TestAsync(
"delegate void $$D<T>() where T : notnull;",
MainDescription("delegate void D<T>() where T : notnull"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task NotNullConstraint_LocalFunction()
{
await TestAsync(
@"
class X
{
void N()
{
void $$M<T>() where T : notnull { }
}
}",
MainDescription("void M<T>() where T : notnull"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task NullableParameterThatIsMaybeNull()
{
await TestWithOptionsAsync(TestOptions.Regular8,
@"#nullable enable
class X
{
void N(string? s)
{
string s2 = $$s;
}
}",
MainDescription($"({FeaturesResources.parameter}) string? s"),
NullabilityAnalysis(string.Format(FeaturesResources._0_may_be_null_here, "s")));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task NullableParameterThatIsNotNull()
{
await TestWithOptionsAsync(TestOptions.Regular8,
@"#nullable enable
class X
{
void N(string? s)
{
s = """";
string s2 = $$s;
}
}",
MainDescription($"({FeaturesResources.parameter}) string? s"),
NullabilityAnalysis(string.Format(FeaturesResources._0_is_not_null_here, "s")));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task NullableFieldThatIsMaybeNull()
{
await TestWithOptionsAsync(TestOptions.Regular8,
@"#nullable enable
class X
{
string? s = null;
void N()
{
string s2 = $$s;
}
}",
MainDescription($"({FeaturesResources.field}) string? X.s"),
NullabilityAnalysis(string.Format(FeaturesResources._0_may_be_null_here, "s")));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task NullableFieldThatIsNotNull()
{
await TestWithOptionsAsync(TestOptions.Regular8,
@"#nullable enable
class X
{
string? s = null;
void N()
{
s = """";
string s2 = $$s;
}
}",
MainDescription($"({FeaturesResources.field}) string? X.s"),
NullabilityAnalysis(string.Format(FeaturesResources._0_is_not_null_here, "s")));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task NullablePropertyThatIsMaybeNull()
{
await TestWithOptionsAsync(TestOptions.Regular8,
@"#nullable enable
class X
{
string? S { get; set; }
void N()
{
string s2 = $$S;
}
}",
MainDescription("string? X.S { get; set; }"),
NullabilityAnalysis(string.Format(FeaturesResources._0_may_be_null_here, "S")));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task NullablePropertyThatIsNotNull()
{
await TestWithOptionsAsync(TestOptions.Regular8,
@"#nullable enable
class X
{
string? S { get; set; }
void N()
{
S = """";
string s2 = $$S;
}
}",
MainDescription("string? X.S { get; set; }"),
NullabilityAnalysis(string.Format(FeaturesResources._0_is_not_null_here, "S")));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task NullableRangeVariableThatIsMaybeNull()
{
await TestWithOptionsAsync(TestOptions.Regular8,
@"#nullable enable
using System.Collections.Generic;
class X
{
void N()
{
IEnumerable<string?> enumerable;
foreach (var s in enumerable)
{
string s2 = $$s;
}
}
}",
MainDescription($"({FeaturesResources.local_variable}) string? s"),
NullabilityAnalysis(string.Format(FeaturesResources._0_may_be_null_here, "s")));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task NullableRangeVariableThatIsNotNull()
{
await TestWithOptionsAsync(TestOptions.Regular8,
@"#nullable enable
using System.Collections.Generic;
class X
{
void N()
{
IEnumerable<string> enumerable;
foreach (var s in enumerable)
{
string s2 = $$s;
}
}
}",
MainDescription($"({FeaturesResources.local_variable}) string? s"),
NullabilityAnalysis(string.Format(FeaturesResources._0_is_not_null_here, "s")));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task NullableLocalThatIsMaybeNull()
{
await TestWithOptionsAsync(TestOptions.Regular8,
@"#nullable enable
using System.Collections.Generic;
class X
{
void N()
{
string? s = null;
string s2 = $$s;
}
}",
MainDescription($"({FeaturesResources.local_variable}) string? s"),
NullabilityAnalysis(string.Format(FeaturesResources._0_may_be_null_here, "s")));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task NullableLocalThatIsNotNull()
{
await TestWithOptionsAsync(TestOptions.Regular8,
@"#nullable enable
using System.Collections.Generic;
class X
{
void N()
{
string? s = """";
string s2 = $$s;
}
}",
MainDescription($"({FeaturesResources.local_variable}) string? s"),
NullabilityAnalysis(string.Format(FeaturesResources._0_is_not_null_here, "s")));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task NullableNotShownPriorToLanguageVersion8()
{
await TestWithOptionsAsync(TestOptions.Regular7_3,
@"#nullable enable
using System.Collections.Generic;
class X
{
void N()
{
string s = """";
string s2 = $$s;
}
}",
MainDescription($"({FeaturesResources.local_variable}) string s"),
NullabilityAnalysis(""));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task NullableNotShownInNullableDisable()
{
await TestWithOptionsAsync(TestOptions.Regular8,
@"#nullable disable
using System.Collections.Generic;
class X
{
void N()
{
string s = """";
string s2 = $$s;
}
}",
MainDescription($"({FeaturesResources.local_variable}) string s"),
NullabilityAnalysis(""));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task NullableShownWhenEnabledGlobally()
{
await TestWithOptionsAsync(new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary, nullableContextOptions: NullableContextOptions.Enable),
@"using System.Collections.Generic;
class X
{
void N()
{
string s = """";
string s2 = $$s;
}
}",
MainDescription($"({FeaturesResources.local_variable}) string s"),
NullabilityAnalysis(string.Format(FeaturesResources._0_is_not_null_here, "s")));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task NullableNotShownForValueType()
{
await TestWithOptionsAsync(TestOptions.Regular8,
@"#nullable enable
using System.Collections.Generic;
class X
{
void N()
{
int a = 0;
int b = $$a;
}
}",
MainDescription($"({FeaturesResources.local_variable}) int a"),
NullabilityAnalysis(""));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task NullableNotShownForConst()
{
await TestWithOptionsAsync(TestOptions.Regular8,
@"#nullable enable
using System.Collections.Generic;
class X
{
void N()
{
const string? s = null;
string? s2 = $$s;
}
}",
MainDescription($"({FeaturesResources.local_constant}) string? s = null"),
NullabilityAnalysis(""));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestInheritdocInlineSummary()
{
var markup =
@"
/// <summary>Summary documentation</summary>
/// <remarks>Remarks documentation</remarks>
void M(int x) { }
/// <summary><inheritdoc cref=""M(int)""/></summary>
void $$M(int x, int y) { }";
await TestInClassAsync(markup,
MainDescription("void C.M(int x, int y)"),
Documentation("Summary documentation"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestInheritdocCycle1()
{
var markup =
@"
/// <inheritdoc cref=""M(int, int)""/>
void M(int x) { }
/// <inheritdoc cref=""M(int)""/>
void $$M(int x, int y) { }";
await TestInClassAsync(markup,
MainDescription("void C.M(int x, int y)"),
Documentation(""));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestInheritdocCycle2()
{
var markup =
@"
/// <inheritdoc cref=""M(int)""/>
void $$M(int x) { }";
await TestInClassAsync(markup,
MainDescription("void C.M(int x)"),
Documentation(""));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestInheritdocCycle3()
{
var markup =
@"
/// <inheritdoc cref=""M""/>
void $$M(int x) { }";
await TestInClassAsync(markup,
MainDescription("void C.M(int x)"),
Documentation(""));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(38794, "https://github.com/dotnet/roslyn/issues/38794")]
public async Task TestLinqGroupVariableDeclaration()
{
var code =
@"
void M(string[] a)
{
var v = from x in a
group x by x.Length into $$g
select g;
}";
await TestInClassAsync(code,
MainDescription($"({FeaturesResources.range_variable}) IGrouping<int, string> g"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(38283, "https://github.com/dotnet/roslyn/issues/38283")]
public async Task QuickInfoOnIndexerCloseBracket()
{
await TestAsync(@"
class C
{
public int this[int x] { get { return 1; } }
void M()
{
var x = new C()[5$$];
}
}",
MainDescription("int C.this[int x] { get; }"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(38283, "https://github.com/dotnet/roslyn/issues/38283")]
public async Task QuickInfoOnIndexerOpenBracket()
{
await TestAsync(@"
class C
{
public int this[int x] { get { return 1; } }
void M()
{
var x = new C()$$[5];
}
}",
MainDescription("int C.this[int x] { get; }"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(38283, "https://github.com/dotnet/roslyn/issues/38283")]
public async Task QuickInfoOnIndexer_NotOnArrayAccess()
{
await TestAsync(@"
class Program
{
void M()
{
int[] x = new int[4];
int y = x[3$$];
}
}",
MainDescription("struct System.Int32"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(31618, "https://github.com/dotnet/roslyn/issues/31618")]
public async Task QuickInfoWithRemarksOnMethod()
{
await TestAsync(@"
class Program
{
/// <summary>
/// Summary text
/// </summary>
/// <remarks>
/// Remarks text
/// </remarks>
int M()
{
return $$M();
}
}",
MainDescription("int Program.M()"),
Documentation("Summary text"),
Remarks("\r\nRemarks text"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(31618, "https://github.com/dotnet/roslyn/issues/31618")]
public async Task QuickInfoWithRemarksOnPropertyAccessor()
{
await TestAsync(@"
class Program
{
/// <summary>
/// Summary text
/// </summary>
/// <remarks>
/// Remarks text
/// </remarks>
int M { $$get; }
}",
MainDescription("int Program.M.get"),
Documentation("Summary text"),
Remarks("\r\nRemarks text"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(31618, "https://github.com/dotnet/roslyn/issues/31618")]
public async Task QuickInfoWithReturnsOnMethod()
{
await TestAsync(@"
class Program
{
/// <summary>
/// Summary text
/// </summary>
/// <returns>
/// Returns text
/// </returns>
int M()
{
return $$M();
}
}",
MainDescription("int Program.M()"),
Documentation("Summary text"),
Returns($"\r\n{FeaturesResources.Returns_colon}\r\n Returns text"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(31618, "https://github.com/dotnet/roslyn/issues/31618")]
public async Task QuickInfoWithReturnsOnPropertyAccessor()
{
await TestAsync(@"
class Program
{
/// <summary>
/// Summary text
/// </summary>
/// <returns>
/// Returns text
/// </returns>
int M { $$get; }
}",
MainDescription("int Program.M.get"),
Documentation("Summary text"),
Returns($"\r\n{FeaturesResources.Returns_colon}\r\n Returns text"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(31618, "https://github.com/dotnet/roslyn/issues/31618")]
public async Task QuickInfoWithValueOnMethod()
{
await TestAsync(@"
class Program
{
/// <summary>
/// Summary text
/// </summary>
/// <value>
/// Value text
/// </value>
int M()
{
return $$M();
}
}",
MainDescription("int Program.M()"),
Documentation("Summary text"),
Value($"\r\n{FeaturesResources.Value_colon}\r\n Value text"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(31618, "https://github.com/dotnet/roslyn/issues/31618")]
public async Task QuickInfoWithValueOnPropertyAccessor()
{
await TestAsync(@"
class Program
{
/// <summary>
/// Summary text
/// </summary>
/// <value>
/// Value text
/// </value>
int M { $$get; }
}",
MainDescription("int Program.M.get"),
Documentation("Summary text"),
Value($"\r\n{FeaturesResources.Value_colon}\r\n Value text"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(42368, "https://github.com/dotnet/roslyn/issues/42368")]
public async Task QuickInfoNotPattern1()
{
await TestAsync(@"
class Person
{
void Goo(object o)
{
if (o is not $$Person p)
{
}
}
}",
MainDescription("class Person"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(42368, "https://github.com/dotnet/roslyn/issues/42368")]
public async Task QuickInfoNotPattern2()
{
await TestAsync(@"
class Person
{
void Goo(object o)
{
if (o is $$not Person p)
{
}
}
}");
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(42368, "https://github.com/dotnet/roslyn/issues/42368")]
public async Task QuickInfoOrPattern1()
{
await TestAsync(@"
class Person
{
void Goo(object o)
{
if (o is $$Person or int)
{
}
}
}", MainDescription("class Person"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(42368, "https://github.com/dotnet/roslyn/issues/42368")]
public async Task QuickInfoOrPattern2()
{
await TestAsync(@"
class Person
{
void Goo(object o)
{
if (o is Person or $$int)
{
}
}
}", MainDescription("struct System.Int32"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(42368, "https://github.com/dotnet/roslyn/issues/42368")]
public async Task QuickInfoOrPattern3()
{
await TestAsync(@"
class Person
{
void Goo(object o)
{
if (o is Person $$or int)
{
}
}
}");
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task QuickInfoRecord()
{
await TestWithOptionsAsync(
Options.Regular.WithLanguageVersion(LanguageVersion.CSharp9),
@"record Person(string First, string Last)
{
void M($$Person p)
{
}
}", MainDescription("record Person"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task QuickInfoDerivedRecord()
{
await TestWithOptionsAsync(
Options.Regular.WithLanguageVersion(LanguageVersion.CSharp9),
@"record Person(string First, string Last)
{
}
record Student(string Id)
{
void M($$Student p)
{
}
}
", MainDescription("record Student"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(44904, "https://github.com/dotnet/roslyn/issues/44904")]
public async Task QuickInfoRecord_BaseTypeList()
{
await TestAsync(@"
record Person(string First, string Last);
record Student(int Id) : $$Person(null, null);
", MainDescription("Person.Person(string First, string Last)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task QuickInfo_BaseConstructorInitializer()
{
await TestAsync(@"
public class Person { public Person(int id) { } }
public class Student : Person { public Student() : $$base(0) { } }
", MainDescription("Person.Person(int id)"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task QuickInfoRecordClass()
{
await TestWithOptionsAsync(
Options.Regular.WithLanguageVersion(LanguageVersion.CSharp9),
@"record class Person(string First, string Last)
{
void M($$Person p)
{
}
}", MainDescription("record Person"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task QuickInfoRecordStruct()
{
await TestWithOptionsAsync(
Options.Regular.WithLanguageVersion(LanguageVersion.CSharp9),
@"record struct Person(string First, string Last)
{
void M($$Person p)
{
}
}", MainDescription("record struct Person"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task QuickInfoReadOnlyRecordStruct()
{
await TestWithOptionsAsync(
Options.Regular.WithLanguageVersion(LanguageVersion.CSharp9),
@"readonly record struct Person(string First, string Last)
{
void M($$Person p)
{
}
}", MainDescription("readonly record struct Person"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(51615, "https://github.com/dotnet/roslyn/issues/51615")]
public async Task TestVarPatternOnVarKeyword()
{
await TestAsync(
@"class C
{
string M() { }
void M2()
{
if (M() is va$$r x && x.Length > 0)
{
}
}
}",
MainDescription("class System.String"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
public async Task TestVarPatternOnVariableItself()
{
await TestAsync(
@"class C
{
string M() { }
void M2()
{
if (M() is var x$$ && x.Length > 0)
{
}
}
}",
MainDescription($"({FeaturesResources.local_variable}) string? x"));
}
}
}
| 29.35039 | 474 | 0.584136 | [
"MIT"
] | PTKu/roslyn | src/EditorFeatures/CSharpTest/QuickInfo/SemanticQuickInfoSourceTests.cs | 214,524 | C# |
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
namespace Pulumi.Aws.WafV2.Outputs
{
[OutputType]
public sealed class WebAclRuleStatementManagedRuleGroupStatementScopeDownStatementNotStatementStatementAndStatementStatementByteMatchStatementFieldToMatchSingleHeader
{
/// <summary>
/// Name of the query header to inspect. This setting must be provided as lower case characters.
/// </summary>
public readonly string Name;
[OutputConstructor]
private WebAclRuleStatementManagedRuleGroupStatementScopeDownStatementNotStatementStatementAndStatementStatementByteMatchStatementFieldToMatchSingleHeader(string name)
{
Name = name;
}
}
}
| 35.428571 | 175 | 0.746976 | [
"ECL-2.0",
"Apache-2.0"
] | chivandikwa/pulumi-aws | sdk/dotnet/WafV2/Outputs/WebAclRuleStatementManagedRuleGroupStatementScopeDownStatementNotStatementStatementAndStatementStatementByteMatchStatementFieldToMatchSingleHeader.cs | 992 | C# |
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
namespace InventarioAPI.Entities
{
public class TelefonoCliente
{
public int CodigoTelefono { get; set; }
[Required]
public string Numero { get; set; }
public string Descripcion { get; set; }
public string Nit { get; set; }
public Cliente Cliente { get; set; }
}
}
| 24.736842 | 47 | 0.665957 | [
"Apache-2.0"
] | johnsvill/almacen-api | Entities/TelefonoCliente.cs | 472 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SumReversedNumbers
{
class Program
{
static void Main(string[] args)
{
List<long> nums = Console.ReadLine().Trim().Split(' ').Select(long.Parse).ToList();
long sum = 0;
for (int i = 0; i < nums.Count; i++)
{
long number = nums[i];
if (number > 0)
{
StringBuilder strNum = new StringBuilder();
while (number > 0)
{
int lastDigit = (int)(number % 10);
strNum.Append(lastDigit);
number /= 10;
}
sum += Convert.ToInt32(strNum.ToString());
}
}
Console.WriteLine(sum);
}
}
}
| 24.25641 | 95 | 0.438689 | [
"MIT"
] | StefanLB/Programming-Fundamentals---September-2017 | 15. Lists - Exercises/SumReversedNumbers/Program.cs | 948 | C# |
using UnityEngine;
using System.Collections;
namespace EA4S {
public class PlayerProfileCleaner : MonoBehaviour {
public void ResetAllPlayerProfiles() {
AppManager.I.PlayerProfileManager.DeleteAllProfiles();
AppManager.I.PlayerProfileManager = new PlayerProfileManager();
// UnityEngine.SceneManagement.SceneManager.LoadScene(UnityEngine.SceneManagement.SceneManager.GetActiveScene().name);
}
public void TotalResetPlayerPref() {
PlayerPrefs.DeleteAll();
UnityEngine.SceneManagement.SceneManager.UnloadScene(UnityEngine.SceneManagement.SceneManager.GetActiveScene().name);
UnityEngine.SceneManagement.SceneManager.LoadScene(UnityEngine.SceneManagement.SceneManager.GetActiveScene().name, UnityEngine.SceneManagement.LoadSceneMode.Single);
AppManager.I.PlayerProfileManager = new PlayerProfileManager();
}
}
}
| 40.826087 | 177 | 0.733759 | [
"BSD-2-Clause"
] | Megapop/Norad-Eduapp4syria | Antura/EA4S_Antura_U3D/Assets/_app/_scripts/Player/PlayerProfileCleaner.cs | 941 | C# |
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Client")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Client")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("7eec9672-d161-4fc6-a369-75aa7d806126")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
| 37.25 | 84 | 0.741984 | [
"MIT"
] | StanislavKhalash/cakery | Source/Client/Properties/AssemblyInfo.cs | 1,344 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using GadzhiCommon.Extensions.Collection;
using GadzhiCommon.Extensions.Functional;
using GadzhiCommon.Infrastructure.Implementations.Converters.Errors;
using GadzhiCommon.Infrastructure.Implementations.Logger;
using GadzhiCommon.Infrastructure.Interfaces;
using GadzhiCommon.Infrastructure.Interfaces.Logger;
using GadzhiCommon.Models.Implementations.Functional;
using GadzhiCommon.Models.Interfaces.Errors;
using GadzhiConvertingLibrary.Infrastructure.Interfaces;
namespace GadzhiConvertingLibrary.Infrastructure.Implementations
{
/// <summary>
/// Класс для отображения изменений и логгирования
/// </summary>
public class MessagingService : IMessagingService
{
/// <summary>
/// Журнал системных сообщений
/// </summary>
private static readonly ILoggerService _loggerService = LoggerFactory.GetFileLogger();
/// <summary>
/// Дата и время выполнения операций
/// </summary>
private readonly IAccessService _accessService;
public MessagingService(IAccessService accessService)
{
_accessService = accessService ?? throw new ArgumentNullException(nameof(accessService));
}
/// <summary>
/// Отобразить сообщение
/// </summary>
public void ShowMessage(string message) =>
message.
Void(_ => Console.WriteLine(message)).
Void(_ => _accessService.SetLastTimeOperationByNow());
/// <summary>
/// Отобразить сообщение
/// </summary>
public void ShowError(IErrorCommon errorConverting) =>
errorConverting?.
Map(error => new List<string>()
{
"Ошибка | " + ConverterErrorType.ErrorTypeToString(error.ErrorConvertingType),
errorConverting.Description,
errorConverting.Exception?.Message}).
Map(messages => String.Join("\n", messages.Where(message => !String.IsNullOrWhiteSpace(message)))).
Map(messageText => { Console.WriteLine(messageText); return Unit.Value; }).
Void(_ => _accessService.SetLastTimeOperationByNow());
/// <summary>
/// Отобразить и добавить в журнал ошибки
/// </summary>
public void ShowErrors(IEnumerable<IErrorCommon> errorsConverting)
{
foreach (var error in errorsConverting.EmptyIfNull())
{
ShowError(error);
}
}
/// <summary>
/// Отобразить и записать в лог ошибку
/// </summary>
public void ShowAndLogError(IErrorCommon errorConverting) =>
errorConverting.
Void(ShowError).
Void(error => _loggerService.ErrorLog(error));
/// <summary>
/// Отобразить и записать в лог ошибки
/// </summary>
public void ShowAndLogErrors(IEnumerable<IErrorCommon> errorsConverting) =>
errorsConverting.
Void(ShowErrors).
Void(error => _loggerService.ErrorsLog(error));
}
}
| 35.647727 | 111 | 0.639146 | [
"MIT"
] | rubilnik4/GadzhiResurrected | GadzhiConvertingLibrary/Infrastructure/Implementations/MessagingService.cs | 3,366 | C# |
using System;
namespace Rtp.Protocol
{
public readonly struct RtpBuilderStep
{
private const int CurrentVersion = 2;
private const int MinLength = 12;
private const int IdentifierLength = 4;
private readonly RtpBuilderState state;
private RtpBuilderStep(RtpBuilderState state)
{
this.state = state;
}
public RtpBuilderStep WithHeaderExtension()
{
return SetHeaderExtension(true);
}
public RtpBuilderStep SetHeaderExtension(bool value)
{
var currentState = state;
currentState.hasHeaderExtension = value;
return new RtpBuilderStep(currentState);
}
public RtpBuilderStep WithMarker()
{
return SetMarker(true);
}
public RtpBuilderStep SetMarker(bool value)
{
var currentState = state;
currentState.isMarker = value;
return new RtpBuilderStep(currentState);
}
public RtpBuilderStep SetPayloadType(int type)
{
if(type < 0 || type > 127)
{
throw new ArgumentOutOfRangeException(nameof(type), "Must be in range from 0 to 127");
}
var currentState = state;
currentState.payloadType = type;
return new RtpBuilderStep(currentState);
}
public RtpBuilderStep SetSequenceNumber(ushort value)
{
var currentState = state;
currentState.sequenceNumber = value;
return new RtpBuilderStep(currentState);
}
public RtpBuilderStep SetTimestamp(int value)
{
var currentState = state;
currentState.timestamp = value;
return new RtpBuilderStep(currentState);
}
public RtpBuilderStep SetSourceIdentifier(int value)
{
var currentState = state;
currentState.sourceIdentifier = value;
return new RtpBuilderStep(currentState);
}
public RtpBuilderStep GenerateSourceIdentifier()
{
return SetSourceIdentifier(ThreadSafeRandom.Next());
}
public RtpBuilderStep SetPayload(ReadOnlyMemory<byte> bytes)
{
var currentState = state;
currentState.payload = bytes;
return new RtpBuilderStep(currentState);
}
public RtpBuilderStep SetPaddingBytesLength(byte value)
{
var currentState = state;
currentState.paddingLength = value;
return new RtpBuilderStep(currentState);
}
public RtpBuilderStep AddSource(int sourceIdentifier)
{
var currentState = state;
AddSourceToState(ref currentState, sourceIdentifier);
return new RtpBuilderStep(currentState);
}
private void AddSourceToState(ref RtpBuilderState state, int sourceIdentifier)
{
if (state.sourcesCount == 15)
{
throw new ArgumentOutOfRangeException(nameof(sourceIdentifier), "Count must be in range from 0 to 15");
}
var hasAlreadySet = false;
TrySetValue(ref state.sourceIdentifier1, sourceIdentifier, ref hasAlreadySet);
TrySetValue(ref state.sourceIdentifier2, sourceIdentifier, ref hasAlreadySet);
TrySetValue(ref state.sourceIdentifier3, sourceIdentifier, ref hasAlreadySet);
TrySetValue(ref state.sourceIdentifier4, sourceIdentifier, ref hasAlreadySet);
TrySetValue(ref state.sourceIdentifier5, sourceIdentifier, ref hasAlreadySet);
TrySetValue(ref state.sourceIdentifier6, sourceIdentifier, ref hasAlreadySet);
TrySetValue(ref state.sourceIdentifier7, sourceIdentifier, ref hasAlreadySet);
TrySetValue(ref state.sourceIdentifier8, sourceIdentifier, ref hasAlreadySet);
TrySetValue(ref state.sourceIdentifier9, sourceIdentifier, ref hasAlreadySet);
TrySetValue(ref state.sourceIdentifier10, sourceIdentifier, ref hasAlreadySet);
TrySetValue(ref state.sourceIdentifier11, sourceIdentifier, ref hasAlreadySet);
TrySetValue(ref state.sourceIdentifier12, sourceIdentifier, ref hasAlreadySet);
TrySetValue(ref state.sourceIdentifier13, sourceIdentifier, ref hasAlreadySet);
TrySetValue(ref state.sourceIdentifier14, sourceIdentifier, ref hasAlreadySet);
TrySetValue(ref state.sourceIdentifier15, sourceIdentifier, ref hasAlreadySet);
state.sourcesCount++;
}
private void TrySetValue(ref int? field, int value, ref bool hasAlreadySet)
{
if(field.HasValue || hasAlreadySet)
{
return;
}
field = value;
hasAlreadySet = true;
}
public ReadOnlyMemory<byte> Build()
{
var buffer = CreateBuffer();
var remains = buffer.AsSpan();
remains = WriteFirst2Bytes(remains);
remains = WriteSequenceNumber(remains);
remains = WriteTimestamp(remains);
remains = WriteSourceIdentifier(remains);
remains = WriteSources(remains);
remains = WritePayload(remains);
WritePadding(remains);
return buffer;
}
private byte[] CreateBuffer()
{
var sourcesLength = IdentifierLength * state.sourcesCount;
return new byte[MinLength + sourcesLength + state.payload.Length + state.paddingLength];
}
private Span<byte> WriteFirst2Bytes(Span<byte> bytes)
{
bytes[0] = GetFirstByte();
bytes[1] = GetSecondByte();
return bytes.Slice(2);
}
private byte GetFirstByte()
{
var result = CurrentVersion << 6;
if(state.paddingLength > 0)
{
result = result | 1 << 5;
}
if(state.hasHeaderExtension)
{
result = result | 1 << 4;
}
result = result | state.sourcesCount & 15;
return (byte)result;
}
private byte GetSecondByte()
{
var result = 0;
if(state.isMarker)
{
result = 1 << 7;
}
result = result | state.payloadType & 127;
return (byte)result;
}
private Span<byte> WriteSequenceNumber(Span<byte> bytes)
{
NetworkBitConverter.WriteBytes(bytes.Slice(0, 2), state.sequenceNumber);
return bytes.Slice(2);
}
private Span<byte> WriteTimestamp(Span<byte> bytes)
{
NetworkBitConverter.WriteBytes(bytes.Slice(0, 4), state.timestamp);
return bytes.Slice(4);
}
private Span<byte> WriteSourceIdentifier(Span<byte> bytes)
{
NetworkBitConverter.WriteBytes(bytes.Slice(0, 4), state.sourceIdentifier);
return bytes.Slice(4);
}
private Span<byte> WriteSources(Span<byte> bytes)
{
var index = 0;
TryWriteSource(bytes, state.sourceIdentifier1, index++);
TryWriteSource(bytes, state.sourceIdentifier2, index++);
TryWriteSource(bytes, state.sourceIdentifier3, index++);
TryWriteSource(bytes, state.sourceIdentifier4, index++);
TryWriteSource(bytes, state.sourceIdentifier5, index++);
TryWriteSource(bytes, state.sourceIdentifier6, index++);
TryWriteSource(bytes, state.sourceIdentifier7, index++);
TryWriteSource(bytes, state.sourceIdentifier8, index++);
TryWriteSource(bytes, state.sourceIdentifier9, index++);
TryWriteSource(bytes, state.sourceIdentifier10, index++);
TryWriteSource(bytes, state.sourceIdentifier11, index++);
TryWriteSource(bytes, state.sourceIdentifier12, index++);
TryWriteSource(bytes, state.sourceIdentifier13, index++);
TryWriteSource(bytes, state.sourceIdentifier14, index++);
TryWriteSource(bytes, state.sourceIdentifier15, index);
return bytes.Slice(state.sourcesCount * IdentifierLength);
}
private void TryWriteSource(Span<byte> bytes, int? sourceIdentifier, int index)
{
if(sourceIdentifier.HasValue)
{
NetworkBitConverter.WriteBytes(bytes.Slice(index * IdentifierLength, IdentifierLength), sourceIdentifier.Value);
}
}
private Span<byte> WritePayload(Span<byte> bytes)
{
state.payload.Span.CopyTo(bytes);
return bytes.Slice(state.payload.Length);
}
private void WritePadding(Span<byte> bytes)
{
if(state.paddingLength > 0)
{
bytes[bytes.Length - 1] = state.paddingLength;
}
}
private struct RtpBuilderState
{
public byte paddingLength;
public bool hasHeaderExtension;
public bool isMarker;
public int payloadType;
public ushort sequenceNumber;
public int timestamp;
public int sourceIdentifier;
public int sourcesCount;
public int? sourceIdentifier1;
public int? sourceIdentifier2;
public int? sourceIdentifier3;
public int? sourceIdentifier4;
public int? sourceIdentifier5;
public int? sourceIdentifier6;
public int? sourceIdentifier7;
public int? sourceIdentifier8;
public int? sourceIdentifier9;
public int? sourceIdentifier10;
public int? sourceIdentifier11;
public int? sourceIdentifier12;
public int? sourceIdentifier13;
public int? sourceIdentifier14;
public int? sourceIdentifier15;
public ReadOnlyMemory<byte> payload;
}
}
}
| 32.356688 | 128 | 0.594882 | [
"MIT"
] | gendalf90/Datagrammer.Rtp | Datagrammer.Rtp/Datagrammer.Rtp/Protocol/RtpBuilderStep.cs | 10,162 | C# |
// *** WARNING: this file was generated by the Pulumi SDK Generator. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
namespace Pulumi.AzureNative.Network.V20160901.Inputs
{
/// <summary>
/// Route resource
/// </summary>
public sealed class RouteArgs : Pulumi.ResourceArgs
{
/// <summary>
/// The destination CIDR to which the route applies.
/// </summary>
[Input("addressPrefix")]
public Input<string>? AddressPrefix { get; set; }
/// <summary>
/// A unique read-only string that changes whenever the resource is updated.
/// </summary>
[Input("etag")]
public Input<string>? Etag { get; set; }
/// <summary>
/// Resource ID.
/// </summary>
[Input("id")]
public Input<string>? Id { get; set; }
/// <summary>
/// The name of the resource that is unique within a resource group. This name can be used to access the resource.
/// </summary>
[Input("name")]
public Input<string>? Name { get; set; }
/// <summary>
/// The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
/// </summary>
[Input("nextHopIpAddress")]
public Input<string>? NextHopIpAddress { get; set; }
/// <summary>
/// The type of Azure hop the packet should be sent to. Possible values are: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'
/// </summary>
[Input("nextHopType", required: true)]
public InputUnion<string, Pulumi.AzureNative.Network.V20160901.RouteNextHopType> NextHopType { get; set; } = null!;
/// <summary>
/// The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
/// </summary>
[Input("provisioningState")]
public Input<string>? ProvisioningState { get; set; }
public RouteArgs()
{
}
}
}
| 34.553846 | 165 | 0.60463 | [
"Apache-2.0"
] | polivbr/pulumi-azure-native | sdk/dotnet/Network/V20160901/Inputs/RouteArgs.cs | 2,246 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Glass.Mapper.Pipelines.ObjectConstruction;
namespace Glass.Mapper.Sc.Pipelines.ObjectConstruction
{
public class SitecoreItemTask : AbstractObjectConstructionTask
{
public SitecoreItemTask()
{
Name = "SitecoreItemTask";
}
public override void Execute(ObjectConstructionArgs args)
{
if (args.Result == null && args.Configuration == Sc.Pipelines.ConfigurationResolver.SitecoreItemResolverTask.Config)
{
var scArgs = args.AbstractTypeCreationContext as SitecoreTypeCreationContext;
args.Result = scArgs.Item;
}
base.Execute(args);
}
}
}
| 28.925926 | 128 | 0.654289 | [
"Apache-2.0"
] | RvanDalen/Glass.Mapper | Source/Glass.Mapper.Sc/Pipelines/ObjectConstruction/SitecoreItemTask.cs | 783 | C# |
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using Microsoft.MixedReality.Toolkit.Input;
using Microsoft.MixedReality.Toolkit.Utilities;
using UnityEngine;
namespace Microsoft.MixedReality.Toolkit.UI
{
/// <summary>
/// Class that initializes the appearance of the features panel according to the toggled states of the associated features
/// </summary>
internal class FeaturesPanelVisuals : MonoBehaviour
{
[SerializeField]
private Interactable profilerButton = null;
[SerializeField]
private Interactable handRayButton = null;
[SerializeField]
private Interactable handMeshButton = null;
[SerializeField]
private Interactable handJointsButton = null;
private void Start()
{
profilerButton.IsToggled = (CoreServices.DiagnosticsSystem?.ShowProfiler).GetValueOrDefault(false);
handRayButton.IsToggled = PointerUtils.GetPointerBehavior<ShellHandRayPointer>(Handedness.Any, InputSourceType.Hand) != PointerBehavior.AlwaysOff;
MixedRealityHandTrackingProfile handProfile = null;
if (CoreServices.InputSystem?.InputSystemProfile != null)
{
handProfile = CoreServices.InputSystem.InputSystemProfile.HandTrackingProfile;
}
handMeshButton.IsToggled = handProfile != null && handProfile.EnableHandMeshVisualization;
handJointsButton.IsToggled = handProfile != null && handProfile.EnableHandJointVisualization;
}
}
}
| 41.128205 | 159 | 0.688903 | [
"MIT"
] | HyperLethalVector/ProjectEsky-UnityIntegration | Assets/MRTK/SDK/Features/UX/Scripts/Utilities/FeaturesPanelVisuals.cs | 1,606 | C# |
/* Copyright (c) Citrix Systems Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms,
* with or without modification, are permitted provided
* that the following conditions are met:
*
* * Redistributions of source code must retain the above
* copyright notice, this list of conditions and the
* following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the
* following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
using System.Collections.Generic;
using System.Linq;
using XenAdmin.Actions;
using XenAdmin.Core;
using XenAPI;
namespace XenAdmin.Commands
{
internal class TrimSRCommand : SRCommand
{
/// <summary>
/// Initializes a new instance of this Command. The parameter-less constructor is required in the derived
/// class if it is to be attached to a ToolStrip menu item or button. It should not be used in any other scenario.
/// </summary>
public TrimSRCommand()
{
}
public TrimSRCommand(IMainWindow mainWindow, IEnumerable<SelectedItem> selection)
: base(mainWindow, selection)
{
}
public TrimSRCommand(IMainWindow mainWindow, SR sr)
: base(mainWindow, sr)
{
}
protected override void ExecuteCore(SelectedItemCollection selection)
{
var actions = new List<AsyncAction>();
foreach (SR sr in selection.AsXenObjects<SR>(CanExecute))
{
actions.Add(new SrTrimAction(sr.Connection, sr));
}
RunMultipleActions(actions, null, Messages.ACTION_SR_TRIM_DESCRIPTION, Messages.ACTION_SR_TRIM_DONE, true);
}
protected override bool CanExecuteCore(SelectedItemCollection selection)
{
return selection.AllItemsAre<SR>() && selection.AtLeastOneXenObjectCan<SR>(CanExecute);
}
private static bool CanExecute(SR sr)
{
return sr != null && sr.SupportsTrim;
}
public override string MenuText
{
get
{
return Messages.MAINWINDOW_TRIM_SR;
}
}
protected override string GetCantExecuteReasonCore(SelectedItem item)
{
SR sr = item.XenObject as SR;
if (sr != null && !sr.SupportsTrim)
{
return Messages.TOOLTIP_SR_TRIM_UNSUPPORTED;
}
return base.GetCantExecuteReasonCore(item);
}
/// <summary>
/// Gets the tool tip text when the command is not able to run.
/// If multiple items and Trim is not supported on all, then return this reason.
/// Otherwise, the default behaviour: CantExectuteReason for single items, null for multiple.
/// </summary>
protected override string DisabledToolTipText
{
get
{
var selection = GetSelection();
var allUnsuported = selection.Count > 1 && selection.Select(item => item.XenObject as SR).All(sr => sr != null && !sr.SupportsTrim);
return allUnsuported ? Messages.TOOLTIP_SR_TRIM_UNSUPPORTED_MULTIPLE : base.DisabledToolTipText;
}
}
protected override bool ConfirmationRequired
{
get
{
return true;
}
}
protected override string ConfirmationDialogTitle
{
get
{
return Messages.CONFIRM_TRIM_SR_TITLE;
}
}
protected override string ConfirmationDialogText
{
get
{
return Messages.CONFIRM_TRIM_SR;
}
}
}
}
| 33.913669 | 148 | 0.622401 | [
"BSD-2-Clause"
] | robertbreker/xenadmin | XenAdmin/Commands/TrimSRCommand.cs | 4,716 | C# |
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace BankProject {
public partial class OpenCorpCustomer {
/// <summary>
/// RadToolBar1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadToolBar RadToolBar1;
/// <summary>
/// ValidationSummary1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.ValidationSummary ValidationSummary1;
/// <summary>
/// txtId control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtId;
/// <summary>
/// RequiredFieldValidator1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1;
/// <summary>
/// txtGBShortName control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadTextBox txtGBShortName;
/// <summary>
/// RequiredFieldValidator2 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator2;
/// <summary>
/// txtGBFullName control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadTextBox txtGBFullName;
/// <summary>
/// RequiredFieldValidator4 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator4;
/// <summary>
/// rdpIncorpDate control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadDatePicker rdpIncorpDate;
/// <summary>
/// RequiredFieldValidator5 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator5;
/// <summary>
/// txtGBStreet control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadTextBox txtGBStreet;
/// <summary>
/// RequiredFieldValidator6 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator6;
/// <summary>
/// txtGBDist control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadTextBox txtGBDist;
/// <summary>
/// RequiredFieldValidator7 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator7;
/// <summary>
/// cmbCity control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadComboBox cmbCity;
/// <summary>
/// cmbCountry control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadComboBox cmbCountry;
/// <summary>
/// cmbNationality control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadComboBox cmbNationality;
/// <summary>
/// cmbRecidence control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadComboBox cmbRecidence;
/// <summary>
/// cmbDocType control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadComboBox cmbDocType;
/// <summary>
/// btThem control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.ImageButton btThem;
/// <summary>
/// txtDocID control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadTextBox txtDocID;
/// <summary>
/// txtDocIssuePlace control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadTextBox txtDocIssuePlace;
/// <summary>
/// rdpDocIssueDate control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadDatePicker rdpDocIssueDate;
/// <summary>
/// rdpDocExpiryDate control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadDatePicker rdpDocExpiryDate;
/// <summary>
/// divDocType control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divDocType;
/// <summary>
/// cmbInVisibleDocType control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadComboBox cmbInVisibleDocType;
/// <summary>
/// RadTextBox1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadTextBox RadTextBox1;
/// <summary>
/// RadTextBox2 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadTextBox RadTextBox2;
/// <summary>
/// RadDatePicker1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadDatePicker RadDatePicker1;
/// <summary>
/// RadDatePicker2 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadDatePicker RadDatePicker2;
/// <summary>
/// txtContactPerson control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadTextBox txtContactPerson;
/// <summary>
/// txtPosition control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadTextBox txtPosition;
/// <summary>
/// txtTelephone control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadMaskedTextBox txtTelephone;
/// <summary>
/// txtEmailAddress control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadTextBox txtEmailAddress;
/// <summary>
/// txtRemarks control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadTextBox txtRemarks;
/// <summary>
/// UpdatePanel1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel UpdatePanel1;
/// <summary>
/// cmbMainSector control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadComboBox cmbMainSector;
/// <summary>
/// RequiredFieldValidator8 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator8;
/// <summary>
/// cmbSector control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadComboBox cmbSector;
/// <summary>
/// cmbMainIndustry control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadComboBox cmbMainIndustry;
/// <summary>
/// cmbIndustry control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadComboBox cmbIndustry;
/// <summary>
/// cmbTarget control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadComboBox cmbTarget;
/// <summary>
/// cmbAccountOfficer control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadComboBox cmbAccountOfficer;
/// <summary>
/// txtCifCode control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadTextBox txtCifCode;
/// <summary>
/// rdpContactDate control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadDatePicker rdpContactDate;
/// <summary>
/// cmbRelationCode control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadComboBox cmbRelationCode;
/// <summary>
/// txtOfficeNumber control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadMaskedTextBox txtOfficeNumber;
/// <summary>
/// txtTotalCapital control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadNumericTextBox txtTotalCapital;
/// <summary>
/// txtNoOfEmployee control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadNumericTextBox txtNoOfEmployee;
/// <summary>
/// txtTotalAssets control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadNumericTextBox txtTotalAssets;
/// <summary>
/// txtTotalRevenue control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadNumericTextBox txtTotalRevenue;
/// <summary>
/// txtCustomerLiability control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadTextBox txtCustomerLiability;
/// <summary>
/// txtLegacyRef control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadTextBox txtLegacyRef;
/// <summary>
/// btSearch control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btSearch;
}
}
| 37.095618 | 100 | 0.540812 | [
"Apache-2.0",
"BSD-3-Clause"
] | nguyenppt/1pubcreditnew | DesktopModules/TrainingCoreBanking/BankProject/OpenCorpCustomer.ascx.designer.cs | 18,624 | C# |
using AspNetCoreAuthMultiLang.Data;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Components.Authorization;
using Microsoft.AspNetCore.Localization;
using Microsoft.Extensions.Options;
using System.Globalization;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddRazorPages();
builder.Services.AddServerSideBlazor();
builder.Services.AddSingleton<WeatherForecastService>();
// For authentication
builder.Services.AddAuthorizationCore();
// Here create an instance of the DB layer you want to use
builder.Services.AddSingleton<AspNetCoreAuthMultiLang.IDBAbstraction>(new AspNetCoreAuthMultiLang.DBMemory());
// Here we specify our version of AuthenticationStateProvider
builder.Services.AddScoped<AuthenticationStateProvider, AspNetCoreAuthMultiLang.MyServerAuthenticationStateProvider>();
builder.Services.AddHttpContextAccessor();
#region Localization
builder.Services.AddLocalization(option => option.ResourcesPath = "Resources");
builder.Services.Configure<RequestLocalizationOptions>(options =>
{
var supportedCultures = new List<CultureInfo>()
{
new CultureInfo("en-US"),
new CultureInfo("fr-FR")
};
options.DefaultRequestCulture = new RequestCulture("en-US");
options.SupportedCultures = supportedCultures;
options.SupportedUICultures = supportedCultures;
});
#endregion
var app = builder.Build();
// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
#region Localisation
app.UseRequestLocalization(app.Services.GetService<IOptions<RequestLocalizationOptions>>().Value);
#endregion
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseRouting();
// For authentication
app.UseAuthentication();
app.UseAuthorization();
app.MapBlazorHub();
app.MapControllers();
app.MapFallbackToPage("/_Host");
app.Run();
| 31.923077 | 131 | 0.772048 | [
"MIT"
] | iso8859/AspNetCoreAuthMultiLang | Program.cs | 2,077 | C# |
#pragma checksum "C:\Users\firatalcin\Documents\GitHub\CSharp-Camp\FullStackDotNetCore-Lessons\Directory\Directory.UI\Views\Shared\Error.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "d6a5625cc8fb4476f348b0fe9041c550465d8bf9"
// <auto-generated/>
#pragma warning disable 1591
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.Views_Shared_Error), @"mvc.1.0.view", @"/Views/Shared/Error.cshtml")]
namespace AspNetCore
{
#line hidden
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
#nullable restore
#line 1 "C:\Users\firatalcin\Documents\GitHub\CSharp-Camp\FullStackDotNetCore-Lessons\Directory\Directory.UI\Views\_ViewImports.cshtml"
using Directory.UI;
#line default
#line hidden
#nullable disable
#nullable restore
#line 2 "C:\Users\firatalcin\Documents\GitHub\CSharp-Camp\FullStackDotNetCore-Lessons\Directory\Directory.UI\Views\_ViewImports.cshtml"
using Directory.UI.Models;
#line default
#line hidden
#nullable disable
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"d6a5625cc8fb4476f348b0fe9041c550465d8bf9", @"/Views/Shared/Error.cshtml")]
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"b26f03dba59849b21da08bfd3d76ce1158ad7933", @"/Views/_ViewImports.cshtml")]
#nullable restore
public class Views_Shared_Error : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<ErrorViewModel>
#nullable disable
{
#pragma warning disable 1998
public async override global::System.Threading.Tasks.Task ExecuteAsync()
{
#nullable restore
#line 2 "C:\Users\firatalcin\Documents\GitHub\CSharp-Camp\FullStackDotNetCore-Lessons\Directory\Directory.UI\Views\Shared\Error.cshtml"
ViewData["Title"] = "Error";
#line default
#line hidden
#nullable disable
WriteLiteral("\r\n<h1 class=\"text-danger\">Error.</h1>\r\n<h2 class=\"text-danger\">An error occurred while processing your request.</h2>\r\n\r\n");
#nullable restore
#line 9 "C:\Users\firatalcin\Documents\GitHub\CSharp-Camp\FullStackDotNetCore-Lessons\Directory\Directory.UI\Views\Shared\Error.cshtml"
if (Model.ShowRequestId)
{
#line default
#line hidden
#nullable disable
WriteLiteral(" <p>\r\n <strong>Request ID:</strong> <code>");
#nullable restore
#line 12 "C:\Users\firatalcin\Documents\GitHub\CSharp-Camp\FullStackDotNetCore-Lessons\Directory\Directory.UI\Views\Shared\Error.cshtml"
Write(Model.RequestId);
#line default
#line hidden
#nullable disable
WriteLiteral("</code>\r\n </p>\r\n");
#nullable restore
#line 14 "C:\Users\firatalcin\Documents\GitHub\CSharp-Camp\FullStackDotNetCore-Lessons\Directory\Directory.UI\Views\Shared\Error.cshtml"
}
#line default
#line hidden
#nullable disable
WriteLiteral(@"
<h3>Development Mode</h3>
<p>
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
</p>
<p>
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
It can result in displaying sensitive information from exceptions to end users.
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
and restarting the app.
</p>
");
}
#pragma warning restore 1998
#nullable restore
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider ModelExpressionProvider { get; private set; } = default!;
#nullable disable
#nullable restore
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IUrlHelper Url { get; private set; } = default!;
#nullable disable
#nullable restore
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IViewComponentHelper Component { get; private set; } = default!;
#nullable disable
#nullable restore
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper Json { get; private set; } = default!;
#nullable disable
#nullable restore
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<ErrorViewModel> Html { get; private set; } = default!;
#nullable disable
}
}
#pragma warning restore 1591
| 46.722222 | 229 | 0.729885 | [
"MIT"
] | firatalcin/CSharp-.NetCore-Works | FullStackDotNetCore-Lessons/Directory/Directory.UI/obj/Debug/net5.0/Razor/Views/Shared/Error.cshtml.g.cs | 5,046 | C# |
// Copyright (c) 2019 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under
// the License.
using Google.Cloud.Diagnostics.AspNetCore;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
namespace AntiForgery
{
public class Program
{
public static void Main(string[] args)
{
CreateWebHostBuilder(args).Build().Run();
}
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseDiagnostics()
.UseStartup<Startup>();
}
internal static class ProgramExtensions
{
internal static IWebHostBuilder UseDiagnostics(
this IWebHostBuilder builder)
{
// App Engine sets the following 3 environment variables.
string projectId = Environment
.GetEnvironmentVariable("GOOGLE_CLOUD_PROJECT");
if (!string.IsNullOrWhiteSpace(projectId))
{
string service = Environment
.GetEnvironmentVariable("GAE_SERVICE") ?? "unknown";
string version = Environment
.GetEnvironmentVariable("GAE_VERSION") ?? "unknown";
builder.UseGoogleDiagnostics(projectId, service, version);
}
return builder;
}
}
}
| 34.241935 | 80 | 0.647197 | [
"ECL-2.0",
"Apache-2.0"
] | AdrianaDJ/dotnet-docs-samples | appengine/flexible/AntiForgery/Program.cs | 2,125 | C# |
using System;
using System.Security.Cryptography;
namespace Barista.Api
{
public class ApiKeyGenerator : IApiKeyGenerator
{
private readonly RandomNumberGenerator _rng = RandomNumberGenerator.Create();
public const int KeySizeInBytes = 128;
public string Generate()
{
var bytes = new byte[KeySizeInBytes];
_rng.GetBytes(bytes, 0, KeySizeInBytes);
return Convert.ToBase64String(bytes);
}
}
}
| 25.368421 | 85 | 0.651452 | [
"MIT"
] | nesfit/Coffee | Barista.Api/ApiKeyGenerator.cs | 484 | C# |
using Regression;
using Regression.Implicit.Constructors;
using System;
#if UNITY_V4
using Microsoft.Practices.Unity;
#else
using Unity;
#endif
namespace Injection.Required.Constructors
{
public class Inherited_Import<TDependency> : BaselineTestType<TDependency>
{
[InjectionConstructor] public Inherited_Import([Dependency] TDependency value) : base(value) { }
}
public class Inherited_Twice<TDependency> : Inherited_Import<TDependency>
{
[InjectionConstructor] public Inherited_Twice([Dependency] TDependency value) : base(value) { }
}
#region Validation
public class PrivateTestType<TDependency>
: PatternBaseType
{
private PrivateTestType([Dependency] TDependency value) => Value = value;
public override object Default => default(TDependency);
}
public class ProtectedTestType<TDependency>
: PatternBaseType
{
protected ProtectedTestType([Dependency] TDependency value) => Value = value;
public override object Default => default(TDependency);
}
public class InternalTestType<TDependency>
: PatternBaseType
{
internal InternalTestType([Dependency] TDependency value) => Value = value;
public override object Default => default(TDependency);
}
public class BaselineTestType_Ref<TDependency>
: PatternBaseType where TDependency : class
{
public BaselineTestType_Ref([Dependency] ref TDependency _)
=> throw new InvalidOperationException("should never execute");
}
public class BaselineTestType_Out<TDependency>
: PatternBaseType where TDependency : class
{
public BaselineTestType_Out([Dependency] out TDependency _)
=> throw new InvalidOperationException("should never execute");
}
#endregion
}
| 29.31746 | 104 | 0.70222 | [
"Apache-2.0"
] | unitycontainer/container-regression-tests | Container/Patterns/Injection/Data/Constructors/Required.cs | 1,849 | C# |
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc
{
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
using Microsoft.SpecExplorer.Runtime.Testing;
using Microsoft.Protocols.TestTools;
using Microsoft.Protocols.TestSuites.ActiveDirectory.Common;
using System.Net;
using System.DirectoryServices.Protocols;
using System.Threading;
using Microsoft.VisualStudio.TestTools.UnitTesting;
[System.CodeDom.Compiler.GeneratedCodeAttribute("Spec Explorer", "3.5.3146.0")]
[TestClassAttribute()]
public partial class BVT_Test_LocateDc_DsrAddressToSiteNamesW : PtfTestClassBase
{
public BVT_Test_LocateDc_DsrAddressToSiteNamesW()
{
this.SetSwitch("ProceedControlTimeout", "100");
this.SetSwitch("QuiescenceTimeout", "30000");
}
#region Adapter Instances
private Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.INrpcServerAdapter INrpcServerAdapterInstance;
#endregion
#region Class Initialization and Cleanup
[ClassInitializeAttribute()]
public static void ClassInitialize(TestContext context)
{
PtfTestClassBase.Initialize(context);
}
[ClassCleanupAttribute()]
public static void ClassCleanup()
{
PtfTestClassBase.Cleanup();
}
#endregion
#region Test Initialization and Cleanup
protected override void TestInitialize()
{
this.InitializeTestManager();
this.INrpcServerAdapterInstance = ((Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.INrpcServerAdapter)(this.Manager.GetAdapter(typeof(Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.INrpcServerAdapter))));
}
protected override void TestCleanup()
{
base.TestCleanup();
this.CleanupTestManager();
}
#endregion
#region Test Starting in S0
[TestMethod]
[TestCategory("DomainWin2008R2")]
[TestCategory("BVT")]
[TestCategory("PDC")]
[TestCategory("MS-NRPC")]
public void NRPC_BVT_Test_LocateDc_DsrAddressToSiteNamesWS0()
{
this.Manager.BeginTest("BVT_Test_LocateDc_DsrAddressToSiteNamesWS0");
this.Manager.Comment("reaching state \'S0\'");
Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.PlatformType temp0;
this.Manager.Comment("executing step \'call GetPlatform(out _)\'");
this.INrpcServerAdapterInstance.GetPlatform(out temp0);
this.Manager.Comment("reaching state \'S1\'");
this.Manager.Comment("checking step \'return GetPlatform/[out WindowsServer2008R2]\'");
TestManagerHelpers.AssertAreEqual<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.PlatformType>(this.Manager, Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.PlatformType.WindowsServer2008R2, temp0, "sutPlatform of GetPlatform, state S1");
this.Manager.Comment("reaching state \'S16\'");
Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.HRESULT temp1;
this.Manager.Comment("executing step \'call DsrAddressToSiteNamesExW(PrimaryDc,{InvalidSocketAddress})\'");
temp1 = this.INrpcServerAdapterInstance.DsrAddressToSiteNamesExW(Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.ComputerType.PrimaryDc, this.Make<Microsoft.Modeling.Set<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.SocketAddressType>>(new string[] {
"Rep"}, new object[] {
Microsoft.Xrt.Runtime.RuntimeSupport.UpdateMap<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.SocketAddressType, Microsoft.Xrt.Runtime.Singleton>(Microsoft.Xrt.Runtime.RuntimeSupport.MakeMap<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.SocketAddressType, Microsoft.Xrt.Runtime.Singleton>(), Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.SocketAddressType.InvalidSocketAddress, this.Make<Microsoft.Xrt.Runtime.RuntimeMapElement<Microsoft.Xrt.Runtime.Singleton>>(new string[] {
"Element"}, new object[] {
Microsoft.Xrt.Runtime.Singleton.Single}))}));
this.Manager.Checkpoint("MS-NRPC_R103451");
this.Manager.Comment("reaching state \'S24\'");
this.Manager.Comment("checking step \'return DsrAddressToSiteNamesExW/ERROR_SUCCESS\'");
TestManagerHelpers.AssertAreEqual<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.HRESULT>(this.Manager, ((Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.HRESULT)(0)), temp1, "return of DsrAddressToSiteNamesExW, state S24");
BVT_Test_LocateDc_DsrAddressToSiteNamesWS32();
this.Manager.EndTest();
}
private void BVT_Test_LocateDc_DsrAddressToSiteNamesWS32()
{
this.Manager.Comment("reaching state \'S32\'");
}
#endregion
#region Test Starting in S10
[TestMethod]
[TestCategory("DomainWin2008R2")]
[TestCategory("BVT")]
[TestCategory("PDC")]
[TestCategory("MS-NRPC")]
public void NRPC_BVT_Test_LocateDc_DsrAddressToSiteNamesWS10()
{
this.Manager.BeginTest("BVT_Test_LocateDc_DsrAddressToSiteNamesWS10");
this.Manager.Comment("reaching state \'S10\'");
Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.PlatformType temp2;
this.Manager.Comment("executing step \'call GetPlatform(out _)\'");
this.INrpcServerAdapterInstance.GetPlatform(out temp2);
this.Manager.Comment("reaching state \'S11\'");
this.Manager.Comment("checking step \'return GetPlatform/[out WindowsServer2008R2]\'");
TestManagerHelpers.AssertAreEqual<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.PlatformType>(this.Manager, Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.PlatformType.WindowsServer2008R2, temp2, "sutPlatform of GetPlatform, state S11");
this.Manager.Comment("reaching state \'S21\'");
Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.HRESULT temp3;
this.Manager.Comment("executing step \'call DsrAddressToSiteNamesExW(PrimaryDc,{Ipv4SocketAddress})\'");
temp3 = this.INrpcServerAdapterInstance.DsrAddressToSiteNamesExW(Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.ComputerType.PrimaryDc, this.Make<Microsoft.Modeling.Set<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.SocketAddressType>>(new string[] {
"Rep"}, new object[] {
Microsoft.Xrt.Runtime.RuntimeSupport.UpdateMap<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.SocketAddressType, Microsoft.Xrt.Runtime.Singleton>(Microsoft.Xrt.Runtime.RuntimeSupport.MakeMap<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.SocketAddressType, Microsoft.Xrt.Runtime.Singleton>(), Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.SocketAddressType.Ipv4SocketAddress, this.Make<Microsoft.Xrt.Runtime.RuntimeMapElement<Microsoft.Xrt.Runtime.Singleton>>(new string[] {
"Element"}, new object[] {
Microsoft.Xrt.Runtime.Singleton.Single}))}));
this.Manager.Checkpoint("MS-NRPC_R103451");
this.Manager.Comment("reaching state \'S29\'");
this.Manager.Comment("checking step \'return DsrAddressToSiteNamesExW/ERROR_SUCCESS\'");
TestManagerHelpers.AssertAreEqual<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.HRESULT>(this.Manager, ((Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.HRESULT)(0)), temp3, "return of DsrAddressToSiteNamesExW, state S29");
BVT_Test_LocateDc_DsrAddressToSiteNamesWS32();
this.Manager.EndTest();
}
#endregion
#region Test Starting in S12
[TestMethod]
[TestCategory("DomainWin2008R2")]
[TestCategory("BVT")]
[TestCategory("PDC")]
[TestCategory("MS-NRPC")]
public void NRPC_BVT_Test_LocateDc_DsrAddressToSiteNamesWS12()
{
this.Manager.BeginTest("BVT_Test_LocateDc_DsrAddressToSiteNamesWS12");
this.Manager.Comment("reaching state \'S12\'");
Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.PlatformType temp4;
this.Manager.Comment("executing step \'call GetPlatform(out _)\'");
this.INrpcServerAdapterInstance.GetPlatform(out temp4);
this.Manager.Comment("reaching state \'S13\'");
this.Manager.Comment("checking step \'return GetPlatform/[out WindowsServer2008R2]\'");
TestManagerHelpers.AssertAreEqual<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.PlatformType>(this.Manager, Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.PlatformType.WindowsServer2008R2, temp4, "sutPlatform of GetPlatform, state S13");
this.Manager.Comment("reaching state \'S22\'");
Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.HRESULT temp5;
this.Manager.Comment("executing step \'call DsrAddressToSiteNamesExW(PrimaryDc,{Ipv6SocketAddress})\'");
temp5 = this.INrpcServerAdapterInstance.DsrAddressToSiteNamesExW(Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.ComputerType.PrimaryDc, this.Make<Microsoft.Modeling.Set<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.SocketAddressType>>(new string[] {
"Rep"}, new object[] {
Microsoft.Xrt.Runtime.RuntimeSupport.UpdateMap<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.SocketAddressType, Microsoft.Xrt.Runtime.Singleton>(Microsoft.Xrt.Runtime.RuntimeSupport.MakeMap<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.SocketAddressType, Microsoft.Xrt.Runtime.Singleton>(), Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.SocketAddressType.Ipv6SocketAddress, this.Make<Microsoft.Xrt.Runtime.RuntimeMapElement<Microsoft.Xrt.Runtime.Singleton>>(new string[] {
"Element"}, new object[] {
Microsoft.Xrt.Runtime.Singleton.Single}))}));
this.Manager.Checkpoint("MS-NRPC_R103451");
this.Manager.Comment("reaching state \'S30\'");
this.Manager.Comment("checking step \'return DsrAddressToSiteNamesExW/ERROR_SUCCESS\'");
TestManagerHelpers.AssertAreEqual<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.HRESULT>(this.Manager, ((Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.HRESULT)(0)), temp5, "return of DsrAddressToSiteNamesExW, state S30");
BVT_Test_LocateDc_DsrAddressToSiteNamesWS32();
this.Manager.EndTest();
}
#endregion
#region Test Starting in S14
[TestMethod]
[TestCategory("DomainWin2008R2")]
[TestCategory("BVT")]
[TestCategory("PDC")]
[TestCategory("MS-NRPC")]
public void NRPC_BVT_Test_LocateDc_DsrAddressToSiteNamesWS14()
{
this.Manager.BeginTest("BVT_Test_LocateDc_DsrAddressToSiteNamesWS14");
this.Manager.Comment("reaching state \'S14\'");
Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.PlatformType temp6;
this.Manager.Comment("executing step \'call GetPlatform(out _)\'");
this.INrpcServerAdapterInstance.GetPlatform(out temp6);
this.Manager.Comment("reaching state \'S15\'");
this.Manager.Comment("checking step \'return GetPlatform/[out WindowsServer2008R2]\'");
TestManagerHelpers.AssertAreEqual<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.PlatformType>(this.Manager, Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.PlatformType.WindowsServer2008R2, temp6, "sutPlatform of GetPlatform, state S15");
this.Manager.Comment("reaching state \'S23\'");
Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.HRESULT temp7;
this.Manager.Comment("executing step \'call DsrAddressToSiteNamesExW(PrimaryDc,{InvalidFormatSocketAddre" +
"ss})\'");
temp7 = this.INrpcServerAdapterInstance.DsrAddressToSiteNamesExW(Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.ComputerType.PrimaryDc, this.Make<Microsoft.Modeling.Set<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.SocketAddressType>>(new string[] {
"Rep"}, new object[] {
Microsoft.Xrt.Runtime.RuntimeSupport.UpdateMap<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.SocketAddressType, Microsoft.Xrt.Runtime.Singleton>(Microsoft.Xrt.Runtime.RuntimeSupport.MakeMap<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.SocketAddressType, Microsoft.Xrt.Runtime.Singleton>(), Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.SocketAddressType.InvalidFormatSocketAddress, this.Make<Microsoft.Xrt.Runtime.RuntimeMapElement<Microsoft.Xrt.Runtime.Singleton>>(new string[] {
"Element"}, new object[] {
Microsoft.Xrt.Runtime.Singleton.Single}))}));
this.Manager.Checkpoint("MS-NRPC_R103451");
this.Manager.Comment("reaching state \'S31\'");
this.Manager.Comment("checking step \'return DsrAddressToSiteNamesExW/ERROR_SUCCESS\'");
TestManagerHelpers.AssertAreEqual<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.HRESULT>(this.Manager, ((Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.HRESULT)(0)), temp7, "return of DsrAddressToSiteNamesExW, state S31");
BVT_Test_LocateDc_DsrAddressToSiteNamesWS32();
this.Manager.EndTest();
}
#endregion
#region Test Starting in S2
[TestMethod]
[TestCategory("DomainWin2008R2")]
[TestCategory("BVT")]
[TestCategory("PDC")]
[TestCategory("MS-NRPC")]
public void NRPC_BVT_Test_LocateDc_DsrAddressToSiteNamesWS2()
{
this.Manager.BeginTest("BVT_Test_LocateDc_DsrAddressToSiteNamesWS2");
this.Manager.Comment("reaching state \'S2\'");
Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.PlatformType temp8;
this.Manager.Comment("executing step \'call GetPlatform(out _)\'");
this.INrpcServerAdapterInstance.GetPlatform(out temp8);
this.Manager.Comment("reaching state \'S3\'");
this.Manager.Comment("checking step \'return GetPlatform/[out WindowsServer2008R2]\'");
TestManagerHelpers.AssertAreEqual<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.PlatformType>(this.Manager, Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.PlatformType.WindowsServer2008R2, temp8, "sutPlatform of GetPlatform, state S3");
this.Manager.Comment("reaching state \'S17\'");
Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.HRESULT temp9;
this.Manager.Comment("executing step \'call DsrAddressToSiteNamesW(PrimaryDc,{Ipv4SocketAddress})\'");
temp9 = this.INrpcServerAdapterInstance.DsrAddressToSiteNamesW(Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.ComputerType.PrimaryDc, this.Make<Microsoft.Modeling.Set<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.SocketAddressType>>(new string[] {
"Rep"}, new object[] {
Microsoft.Xrt.Runtime.RuntimeSupport.UpdateMap<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.SocketAddressType, Microsoft.Xrt.Runtime.Singleton>(Microsoft.Xrt.Runtime.RuntimeSupport.MakeMap<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.SocketAddressType, Microsoft.Xrt.Runtime.Singleton>(), Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.SocketAddressType.Ipv4SocketAddress, this.Make<Microsoft.Xrt.Runtime.RuntimeMapElement<Microsoft.Xrt.Runtime.Singleton>>(new string[] {
"Element"}, new object[] {
Microsoft.Xrt.Runtime.Singleton.Single}))}));
this.Manager.Checkpoint("MS-NRPC_R103449");
this.Manager.Comment("reaching state \'S25\'");
this.Manager.Comment("checking step \'return DsrAddressToSiteNamesW/ERROR_SUCCESS\'");
TestManagerHelpers.AssertAreEqual<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.HRESULT>(this.Manager, ((Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.HRESULT)(0)), temp9, "return of DsrAddressToSiteNamesW, state S25");
BVT_Test_LocateDc_DsrAddressToSiteNamesWS32();
this.Manager.EndTest();
}
#endregion
#region Test Starting in S4
[TestMethod]
[TestCategory("DomainWin2008R2")]
[TestCategory("BVT")]
[TestCategory("PDC")]
[TestCategory("MS-NRPC")]
public void NRPC_BVT_Test_LocateDc_DsrAddressToSiteNamesWS4()
{
this.Manager.BeginTest("BVT_Test_LocateDc_DsrAddressToSiteNamesWS4");
this.Manager.Comment("reaching state \'S4\'");
Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.PlatformType temp10;
this.Manager.Comment("executing step \'call GetPlatform(out _)\'");
this.INrpcServerAdapterInstance.GetPlatform(out temp10);
this.Manager.Comment("reaching state \'S5\'");
this.Manager.Comment("checking step \'return GetPlatform/[out WindowsServer2008R2]\'");
TestManagerHelpers.AssertAreEqual<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.PlatformType>(this.Manager, Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.PlatformType.WindowsServer2008R2, temp10, "sutPlatform of GetPlatform, state S5");
this.Manager.Comment("reaching state \'S18\'");
Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.HRESULT temp11;
this.Manager.Comment("executing step \'call DsrAddressToSiteNamesW(PrimaryDc,{Ipv6SocketAddress})\'");
temp11 = this.INrpcServerAdapterInstance.DsrAddressToSiteNamesW(Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.ComputerType.PrimaryDc, this.Make<Microsoft.Modeling.Set<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.SocketAddressType>>(new string[] {
"Rep"}, new object[] {
Microsoft.Xrt.Runtime.RuntimeSupport.UpdateMap<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.SocketAddressType, Microsoft.Xrt.Runtime.Singleton>(Microsoft.Xrt.Runtime.RuntimeSupport.MakeMap<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.SocketAddressType, Microsoft.Xrt.Runtime.Singleton>(), Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.SocketAddressType.Ipv6SocketAddress, this.Make<Microsoft.Xrt.Runtime.RuntimeMapElement<Microsoft.Xrt.Runtime.Singleton>>(new string[] {
"Element"}, new object[] {
Microsoft.Xrt.Runtime.Singleton.Single}))}));
this.Manager.Checkpoint("MS-NRPC_R103449");
this.Manager.Comment("reaching state \'S26\'");
this.Manager.Comment("checking step \'return DsrAddressToSiteNamesW/ERROR_SUCCESS\'");
TestManagerHelpers.AssertAreEqual<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.HRESULT>(this.Manager, ((Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.HRESULT)(0)), temp11, "return of DsrAddressToSiteNamesW, state S26");
BVT_Test_LocateDc_DsrAddressToSiteNamesWS32();
this.Manager.EndTest();
}
#endregion
#region Test Starting in S6
[TestMethod]
[TestCategory("DomainWin2008R2")]
[TestCategory("BVT")]
[TestCategory("PDC")]
[TestCategory("MS-NRPC")]
public void NRPC_BVT_Test_LocateDc_DsrAddressToSiteNamesWS6()
{
this.Manager.BeginTest("BVT_Test_LocateDc_DsrAddressToSiteNamesWS6");
this.Manager.Comment("reaching state \'S6\'");
Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.PlatformType temp12;
this.Manager.Comment("executing step \'call GetPlatform(out _)\'");
this.INrpcServerAdapterInstance.GetPlatform(out temp12);
this.Manager.Comment("reaching state \'S7\'");
this.Manager.Comment("checking step \'return GetPlatform/[out WindowsServer2008R2]\'");
TestManagerHelpers.AssertAreEqual<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.PlatformType>(this.Manager, Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.PlatformType.WindowsServer2008R2, temp12, "sutPlatform of GetPlatform, state S7");
this.Manager.Comment("reaching state \'S19\'");
Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.HRESULT temp13;
this.Manager.Comment("executing step \'call DsrAddressToSiteNamesW(PrimaryDc,{InvalidFormatSocketAddress" +
"})\'");
temp13 = this.INrpcServerAdapterInstance.DsrAddressToSiteNamesW(Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.ComputerType.PrimaryDc, this.Make<Microsoft.Modeling.Set<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.SocketAddressType>>(new string[] {
"Rep"}, new object[] {
Microsoft.Xrt.Runtime.RuntimeSupport.UpdateMap<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.SocketAddressType, Microsoft.Xrt.Runtime.Singleton>(Microsoft.Xrt.Runtime.RuntimeSupport.MakeMap<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.SocketAddressType, Microsoft.Xrt.Runtime.Singleton>(), Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.SocketAddressType.InvalidFormatSocketAddress, this.Make<Microsoft.Xrt.Runtime.RuntimeMapElement<Microsoft.Xrt.Runtime.Singleton>>(new string[] {
"Element"}, new object[] {
Microsoft.Xrt.Runtime.Singleton.Single}))}));
this.Manager.Checkpoint("MS-NRPC_R103449");
this.Manager.Comment("reaching state \'S27\'");
this.Manager.Comment("checking step \'return DsrAddressToSiteNamesW/ERROR_SUCCESS\'");
TestManagerHelpers.AssertAreEqual<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.HRESULT>(this.Manager, ((Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.HRESULT)(0)), temp13, "return of DsrAddressToSiteNamesW, state S27");
BVT_Test_LocateDc_DsrAddressToSiteNamesWS32();
this.Manager.EndTest();
}
#endregion
#region Test Starting in S8
[TestMethod]
[TestCategory("DomainWin2008R2")]
[TestCategory("BVT")]
[TestCategory("PDC")]
[TestCategory("MS-NRPC")]
public void NRPC_BVT_Test_LocateDc_DsrAddressToSiteNamesWS8()
{
this.Manager.BeginTest("BVT_Test_LocateDc_DsrAddressToSiteNamesWS8");
this.Manager.Comment("reaching state \'S8\'");
Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.PlatformType temp14;
this.Manager.Comment("executing step \'call GetPlatform(out _)\'");
this.INrpcServerAdapterInstance.GetPlatform(out temp14);
this.Manager.Comment("reaching state \'S9\'");
this.Manager.Comment("checking step \'return GetPlatform/[out WindowsServer2008R2]\'");
TestManagerHelpers.AssertAreEqual<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.PlatformType>(this.Manager, Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.PlatformType.WindowsServer2008R2, temp14, "sutPlatform of GetPlatform, state S9");
this.Manager.Comment("reaching state \'S20\'");
Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.HRESULT temp15;
this.Manager.Comment("executing step \'call DsrAddressToSiteNamesW(PrimaryDc,{InvalidSocketAddress})\'");
temp15 = this.INrpcServerAdapterInstance.DsrAddressToSiteNamesW(Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.ComputerType.PrimaryDc, this.Make<Microsoft.Modeling.Set<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.SocketAddressType>>(new string[] {
"Rep"}, new object[] {
Microsoft.Xrt.Runtime.RuntimeSupport.UpdateMap<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.SocketAddressType, Microsoft.Xrt.Runtime.Singleton>(Microsoft.Xrt.Runtime.RuntimeSupport.MakeMap<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.SocketAddressType, Microsoft.Xrt.Runtime.Singleton>(), Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.SocketAddressType.InvalidSocketAddress, this.Make<Microsoft.Xrt.Runtime.RuntimeMapElement<Microsoft.Xrt.Runtime.Singleton>>(new string[] {
"Element"}, new object[] {
Microsoft.Xrt.Runtime.Singleton.Single}))}));
this.Manager.Checkpoint("MS-NRPC_R103449");
this.Manager.Comment("reaching state \'S28\'");
this.Manager.Comment("checking step \'return DsrAddressToSiteNamesW/ERROR_SUCCESS\'");
TestManagerHelpers.AssertAreEqual<Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.HRESULT>(this.Manager, ((Microsoft.Protocols.TestSuites.ActiveDirectory.Nrpc.HRESULT)(0)), temp15, "return of DsrAddressToSiteNamesW, state S28");
BVT_Test_LocateDc_DsrAddressToSiteNamesWS32();
this.Manager.EndTest();
}
#endregion
}
}
| 76.674627 | 527 | 0.699759 | [
"MIT"
] | 0neb1n/WindowsProtocolTestSuites | TestSuites/ADFamily/src/TestSuite/MS-NRPC/BVT_Test_LocateDc_DsrAddressToSiteNamesW.cs | 25,686 | C# |
namespace DapperCodeGenerator.Core.Providers.Oracle
{
internal class OracleColumn
{
public string ColumnName { get; set; }
public string DataType { get; set; }
public string DataLength { get; set; }
public string Nullable { get; set; }
}
}
| 25.909091 | 52 | 0.631579 | [
"MIT"
] | cjwang/DapperCodeGenerator | DapperCodeGenerator.Core/Providers/Oracle/OracleColumn.cs | 287 | C# |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#if FEATURE_REGISTRY
using Microsoft.Win32;
#endif
using System.Collections.Generic;
using System.IO;
using System.Security;
namespace System.Diagnostics
{
public sealed partial class ProcessStartInfo
{
private string _userName;
private string _domain;
private const bool CaseSensitiveEnvironmentVariables = false;
public string UserName
{
get => _userName ?? string.Empty;
set => _userName = value;
}
public string PasswordInClearText { get; set; }
public string Domain
{
get => _domain ?? string.Empty;
set => _domain = value;
}
public bool LoadUserProfile { get; set; }
public string[] Verbs
{
get
{
#if FEATURE_REGISTRY
string extension = Path.GetExtension(FileName);
if (string.IsNullOrEmpty(extension))
return Array.Empty<string>();
using (RegistryKey key = Registry.ClassesRoot.OpenSubKey(extension))
{
if (key == null)
return Array.Empty<string>();
string value = key.GetValue(string.Empty) as string;
if (string.IsNullOrEmpty(value))
return Array.Empty<string>();
using (RegistryKey subKey = Registry.ClassesRoot.OpenSubKey(value + "\\shell"))
{
if (subKey == null)
return Array.Empty<string>();
string[] names = subKey.GetSubKeyNames();
List<string> verbs = new List<string>();
foreach (string name in names)
{
if (!string.Equals(name, "new", StringComparison.OrdinalIgnoreCase))
{
verbs.Add(name);
}
}
return verbs.ToArray();
}
}
#else
return Array.Empty<string>();
#endif
}
}
[CLSCompliant(false)]
public SecureString Password { get; set; }
// CoreCLR can't correctly support UseShellExecute=true for the following reasons
// 1. ShellExecuteEx is not supported on onecore.
// 2. ShellExecuteEx needs to run as STA but managed code runs as MTA by default and Thread.SetApartmentState() is not supported on all platforms.
//
// Irrespective of the limited functionality of the property we still expose it in the contract as it can be implemented
// on other platforms. Further, the default value of UseShellExecute is true on desktop and scenarios like redirection mandates
// the value to be false. So in order to provide maximum code portability we expose UseShellExecute in the contract
// and throw PlatformNotSupportedException in portable library in case it is set to true.
public bool UseShellExecute
{
get { return false; }
set { if (value == true) throw new PlatformNotSupportedException(SR.UseShellExecute); }
}
}
}
| 36.354167 | 154 | 0.558453 | [
"MIT"
] | ERROR-FAILS-NewData-News/corefx | src/System.Diagnostics.Process/src/System/Diagnostics/ProcessStartInfo.Windows.cs | 3,490 | C# |
using System;
using CoreGraphics;
using UIKit;
namespace AiForms.Effects.iOS
{
[Foundation.Preserve(AllMembers = true)]
internal class NoCaretField : UITextField
{
public NoCaretField() : base(new CGRect())
{
}
public override CGRect GetCaretRectForPosition(UITextPosition position)
{
return new CGRect();
}
}
}
| 18.666667 | 79 | 0.619898 | [
"MIT"
] | Fluck000/AiForms.Effects | AiForms.Effects.iOS/NoCaretField.cs | 394 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using FytSoa.Common;
using FytSoa.Core.Model.Cms;
using FytSoa.Extensions;
using FytSoa.Service.DtoModel;
using FytSoa.Service.Interfaces;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace FytSoa.Api.Controllers.Cms
{
[Route("api/[controller]")]
[Produces("application/json")]
[JwtAuthorize(Roles = "Admin")]
public class MessageController : Controller
{
private readonly ICmsMessageService _messageService;
public MessageController(ICmsMessageService messageService)
{
_messageService = messageService;
}
[HttpPost("page")]
public async Task<ApiResult<Page<CmsMessage>>> GetPages(PageParm parm)
{
parm.site = parm.site = SiteTool.CurrentSite?.Guid; ;
return await _messageService.GetPagesAsync(parm, m => m.Id > 0, m => m.AddDate, DbOrderEnum.Desc);
}
/// <summary>
/// 删除
/// </summary>
/// <returns></returns>
[HttpPost("delete")]
public async Task<ApiResult<string>> Delete([FromBody]MessageDeleteDto obj)
{
if (obj.type == 0)
{
return await _messageService.DeleteAsync(obj.parm);
}
else
{
return await _messageService.DeleteAsync(m => true);
}
}
/// <summary>
/// 改为已读
/// </summary>
/// <returns></returns>
[HttpPost("read")]
public async Task<ApiResult<string>> Read([FromBody]MessageReadDto obj)
{
if (obj.type == 0)
{
return await _messageService.UpdateAsync(m => new CmsMessage() { Status = true }, m => m.Id == obj.parm);
}
else
{
return await _messageService.UpdateAsync(m => new CmsMessage() { Status = true }, m => true);
}
}
}
} | 30.470588 | 121 | 0.576737 | [
"MIT"
] | neostfox/FytSoaCms | FytSoa.Api/Controllers/Cms/MessageController.cs | 2,086 | C# |
using System;
using System.Linq;
using System.Xml.Linq;
namespace RCNet.Neural.Network.SM.Preprocessing.Reservoir.SynapseNS
{
/// <summary>
/// Synapse's plasticity configuration (input spiking to hidden analog neuron)
/// </summary>
[Serializable]
public class PlasticityATInputSettings : RCNetBaseSettings
{
//Constants
/// <summary>
/// Name of the associated xsd type
/// </summary>
public const string XsdTypeName = "SynapsePlasticityATInputType";
//Attribute properties
/// <summary>
/// Synapse's dynamics configuration
/// </summary>
public IDynamicsSettings DynamicsCfg { get; }
//Constructors
/// <summary>
/// Creates an initialized instance
/// </summary>
public PlasticityATInputSettings(IDynamicsSettings dynamicsCfg = null)
{
if (dynamicsCfg == null)
{
DynamicsCfg = new ConstantDynamicsATInputSettings();
}
else if (dynamicsCfg.Application != PlasticityCommon.DynApplication.ATInput)
{
throw new InvalidOperationException($"Dynamics application must be ATInput.");
}
else
{
DynamicsCfg = (IDynamicsSettings)(((RCNetBaseSettings)dynamicsCfg).DeepClone());
}
return;
}
/// <summary>
/// The deep copy constructor
/// </summary>
/// <param name="source">Source instance</param>
public PlasticityATInputSettings(PlasticityATInputSettings source)
: this(source.DynamicsCfg)
{
return;
}
/// <summary>
/// Creates an initialized instance.
/// </summary>
/// <param name="elem">Xml element containing the initialization settings</param>
public PlasticityATInputSettings(XElement elem)
{
//Validation
XElement settingsElem = Validate(elem, XsdTypeName);
//Parsing
XElement dynamicsCfgElem = settingsElem.Elements().FirstOrDefault();
if (dynamicsCfgElem == null)
{
DynamicsCfg = new ConstantDynamicsATInputSettings();
}
else
{
switch (dynamicsCfgElem.Name.LocalName)
{
case "constantDynamics":
DynamicsCfg = new ConstantDynamicsATInputSettings(dynamicsCfgElem);
break;
case "linearDynamics":
DynamicsCfg = new LinearDynamicsATInputSettings(dynamicsCfgElem);
break;
case "nonlinearDynamics":
DynamicsCfg = new NonlinearDynamicsATInputSettings(dynamicsCfgElem);
break;
default:
throw new InvalidOperationException($"Unexpected element name {dynamicsCfgElem.Name.LocalName}.");
}
}
return;
}
//Properties
/// <summary>
/// Identifies settings containing only default values
/// </summary>
public override bool ContainsOnlyDefaults
{
get
{
return DynamicsCfg.Type == PlasticityCommon.DynType.Constant &&
((RCNetBaseSettings)DynamicsCfg).ContainsOnlyDefaults;
}
}
//Methods
/// <summary>
/// Checks consistency
/// </summary>
protected override void Check()
{
return;
}
/// <summary>
/// Creates the deep copy instance of this instance
/// </summary>
public override RCNetBaseSettings DeepClone()
{
return new PlasticityATInputSettings(this);
}
/// <summary>
/// Generates xml element containing the settings.
/// </summary>
/// <param name="rootElemName">Name to be used as a name of the root element.</param>
/// <param name="suppressDefaults">Specifies whether to ommit optional nodes having set default values</param>
/// <returns>XElement containing the settings</returns>
public override XElement GetXml(string rootElemName, bool suppressDefaults)
{
XElement rootElem = new XElement(rootElemName);
if (!suppressDefaults || !((RCNetBaseSettings)DynamicsCfg).ContainsOnlyDefaults)
{
rootElem.Add(DynamicsCfg.GetXml(suppressDefaults));
}
Validate(rootElem, XsdTypeName);
return rootElem;
}
/// <summary>
/// Generates default named xml element containing the settings.
/// </summary>
/// <param name="suppressDefaults">Specifies whether to ommit optional nodes having set default values</param>
/// <returns>XElement containing the settings</returns>
public override XElement GetXml(bool suppressDefaults)
{
return GetXml("plasticity", suppressDefaults);
}
}//PlasticityATInputSettings
}//Namespace
| 34.596026 | 122 | 0.562979 | [
"MIT"
] | thild/NET | RCNet/Neural/Network/SM/Preprocessing/Reservoir/Synapse/PlasticityATInputSettings.cs | 5,226 | C# |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections.Generic;
using System.Reflection;
using System.Text;
using Test.Cryptography;
using Xunit;
namespace System.Security.Cryptography.DeriveBytesTests
{
[SkipOnMono("Not supported on Browser", TestPlatforms.Browser)]
public class Rfc2898Tests
{
// 8 bytes is the minimum accepted value, by using it we've already assured that the minimum is acceptable.
private static readonly byte[] s_testSalt = new byte[] { 9, 5, 5, 5, 1, 2, 1, 2 };
private static readonly byte[] s_testSaltB = new byte[] { 0, 4, 0, 4, 1, 9, 7, 5 };
private const string TestPassword = "PasswordGoesHere";
private const string TestPasswordB = "FakePasswordsAreHard";
private const int DefaultIterationCount = 1000;
[Fact]
public static void Ctor_NullPasswordBytes()
{
Assert.Throws<NullReferenceException>(() => new Rfc2898DeriveBytes((byte[])null, s_testSalt, DefaultIterationCount));
}
[Fact]
public static void Ctor_NullPasswordString()
{
Assert.Throws<ArgumentNullException>(() => new Rfc2898DeriveBytes((string)null, s_testSalt, DefaultIterationCount));
}
[Fact]
public static void Ctor_NullSalt()
{
Assert.Throws<ArgumentNullException>(() => new Rfc2898DeriveBytes(TestPassword, null, DefaultIterationCount));
}
[Fact]
public static void Ctor_EmptySalt()
{
AssertExtensions.Throws<ArgumentException>("salt", null, () => new Rfc2898DeriveBytes(TestPassword, Array.Empty<byte>(), DefaultIterationCount));
}
[Fact]
public static void Ctor_DiminishedSalt()
{
AssertExtensions.Throws<ArgumentException>("salt", null, () => new Rfc2898DeriveBytes(TestPassword, new byte[7], DefaultIterationCount));
}
[Fact]
public static void Ctor_GenerateZeroSalt()
{
AssertExtensions.Throws<ArgumentException>("saltSize", null, () => new Rfc2898DeriveBytes(TestPassword, 0));
}
[Fact]
public static void Ctor_GenerateNegativeSalt()
{
Assert.Throws<ArgumentOutOfRangeException>(() => new Rfc2898DeriveBytes(TestPassword, -1));
Assert.Throws<ArgumentOutOfRangeException>(() => new Rfc2898DeriveBytes(TestPassword, int.MinValue));
Assert.Throws<ArgumentOutOfRangeException>(() => new Rfc2898DeriveBytes(TestPassword, int.MinValue / 2));
}
[Fact]
public static void Ctor_GenerateDiminishedSalt()
{
AssertExtensions.Throws<ArgumentException>("saltSize", null, () => new Rfc2898DeriveBytes(TestPassword, 7));
}
[Fact]
public static void Ctor_TooFewIterations()
{
Assert.Throws<ArgumentOutOfRangeException>(() => new Rfc2898DeriveBytes(TestPassword, s_testSalt, 0));
}
[Fact]
public static void Ctor_NegativeIterations()
{
Assert.Throws<ArgumentOutOfRangeException>(() => new Rfc2898DeriveBytes(TestPassword, s_testSalt, -1));
Assert.Throws<ArgumentOutOfRangeException>(() => new Rfc2898DeriveBytes(TestPassword, s_testSalt, int.MinValue));
Assert.Throws<ArgumentOutOfRangeException>(() => new Rfc2898DeriveBytes(TestPassword, s_testSalt, int.MinValue / 2));
}
#if NETCOREAPP
[Fact]
public static void Ctor_EmptyAlgorithm()
{
HashAlgorithmName alg = default(HashAlgorithmName);
// (byte[], byte[], int, HashAlgorithmName)
Assert.Throws<CryptographicException>(() => new Rfc2898DeriveBytes(s_testSalt, s_testSalt, DefaultIterationCount, alg));
// (string, byte[], int, HashAlgorithmName)
Assert.Throws<CryptographicException>(() => new Rfc2898DeriveBytes(TestPassword, s_testSalt, DefaultIterationCount, alg));
// (string, int, int, HashAlgorithmName)
Assert.Throws<CryptographicException>(() => new Rfc2898DeriveBytes(TestPassword, 8, DefaultIterationCount, alg));
}
[Fact]
public static void Ctor_MD5NotSupported()
{
Assert.Throws<CryptographicException>(
() => new Rfc2898DeriveBytes(TestPassword, s_testSalt, DefaultIterationCount, HashAlgorithmName.MD5));
}
[Fact]
public static void Ctor_UnknownAlgorithm()
{
Assert.Throws<CryptographicException>(
() => new Rfc2898DeriveBytes(TestPassword, s_testSalt, DefaultIterationCount, new HashAlgorithmName("PotatoLemming")));
}
#endif
[Fact]
public static void Ctor_SaltCopied()
{
byte[] saltIn = (byte[])s_testSalt.Clone();
using (var deriveBytes = new Rfc2898DeriveBytes(TestPassword, saltIn, DefaultIterationCount))
{
byte[] saltOut = deriveBytes.Salt;
Assert.NotSame(saltIn, saltOut);
Assert.Equal(saltIn, saltOut);
// Right now we know that at least one of the constructor and get_Salt made a copy, if it was
// only get_Salt then this next part would fail.
saltIn[0] = unchecked((byte)~saltIn[0]);
// Have to read the property again to prove it's detached.
Assert.NotEqual(saltIn, deriveBytes.Salt);
}
}
[Fact]
public static void Ctor_DefaultIterations()
{
using (var deriveBytes = new Rfc2898DeriveBytes(TestPassword, s_testSalt))
{
Assert.Equal(DefaultIterationCount, deriveBytes.IterationCount);
}
}
[Fact]
public static void Ctor_IterationsRespected()
{
using (var deriveBytes = new Rfc2898DeriveBytes(TestPassword, s_testSalt, 1))
{
Assert.Equal(1, deriveBytes.IterationCount);
}
}
[Fact]
public static void GetSaltCopies()
{
byte[] first;
byte[] second;
using (var deriveBytes = new Rfc2898DeriveBytes(TestPassword, s_testSalt, DefaultIterationCount))
{
first = deriveBytes.Salt;
second = deriveBytes.Salt;
}
Assert.NotSame(first, second);
Assert.Equal(first, second);
}
[Fact]
public static void MinimumAcceptableInputs()
{
byte[] output;
using (var deriveBytes = new Rfc2898DeriveBytes("", new byte[8], 1))
{
output = deriveBytes.GetBytes(1);
}
Assert.Equal(1, output.Length);
Assert.Equal(0xA6, output[0]);
}
[Fact]
public static void GetBytes_ZeroLength()
{
using (var deriveBytes = new Rfc2898DeriveBytes(TestPassword, s_testSalt))
{
Assert.Throws<ArgumentOutOfRangeException>(() => deriveBytes.GetBytes(0));
}
}
[Fact]
public static void GetBytes_NegativeLength()
{
Rfc2898DeriveBytes deriveBytes = new Rfc2898DeriveBytes(TestPassword, s_testSalt);
Assert.Throws<ArgumentOutOfRangeException>(() => deriveBytes.GetBytes(-1));
Assert.Throws<ArgumentOutOfRangeException>(() => deriveBytes.GetBytes(int.MinValue));
Assert.Throws<ArgumentOutOfRangeException>(() => deriveBytes.GetBytes(int.MinValue / 2));
}
[Fact]
public static void GetBytes_NotIdempotent()
{
byte[] first;
byte[] second;
using (var deriveBytes = new Rfc2898DeriveBytes(TestPassword, s_testSalt))
{
first = deriveBytes.GetBytes(32);
second = deriveBytes.GetBytes(32);
}
Assert.NotEqual(first, second);
}
[Theory]
[InlineData(2)]
[InlineData(5)]
[InlineData(10)]
[InlineData(16)]
[InlineData(20)]
[InlineData(25)]
[InlineData(32)]
[InlineData(40)]
[InlineData(192)]
public static void GetBytes_StreamLike(int size)
{
byte[] first;
using (var deriveBytes = new Rfc2898DeriveBytes(TestPassword, s_testSalt))
{
first = deriveBytes.GetBytes(size);
}
byte[] second = new byte[first.Length];
// Reset
using (var deriveBytes = new Rfc2898DeriveBytes(TestPassword, s_testSalt))
{
byte[] secondFirstHalf = deriveBytes.GetBytes(first.Length / 2);
byte[] secondSecondHalf = deriveBytes.GetBytes(first.Length - secondFirstHalf.Length);
Buffer.BlockCopy(secondFirstHalf, 0, second, 0, secondFirstHalf.Length);
Buffer.BlockCopy(secondSecondHalf, 0, second, secondFirstHalf.Length, secondSecondHalf.Length);
}
Assert.Equal(first, second);
}
[Theory]
[InlineData(2)]
[InlineData(5)]
[InlineData(10)]
[InlineData(16)]
[InlineData(20)]
[InlineData(25)]
[InlineData(32)]
[InlineData(40)]
[InlineData(192)]
public static void GetBytes_StreamLike_OneAtATime(int size)
{
byte[] first;
using (var deriveBytes = new Rfc2898DeriveBytes(TestPasswordB, s_testSaltB))
{
first = deriveBytes.GetBytes(size);
}
byte[] second = new byte[first.Length];
// Reset
using (var deriveBytes = new Rfc2898DeriveBytes(TestPasswordB, s_testSaltB))
{
for (int i = 0; i < second.Length; i++)
{
second[i] = deriveBytes.GetBytes(1)[0];
}
}
Assert.Equal(first, second);
}
[Fact]
public static void GetBytes_KnownValues_1()
{
TestKnownValue(
TestPassword,
s_testSalt,
DefaultIterationCount,
new byte[]
{
0x6C, 0x3C, 0x55, 0xA4, 0x2E, 0xE9, 0xD6, 0xAE,
0x7D, 0x28, 0x6C, 0x83, 0xE4, 0xD7, 0xA3, 0xC8,
0xB5, 0x93, 0x9F, 0x45, 0x2F, 0x2B, 0xF3, 0x68,
0xFA, 0xE8, 0xB2, 0x74, 0x55, 0x3A, 0x36, 0x8A,
});
}
[Fact]
public static void GetBytes_KnownValues_2()
{
TestKnownValue(
TestPassword,
s_testSalt,
DefaultIterationCount + 1,
new byte[]
{
0x8E, 0x9B, 0xF7, 0xC1, 0x83, 0xD4, 0xD1, 0x20,
0x87, 0xA8, 0x2C, 0xD7, 0xCD, 0x84, 0xBC, 0x1A,
0xC6, 0x7A, 0x7A, 0xDD, 0x46, 0xFA, 0x40, 0xAA,
0x60, 0x3A, 0x2B, 0x8B, 0x79, 0x2C, 0x8A, 0x6D,
});
}
[Fact]
public static void GetBytes_KnownValues_3()
{
TestKnownValue(
TestPassword,
s_testSaltB,
DefaultIterationCount,
new byte[]
{
0x4E, 0xF5, 0xA5, 0x85, 0x92, 0x9D, 0x8B, 0xC5,
0x57, 0x0C, 0x83, 0xB5, 0x19, 0x69, 0x4B, 0xC2,
0x4B, 0xAA, 0x09, 0xE9, 0xE7, 0x9C, 0x29, 0x94,
0x14, 0x19, 0xE3, 0x61, 0xDA, 0x36, 0x5B, 0xB3,
});
}
[Fact]
public static void GetBytes_KnownValues_4()
{
TestKnownValue(
TestPasswordB,
s_testSalt,
DefaultIterationCount,
new byte[]
{
0x86, 0xBB, 0xB3, 0xD7, 0x99, 0x0C, 0xAC, 0x4D,
0x1D, 0xB2, 0x78, 0x9D, 0x57, 0x5C, 0x06, 0x93,
0x97, 0x50, 0x72, 0xFF, 0x56, 0x57, 0xAC, 0x7F,
0x9B, 0xD2, 0x14, 0x9D, 0xE9, 0x95, 0xA2, 0x6D,
});
}
#if NETCOREAPP
[Theory]
[MemberData(nameof(KnownValuesTestCases))]
public static void GetBytes_KnownValues_WithAlgorithm(KnownValuesTestCase testCase)
{
byte[] output;
var pbkdf2 = new Rfc2898DeriveBytes(
testCase.Password,
testCase.Salt,
testCase.IterationCount,
new HashAlgorithmName(testCase.HashAlgorithmName));
using (pbkdf2)
{
output = pbkdf2.GetBytes(testCase.AnswerHex.Length / 2);
}
Assert.Equal(testCase.AnswerHex, output.ByteArrayToHex());
}
[Theory]
[InlineData("SHA1")]
[InlineData("SHA256")]
[InlineData("SHA384")]
[InlineData("SHA512")]
public static void CheckHashAlgorithmValue(string hashAlgorithmName)
{
HashAlgorithmName hashAlgorithm = new HashAlgorithmName(hashAlgorithmName);
using (var pbkdf2 = new Rfc2898DeriveBytes(TestPassword, s_testSalt, DefaultIterationCount, hashAlgorithm))
{
Assert.Equal(hashAlgorithm, pbkdf2.HashAlgorithm);
}
}
#endif
[Fact]
public static void CryptDeriveKey_NotSupported()
{
using (var deriveBytes = new Rfc2898DeriveBytes(TestPassword, s_testSalt))
{
Assert.Throws<PlatformNotSupportedException>(() => deriveBytes.CryptDeriveKey("RC2", "SHA1", 128, new byte[8]));
}
}
[Fact]
public static void GetBytes_ExceedCounterLimit()
{
FieldInfo blockField = typeof(Rfc2898DeriveBytes).GetField("_block", BindingFlags.NonPublic | BindingFlags.Instance);
Assert.NotNull(blockField);
using (Rfc2898DeriveBytes deriveBytes = new Rfc2898DeriveBytes(TestPassword, s_testSalt))
{
// Set the internal block counter to be on the last possible block. This should succeed.
blockField.SetValue(deriveBytes, uint.MaxValue - 1);
deriveBytes.GetBytes(20); // Extract 20 bytes, a full block.
// Block should now be uint.MaxValue, which will overflow when writing.
Assert.Throws<CryptographicException>(() => deriveBytes.GetBytes(1));
}
}
[Fact]
public static void Ctor_PasswordMutatedAfterCreate()
{
byte[] passwordBytes = Encoding.UTF8.GetBytes(TestPassword);
byte[] derived;
using (Rfc2898DeriveBytes deriveBytes = new Rfc2898DeriveBytes(passwordBytes, s_testSaltB, DefaultIterationCount))
{
derived = deriveBytes.GetBytes(64);
}
using (Rfc2898DeriveBytes deriveBytes = new Rfc2898DeriveBytes(passwordBytes, s_testSaltB, DefaultIterationCount))
{
passwordBytes[0] ^= 0xFF; // Flipping a byte after the object is constructed should not be observed.
byte[] actual = deriveBytes.GetBytes(64);
Assert.Equal(derived, actual);
}
}
[Fact]
public static void Ctor_PasswordBytes_NotCleared()
{
byte[] passwordBytes = Encoding.UTF8.GetBytes(TestPassword);
byte[] passwordBytesOriginal = passwordBytes.AsSpan().ToArray();
using (Rfc2898DeriveBytes deriveBytes = new Rfc2898DeriveBytes(passwordBytes, s_testSaltB, DefaultIterationCount))
{
Assert.Equal(passwordBytesOriginal, passwordBytes);
}
}
private static void TestKnownValue(string password, byte[] salt, int iterationCount, byte[] expected)
{
byte[] output;
using (var deriveBytes = new Rfc2898DeriveBytes(password, salt, iterationCount))
{
output = deriveBytes.GetBytes(expected.Length);
}
Assert.Equal(expected, output);
}
public static IEnumerable<object[]> KnownValuesTestCases()
{
HashSet<string> testCaseNames = new HashSet<string>();
// Wrap the class in the MemberData-required-object[].
foreach (KnownValuesTestCase testCase in GetKnownValuesTestCases())
{
if (!testCaseNames.Add(testCase.CaseName))
{
throw new InvalidOperationException($"Duplicate test case name: {testCase.CaseName}");
}
yield return new object[] { testCase };
}
}
private static IEnumerable<KnownValuesTestCase> GetKnownValuesTestCases()
{
Encoding ascii = Encoding.ASCII;
yield return new KnownValuesTestCase
{
CaseName = "RFC 3211 Section 3 #1",
HashAlgorithmName = "SHA1",
Password = "password",
Salt = "1234567878563412".HexToByteArray(),
IterationCount = 5,
AnswerHex = "D1DAA78615F287E6",
};
yield return new KnownValuesTestCase
{
CaseName = "RFC 3211 Section 3 #2",
HashAlgorithmName = "SHA1",
Password = "All n-entities must communicate with other n-entities via n-1 entiteeheehees",
Salt = "1234567878563412".HexToByteArray(),
IterationCount = 500,
AnswerHex = "6A8970BF68C92CAEA84A8DF28510858607126380CC47AB2D",
};
yield return new KnownValuesTestCase
{
CaseName = "RFC 6070 Case 5",
HashAlgorithmName = "SHA1",
Password = "passwordPASSWORDpassword",
Salt = ascii.GetBytes("saltSALTsaltSALTsaltSALTsaltSALTsalt"),
IterationCount = 4096,
AnswerHex = "3D2EEC4FE41C849B80C8D83662C0E44A8B291A964CF2F07038",
};
// From OpenSSL.
// https://github.com/openssl/openssl/blob/6f0ac0e2f27d9240516edb9a23b7863e7ad02898/test/evptests.txt
// Corroborated on http://stackoverflow.com/questions/5130513/pbkdf2-hmac-sha2-test-vectors,
// though the SO answer stopped at 25 bytes.
yield return new KnownValuesTestCase
{
CaseName = "RFC 6070#5 SHA256",
HashAlgorithmName = "SHA256",
Password = "passwordPASSWORDpassword",
Salt = ascii.GetBytes("saltSALTsaltSALTsaltSALTsaltSALTsalt"),
IterationCount = 4096,
AnswerHex =
"348C89DBCBD32B2F32D814B8116E84CF2B17347EBC1800181C4E2A1FB8DD53E1C635518C7DAC47E9",
};
// From OpenSSL.
yield return new KnownValuesTestCase
{
CaseName = "RFC 6070#5 SHA512",
HashAlgorithmName = "SHA512",
Password = "passwordPASSWORDpassword",
Salt = ascii.GetBytes("saltSALTsaltSALTsaltSALTsaltSALTsalt"),
IterationCount = 4096,
AnswerHex = (
"8C0511F4C6E597C6AC6315D8F0362E225F3C501495BA23B868C005174DC4EE71" +
"115B59F9E60CD9532FA33E0F75AEFE30225C583A186CD82BD4DAEA9724A3D3B8"),
};
// Verified against BCryptDeriveKeyPBKDF2, as an independent implementation.
yield return new KnownValuesTestCase
{
CaseName = "RFC 3962 Appendix B#1 SHA384-24000",
HashAlgorithmName = "SHA384",
Password = "password",
Salt = ascii.GetBytes("ATHENA.MIT.EDUraeburn"),
IterationCount = 24000,
AnswerHex = (
"4B138897F289129C6E80965F96B940F76BBC0363CD22190E0BD94ADBA79BE33E" +
"02C9D8E0AF0D19B295B02828770587F672E0ED182A9A59BA5E07120CA936E6BF" +
"F5D425688253C2A8336ED30DA898C67FD9DDFD8EF3F8C708392E2E2458716DF8" +
"6799372DEF27AB36AF239D7D654A56A51395086A322B9322977F62A98662B57E"),
};
// These "alternate" tests are made up, due to a lack of test corpus diversity
yield return new KnownValuesTestCase
{
CaseName = "SHA256 alternate",
HashAlgorithmName = "SHA256",
Password = "PLACEHOLDER",
Salt = ascii.GetBytes("abcdefghij"),
IterationCount = 1,
AnswerHex = (
// T-Block 1
"9352784113E5E6DC21FC82ADA3A321D64962F760DF6EAA8E46CEEF4FAF6C6E" +
// T-Block 2
"EE6DB97E5852FC4C15FA7C52FACDEDE89B916BCC864028084A2CF0889F7F76"),
};
yield return new KnownValuesTestCase
{
CaseName = "SHA384 alternate",
HashAlgorithmName = "SHA384",
Password = "PLACEHOLDER",
Salt = ascii.GetBytes("abcdefghij"),
IterationCount = 1,
AnswerHex = (
// T-Block 1
"B9A10C6C82F36482D76C0C38C982C05F8BB21211ACBE1D1104B4F647DDEAEE179B92ACB0E00A304B791FD0" +
// T-Block 2
"3C6A08364D0A47CD1F15E0E314800FF3AC9CF2E93B3F81A5EB67FE9F2FE6E86B0430B59902CCB5FD190E67"),
};
yield return new KnownValuesTestCase
{
CaseName = "SHA512 alternate",
HashAlgorithmName = "SHA512",
Password = "PLACEHOLDER",
Salt = ascii.GetBytes("abcdefghij"),
IterationCount = 1,
AnswerHex = (
// T-Block 1
"AD8CE08CFA8F932CF9FEDDCDB6E4BC6417D61F0465D408C0BFE9656E2C1C47" +
"1424537ADB2D9EBE4E4232F474EFEE2AF347F21A804F64CBC05474A6DCE0A5" +
// T-Block 2
"078100F813C1F8388EC233C1397D5E18C6509B5483141EF836C15A34D6DC67" +
"A3C46A45798A2839CFD239749219E9F2EDAD3249EC8221AFB17C0028A4A0A5"),
};
}
public class KnownValuesTestCase
{
public string CaseName { get; set; }
public string HashAlgorithmName { get; set; }
public string Password { get; set; }
public byte[] Salt { get; set; }
public int IterationCount { get; set; }
public string AnswerHex { get; set; }
public override string ToString()
{
return CaseName;
}
}
}
}
| 37.667758 | 157 | 0.566804 | [
"MIT"
] | Temppus/runtime | src/libraries/System.Security.Cryptography.Algorithms/tests/Rfc2898Tests.cs | 23,015 | C# |
using System.CodeDom.Compiler;
using System;
using System.Runtime.Serialization;
namespace SolidRpc.Test.Vitec.Types.ForeignPropertyInfo.Estate {
/// <summary>
///
/// </summary>
[GeneratedCode("OpenApiCodeGeneratorV2","1.0.0.0")]
public class Exterior {
/// <summary>
/// Pool
/// </summary>
[DataMember(Name="pool",EmitDefaultValue=false)]
public bool? Pool { get; set; }
/// <summary>
/// Beskrivning av pool
/// </summary>
[DataMember(Name="descriptionOfPool",EmitDefaultValue=false)]
public string DescriptionOfPool { get; set; }
/// <summary>
/// Terrass
/// </summary>
[DataMember(Name="terrace",EmitDefaultValue=false)]
public bool? Terrace { get; set; }
/// <summary>
/// Terrasyta (kvm)
/// </summary>
[DataMember(Name="terraceSurface",EmitDefaultValue=false)]
public int? TerraceSurface { get; set; }
/// <summary>
/// Balkong
/// </summary>
[DataMember(Name="balcony",EmitDefaultValue=false)]
public bool? Balcony { get; set; }
/// <summary>
/// Balkongyta (kvm)
/// </summary>
[DataMember(Name="balconySurface",EmitDefaultValue=false)]
public int? BalconySurface { get; set; }
/// <summary>
/// Beskrivning terrass och balkong
/// </summary>
[DataMember(Name="descriptionTerraceAndBalcony",EmitDefaultValue=false)]
public string DescriptionTerraceAndBalcony { get; set; }
}
} | 30.716981 | 80 | 0.566953 | [
"MIT"
] | aarrgard/solidrpc | SolidRpc.Test.Vitec/Types/ForeignPropertyInfo/Estate/Exterior.cs | 1,628 | C# |
using Laconic.CodeGeneration;
using Xunit;
namespace Laconic.CodeGeneration.Tests
{
// ReSharper disable UnusedType.Global
// ReSharper disable UnusedMember.Global
[Records]
public interface TestRecords
{
record User(string firstName, string lastName);
record TaggedUser(User user, params string[] tags);
}
// ReSharper restore UnusedType.Global
// ReSharper restore UnusedMember.Global
public class RecordTests
{
[Fact]
public void parameters_become_property_names()
{
var user = new User("a", "b");
Assert.Equal("a", user.FirstName);
Assert.Equal("b", user.LastName);
}
[Fact]
public void With_method_works()
{
var user = new User("a", "b");
var updated = user.With(lastName: "c");
Assert.Equal("a", updated.FirstName);
Assert.Equal("c", updated.LastName);
}
[Fact]
public void Deconstruct_method_works()
{
var user = new User("a", "b");
var (first, last) = user;
Assert.Equal("a", first);
Assert.Equal("b", last);
}
[Fact]
public void Records_have_structural_equality()
{
Assert.Equal(new User("a", "b"), new User("a", "b"));
Assert.True(((object) new User("a", "b")).Equals((object) new User("a", "b")));
Assert.NotEqual(new User("a", "b"), new User("a", "c"));
Assert.True(new User("a", "b") == new User("a", "b"));
Assert.False(new User("a", "b") == new User("a", "c"));
}
[Fact]
public void Records_define_GetHashCode()
{
var user1 = new User("a", "b");
var user2 = new User("a", "b");
var user3 = new User("a", "c");
Assert.Equal(user1.GetHashCode(), user2.GetHashCode());
Assert.NotEqual(user1.GetHashCode(), user3.GetHashCode());
}
[Fact]
public void Records_with_params_arrays_have_structural_equality()
{
Assert.Equal(
new TaggedUser(new User("a", "b"), "t1", "t2"),
new TaggedUser(new User("a", "b"), "t1", "t2"));
Assert.NotEqual(
new TaggedUser(new User("a", "b"), "t1", "t2"),
new TaggedUser(new User("a", "b"), "t1", "t2", "t3"));
}
}
} | 29.626506 | 91 | 0.514843 | [
"MIT"
] | shirshov/laconic | codegen/test/RecordTests.cs | 2,459 | C# |
namespace SagaImpl.Common.ModelDtos
{
public class OrderItemDto
{
public int ItemId { get; set; }
public int NumberOf { get; set; }
}
} | 18.333333 | 41 | 0.6 | [
"MIT"
] | IvanJevtic9/SagaPatternImpl | src/SagaImpl.Common/ModelDtos/OrderItemDto.cs | 167 | C# |
/**
* Autogenerated by Thrift
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
namespace Evernote.EDAM.Type
{
public enum BusinessUserRole
{
ADMIN = 1,
NORMAL = 2,
}
}
| 14 | 67 | 0.647619 | [
"MIT"
] | DamianMehers/EnUWPAuthDemo | EvernoteUniveralWindowsAuthenticationDemo/EDAM/Type/BusinessUserRole.cs | 210 | C# |
namespace Xilium.CefGlue
{
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime.InteropServices;
using Xilium.CefGlue.Interop;
/// <summary>
/// Class used to represent drag data. The methods of this class may be called
/// on any thread.
/// </summary>
public sealed unsafe partial class CefDragData
{
/// <summary>
/// Create a new CefDragData object.
/// </summary>
public static CefDragData Create()
{
return CefDragData.FromNative(cef_drag_data_t.create());
}
/// <summary>
/// Returns a copy of the current object.
/// </summary>
public CefDragData Clone()
{
return CefDragData.FromNative(cef_drag_data_t.clone(_self));
}
/// <summary>
/// Returns true if this object is read-only.
/// </summary>
public bool IsReadOnly
{
get { return cef_drag_data_t.is_read_only(_self) != 0; }
}
/// <summary>
/// Returns true if the drag data is a link.
/// </summary>
public bool IsLink
{
get { return cef_drag_data_t.is_link(_self) != 0; }
}
/// <summary>
/// Returns true if the drag data is a text or html fragment.
/// </summary>
public bool IsFragment
{
get { return cef_drag_data_t.is_fragment(_self) != 0; }
}
/// <summary>
/// Returns true if the drag data is a file.
/// </summary>
public bool IsFile
{
get { return cef_drag_data_t.is_file(_self) != 0; }
}
/// <summary>
/// Return the link URL that is being dragged.
/// </summary>
public string LinkUrl
{
get
{
var n_result = cef_drag_data_t.get_link_url(_self);
return cef_string_userfree.ToString(n_result);
}
}
/// <summary>
/// Return the title associated with the link being dragged.
/// </summary>
public string LinkTitle
{
get
{
var n_result = cef_drag_data_t.get_link_title(_self);
return cef_string_userfree.ToString(n_result);
}
}
/// <summary>
/// Return the metadata, if any, associated with the link being dragged.
/// </summary>
public string LinkMetadata
{
get
{
var n_result = cef_drag_data_t.get_link_metadata(_self);
return cef_string_userfree.ToString(n_result);
}
}
/// <summary>
/// Return the plain text fragment that is being dragged.
/// </summary>
public string FragmentText
{
get
{
var n_result = cef_drag_data_t.get_fragment_text(_self);
return cef_string_userfree.ToString(n_result);
}
}
/// <summary>
/// Return the text/html fragment that is being dragged.
/// </summary>
public string FragmentHtml
{
get
{
var n_result = cef_drag_data_t.get_fragment_html(_self);
return cef_string_userfree.ToString(n_result);
}
}
/// <summary>
/// Return the base URL that the fragment came from. This value is used for
/// resolving relative URLs and may be empty.
/// </summary>
public string FragmentBaseUrl
{
get
{
var n_result = cef_drag_data_t.get_fragment_base_url(_self);
return cef_string_userfree.ToString(n_result);
}
}
/// <summary>
/// Return the name of the file being dragged out of the browser window.
/// </summary>
public string FileName
{
get
{
var n_result = cef_drag_data_t.get_file_name(_self);
return cef_string_userfree.ToString(n_result);
}
}
/// <summary>
/// Write the contents of the file being dragged out of the web view into
/// |writer|. Returns the number of bytes sent to |writer|. If |writer| is
/// NULL this method will return the size of the file contents in bytes.
/// Call GetFileName() to get a suggested name for the file.
/// </summary>
public ulong GetFileContents(CefStreamWriter writer)
{
var n_writer = writer != null ? writer.ToNative() : null;
return (ulong)cef_drag_data_t.get_file_contents(_self, n_writer);
}
/// <summary>
/// Retrieve the list of file names that are being dragged into the browser
/// window.
/// </summary>
public string[] GetFileNames()
{
cef_string_list* n_result = null;
try
{
n_result = libcef.string_list_alloc();
var success = cef_drag_data_t.get_file_names(_self, n_result) != 0;
if (!success) return null;
return cef_string_list.ToArray(n_result);
}
finally
{
if (n_result != null) libcef.string_list_free(n_result);
}
}
/// <summary>
/// Set the link URL that is being dragged.
/// </summary>
public void SetLinkURL(string url)
{
fixed (char* url_str = url)
{
var n_url = new cef_string_t(url_str, url != null ? url.Length : 0);
cef_drag_data_t.set_link_url(_self, &n_url);
}
}
/// <summary>
/// Set the title associated with the link being dragged.
/// </summary>
public void SetLinkTitle(string title)
{
fixed (char* title_str = title)
{
var n_title = new cef_string_t(title_str, title != null ? title.Length : 0);
cef_drag_data_t.set_link_title(_self, &n_title);
}
}
/// <summary>
/// Set the metadata associated with the link being dragged.
/// </summary>
public void SetLinkMetadata(string data)
{
fixed (char* data_str = data)
{
var n_data = new cef_string_t(data_str, data != null ? data.Length : 0);
cef_drag_data_t.set_link_metadata(_self, &n_data);
}
}
/// <summary>
/// Set the plain text fragment that is being dragged.
/// </summary>
public void SetFragmentText(string text)
{
fixed (char* text_str = text)
{
var n_text = new cef_string_t(text_str, text != null ? text.Length : 0);
cef_drag_data_t.set_fragment_text(_self, &n_text);
}
}
/// <summary>
/// Set the text/html fragment that is being dragged.
/// </summary>
public void SetFragmentHtml(string html)
{
fixed (char* html_str = html)
{
var n_html = new cef_string_t(html_str, html != null ? html.Length : 0);
cef_drag_data_t.set_fragment_html(_self, &n_html);
}
}
/// <summary>
/// Set the base URL that the fragment came from.
/// </summary>
public void SetFragmentBaseURL(string baseUrl)
{
fixed (char* baseUrl_str = baseUrl)
{
var n_baseUrl = new cef_string_t(baseUrl_str, baseUrl != null ? baseUrl.Length : 0);
cef_drag_data_t.set_fragment_base_url(_self, &n_baseUrl);
}
}
/// <summary>
/// Reset the file contents. You should do this before calling
/// CefBrowserHost::DragTargetDragEnter as the web view does not allow us to
/// drag in this kind of data.
/// </summary>
public void ResetFileContents()
{
cef_drag_data_t.reset_file_contents(_self);
}
/// <summary>
/// Add a file that is being dragged into the webview.
/// </summary>
public void AddFile(string path, string displayName)
{
fixed (char* path_str = path)
fixed (char* displayName_str = displayName)
{
var n_path = new cef_string_t(path_str, path != null ? path.Length : 0);
var n_displayName = new cef_string_t(displayName_str, displayName != null ? displayName.Length : 0);
cef_drag_data_t.add_file(_self, &n_path, &n_displayName);
}
}
/// <summary>
/// Clear list of filenames.
/// </summary>
public void ClearFilenames()
=> cef_drag_data_t.clear_filenames(_self);
/// <summary>
/// Get the image representation of drag data. May return NULL if no image
/// representation is available.
/// </summary>
public CefImage GetImage()
{
var result = cef_drag_data_t.get_image(_self);
return CefImage.FromNativeOrNull(result);
}
/// <summary>
/// Get the image hotspot (drag start location relative to image dimensions).
/// </summary>
public CefPoint GetImageHotspot()
{
var result = cef_drag_data_t.get_image_hotspot(_self);
return new CefPoint(result.x, result.y);
}
/// <summary>
/// Returns true if an image representation of drag data is available.
/// </summary>
public bool HasImage
{
get
{
return cef_drag_data_t.has_image(_self) != 0;
}
}
}
}
| 31.644444 | 116 | 0.526184 | [
"MIT",
"BSD-3-Clause"
] | mattkol/Chromely | src/Chromely/CefGlue/Classes.Proxies/CefDragData.cs | 9,970 | C# |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections.Generic;
using System.Reflection;
using System.Reflection.Emit;
using Xunit;
namespace System.Linq.Expressions.Tests
{
[ActiveIssue("https://github.com/dotnet/runtime/issues/51952", TestPlatforms.tvOS)]
public static class MemberAccessTests
{
private class UnreadableIndexableClass
{
public int this[int index]
{
set { }
}
}
[Theory]
[ClassData(typeof(CompilationTypes))]
public static void CheckMemberAccessStructInstanceFieldTest(bool useInterpreter)
{
Expression<Func<int>> e =
Expression.Lambda<Func<int>>(
Expression.Field(
Expression.Constant(new FS() { II = 42 }),
"II"),
Enumerable.Empty<ParameterExpression>());
Func<int> f = e.Compile(useInterpreter);
Assert.Equal(42, f());
}
[Theory]
[ClassData(typeof(CompilationTypes))]
public static void CheckMemberAccessStructStaticFieldTest(bool useInterpreter)
{
FS.SI = 42;
try
{
Expression<Func<int>> e =
Expression.Lambda<Func<int>>(
Expression.Field(
null,
typeof(FS),
"SI"),
Enumerable.Empty<ParameterExpression>());
Func<int> f = e.Compile(useInterpreter);
Assert.Equal(42, f());
}
finally
{
FS.SI = 0;
}
}
[Theory]
[ClassData(typeof(CompilationTypes))]
public static void CheckMemberAccessStructConstFieldTest(bool useInterpreter)
{
Expression<Func<int>> e =
Expression.Lambda<Func<int>>(
Expression.Field(
null,
typeof(FS),
"CI"),
Enumerable.Empty<ParameterExpression>());
Func<int> f = e.Compile(useInterpreter);
Assert.Equal(42, f());
}
[Theory]
[ClassData(typeof(CompilationTypes))]
public static void CheckMemberAccessStructStaticReadOnlyFieldTest(bool useInterpreter)
{
Expression<Func<int>> e =
Expression.Lambda<Func<int>>(
Expression.Field(
null,
typeof(FS),
"RI"),
Enumerable.Empty<ParameterExpression>());
Func<int> f = e.Compile(useInterpreter);
Assert.Equal(42, f());
}
[Theory]
[ClassData(typeof(CompilationTypes))]
public static void CheckMemberAccessStructInstancePropertyTest(bool useInterpreter)
{
Expression<Func<int>> e =
Expression.Lambda<Func<int>>(
Expression.Property(
Expression.Constant(new PS() { II = 42 }),
"II"),
Enumerable.Empty<ParameterExpression>());
Func<int> f = e.Compile(useInterpreter);
Assert.Equal(42, f());
}
[Theory]
[ClassData(typeof(CompilationTypes))]
public static void CheckMemberAccessStructStaticPropertyTest(bool useInterpreter)
{
PS.SI = 42;
try
{
Expression<Func<int>> e =
Expression.Lambda<Func<int>>(
Expression.Property(
null,
typeof(PS),
"SI"),
Enumerable.Empty<ParameterExpression>());
Func<int> f = e.Compile(useInterpreter);
Assert.Equal(42, f());
}
finally
{
PS.SI = 0;
}
}
[Theory, ClassData(typeof(CompilationTypes))]
public static void NullNullableValueException(bool useInterpreter)
{
string localizedMessage = null;
try
{
int dummy = default(int?).Value;
}
catch (InvalidOperationException ioe)
{
localizedMessage = ioe.Message;
}
Expression<Func<long>> e = () => default(long?).Value;
Func<long> f = e.Compile(useInterpreter);
InvalidOperationException exception = Assert.Throws<InvalidOperationException>(() => f());
Assert.Equal(localizedMessage, exception.Message);
}
[Theory]
[ClassData(typeof(CompilationTypes))]
public static void CheckMemberAccessClassInstanceFieldTest(bool useInterpreter)
{
Expression<Func<int>> e =
Expression.Lambda<Func<int>>(
Expression.Field(
Expression.Constant(new FC() { II = 42 }),
"II"),
Enumerable.Empty<ParameterExpression>());
Func<int> f = e.Compile(useInterpreter);
Assert.Equal(42, f());
}
[Theory]
[ClassData(typeof(CompilationTypes))]
public static void CheckMemberAccessClassStaticFieldTest(bool useInterpreter)
{
FC.SI = 42;
try
{
Expression<Func<int>> e =
Expression.Lambda<Func<int>>(
Expression.Field(
null,
typeof(FC),
"SI"),
Enumerable.Empty<ParameterExpression>());
Func<int> f = e.Compile(useInterpreter);
Assert.Equal(42, f());
}
finally
{
FC.SI = 0;
}
}
[Theory]
[ClassData(typeof(CompilationTypes))]
public static void CheckMemberAccessClassConstFieldTest(bool useInterpreter)
{
Expression<Func<int>> e =
Expression.Lambda<Func<int>>(
Expression.Field(
null,
typeof(FC),
"CI"),
Enumerable.Empty<ParameterExpression>());
Func<int> f = e.Compile(useInterpreter);
Assert.Equal(42, f());
}
[Theory]
[ClassData(typeof(CompilationTypes))]
public static void CheckMemberAccessClassStaticReadOnlyFieldTest(bool useInterpreter)
{
Expression<Func<int>> e =
Expression.Lambda<Func<int>>(
Expression.Field(
null,
typeof(FC),
"RI"),
Enumerable.Empty<ParameterExpression>());
Func<int> f = e.Compile(useInterpreter);
Assert.Equal(42, f());
}
[Fact]
public static void Field_NullField_ThrowsArgumentNullException()
{
AssertExtensions.Throws<ArgumentNullException>("field", () => Expression.Field(null, (FieldInfo)null));
AssertExtensions.Throws<ArgumentNullException>("fieldName", () => Expression.Field(Expression.Constant(new FC()), (string)null));
AssertExtensions.Throws<ArgumentNullException>("fieldName", () => Expression.Field(Expression.Constant(new FC()), typeof(FC), (string)null));
}
[Fact]
public static void Field_NullType_ThrowsArgumentNullException()
{
AssertExtensions.Throws<ArgumentNullException>("type", () => Expression.Field(Expression.Constant(new FC()), null, "AField"));
}
[Fact]
public static void Field_StaticField_NonNullExpression_ThrowsArgumentException()
{
Expression expression = Expression.Constant(new FC());
AssertExtensions.Throws<ArgumentException>("expression", () => Expression.Field(expression, typeof(FC), nameof(FC.SI)));
AssertExtensions.Throws<ArgumentException>("expression", () => Expression.Field(expression, typeof(FC).GetField(nameof(FC.SI))));
AssertExtensions.Throws<ArgumentException>("expression", () => Expression.MakeMemberAccess(expression, typeof(FC).GetField(nameof(FC.SI))));
}
[Fact]
public static void Field_ByrefTypeFieldAccessor_ThrowsArgumentException()
{
AssertExtensions.Throws<ArgumentException>("propertyName", () => Expression.Property(null, typeof(GenericClass<string>).MakeByRefType(), nameof(GenericClass<string>.Field)));
}
[Fact]
public static void Field_GenericFieldAccessor_ThrowsArgumentException()
{
AssertExtensions.Throws<ArgumentException>("propertyName", () => Expression.Property(null, typeof(GenericClass<>), nameof(GenericClass<string>.Field)));
}
[Fact]
public static void Field_InstanceField_NullExpression_ThrowsArgumentException()
{
AssertExtensions.Throws<ArgumentNullException>("expression", () => Expression.Field(null, "fieldName"));
AssertExtensions.Throws<ArgumentException>("field", () => Expression.Field(null, typeof(FC), nameof(FC.II)));
AssertExtensions.Throws<ArgumentException>("field", () => Expression.Field(null, typeof(FC).GetField(nameof(FC.II))));
AssertExtensions.Throws<ArgumentException>("field", () => Expression.MakeMemberAccess(null, typeof(FC).GetField(nameof(FC.II))));
}
[Fact]
public static void Field_ExpressionNotReadable_ThrowsArgumentException()
{
Expression expression = Expression.Property(null, typeof(Unreadable<string>), nameof(Unreadable<string>.WriteOnly));
AssertExtensions.Throws<ArgumentException>("expression", () => Expression.Field(expression, "fieldName"));
AssertExtensions.Throws<ArgumentException>("expression", () => Expression.Field(expression, typeof(FC), nameof(FC.SI)));
AssertExtensions.Throws<ArgumentException>("expression", () => Expression.Field(expression, typeof(FC).GetField(nameof(FC.SI))));
AssertExtensions.Throws<ArgumentException>("expression", () => Expression.MakeMemberAccess(expression, typeof(FC).GetField(nameof(FC.SI))));
}
[Fact]
public static void Field_ExpressionNotTypeOfDeclaringType_ThrowsArgumentException()
{
Expression expression = Expression.Constant(new PC());
AssertExtensions.Throws<ArgumentException>(null, () => Expression.Field(expression, typeof(FC), nameof(FC.II)));
AssertExtensions.Throws<ArgumentException>(null, () => Expression.Field(expression, typeof(FC).GetField(nameof(FC.II))));
AssertExtensions.Throws<ArgumentException>(null, () => Expression.MakeMemberAccess(expression, typeof(FC).GetField(nameof(FC.II))));
}
[Fact]
public static void Field_NoSuchFieldName_ThrowsArgumentException()
{
AssertExtensions.Throws<ArgumentException>(null, () => Expression.Field(Expression.Constant(new FC()), "NoSuchField"));
AssertExtensions.Throws<ArgumentException>(null, () => Expression.Field(Expression.Constant(new FC()), typeof(FC), "NoSuchField"));
}
[Theory]
[ClassData(typeof(CompilationTypes))]
public static void CheckMemberAccessClassInstancePropertyTest(bool useInterpreter)
{
Expression<Func<int>> e =
Expression.Lambda<Func<int>>(
Expression.Property(
Expression.Constant(new PC() { II = 42 }),
"II"),
Enumerable.Empty<ParameterExpression>());
Func<int> f = e.Compile(useInterpreter);
Assert.Equal(42, f());
}
[Theory]
[ClassData(typeof(CompilationTypes))]
public static void CheckMemberAccessClassStaticPropertyTest(bool useInterpreter)
{
PC.SI = 42;
try
{
Expression<Func<int>> e =
Expression.Lambda<Func<int>>(
Expression.Property(
null,
typeof(PC),
"SI"),
Enumerable.Empty<ParameterExpression>());
Func<int> f = e.Compile(useInterpreter);
Assert.Equal(42, f());
}
finally
{
PC.SI = 0;
}
}
[Theory]
[ClassData(typeof(CompilationTypes))]
public static void CheckMemberAccessClassInstanceFieldNullReferenceTest(bool useInterpreter)
{
Expression<Func<int>> e =
Expression.Lambda<Func<int>>(
Expression.Field(
Expression.Constant(null, typeof(FC)),
"II"),
Enumerable.Empty<ParameterExpression>());
Func<int> f = e.Compile(useInterpreter);
Assert.Throws<NullReferenceException>(() => f());
}
[Theory]
[ClassData(typeof(CompilationTypes))]
public static void CheckMemberAccessClassInstanceFieldAssignNullReferenceTest(bool useInterpreter)
{
Expression<Func<int>> e =
Expression.Lambda<Func<int>>(
Expression.Assign(
Expression.Field(
Expression.Constant(null, typeof(FC)),
"II"),
Expression.Constant(1)),
Enumerable.Empty<ParameterExpression>());
Func<int> f = e.Compile(useInterpreter);
Assert.Throws<NullReferenceException>(() => f());
}
[Theory]
[ClassData(typeof(CompilationTypes))]
public static void CheckMemberAccessClassInstancePropertyNullReferenceTest(bool useInterpreter)
{
Expression<Func<int>> e =
Expression.Lambda<Func<int>>(
Expression.Property(
Expression.Constant(null, typeof(PC)),
"II"),
Enumerable.Empty<ParameterExpression>());
Func<int> f = e.Compile(useInterpreter);
Assert.Throws<NullReferenceException>(() => f());
}
[Theory]
[ClassData(typeof(CompilationTypes))]
public static void CheckMemberAccessClassInstanceIndexerNullReferenceTest(bool useInterpreter)
{
Expression<Func<int>> e =
Expression.Lambda<Func<int>>(
Expression.Property(
Expression.Constant(null, typeof(PC)),
"Item",
Expression.Constant(1)),
Enumerable.Empty<ParameterExpression>());
Func<int> f = e.Compile(useInterpreter);
Assert.Throws<NullReferenceException>(() => f());
}
[Theory]
[ClassData(typeof(CompilationTypes))]
public static void CheckMemberAccessClassInstanceIndexerAssignNullReferenceTest(bool useInterpreter)
{
Expression<Func<int>> e =
Expression.Lambda<Func<int>>(
Expression.Assign(
Expression.Property(
Expression.Constant(null, typeof(PC)),
"Item",
Expression.Constant(1)),
Expression.Constant(1)),
Enumerable.Empty<ParameterExpression>());
Func<int> f = e.Compile(useInterpreter);
Assert.Throws<NullReferenceException>(() => f());
}
[Fact]
public static void AccessIndexedPropertyWithoutIndex()
{
AssertExtensions.Throws<ArgumentException>("property", () => Expression.Property(Expression.Default(typeof(List<int>)), typeof(List<int>).GetProperty("Item")));
}
[Fact]
public static void AccessIndexedPropertyWithoutIndexWriteOnly()
{
AssertExtensions.Throws<ArgumentException>("property", () => Expression.Property(Expression.Default(typeof(UnreadableIndexableClass)), typeof(UnreadableIndexableClass).GetProperty("Item")));
}
[Fact]
public static void Property_NullProperty_ThrowsArgumentNullException()
{
AssertExtensions.Throws<ArgumentNullException>("property", () => Expression.Property(null, (PropertyInfo)null));
AssertExtensions.Throws<ArgumentNullException>("propertyName", () => Expression.Property(Expression.Constant(new PC()), (string)null));
}
[Fact]
public static void Property_NullType_ThrowsArgumentNullException()
{
AssertExtensions.Throws<ArgumentNullException>("type", () => Expression.Property(Expression.Constant(new PC()), null, "AProperty"));
}
[Fact]
public static void Property_StaticProperty_NonNullExpression_ThrowsArgumentException()
{
Expression expression = Expression.Constant(new PC());
AssertExtensions.Throws<ArgumentException>("expression", () => Expression.Property(expression, typeof(PC), nameof(PC.SI)));
AssertExtensions.Throws<ArgumentException>("expression", () => Expression.Property(expression, typeof(PC).GetProperty(nameof(PC.SI))));
AssertExtensions.Throws<ArgumentException>("expression", () => Expression.Property(expression, typeof(PC).GetProperty(nameof(PC.SI)).GetGetMethod()));
AssertExtensions.Throws<ArgumentException>("expression", () => Expression.MakeMemberAccess(expression, typeof(PC).GetProperty(nameof(PC.SI))));
}
[Fact]
public static void Property_InstanceProperty_NullExpression_ThrowsArgumentException()
{
AssertExtensions.Throws<ArgumentNullException>("expression", () => Expression.Property(null, "propertyName"));
AssertExtensions.Throws<ArgumentException>("property", () => Expression.Property(null, typeof(PC), nameof(PC.II)));
AssertExtensions.Throws<ArgumentException>("property", () => Expression.Property(null, typeof(PC).GetProperty(nameof(PC.II))));
AssertExtensions.Throws<ArgumentException>("property", () => Expression.Property(null, typeof(PC).GetProperty(nameof(PC.II)).GetGetMethod()));
AssertExtensions.Throws<ArgumentException>("property", () => Expression.MakeMemberAccess(null, typeof(PC).GetProperty(nameof(PC.II))));
}
[Fact]
public static void Property_ExpressionNotReadable_ThrowsArgumentException()
{
Expression expression = Expression.Property(null, typeof(Unreadable<string>), nameof(Unreadable<string>.WriteOnly));
AssertExtensions.Throws<ArgumentException>("expression", () => Expression.Property(expression, "fieldName"));
AssertExtensions.Throws<ArgumentException>("expression", () => Expression.Property(expression, typeof(PC), nameof(PC.SI)));
AssertExtensions.Throws<ArgumentException>("expression", () => Expression.Property(expression, typeof(PC).GetProperty(nameof(PC.SI))));
AssertExtensions.Throws<ArgumentException>("expression", () => Expression.Property(expression, typeof(PC).GetProperty(nameof(PC.SI)).GetGetMethod()));
}
[Fact]
public static void Property_ExpressionNotTypeOfDeclaringType_ThrowsArgumentException()
{
Expression expression = Expression.Constant(new FC());
AssertExtensions.Throws<ArgumentException>("property", () => Expression.Property(expression, typeof(PC), nameof(PC.II)));
AssertExtensions.Throws<ArgumentException>("property", () => Expression.Property(expression, typeof(PC).GetProperty(nameof(PC.II))));
AssertExtensions.Throws<ArgumentException>("property", () => Expression.Property(expression, typeof(PC).GetProperty(nameof(PC.II)).GetGetMethod()));
AssertExtensions.Throws<ArgumentException>("property", () => Expression.MakeMemberAccess(expression, typeof(PC).GetProperty(nameof(PC.II))));
}
[Fact]
public static void Property_NoSuchPropertyName_ThrowsArgumentException()
{
AssertExtensions.Throws<ArgumentException>("propertyName", () => Expression.Property(Expression.Constant(new PC()), "NoSuchProperty"));
AssertExtensions.Throws<ArgumentException>("propertyName", () => Expression.Property(Expression.Constant(new PC()), typeof(PC), "NoSuchProperty"));
}
[Fact]
public static void Property_NullPropertyAccessor_ThrowsArgumentNullException()
{
AssertExtensions.Throws<ArgumentNullException>("propertyAccessor", () => Expression.Property(Expression.Constant(new PC()), (MethodInfo)null));
}
[Fact]
public static void Property_GenericPropertyAccessor_ThrowsArgumentException()
{
AssertExtensions.Throws<ArgumentException>("propertyAccessor", () => Expression.Property(null, typeof(GenericClass<>).GetProperty(nameof(GenericClass<string>.Property)).GetGetMethod()));
AssertExtensions.Throws<ArgumentException>("propertyAccessor", () => Expression.Property(null, typeof(NonGenericClass).GetMethod(nameof(NonGenericClass.GenericMethod))));
AssertExtensions.Throws<ArgumentException>("property", () => Expression.Property(null, typeof(GenericClass<>).GetProperty(nameof(GenericClass<string>.Property))));
}
[Fact]
public static void Property_PropertyAccessorNotFromProperty_ThrowsArgumentException()
{
AssertExtensions.Throws<ArgumentException>("propertyAccessor", () => Expression.Property(null, typeof(NonGenericClass).GetMethod(nameof(NonGenericClass.StaticMethod))));
}
[Fact]
public static void Property_ByRefStaticAccess_ThrowsArgumentException()
{
AssertExtensions.Throws<ArgumentException>("propertyName", () => Expression.Property(null, typeof(NonGenericClass).MakeByRefType(), nameof(NonGenericClass.NonGenericProperty)));
}
[Fact]
public static void PropertyOrField_NullExpression_ThrowsArgumentNullException()
{
AssertExtensions.Throws<ArgumentNullException>("expression", () => Expression.PropertyOrField(null, "APropertyOrField"));
}
[Fact]
public static void PropertyOrField_ExpressionNotReadable_ThrowsArgumentNullException()
{
Expression expression = Expression.Property(null, typeof(Unreadable<string>), nameof(Unreadable<string>.WriteOnly));
AssertExtensions.Throws<ArgumentException>("expression", () => Expression.PropertyOrField(expression, "APropertyOrField"));
}
[Fact]
public static void PropertyOrField_NoSuchPropertyOrField_ThrowsArgumentException()
{
Expression expression = Expression.Constant(new PC());
AssertExtensions.Throws<ArgumentException>("propertyOrFieldName", () => Expression.PropertyOrField(expression, "NoSuchPropertyOrField"));
}
[Fact]
public static void MakeMemberAccess_NullMember_ThrowsArgumentNullException()
{
AssertExtensions.Throws<ArgumentNullException>("member", () => Expression.MakeMemberAccess(Expression.Constant(new PC()), null));
}
[Fact]
public static void MakeMemberAccess_MemberNotFieldOrProperty_ThrowsArgumentException()
{
MemberInfo member = typeof(NonGenericClass).GetEvent("Event");
AssertExtensions.Throws<ArgumentException>("member", () => Expression.MakeMemberAccess(Expression.Constant(new PC()), member));
}
#if FEATURE_COMPILE
[Fact]
[ActiveIssue("https://github.com/mono/mono/issues/14920", TestRuntimes.Mono)]
public static void Property_NoGetOrSetAccessors_ThrowsArgumentException()
{
AssemblyBuilder assembly = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("Name"), AssemblyBuilderAccess.RunAndCollect);
ModuleBuilder module = assembly.DefineDynamicModule("Module");
TypeBuilder type = module.DefineType("Type");
PropertyBuilder property = type.DefineProperty("Property", PropertyAttributes.None, typeof(void), new Type[0]);
TypeInfo createdType = type.CreateTypeInfo();
PropertyInfo createdProperty = createdType.DeclaredProperties.First();
Expression expression = Expression.Constant(Activator.CreateInstance(createdType));
AssertExtensions.Throws<ArgumentException>("property", () => Expression.Property(expression, createdProperty));
AssertExtensions.Throws<ArgumentException>("property", () => Expression.Property(expression, createdProperty.Name));
AssertExtensions.Throws<ArgumentException>("property", () => Expression.PropertyOrField(expression, createdProperty.Name));
AssertExtensions.Throws<ArgumentException>("property", () => Expression.MakeMemberAccess(expression, createdProperty));
}
#endif
[Fact]
public static void ToStringTest()
{
MemberExpression e1 = Expression.Property(null, typeof(DateTime).GetProperty(nameof(DateTime.Now)));
Assert.Equal("DateTime.Now", e1.ToString());
MemberExpression e2 = Expression.Property(Expression.Parameter(typeof(DateTime), "d"), typeof(DateTime).GetProperty(nameof(DateTime.Year)));
Assert.Equal("d.Year", e2.ToString());
}
[Fact]
public static void UpdateSameResturnsSame()
{
var exp = Expression.Constant(new PS {II = 42});
var pro = Expression.Property(exp, nameof(PS.II));
Assert.Same(pro, pro.Update(exp));
}
[Fact]
public static void UpdateStaticResturnsSame()
{
var pro = Expression.Property(null, typeof(PS), nameof(PS.SI));
Assert.Same(pro, pro.Update(null));
}
[Fact]
public static void UpdateDifferentResturnsDifferent()
{
var pro = Expression.Property(Expression.Constant(new PS {II = 42}), nameof(PS.II));
Assert.NotSame(pro, pro.Update(Expression.Constant(new PS {II = 42})));
}
}
}
| 43.708469 | 202 | 0.597012 | [
"MIT"
] | Alex-ABPerson/runtime | src/libraries/System.Linq.Expressions/tests/Member/MemberAccessTests.cs | 26,837 | C# |
using Nfantom.JsonRpc.Client;
using Nfantom.RPC.Eth.DTOs;
using Nfantom.RPC.Eth.Transactions;
using System.Threading.Tasks;
using Nfantom.Opera;
using Nfantom.Opera.MessageEncodingServices;
namespace Nfantom.Opera.QueryHandlers
{
public abstract class QueryHandlerBase<TFunctionMessage>
where TFunctionMessage : FunctionMessage, new()
{
protected IEthCall EthCall { get; set; }
private ContractCall _contractCall;
public string DefaultAddressFrom { get; set; }
protected BlockParameter DefaultBlockParameter { get; set; }
public FunctionMessageEncodingService<TFunctionMessage> FunctionMessageEncodingService { get; } = new FunctionMessageEncodingService<TFunctionMessage>();
protected QueryHandlerBase(IEthCall ethCall, string defaultAddressFrom = null, BlockParameter defaultBlockParameter = null)
{
EthCall = ethCall;
DefaultAddressFrom = defaultAddressFrom;
DefaultBlockParameter = defaultBlockParameter ?? BlockParameter.CreateLatest();
_contractCall = new ContractCall(EthCall, DefaultBlockParameter);
}
protected QueryHandlerBase(IClient client, string defaultAddressFrom = null, BlockParameter defaultBlockParameter = null) : this(new EthCall(client), defaultAddressFrom, defaultBlockParameter)
{
}
public virtual string GetAccountAddressFrom()
{
return DefaultAddressFrom;
}
protected void EnsureInitialiseAddress()
{
if (FunctionMessageEncodingService != null)
{
FunctionMessageEncodingService.DefaultAddressFrom = GetAccountAddressFrom();
}
}
#if !DOTNET35
protected Task<string> CallAsync(CallInput callInput, BlockParameter block = null)
{
if (block == null) block = DefaultBlockParameter;
return _contractCall.CallAsync(callInput, block);
}
#endif
}
} | 38.230769 | 200 | 0.693159 | [
"MIT"
] | PeaStew/Nfantom | Nfantom.Geth/QueryHandlers/QueryHandlerBase.cs | 1,990 | C# |
using NetDevPack.Messaging;
namespace SimpleLibrary.Domain.Events;
public class BookRegisteredEvent : Event
{
public BookRegisteredEvent(Guid id, string title, DateTime publishedDate, string isbn, int edition)
{
Id = id;
Title = title;
PublishedDate = publishedDate;
ISBN = isbn;
Edition = edition;
AggregateId = id;
}
public Guid Id { get; set; }
public string Title { get; private set; }
public DateTime PublishedDate { get; private set; }
public string ISBN { get; private set; }
public int Edition { get; private set; }
} | 24.48 | 103 | 0.648693 | [
"MIT"
] | leosousa/simple-library-api | SimpleLibrary.Domain/Events/BookRegisteredEvent .cs | 614 | C# |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
//using CollectionMigrator.Model;
using logger = CosmosCloneCommon.Utility.CloneLogger;
namespace CloneConsoleRun.Sample
{
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using CosmosCloneCommon.Utility;
using Microsoft.Azure.CosmosDB.BulkExecutor.BulkImport;
using Microsoft.Azure.Documents;
using Microsoft.Azure.Documents.Client;
public class SampleDBCreator
{
#region declare variables
protected int WriteBatchSize = 10000;
protected int ReadDelaybetweenRequestsInMs = 2000;
protected int maxtestDocumentCount = 50000;
protected bool IsFixedCollection = true;
protected CosmosSampleDBHelper cosmosHelper;
protected CosmosBulkImporter cosmosBulkImporter;
protected DocumentClient sampleClient;
protected DocumentCollection sampleCollection;
#endregion
public SampleDBCreator()
{
cosmosHelper = new CosmosSampleDBHelper();
cosmosBulkImporter = new CosmosBulkImporter();
}
public async Task InitializeMigration()
{
logger.LogInfo("Inside Initialize migration for SampleDBCreator. ");
sampleClient = cosmosHelper.GetSampleDocumentDbClient();
sampleCollection = await cosmosHelper.CreateSampleDocumentCollection(sampleClient, this.IsFixedCollection);
await cosmosBulkImporter.InitializeBulkExecutor(sampleClient, sampleCollection);
}
public async Task<bool> Start()
{
await InitializeMigration();
await CreateUploadTestDataInbatches();
return true;
}
protected List<dynamic> GetCommonEntitiesinBatch()
{
List<dynamic> entities = new List<dynamic>();
for(int i=0; i<this.WriteBatchSize; i++)
{
entities.Add(EntityV2.getRandomEntity());
}
return entities;
}
public async Task<bool> CreateUploadTestDataInbatches()
{
#region batchVariables
//initialize Batch Process variables
int batchCount = 0;
int totalUploaded = 0;
var badEntities = new List<Object>();
Stopwatch stopwatch = new Stopwatch();
stopwatch.Start();
#endregion
while (totalUploaded < maxtestDocumentCount)
{
batchCount++;
logger.LogInfo("Begin Sample Db creation");
List<dynamic> entities = GetCommonEntitiesinBatch();
BulkImportResponse uploadResponse = new BulkImportResponse();
if (entities.Any())
{
uploadResponse = await cosmosBulkImporter.BulkSendToNewCollection<dynamic>(entities);
}
badEntities = uploadResponse.BadInputDocuments;
//summary.totalRecordsSent += uploadResponse.NumberOfDocumentsImported;
totalUploaded += entities.Count();
logger.LogInfo($"Summary of Batch {batchCount} records retrieved {entities.Count()}. Records Uploaded: {uploadResponse.NumberOfDocumentsImported}");
//logger.LogInfo($"Total records retrieved {summary.totalRecordsRetrieved}. Total records uploaded {summary.totalRecordsSent}");
logger.LogInfo($"Time elapsed : {stopwatch.Elapsed} ");
}
stopwatch.Stop();
logger.LogInfo("Completed Sample DB creation.");
return true;
}
}
}
| 38.489796 | 164 | 0.627253 | [
"MIT"
] | Azure-Samples/CosmicClone | CosmosClone/CloneConsoleRun/Sample/SampleDBCreator.cs | 3,774 | C# |
using EasyCharacterMovement;
using System.Collections;
using UnityEngine;
namespace EasyCharacterMovement.CharacterMovementWalkthrough.Teleporting
{
public class Player : MonoBehaviour
{
#region EDITOR EXPOSED FIELDS
[Tooltip("Change in rotation per second (Deg / s).")]
public float rotationRate = 540.0f;
[Space(15f)]
[Tooltip("The character's maximum speed.")]
public float maxSpeed = 5.0f;
[Tooltip("Max Acceleration (rate of change of velocity).")]
public float maxAcceleration = 20.0f;
[Tooltip("Setting that affects movement control. Higher values allow faster changes in direction.")]
public float groundFriction = 8.0f;
[Space(15f)]
[Tooltip("Initial velocity (instantaneous vertical velocity) when jumping.")]
public float jumpImpulse = 6.5f;
[Tooltip("Friction to apply when falling.")]
public float airFriction = 0.1f;
[Range(0.0f, 1.0f)]
[Tooltip("When falling, amount of horizontal movement control available to the character.\n" +
"0 = no control, 1 = full control at max acceleration.")]
public float airControl = 0.3f;
[Tooltip("The character's gravity.")]
public Vector3 gravity = Vector3.down * 9.81f;
[Space(15f)]
[Tooltip("Character's height when standing.")]
public float standingHeight = 2.0f;
[Tooltip("Character's height when crouching.")]
public float crouchingHeight = 1.25f;
[Tooltip("The max speed modifier while crouching.")]
[Range(0.0f, 1.0f)]
public float crouchingSpeedModifier = 0.5f;
#endregion
#region FIELDS
private Coroutine _lateFixedUpdateCoroutine;
#endregion
#region PROPERTIES
/// <summary>
/// Cached CharacterMovement component.
/// </summary>
public CharacterMovement characterMovement { get; private set; }
/// <summary>
/// Desired movement direction vector in world-space.
/// </summary>
public Vector3 movementDirection { get; set; }
/// <summary>
/// Jump input.
/// </summary>
public bool jump { get; set; }
/// <summary>
/// Crouch input command.
/// </summary>
public bool crouch { get; set; }
/// <summary>
/// Is the character crouching?
/// </summary>
public bool isCrouching { get; protected set; }
#endregion
#region EVENT HANDLERS
/// <summary>
/// FoundGround event handler.
/// </summary>
private void OnFoundGround(ref FindGroundResult foundGround)
{
Debug.Log("Found ground...");
// Determine if the character has landed
if (!characterMovement.wasOnGround && foundGround.isWalkableGround)
{
Debug.Log("Landed!");
}
}
/// <summary>
/// Collided event handler.
/// </summary>
private void OnCollided(ref CollisionResult inHit)
{
Debug.Log($"{name} collided with: {inHit.collider.name}");
}
#endregion
#region METHODS
/// <summary>
/// Handle Player input.
/// </summary>
private void HandleInput()
{
// Read Input values
float horizontal = Input.GetAxisRaw($"Horizontal");
float vertical = Input.GetAxisRaw($"Vertical");
// Create a Movement direction vector (in world space)
movementDirection = Vector3.zero;
movementDirection += Vector3.forward * vertical;
movementDirection += Vector3.right * horizontal;
// Make Sure it won't move faster diagonally
movementDirection = Vector3.ClampMagnitude(movementDirection, 1.0f);
// Jump input
jump = Input.GetButton($"Jump");
// Crouch input
crouch = Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.C);
}
/// <summary>
/// Update the character's rotation.
/// </summary>
private void UpdateRotation()
{
// Rotate towards character's movement direction
characterMovement.RotateTowards(movementDirection, rotationRate * Time.deltaTime);
}
/// <summary>
/// Move the character when on walkable ground.
/// </summary>
private void GroundedMovement(Vector3 desiredVelocity)
{
characterMovement.velocity = Vector3.Lerp(characterMovement.velocity, desiredVelocity,
1f - Mathf.Exp(-groundFriction * Time.deltaTime));
}
/// <summary>
/// Move the character when falling or on not-walkable ground.
/// </summary>
private void NotGroundedMovement(Vector3 desiredVelocity)
{
// Current character's velocity
Vector3 velocity = characterMovement.velocity;
// If moving into non-walkable ground, limit its contribution.
// Allow movement parallel, but not into it because that may push us up.
if (characterMovement.isOnGround && Vector3.Dot(desiredVelocity, characterMovement.groundNormal) < 0.0f)
{
Vector3 groundNormal = characterMovement.groundNormal;
Vector3 groundNormal2D = groundNormal.onlyXZ().normalized;
desiredVelocity = desiredVelocity.projectedOnPlane(groundNormal2D);
}
// If moving...
if (desiredVelocity != Vector3.zero)
{
// Accelerate horizontal velocity towards desired velocity
Vector3 horizontalVelocity = Vector3.MoveTowards(velocity.onlyXZ(), desiredVelocity,
maxAcceleration * airControl * Time.deltaTime);
// Update velocity preserving gravity effects (vertical velocity)
velocity = horizontalVelocity + velocity.onlyY();
}
// Apply gravity
velocity += gravity * Time.deltaTime;
// Apply Air friction (Drag)
velocity -= velocity * airFriction * Time.deltaTime;
// Update character's velocity
characterMovement.velocity = velocity;
}
/// <summary>
/// Handle character's Crouch / UnCrouch.
/// </summary>
private void Crouching()
{
// Process crouch input command
if (crouch)
{
// If already crouching, return
if (isCrouching)
return;
// Set capsule crouching height
characterMovement.SetHeight(crouchingHeight);
// Update Crouching state
isCrouching = true;
}
else
{
// If not crouching, return
if (!isCrouching)
return;
// Check if character can safely stand up
if (!characterMovement.CheckHeight(standingHeight))
{
// Character can safely stand up, set capsule standing height
characterMovement.SetHeight(standingHeight);
// Update crouching state
isCrouching = false;
}
}
}
/// <summary>
/// Handle jumping state.
/// </summary>
private void Jumping()
{
if (jump && characterMovement.isGrounded)
{
// Pause ground constraint so character can jump off ground
characterMovement.PauseGroundConstraint();
// perform the jump
Vector3 jumpVelocity = Vector3.up * jumpImpulse;
characterMovement.LaunchCharacter(jumpVelocity, true);
}
}
/// <summary>
/// Perform character movement.
/// </summary>
private void Move()
{
float targetSpeed = isCrouching ? maxSpeed * crouchingSpeedModifier : maxSpeed;
Vector3 desiredVelocity = movementDirection * targetSpeed;
// Update character’s velocity based on its grounding status
if (characterMovement.isGrounded)
GroundedMovement(desiredVelocity);
else
NotGroundedMovement(desiredVelocity);
// Handle jumping state
Jumping();
// Handle crouching state
Crouching();
// Perform movement using character's current velocity
characterMovement.Move();
}
/// <summary>
/// Post-Physics update, used to sync our character with physics.
/// </summary>
private void OnLateFixedUpdate()
{
UpdateRotation();
Move();
}
#endregion
#region MONOBEHAVIOR
private void Awake()
{
// Cache CharacterMovement component
characterMovement = GetComponent<CharacterMovement>();
// Enable default physic interactions
characterMovement.enablePhysicsInteraction = true;
}
private void OnEnable()
{
// Start LateFixedUpdate coroutine
if (_lateFixedUpdateCoroutine != null)
StopCoroutine(_lateFixedUpdateCoroutine);
_lateFixedUpdateCoroutine = StartCoroutine(LateFixedUpdate());
// Subscribe to CharacterMovement events
characterMovement.FoundGround += OnFoundGround;
characterMovement.Collided += OnCollided;
}
private void OnDisable()
{
// Ends LateFixedUpdate coroutine
if (_lateFixedUpdateCoroutine != null)
StopCoroutine(_lateFixedUpdateCoroutine);
// Un-Subscribe from CharacterMovement events
characterMovement.FoundGround -= OnFoundGround;
characterMovement.Collided -= OnCollided;
}
private IEnumerator LateFixedUpdate()
{
WaitForFixedUpdate waitTime = new WaitForFixedUpdate();
while (true)
{
yield return waitTime;
OnLateFixedUpdate();
}
}
private void Update()
{
HandleInput();
}
#endregion
}
}
| 27.219388 | 116 | 0.555483 | [
"Apache-2.0"
] | ryan-muller/LightSouls | Assets/ImportedAssets/Easy Character Movement 2/Character Movement/Walkthrough/13.- Teleporting/Scripts/Player.cs | 10,674 | C# |
namespace Apprentice.GUI {
partial class StringInputForm {
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing) {
if (disposing && (components != null)) {
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
this.textBox1 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// textBox1
//
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textBox1.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.textBox1.Location = new System.Drawing.Point(12, 150);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(320, 20);
this.textBox1.TabIndex = 0;
this.textBox1.TextChanged += new System.EventHandler(this.OnType);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Consolas", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label1.Location = new System.Drawing.Point(13, 13);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(49, 15);
this.label1.TabIndex = 1;
this.label1.Text = "label1";
//
// StringInputForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(344, 182);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.label1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.MaximumSize = new System.Drawing.Size(1000, 2000);
this.MinimizeBox = false;
this.MinimumSize = new System.Drawing.Size(200, 75);
this.Name = "StringInputForm";
this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Input";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label1;
}
} | 43.831169 | 160 | 0.589926 | [
"MIT"
] | SirVeggie/WinDocker | GUI/Forms/StringInputForm.Designer.cs | 3,377 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using LotterySln.IDAL;
using DBUtility;
namespace LotterySln.DAL.MsSqlProvider
{
public class LotteryItem : ILotteryItem
{
/// <summary>
/// 添加数据到数据库
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public int Insert(Model.LotteryItem model)
{
if (model == null) return -1;
//判断当前记录是否存在,如果存在则返回;
if (IsExist(model.ItemName, null)) return 110;
string cmdText = "insert into [LotteryItem] (ItemName,ItemCode,ImageUrl,FixRatio,LastUpdatedDate) values (@ItemName,@ItemCode,@ImageUrl,@FixRatio,@LastUpdatedDate)";
//创建查询命令参数集
SqlParameter[] parms = {
new SqlParameter("@ItemName",SqlDbType.NVarChar,50),
new SqlParameter("@ItemCode",SqlDbType.NVarChar,50),
new SqlParameter("@ImageUrl",SqlDbType.NVarChar,300),
new SqlParameter("@LastUpdatedDate",SqlDbType.DateTime),
new SqlParameter("@FixRatio",SqlDbType.Decimal)
};
parms[0].Value = model.ItemName;
parms[1].Value = model.ItemCode;
parms[2].Value = model.ImageUrl;
parms[3].Value = model.LastUpdatedDate;
parms[4].Value = model.FixRatio;
//执行数据库操作
return SqlHelper.ExecuteNonQuery(SqlHelper.SqlProviderConnString, CommandType.Text, cmdText, parms);
}
/// <summary>
/// 修改数据
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public int Update(Model.LotteryItem model)
{
if (model == null) return -1;
if (IsExist(model.ItemName, model.NumberID)) return 110;
//定义查询命令
string cmdText = @"update [LotteryItem] set ItemName = @ItemName,ItemCode = @ItemCode,ImageUrl = @ImageUrl,FixRatio = @FixRatio,LastUpdatedDate = @LastUpdatedDate where NumberID = @NumberID";
//创建查询命令参数集
SqlParameter[] parms = {
new SqlParameter("@NumberID",SqlDbType.UniqueIdentifier),
new SqlParameter("@ItemName",SqlDbType.NVarChar,50),
new SqlParameter("@ItemCode",SqlDbType.NVarChar,50),
new SqlParameter("@ImageUrl",SqlDbType.NVarChar,300),
new SqlParameter("@LastUpdatedDate",SqlDbType.DateTime),
new SqlParameter("@FixRatio",SqlDbType.Decimal)
};
parms[0].Value = Guid.Parse(model.NumberID.ToString());
parms[1].Value = model.ItemName;
parms[2].Value = model.ItemCode;
parms[3].Value = model.ImageUrl;
parms[4].Value = model.LastUpdatedDate;
parms[5].Value = model.FixRatio;
return SqlHelper.ExecuteNonQuery(SqlHelper.SqlProviderConnString, CommandType.Text, cmdText, parms);
}
/// <summary>
/// 删除对应数据
/// </summary>
/// <param name="numberId"></param>
/// <returns></returns>
public int Delete(string numberId)
{
if (string.IsNullOrEmpty(numberId)) return -1;
string cmdText = "delete from LotteryItem where NumberID = @NumberID";
SqlParameter parm = new SqlParameter("@NumberID", SqlDbType.UniqueIdentifier);
parm.Value = Guid.Parse(numberId);
return SqlHelper.ExecuteNonQuery(SqlHelper.SqlProviderConnString, CommandType.Text, cmdText, parm);
}
/// <summary>
/// 批量删除数据(启用事务)
/// </summary>
/// <param name="list"></param>
/// <returns></returns>
public bool DeleteBatch(IList<string> list)
{
if (list == null || list.Count == 0) return false;
bool result = false;
StringBuilder sb = new StringBuilder();
ParamsHelper parms = new ParamsHelper();
int n = 0;
foreach (string item in list)
{
n++;
sb.Append(@"delete from [LotteryItem] where NumberID = @NumberID" + n + " ;");
SqlParameter parm = new SqlParameter("@NumberID" + n + "", SqlDbType.UniqueIdentifier);
parm.Value = Guid.Parse(item);
parms.Add(parm);
}
using (SqlConnection conn = new SqlConnection(SqlHelper.SqlProviderConnString))
{
if (conn.State != ConnectionState.Open) conn.Open();
using (SqlTransaction tran = conn.BeginTransaction())
{
try
{
int effect = SqlHelper.ExecuteNonQuery(tran, CommandType.Text, sb.ToString(), parms != null ? parms.ToArray() : null);
tran.Commit();
if (effect > 0) result = true;
}
catch
{
tran.Rollback();
}
}
}
return result;
}
/// <summary>
/// 获取对应的数据
/// </summary>
/// <param name="numberId"></param>
/// <returns></returns>
public Model.LotteryItem GetModel(string numberId)
{
Model.LotteryItem model = null;
string cmdText = @"select top 1 NumberID,ItemName,ItemCode,ImageUrl,FixRatio,LastUpdatedDate from [LotteryItem] where NumberID = @NumberID order by LastUpdatedDate desc ";
SqlParameter parm = new SqlParameter("@NumberID", SqlDbType.UniqueIdentifier);
parm.Value = Guid.Parse(numberId);
using (SqlDataReader reader = SqlHelper.ExecuteReader(SqlHelper.SqlProviderConnString, CommandType.Text, cmdText, parm))
{
if (reader != null)
{
while (reader.Read())
{
model = new Model.LotteryItem();
model.NumberID = reader["NumberID"].ToString();
model.ItemName = reader["ItemName"].ToString();
model.ItemCode = reader["ItemCode"].ToString();
model.ImageUrl = reader["ImageUrl"].ToString();
model.FixRatio = decimal.Parse(reader["FixRatio"].ToString());
model.LastUpdatedDate = DateTime.Parse(reader["LastUpdatedDate"].ToString());
}
}
}
return model;
}
/// <summary>
/// 获取数据分页列表,并返回所有记录数
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="totalCount"></param>
/// <param name="sqlWhere"></param>
/// <param name="commandParameters"></param>
/// <returns></returns>
public List<Model.LotteryItem> GetList(int pageIndex, int pageSize, out int totalCount, string sqlWhere, params SqlParameter[] commandParameters)
{
//获取数据集总数
string cmdText = "select count(*) from [LotteryItem] t1 ";
if (!string.IsNullOrEmpty(sqlWhere)) cmdText += "where 1=1 " + sqlWhere;
totalCount = (int)SqlHelper.ExecuteScalar(SqlHelper.SqlProviderConnString, CommandType.Text, cmdText, commandParameters);
//返回分页数据
int startIndex = (pageIndex - 1) * pageSize + 1;
int endIndex = pageIndex * pageSize;
cmdText = @"select * from(select row_number() over(order by t1.LastUpdatedDate desc) as RowNumber,t1.NumberID,t1.ItemName,t1.ItemCode,t1.ImageUrl,FixRatio,t1.LastUpdatedDate from [LotteryItem] t1 ";
if (!string.IsNullOrEmpty(sqlWhere)) cmdText += "where 1=1 " + sqlWhere;
cmdText += ")as objTable where RowNumber between " + startIndex + " and " + endIndex + " ";
List<Model.LotteryItem> list = null;
using (SqlDataReader reader = SqlHelper.ExecuteReader(SqlHelper.SqlProviderConnString, CommandType.Text, cmdText, commandParameters))
{
if (reader != null && reader.HasRows)
{
list = new List<Model.LotteryItem>();
while (reader.Read())
{
Model.LotteryItem model = new Model.LotteryItem();
model.NumberID = reader["NumberID"].ToString();
model.ItemName = reader["ItemName"].ToString();
model.ItemCode = reader["ItemCode"].ToString();
model.ImageUrl = reader["ImageUrl"].ToString();
model.FixRatio = decimal.Parse(reader["FixRatio"].ToString());
model.LastUpdatedDate = DateTime.Parse(reader["LastUpdatedDate"].ToString());
list.Add(model);
}
}
}
return list;
}
/// <summary>
/// 获取数据分页列表,并返回所有记录数
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="totalCount"></param>
/// <param name="sqlWhere"></param>
/// <param name="commandParameters"></param>
/// <returns></returns>
public DataSet GetDataSet(int pageIndex, int pageSize, out int totalCount, string sqlWhere, params SqlParameter[] commandParameters)
{
//获取数据集总数
string cmdText = "select count(*) from [LotteryItem] t1 ";
if (!string.IsNullOrEmpty(sqlWhere)) cmdText += "where 1=1 " + sqlWhere;
totalCount = (int)SqlHelper.ExecuteScalar(SqlHelper.SqlProviderConnString, CommandType.Text, cmdText, commandParameters);
//返回分页数据
int startIndex = (pageIndex - 1) * pageSize + 1;
int endIndex = pageIndex * pageSize;
cmdText = @"select * from(select row_number() over(order by t1.LastUpdatedDate desc) as RowNumber,t1.NumberID,t1.ItemName,t1.ItemCode,t1.ImageUrl,FixRatio,t1.LastUpdatedDate from [LotteryItem] t1 ";
if (!string.IsNullOrEmpty(sqlWhere)) cmdText += "where 1=1 " + sqlWhere;
cmdText += ")as objTable where RowNumber between " + startIndex + " and " + endIndex + " ";
return SqlHelper.ExecuteDataset(SqlHelper.SqlProviderConnString, CommandType.Text, cmdText, commandParameters);
}
/// <summary>
/// 是否存在对应数据
/// </summary>
/// <param name="name"></param>
/// <param name="numberId"></param>
/// <returns></returns>
public bool IsExist(string name, object numberId)
{
bool isExist = false;
int totalCount = -1;
ParamsHelper parms = new ParamsHelper();
string cmdText = "select count(*) from [LotteryItem] where ItemName = @ItemName";
if (numberId != null)
{
cmdText = "select count(*) from [LotteryItem] where ItemName = @ItemName and NumberID <> @NumberID ";
SqlParameter parm1 = new SqlParameter("@NumberID", SqlDbType.UniqueIdentifier);
parm1.Value = Guid.Parse(numberId.ToString());
parms.Add(parm1);
}
SqlParameter parm = new SqlParameter("@ItemName", SqlDbType.NVarChar, 50);
parm.Value = name;
parms.Add(parm);
object obj = SqlHelper.ExecuteScalar(SqlHelper.SqlProviderConnString, CommandType.Text, cmdText, parms.ToArray());
if (obj != null) totalCount = Convert.ToInt32(obj);
if (totalCount > 0) isExist = true;
return isExist;
}
/// <summary>
/// 获取满足当前条件的数据列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="sqlWhere"></param>
/// <param name="commandParameters"></param>
/// <returns></returns>
public List<Model.LotteryItem> GetList(int pageIndex, int pageSize, string sqlWhere, params SqlParameter[] cmdParms)
{
int startIndex = (pageIndex - 1) * pageSize + 1;
int endIndex = pageIndex * pageSize;
string cmdText = @"select * from(select row_number() over(order by t1.LastUpdatedDate desc) as RowNumber,t1.NumberID,t1.ItemName,t1.ItemCode,t1.ImageUrl,FixRatio,t1.LastUpdatedDate from [LotteryItem] t1 ";
if (!string.IsNullOrEmpty(sqlWhere)) cmdText += "where 1=1 " + sqlWhere;
cmdText += ")as objTable where RowNumber between " + startIndex + " and " + endIndex + " ";
List<Model.LotteryItem> list = null;
using (SqlDataReader reader = SqlHelper.ExecuteReader(SqlHelper.SqlProviderConnString, CommandType.Text, cmdText, cmdParms))
{
if (reader != null && reader.HasRows)
{
list = new List<Model.LotteryItem>();
while (reader.Read())
{
Model.LotteryItem model = new Model.LotteryItem();
model.NumberID = reader["NumberID"].ToString();
model.ItemName = reader["ItemName"].ToString();
model.ItemCode = reader["ItemCode"].ToString();
model.ImageUrl = reader["ImageUrl"].ToString();
model.FixRatio = decimal.Parse(reader["FixRatio"].ToString());
model.LastUpdatedDate = DateTime.Parse(reader["LastUpdatedDate"].ToString());
list.Add(model);
}
}
}
return list;
}
}
}
| 44.734177 | 217 | 0.540252 | [
"MIT"
] | qq283335746/51QiWang | src/TygaSoft/DAL.MsSqlProvider/LotteryItem.cs | 14,470 | C# |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
using System;
using System.Collections.Generic;
using Aliyun.Acs.Core.Transform;
using Aliyun.Acs.CCC.Model.V20170705;
namespace Aliyun.Acs.CCC.Transform.V20170705
{
public class CreateFaultResponseUnmarshaller
{
public static CreateFaultResponse Unmarshall(UnmarshallerContext context)
{
CreateFaultResponse createFaultResponse = new CreateFaultResponse();
createFaultResponse.HttpResponse = context.HttpResponse;
createFaultResponse.RequestId = context.StringValue("CreateFault.RequestId");
createFaultResponse.Success = context.BooleanValue("CreateFault.Success");
createFaultResponse.Code = context.StringValue("CreateFault.Code");
createFaultResponse.Message = context.StringValue("CreateFault.Message");
createFaultResponse.HttpStatusCode = context.IntegerValue("CreateFault.HttpStatusCode");
return createFaultResponse;
}
}
}
| 39.159091 | 91 | 0.761463 | [
"Apache-2.0"
] | bbs168/aliyun-openapi-net-sdk | aliyun-net-sdk-ccc/CCC/Transform/V20170705/CreateFaultResponseUnmarshaller.cs | 1,723 | C# |
#region Using
using System;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using Emotion.Common;
using Emotion.Common.Threading;
using Emotion.Graphics.Data;
using OpenGL;
#endregion
namespace Emotion.Graphics.Objects
{
public abstract class VertexArrayObject : IDisposable
{
/// <summary>
/// The OpenGL pointer to this VertexArrayObject.
/// </summary>
public uint Pointer { get; set; }
/// <summary>
/// The bound vertex array buffer.
/// </summary>
public static uint Bound;
/// <summary>
/// The vertex buffer attached to this vertex array object.
/// When the vao is bound, this vbo is bound automatically.
/// </summary>
public VertexBuffer VBO { get; protected set; }
/// <summary>
/// The ibo attached to this vertex array object.
/// When the vao is bound, this ibo is bound automatically.
/// </summary>
public IndexBuffer IBO { get; protected set; }
/// <summary>
/// The byte size of one instance of the structure.
/// </summary>
public int ByteSize { get; set; }
/// <summary>
/// The offset of the UV field within the structure. The UV field is expected to be at least a Vec2.
/// </summary>
public int UVByteOffset { get; set; }
/// <summary>
/// Ensures the provided pointer is the currently bound vertex array buffer.
/// </summary>
/// <param name="vao">The vertex array object to ensure is bound.</param>
public static void EnsureBound(VertexArrayObject vao)
{
// No binding cache, check https://github.com/Cryru/Emotion/issues/56
uint ptr = vao?.Pointer ?? 0;
Gl.BindVertexArray(ptr);
Bound = ptr;
// Reset the cached binding of VertexBuffers and IndexBuffers as the VAO just bound something else.
// This does disable the cache until the binding, but otherwise we will be binding twice.
VertexBuffer.Bound = uint.MaxValue;
IndexBuffer.Bound = uint.MaxValue;
// Some Intel drivers don't bind the IBO when the VAO is bound.
// https://stackoverflow.com/questions/8973690/vao-and-element-array-buffer-state
if (vao?.IBO != null) IndexBuffer.EnsureBound(vao.IBO.Pointer);
}
/// <summary>
/// Convert a managed C# type to a GL vertex attribute type.
/// </summary>
/// <param name="type">The managed type to convert.</param>
/// <returns>The vertex attribute type corresponding to the provided managed type.</returns>
public static VertexAttribType GetAttribTypeFromManagedType(MemberInfo type)
{
switch (type.Name)
{
default:
return VertexAttribType.Float;
case "Int32":
return VertexAttribType.Int;
case "UInt32":
return VertexAttribType.UnsignedInt;
case "SByte":
return VertexAttribType.Byte;
case "Byte":
return VertexAttribType.UnsignedByte;
}
}
/// <summary>
/// Setup vertex attributes.
/// </summary>
public abstract void SetupAttributes();
#region Cleanup
public void Dispose()
{
uint ptr = Pointer;
Pointer = 0;
if (Engine.Host == null) return;
if (ptr == Bound) Bound = 0;
GLThread.ExecuteGLThreadAsync(() => { Gl.DeleteVertexArrays(ptr); });
}
#endregion
}
/// <summary>
/// Create a vertex array object from the described structure.
/// </summary>
/// <typeparam name="T">The structure to convert to a vertex array object.</typeparam>
public sealed class VertexArrayObject<T> : VertexArrayObject where T : new()
{
public VertexArrayObject(VertexBuffer vbo, IndexBuffer ibo = null)
{
Pointer = Gl.GenVertexArray();
VBO = vbo;
IBO = ibo;
SetupAttributes();
EnsureBound(null);
}
public override void SetupAttributes()
{
EnsureBound(this);
Type structFormat = typeof(T);
FieldInfo[] fields = structFormat.GetFields(BindingFlags.Public | BindingFlags.Instance);
ByteSize = Marshal.SizeOf(new T());
for (uint i = 0; i < fields.Length; i++)
{
Attribute[] fieldAttributes = fields[i].GetCustomAttributes().ToArray();
VertexAttributeAttribute vertexAttributeData = null;
// Go through all attributes and find the VertexAttributeAttribute.
foreach (Attribute attribute in fieldAttributes)
{
if (!(attribute is VertexAttributeAttribute data)) continue;
vertexAttributeData = data;
break;
}
// If the vertex attribute data not found, stop searching.
if (vertexAttributeData == null) continue;
string fieldName = fields[i].Name;
IntPtr offset = Marshal.OffsetOf(structFormat, fieldName);
Type fieldType = vertexAttributeData.TypeOverride ?? fields[i].FieldType;
if (fieldName == "UV") UVByteOffset = (int) offset;
uint position = vertexAttributeData.PositionOverride != -1 ? (uint) vertexAttributeData.PositionOverride : i;
Gl.EnableVertexAttribArray(position);
Gl.VertexAttribPointer(position, vertexAttributeData.ComponentCount, GetAttribTypeFromManagedType(fieldType), vertexAttributeData.Normalized, ByteSize, offset);
}
}
}
} | 36.066667 | 176 | 0.579398 | [
"MIT"
] | simo-andreev/Emotion | Emotion/Graphics/Objects/VertexArrayObject.cs | 5,953 | C# |
using System;
using System.Collections;
namespace AStar
{
/// <summary>
/// AdjacencyList maintains a list of neighbors for a particular <see cref="Node"/>. It is derived from CollectionBase
/// and provides a strongly-typed collection of <see cref="EdgeToNeighbor"/> instances.
/// </summary>
public class AdjacencyList : CollectionBase
{
/// <summary>
/// Adds a new <see cref="EdgeToNeighbor"/> instance to the AdjacencyList.
/// </summary>
/// <param name="e">The <see cref="EdgeToNeighbor"/> instance to add.</param>
protected internal virtual void Add(EdgeToNeighbor e)
{
base.InnerList.Add(e);
}
/// <summary>
/// Returns a particular <see cref="EdgeToNeighbor"/> instance by index.
/// </summary>
public virtual EdgeToNeighbor this[int index]
{
get { return (EdgeToNeighbor) base.InnerList[index]; }
set { base.InnerList[index] = value; }
}
}
}
| 28.967742 | 120 | 0.685969 | [
"MIT"
] | leniel/AStar | AStar/AdjacencyList.cs | 898 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Engine;
using Engine.Platform;
using Engine.Editing;
using OgrePlugin;
namespace Medical
{
class Tracer : Behavior
{
[Editable]
private String sceneNodeName;
[Editable]
private String manualObjectName;
private ManualObject manualObject;
private SceneNodeElement node;
protected override void constructed()
{
base.constructed();
node = Owner.getElement(sceneNodeName) as SceneNodeElement;
if (node == null)
{
blacklist("Could not find scene node named {0}.", sceneNodeName);
}
manualObject = node.getNodeObject(manualObjectName) as ManualObject;
if (manualObject == null)
{
blacklist("Could not find manual object named {0}.", manualObjectName);
}
}
public override void update(Clock clock, EventManager eventManager)
{
}
}
}
| 25.613636 | 88 | 0.570541 | [
"MIT"
] | AnomalousMedical/Medical | Simulation/Animation/Tracer.cs | 1,129 | C# |
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ProjectPeladen.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.2.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int Menu_LastSelectedGame {
get {
return ((int)(this["Menu_LastSelectedGame"]));
}
set {
this["Menu_LastSelectedGame"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string BFBC2_LastGameDir {
get {
return ((string)(this["BFBC2_LastGameDir"]));
}
set {
this["BFBC2_LastGameDir"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string BFBC2_MasterServerIP {
get {
return ((string)(this["BFBC2_MasterServerIP"]));
}
set {
this["BFBC2_MasterServerIP"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool BFBC2_SkipIntro {
get {
return ((bool)(this["BFBC2_SkipIntro"]));
}
set {
this["BFBC2_SkipIntro"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int BFBC2_FOV {
get {
return ((int)(this["BFBC2_FOV"]));
}
set {
this["BFBC2_FOV"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool BFBC2_ModeKentang {
get {
return ((bool)(this["BFBC2_ModeKentang"]));
}
set {
this["BFBC2_ModeKentang"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int BFBC2_Resolution {
get {
return ((int)(this["BFBC2_Resolution"]));
}
set {
this["BFBC2_Resolution"] = value;
}
}
}
}
| 37.531532 | 151 | 0.56193 | [
"MIT"
] | nurradityam/ProjectPeladen | ProjectPeladen/Properties/Settings.Designer.cs | 4,168 | C# |
using Rollvolet.CRM.APIContracts.JsonApi;
namespace Rollvolet.CRM.APIContracts.DTO.WorkingHours
{
public class WorkingHourDto : Resource<WorkingHourAttributesDto, WorkingHourRelationshipsDto>
{
}
} | 26.25 | 97 | 0.8 | [
"MIT"
] | rollvolet/crm-ap | src/Rollvolet.CRM.APIContracts/DTO/WorkingHours/WorkingHourDto.cs | 210 | C# |
using Chapter7.Interface;
using Chapter7.Model;
using System.Collections.ObjectModel;
using System.Windows.Input;
using System;
using System.Net.Http;
using Chapter7.Contracts;
using System.Linq;
using System.Threading.Tasks;
using System.Diagnostics;
using System.IO;
using System.Text;
using System.Collections.Generic;
namespace Chapter7.ViewModel
{
public class MainViewModel : ObservableObject
{
private WebRequest _webRequest;
private ObservableCollection<RecommandationModel> _availableModels = new ObservableCollection<RecommandationModel>();
public ObservableCollection<RecommandationModel> AvailableModels
{
get { return _availableModels; }
set
{
_availableModels = value;
RaisePropertyChangedEvent("AvailableModels");
}
}
private RecommandationModel _selectedModel;
public RecommandationModel SelectedModel
{
get { return _selectedModel; }
set
{
_selectedModel = value;
RaisePropertyChangedEvent("SelectedModel");
}
}
private ObservableCollection<Product> _availableProducts = new ObservableCollection<Product>();
public ObservableCollection<Product> AvailableProducts
{
get { return _availableProducts; }
set
{
_availableProducts = value;
RaisePropertyChangedEvent("AvailableProducts");
}
}
private Product _selectedProduct;
public Product SelectedProduct
{
get { return _selectedProduct; }
set
{
_selectedProduct = value;
RaisePropertyChangedEvent("SelectedProduct");
}
}
private string _recommendations;
public string Recommendations
{
get { return _recommendations; }
set
{
_recommendations = value;
RaisePropertyChangedEvent("Recommendations");
}
}
public ICommand RecommendCommand { get; private set; }
/// <summary>
/// MainViewModel constructor. Creates a <see cref="WebRequest"/> object and command property
/// </summary>
public MainViewModel()
{
_webRequest = new WebRequest("https://<YOUR_WEB_SERVICE>.azurewebsites.net/api/models/", "API_KEY_HERE");
RecommendCommand = new DelegateCommand(RecommendProduct, CanRecommendBook);
Initialize();
}
/// <summary>
/// Initializing the view model by getting models and products
/// </summary>
private async void Initialize()
{
await GetModels();
GetProducts();
}
/// <summary>
/// Funciton to call the Recommendation API to retrieve all available <see cref="RecommandationModel"/>
/// </summary>
/// <returns></returns>
private async Task GetModels()
{
List<RecommandationModel> models = await _webRequest.GetModels(HttpMethod.Get);
foreach (RecommandationModel model in models)
{
AvailableModels.Add(model);
}
SelectedModel = AvailableModels.FirstOrDefault();
}
/// <summary>
/// Function to get all products in a given, hardcoded catalog
/// Reads through a csv file and creates new a <see cref="Product"/> for each line
/// </summary>
private void GetProducts()
{
try
{
var reader = new StreamReader(File.OpenRead("catalog.csv"));
while(!reader.EndOfStream)
{
string line = reader.ReadLine();
var productInfo = line.Split(',');
AvailableProducts.Add(new Product(productInfo[0], productInfo[1], productInfo[2]));
}
SelectedProduct = AvailableProducts.FirstOrDefault();
}
catch(Exception ex)
{
Debug.WriteLine(ex.Message);
}
}
/// <summary>
/// Function to determine whether or not recommandation can happen
/// </summary>
/// <param name="obj"></param>
/// <returns>True if a recommendation model and product has been selected, false otherwise</returns>
private bool CanRecommendBook(object obj)
{
return SelectedModel != null && SelectedProduct != null;
}
/// <summary>
/// Command function for executing the recommendation
/// Creates a query string, makes a request, and parses the result, into a string
/// </summary>
/// <param name="obj"></param>
private async void RecommendProduct(object obj)
{
List<RecommendedItem> recommendations = await _webRequest.RecommendItem(HttpMethod.Get, $"{SelectedModel.id}/recommend?itemid={SelectedProduct.Id}");
if(recommendations.Count == 0)
{
Recommendations = "No recommendations found";
return;
}
StringBuilder sb = new StringBuilder();
sb.Append("Recommended items:\n\n");
foreach(RecommendedItem recommendedItem in recommendations)
{
sb.AppendFormat("Score: {0}\n", recommendedItem.score);
sb.AppendFormat("Item ID: {0}\n", recommendedItem.recommendedItemId);
sb.Append("\n");
}
Recommendations = sb.ToString();
}
}
} | 32.223464 | 161 | 0.568828 | [
"MIT"
] | PacktPublishing/Learning-Azure-Cognitive-Services | Learning Azure Cognitive Services/Chapter7/ViewModel/MainViewModel.cs | 5,770 | C# |
using UnityEngine;
using System.Collections;
using System.Linq;
using System.Collections.Generic;
namespace RelationsInspector
{
internal enum TreeRootLocation { Top, Left, Bottom, Right };
public class TreeLayoutAlgorithm<T, P> where T : class
{
Graph<T, P> graph;
Dictionary<T, float> treeWidth; // width of the tree under the entity, with each entity being one unit wide
const float entityWidth = 1f;
const float entityHeight = 1f;
const float treeSpacing = 3 * entityWidth;
Vector2 RootPos = new Vector2( 0, 0 );
public TreeLayoutAlgorithm( Graph<T, P> graph )
{
this.graph = graph;
treeWidth = new Dictionary<T, float>();
}
public IEnumerator Compute()
{
var roots = graph.RootVertices;
if ( !roots.Any() )
yield break;
// let all subtrees calculate their node positions in local space
var treePositions = roots.Select( GetTreePositions );
yield return MergeTreePositions( treePositions );
}
static Dictionary<T, Vector2> MergeTreePositions( IEnumerable<Dictionary<T, Vector2>> treePositions )
{
if ( treePositions == null || !treePositions.Any() )
throw new System.ArgumentException( "treePositions" );
// move all the trees next to each other
var result = treePositions.First();
float parentEnd = Util.GetBounds( result.Values ).yMax;
foreach ( var treePos in treePositions.Skip( 1 ) )
{
var treeBounds = Util.GetBounds( treePos.Values );
float shift = parentEnd - treeBounds.yMin + treeSpacing;
var keys = treePos.Keys.ToArray();
foreach ( var vertex in keys )
result[ vertex ] = treePos[ vertex ] + new Vector2( 0, shift );
parentEnd += treeBounds.height + treeSpacing;
}
return result;
}
Dictionary<T, Vector2> GetTreePositions( T root )
{
var positions = new Dictionary<T, Vector2>();
positions[ root ] = RootPos;
PositionChildren( root, positions );
// "rotate" positions according to the desired root node location
var nodeTransform = GetNodePositionTransform( Settings.Instance.treeRootLocation );
foreach ( var node in positions.Keys.ToArray() )
positions[ node ] = nodeTransform( positions[ node ] );
return positions;
}
// set the positions of the entity's children (recursively), so that they are centered below entity
void PositionChildren( T entity, Dictionary<T, Vector2> positions )
{
var children = graph.GetChildrenExceptSelf( entity );
var totalWidth = children.Sum( c => GetTreeWidth( c ) );
Vector2 entityPos = positions[ entity ];
float xpos = entityPos.x - totalWidth / 2f;
float height = entityPos.y + entityHeight;
foreach ( var child in children )
{
float childWidth = GetTreeWidth( child );
positions[ child ] = new Vector2( xpos + childWidth / 2f, height );
xpos += childWidth;
PositionChildren( child, positions );
}
}
// get the width of the tree under the root entity. this populates the treeWidth dict with root and all its children
float GetTreeWidth( T root )
{
if ( !treeWidth.ContainsKey( root ) )
{
var children = graph.GetChildrenExceptSelf( root );
float width = children.Any() ? children.Select( v => GetTreeWidth( v ) ).Sum() : entityWidth;
treeWidth[ root ] = width;
}
return treeWidth[ root ];
}
// this becomes superfluous when the view supports rotation
System.Func<Vector2, Vector2> GetNodePositionTransform( TreeRootLocation rootLocation )
{
switch ( rootLocation )
{
case TreeRootLocation.Top:
default:
return pos => pos; // identiy. keep position as it is
case TreeRootLocation.Left:
return pos => new Vector2( pos.y, pos.x ); // flip x and y
case TreeRootLocation.Bottom:
return pos => new Vector2( pos.x, -pos.y ); // mirror y
case TreeRootLocation.Right:
return pos => new Vector2( -pos.y, -pos.x ); // mirror both dimensions and flip
}
}
}
}
| 31.739837 | 118 | 0.6875 | [
"MIT"
] | seldomU/relationsinspector | RIDLLProject/Layout/TreeLayoutAlgorithm.cs | 3,904 | C# |
/*******************************************************
*
* 作者:吴中坡
* 创建日期:20161214
* 说明:此文件只包含一个类,具体内容见类型注释。
* 运行环境:.NET 4.0
* 版本号:1.0.0
*
* 历史记录:
* 创建文件 吴中坡 20161214 09:21
*
*******************************************************/
using System.Collections.Generic;
using System.Linq;
using Rafy.Domain;
namespace Rafy.RBAC.RoleManagement.Controllers
{
/// <summary>
/// 角色领域控制器
/// </summary>
public class RoleController : DomainController
{
/// <summary>
/// 保存角色分配功能操作
/// 功能操作列表必须是当前角色所有的功能操作集合
/// </summary>
/// <param name="roleId">角色Id</param>
/// <param name="operationIdList">操作Id集合</param>
public virtual void SetRoleOperation(long roleId, List<long> operationIdList)
{
RoleOperationRepository roleOperationRepository = RepositoryFacade.ResolveInstance<RoleOperationRepository>();
var roleOperationList = roleOperationRepository.GetByRoleIdList(new List<long> { roleId }).Concrete().ToList();
var changeRoleOpertaionList = roleOperationRepository.NewList();
//处理删除的操作
foreach (var item in roleOperationList)
{
if (operationIdList.All(id => id != item.OperationId))
{
changeRoleOpertaionList.Add(item);
item.PersistenceStatus = PersistenceStatus.Deleted;
}
}
var addRole = new Role { Id = roleId };
//处理新增操作
foreach (var item in operationIdList)
{
if (roleOperationList.All(o => o.OperationId != item))
{
RoleOperation roleOpertaion = new RoleOperation();
roleOpertaion.Role = addRole;
roleOpertaion.Operation = new ResourceOperation() { Id = item };
roleOpertaion.PersistenceStatus = PersistenceStatus.New;
changeRoleOpertaionList.Add(roleOpertaion);
}
}
if (changeRoleOpertaionList.Count > 0)
{
roleOperationRepository.Save(changeRoleOpertaionList);
}
}
}
}
| 33.575758 | 123 | 0.538357 | [
"MIT"
] | zgynhqf/trunk | Rafy/Plugins/Other/Rafy.RBAC V2/Rafy.RBAC.RoleManagement/Controllers/RoleController.cs | 2,444 | C# |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Core.Pipeline;
using Azure.ResourceManager;
using Azure.ResourceManager.Core;
using Azure.ResourceManager.CosmosDB.Models;
namespace Azure.ResourceManager.CosmosDB
{
/// <summary> A class representing collection of GremlinGraph and their operations over its parent. </summary>
public partial class GremlinGraphCollection : ArmCollection, IEnumerable<GremlinGraph>, IAsyncEnumerable<GremlinGraph>
{
private readonly ClientDiagnostics _clientDiagnostics;
private readonly GremlinResourcesRestOperations _gremlinResourcesRestClient;
/// <summary> Initializes a new instance of the <see cref="GremlinGraphCollection"/> class for mocking. </summary>
protected GremlinGraphCollection()
{
}
/// <summary> Initializes a new instance of GremlinGraphCollection class. </summary>
/// <param name="parent"> The resource representing the parent resource. </param>
internal GremlinGraphCollection(ArmResource parent) : base(parent)
{
_clientDiagnostics = new ClientDiagnostics(ClientOptions);
_gremlinResourcesRestClient = new GremlinResourcesRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
}
/// <summary> Gets the valid resource type for this object. </summary>
protected override ResourceType ValidResourceType => GremlinDatabase.ResourceType;
// Collection level operations.
/// <summary> Create or update an Azure Cosmos DB Gremlin graph. </summary>
/// <param name="graphName"> Cosmos DB graph name. </param>
/// <param name="createUpdateGremlinGraphParameters"> The parameters to provide for the current Gremlin graph. </param>
/// <param name="waitForCompletion"> Waits for the completion of the long running operations. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> <paramref name="graphName"/> or <paramref name="createUpdateGremlinGraphParameters"/> is null. </exception>
public virtual GremlinResourceCreateUpdateGremlinGraphOperation CreateOrUpdate(string graphName, GremlinGraphCreateUpdateOptions createUpdateGremlinGraphParameters, bool waitForCompletion = true, CancellationToken cancellationToken = default)
{
if (graphName == null)
{
throw new ArgumentNullException(nameof(graphName));
}
if (createUpdateGremlinGraphParameters == null)
{
throw new ArgumentNullException(nameof(createUpdateGremlinGraphParameters));
}
using var scope = _clientDiagnostics.CreateScope("GremlinGraphCollection.CreateOrUpdate");
scope.Start();
try
{
var response = _gremlinResourcesRestClient.CreateUpdateGremlinGraph(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, graphName, createUpdateGremlinGraphParameters, cancellationToken);
var operation = new GremlinResourceCreateUpdateGremlinGraphOperation(Parent, _clientDiagnostics, Pipeline, _gremlinResourcesRestClient.CreateCreateUpdateGremlinGraphRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, graphName, createUpdateGremlinGraphParameters).Request, response);
if (waitForCompletion)
operation.WaitForCompletion(cancellationToken);
return operation;
}
catch (Exception e)
{
scope.Failed(e);
throw;
}
}
/// <summary> Create or update an Azure Cosmos DB Gremlin graph. </summary>
/// <param name="graphName"> Cosmos DB graph name. </param>
/// <param name="createUpdateGremlinGraphParameters"> The parameters to provide for the current Gremlin graph. </param>
/// <param name="waitForCompletion"> Waits for the completion of the long running operations. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> <paramref name="graphName"/> or <paramref name="createUpdateGremlinGraphParameters"/> is null. </exception>
public async virtual Task<GremlinResourceCreateUpdateGremlinGraphOperation> CreateOrUpdateAsync(string graphName, GremlinGraphCreateUpdateOptions createUpdateGremlinGraphParameters, bool waitForCompletion = true, CancellationToken cancellationToken = default)
{
if (graphName == null)
{
throw new ArgumentNullException(nameof(graphName));
}
if (createUpdateGremlinGraphParameters == null)
{
throw new ArgumentNullException(nameof(createUpdateGremlinGraphParameters));
}
using var scope = _clientDiagnostics.CreateScope("GremlinGraphCollection.CreateOrUpdate");
scope.Start();
try
{
var response = await _gremlinResourcesRestClient.CreateUpdateGremlinGraphAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, graphName, createUpdateGremlinGraphParameters, cancellationToken).ConfigureAwait(false);
var operation = new GremlinResourceCreateUpdateGremlinGraphOperation(Parent, _clientDiagnostics, Pipeline, _gremlinResourcesRestClient.CreateCreateUpdateGremlinGraphRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, graphName, createUpdateGremlinGraphParameters).Request, response);
if (waitForCompletion)
await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
return operation;
}
catch (Exception e)
{
scope.Failed(e);
throw;
}
}
/// <summary> Gets the Gremlin graph under an existing Azure Cosmos DB database account. </summary>
/// <param name="graphName"> Cosmos DB graph name. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> <paramref name="graphName"/> is null. </exception>
public virtual Response<GremlinGraph> Get(string graphName, CancellationToken cancellationToken = default)
{
if (graphName == null)
{
throw new ArgumentNullException(nameof(graphName));
}
using var scope = _clientDiagnostics.CreateScope("GremlinGraphCollection.Get");
scope.Start();
try
{
var response = _gremlinResourcesRestClient.GetGremlinGraph(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, graphName, cancellationToken);
if (response.Value == null)
throw _clientDiagnostics.CreateRequestFailedException(response.GetRawResponse());
return Response.FromValue(new GremlinGraph(Parent, response.Value), response.GetRawResponse());
}
catch (Exception e)
{
scope.Failed(e);
throw;
}
}
/// <summary> Gets the Gremlin graph under an existing Azure Cosmos DB database account. </summary>
/// <param name="graphName"> Cosmos DB graph name. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> <paramref name="graphName"/> is null. </exception>
public async virtual Task<Response<GremlinGraph>> GetAsync(string graphName, CancellationToken cancellationToken = default)
{
if (graphName == null)
{
throw new ArgumentNullException(nameof(graphName));
}
using var scope = _clientDiagnostics.CreateScope("GremlinGraphCollection.Get");
scope.Start();
try
{
var response = await _gremlinResourcesRestClient.GetGremlinGraphAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, graphName, cancellationToken).ConfigureAwait(false);
if (response.Value == null)
throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(response.GetRawResponse()).ConfigureAwait(false);
return Response.FromValue(new GremlinGraph(Parent, response.Value), response.GetRawResponse());
}
catch (Exception e)
{
scope.Failed(e);
throw;
}
}
/// <summary> Tries to get details for this resource from the service. </summary>
/// <param name="graphName"> Cosmos DB graph name. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> <paramref name="graphName"/> is null. </exception>
public virtual Response<GremlinGraph> GetIfExists(string graphName, CancellationToken cancellationToken = default)
{
if (graphName == null)
{
throw new ArgumentNullException(nameof(graphName));
}
using var scope = _clientDiagnostics.CreateScope("GremlinGraphCollection.GetIfExists");
scope.Start();
try
{
var response = _gremlinResourcesRestClient.GetGremlinGraph(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, graphName, cancellationToken: cancellationToken);
return response.Value == null
? Response.FromValue<GremlinGraph>(null, response.GetRawResponse())
: Response.FromValue(new GremlinGraph(this, response.Value), response.GetRawResponse());
}
catch (Exception e)
{
scope.Failed(e);
throw;
}
}
/// <summary> Tries to get details for this resource from the service. </summary>
/// <param name="graphName"> Cosmos DB graph name. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> <paramref name="graphName"/> is null. </exception>
public async virtual Task<Response<GremlinGraph>> GetIfExistsAsync(string graphName, CancellationToken cancellationToken = default)
{
if (graphName == null)
{
throw new ArgumentNullException(nameof(graphName));
}
using var scope = _clientDiagnostics.CreateScope("GremlinGraphCollection.GetIfExistsAsync");
scope.Start();
try
{
var response = await _gremlinResourcesRestClient.GetGremlinGraphAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, graphName, cancellationToken: cancellationToken).ConfigureAwait(false);
return response.Value == null
? Response.FromValue<GremlinGraph>(null, response.GetRawResponse())
: Response.FromValue(new GremlinGraph(this, response.Value), response.GetRawResponse());
}
catch (Exception e)
{
scope.Failed(e);
throw;
}
}
/// <summary> Tries to get details for this resource from the service. </summary>
/// <param name="graphName"> Cosmos DB graph name. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> <paramref name="graphName"/> is null. </exception>
public virtual Response<bool> CheckIfExists(string graphName, CancellationToken cancellationToken = default)
{
if (graphName == null)
{
throw new ArgumentNullException(nameof(graphName));
}
using var scope = _clientDiagnostics.CreateScope("GremlinGraphCollection.CheckIfExists");
scope.Start();
try
{
var response = GetIfExists(graphName, cancellationToken: cancellationToken);
return Response.FromValue(response.Value != null, response.GetRawResponse());
}
catch (Exception e)
{
scope.Failed(e);
throw;
}
}
/// <summary> Tries to get details for this resource from the service. </summary>
/// <param name="graphName"> Cosmos DB graph name. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> <paramref name="graphName"/> is null. </exception>
public async virtual Task<Response<bool>> CheckIfExistsAsync(string graphName, CancellationToken cancellationToken = default)
{
if (graphName == null)
{
throw new ArgumentNullException(nameof(graphName));
}
using var scope = _clientDiagnostics.CreateScope("GremlinGraphCollection.CheckIfExistsAsync");
scope.Start();
try
{
var response = await GetIfExistsAsync(graphName, cancellationToken: cancellationToken).ConfigureAwait(false);
return Response.FromValue(response.Value != null, response.GetRawResponse());
}
catch (Exception e)
{
scope.Failed(e);
throw;
}
}
/// <summary> Lists the Gremlin graph under an existing Azure Cosmos DB database account. </summary>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <returns> A collection of <see cref="GremlinGraph" /> that may take multiple service requests to iterate over. </returns>
public virtual Pageable<GremlinGraph> GetAll(CancellationToken cancellationToken = default)
{
Page<GremlinGraph> FirstPageFunc(int? pageSizeHint)
{
using var scope = _clientDiagnostics.CreateScope("GremlinGraphCollection.GetAll");
scope.Start();
try
{
var response = _gremlinResourcesRestClient.ListGremlinGraphs(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken);
return Page.FromValues(response.Value.Value.Select(value => new GremlinGraph(Parent, value)), null, response.GetRawResponse());
}
catch (Exception e)
{
scope.Failed(e);
throw;
}
}
return PageableHelpers.CreateEnumerable(FirstPageFunc, null);
}
/// <summary> Lists the Gremlin graph under an existing Azure Cosmos DB database account. </summary>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <returns> An async collection of <see cref="GremlinGraph" /> that may take multiple service requests to iterate over. </returns>
public virtual AsyncPageable<GremlinGraph> GetAllAsync(CancellationToken cancellationToken = default)
{
async Task<Page<GremlinGraph>> FirstPageFunc(int? pageSizeHint)
{
using var scope = _clientDiagnostics.CreateScope("GremlinGraphCollection.GetAll");
scope.Start();
try
{
var response = await _gremlinResourcesRestClient.ListGremlinGraphsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false);
return Page.FromValues(response.Value.Value.Select(value => new GremlinGraph(Parent, value)), null, response.GetRawResponse());
}
catch (Exception e)
{
scope.Failed(e);
throw;
}
}
return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, null);
}
IEnumerator<GremlinGraph> IEnumerable<GremlinGraph>.GetEnumerator()
{
return GetAll().GetEnumerator();
}
IEnumerator IEnumerable.GetEnumerator()
{
return GetAll().GetEnumerator();
}
IAsyncEnumerator<GremlinGraph> IAsyncEnumerable<GremlinGraph>.GetAsyncEnumerator(CancellationToken cancellationToken)
{
return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken);
}
// Builders.
// public ArmBuilder<Azure.ResourceManager.ResourceIdentifier, GremlinGraph, GremlinGraphData> Construct() { }
}
}
| 50.902655 | 321 | 0.637923 | [
"MIT"
] | LeiWang3/azure-sdk-for-net | sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GremlinGraphCollection.cs | 17,256 | C# |
using System;
using System.Configuration;
using System.Data.SqlClient;
using Sitecore.Weareyou.Feature.FormsExtension.Processing.Actions;
namespace Sitecore.Weareyou.Feature.FormsExtension.Activities
{
public interface IDataManagementService
{
void DeleteFormEntries(Guid contactId);
}
public class DataManagementService : IDataManagementService
{
private SqlConnection SqlConnection { get; set; }
public DataManagementService()
{
var connectionString = ConfigurationManager.ConnectionStrings["experienceforms"].ConnectionString;
SqlConnection = new SqlConnection(connectionString);
}
/// <summary>
/// Deletes all form entries made by a specific contact.
/// Only works for entries saved via the custom SaveDataWithContact submit action.
/// </summary>
/// <remarks>
/// It would be way nicer to extend the SqlFormDataProvider of the ExperienceForms namespace, but that would not
/// only require adding the Sitecore.Kernel, Sitecore.ExperienceForms and Sitecore.ExperienceForms.Data.SqlServer
/// assemblies to the xConnect deployment, but would also lack the context of the content web roles. To keep things
/// mean and lean, I've decided to do a SQL query on the database directly via a SqlConnection object, which is,
/// effectively, the same as what the SqlFormDataProvider does - also, the System.Data.SqlClient assembly is already
/// present in the default xConnect deployment.
/// </remarks>
/// <param name="contactId">The GUID of the contact to delete the form entries for</param>
public void DeleteFormEntries(Guid contactId)
{
using (SqlConnection)
{
SqlConnection.Open();
const string sqlQuery =
"DELETE FROM [FormEntry] WHERE [ID] IN (SELECT [FormEntryID] FROM [FieldData] WHERE [FieldName]=@FieldName AND [Value]=@FieldValue)";
var sqlCommand = new SqlCommand(sqlQuery, SqlConnection);
sqlCommand.Parameters.AddWithValue("@FieldName", SaveDataWithContact.TrackerIdFieldName);
sqlCommand.Parameters.AddWithValue("@FieldValue", contactId.ToString().ToUpper());
sqlCommand.ExecuteNonQuery();
}
}
}
} | 45.961538 | 153 | 0.67113 | [
"Unlicense"
] | robhabraken/data-privacy | Habitat demo/src/Feature/FormsExtension/code/Activities/DataManagementService.cs | 2,392 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace App
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
}
}
| 21.551724 | 45 | 0.7104 | [
"Apache-2.0"
] | EdwinCloud101/ScrollToBottomThenNext | ScrollToBottomThenNext/App/MainWindow.xaml.cs | 627 | C# |
using LunchBag.Common.EventMessages;
using LunchBag.Common.Managers;
using MassTransit;
using MassTransit.Logging;
using Microsoft.AspNetCore.SignalR;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Newtonsoft.Json;
using RestSharp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
namespace LunchBag.WebPortal.BusService
{
public class NoteCreatedConsumer : IConsumer<INoteCreatedMessage>
{
private readonly ISignalsRestService _signalsRestService;
private readonly ILogger<GoalUpdatedConsumer> _logger;
public NoteCreatedConsumer(ISignalsRestService signalsRestService, ILogger<GoalUpdatedConsumer> logger)
{
_logger = logger;
_signalsRestService = signalsRestService;
}
public async Task Consume(ConsumeContext<INoteCreatedMessage> context)
{
_logger.LogDebug($"NoteCreatedConsumer: Retrieved message {JsonConvert.SerializeObject(context.Message)}");
var result = await _signalsRestService.NoteCreated(context.Message);
if (result == HttpStatusCode.OK)
_logger.LogDebug($"NoteCreatedConsumer: Message sent successfully.");
else
_logger.LogError($"NoteCreatedConsumer: Error while sending a message: {result}");
}
}
}
| 34.170732 | 119 | 0.72591 | [
"MIT"
] | BlueMetal/HashTagLunchBag | MicroServices/LunchBag.WebPortal.BusService/Consumers/NoteCreatedConsumer.cs | 1,403 | C# |
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the cognito-idp-2016-04-18.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CognitoIdentityProvider.Model
{
/// <summary>
/// This exception is thrown when the Amazon Cognito service encounters an invalid password.
/// </summary>
#if !NETSTANDARD
[Serializable]
#endif
public partial class InvalidPasswordException : AmazonCognitoIdentityProviderException
{
/// <summary>
/// Constructs a new InvalidPasswordException with the specified error
/// message.
/// </summary>
/// <param name="message">
/// Describes the error encountered.
/// </param>
public InvalidPasswordException(string message)
: base(message) {}
/// <summary>
/// Construct instance of InvalidPasswordException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
public InvalidPasswordException(string message, Exception innerException)
: base(message, innerException) {}
/// <summary>
/// Construct instance of InvalidPasswordException
/// </summary>
/// <param name="innerException"></param>
public InvalidPasswordException(Exception innerException)
: base(innerException) {}
/// <summary>
/// Construct instance of InvalidPasswordException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public InvalidPasswordException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, innerException, errorType, errorCode, requestId, statusCode) {}
/// <summary>
/// Construct instance of InvalidPasswordException
/// </summary>
/// <param name="message"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public InvalidPasswordException(string message, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, errorType, errorCode, requestId, statusCode) {}
#if !NETSTANDARD
/// <summary>
/// Constructs a new instance of the InvalidPasswordException class with serialized data.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception>
protected InvalidPasswordException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}
/// <summary>
/// Sets the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with information about the exception.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is a null reference (Nothing in Visual Basic). </exception>
#if BCL35
[System.Security.Permissions.SecurityPermission(
System.Security.Permissions.SecurityAction.LinkDemand,
Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)]
#endif
[System.Security.SecurityCritical]
// These FxCop rules are giving false-positives for this method
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2134:MethodsMustOverrideWithConsistentTransparencyFxCopRule")]
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
{
base.GetObjectData(info, context);
}
#endif
}
} | 47.564516 | 178 | 0.682604 | [
"Apache-2.0"
] | ChristopherButtars/aws-sdk-net | sdk/src/Services/CognitoIdentityProvider/Generated/Model/InvalidPasswordException.cs | 5,898 | C# |
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the rds-2014-10-31.normal.json service model.
*/
using System;
using System.Runtime.ExceptionServices;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Net;
using Amazon.RDS.Model;
using Amazon.RDS.Model.Internal.MarshallTransformations;
using Amazon.RDS.Internal;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Auth;
using Amazon.Runtime.Internal.Transform;
namespace Amazon.RDS
{
/// <summary>
/// Implementation for accessing RDS
///
/// Amazon Relational Database Service
/// <para>
///
/// </para>
///
/// <para>
/// Amazon Relational Database Service (Amazon RDS) is a web service that makes it easier
/// to set up, operate, and scale a relational database in the cloud. It provides cost-efficient,
/// resizeable capacity for an industry-standard relational database and manages common
/// database administration tasks, freeing up developers to focus on what makes their
/// applications and businesses unique.
/// </para>
///
/// <para>
/// Amazon RDS gives you access to the capabilities of a MySQL, MariaDB, PostgreSQL, Microsoft
/// SQL Server, Oracle, or Amazon Aurora database server. These capabilities mean that
/// the code, applications, and tools you already use today with your existing databases
/// work with Amazon RDS without modification. Amazon RDS automatically backs up your
/// database and maintains the database software that powers your DB instance. Amazon
/// RDS is flexible: you can scale your DB instance's compute resources and storage capacity
/// to meet your application's demand. As with all Amazon Web Services, there are no up-front
/// investments, and you pay only for the resources you use.
/// </para>
///
/// <para>
/// This interface reference for Amazon RDS contains documentation for a programming or
/// command line interface you can use to manage Amazon RDS. Amazon RDS is asynchronous,
/// which means that some interfaces might require techniques such as polling or callback
/// functions to determine when a command has been applied. In this reference, the parameter
/// descriptions indicate whether a command is applied immediately, on the next instance
/// reboot, or during the maintenance window. The reference structure is as follows, and
/// we list following some related topics from the user guide.
/// </para>
///
/// <para>
/// <b>Amazon RDS API Reference</b>
/// </para>
/// <ul> <li>
/// <para>
/// For the alphabetical list of API actions, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_Operations.html">API
/// Actions</a>.
/// </para>
/// </li> <li>
/// <para>
/// For the alphabetical list of data types, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_Types.html">Data
/// Types</a>.
/// </para>
/// </li> <li>
/// <para>
/// For a list of common query parameters, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/CommonParameters.html">Common
/// Parameters</a>.
/// </para>
/// </li> <li>
/// <para>
/// For descriptions of the error codes, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/CommonErrors.html">Common
/// Errors</a>.
/// </para>
/// </li> </ul>
/// <para>
/// <b>Amazon RDS User Guide</b>
/// </para>
/// <ul> <li>
/// <para>
/// For a summary of the Amazon RDS interfaces, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Welcome.html#Welcome.Interfaces">Available
/// RDS Interfaces</a>.
/// </para>
/// </li> <li>
/// <para>
/// For more information about how to use the Query API, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Using_the_Query_API.html">Using
/// the Query API</a>.
/// </para>
/// </li> </ul>
/// </summary>
public partial class AmazonRDSClient : AmazonServiceClient, IAmazonRDS
{
private static IServiceMetadata serviceMetadata = new AmazonRDSMetadata();
private IRDSPaginatorFactory _paginators;
/// <summary>
/// Paginators for the service
/// </summary>
public IRDSPaginatorFactory Paginators
{
get
{
if (this._paginators == null)
{
this._paginators = new RDSPaginatorFactory(this);
}
return this._paginators;
}
}
#region Constructors
/// <summary>
/// Constructs AmazonRDSClient with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
/// <code>
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
/// </code>
///
/// </summary>
public AmazonRDSClient()
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonRDSConfig()) { }
/// <summary>
/// Constructs AmazonRDSClient with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
/// <code>
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
/// </code>
///
/// </summary>
/// <param name="region">The region to connect.</param>
public AmazonRDSClient(RegionEndpoint region)
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonRDSConfig{RegionEndpoint = region}) { }
/// <summary>
/// Constructs AmazonRDSClient with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
/// <code>
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
/// </code>
///
/// </summary>
/// <param name="config">The AmazonRDSClient Configuration Object</param>
public AmazonRDSClient(AmazonRDSConfig config)
: base(FallbackCredentialsFactory.GetCredentials(), config) { }
/// <summary>
/// Constructs AmazonRDSClient with AWS Credentials
/// </summary>
/// <param name="credentials">AWS Credentials</param>
public AmazonRDSClient(AWSCredentials credentials)
: this(credentials, new AmazonRDSConfig())
{
}
/// <summary>
/// Constructs AmazonRDSClient with AWS Credentials
/// </summary>
/// <param name="credentials">AWS Credentials</param>
/// <param name="region">The region to connect.</param>
public AmazonRDSClient(AWSCredentials credentials, RegionEndpoint region)
: this(credentials, new AmazonRDSConfig{RegionEndpoint = region})
{
}
/// <summary>
/// Constructs AmazonRDSClient with AWS Credentials and an
/// AmazonRDSClient Configuration object.
/// </summary>
/// <param name="credentials">AWS Credentials</param>
/// <param name="clientConfig">The AmazonRDSClient Configuration Object</param>
public AmazonRDSClient(AWSCredentials credentials, AmazonRDSConfig clientConfig)
: base(credentials, clientConfig)
{
}
/// <summary>
/// Constructs AmazonRDSClient with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
public AmazonRDSClient(string awsAccessKeyId, string awsSecretAccessKey)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonRDSConfig())
{
}
/// <summary>
/// Constructs AmazonRDSClient with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="region">The region to connect.</param>
public AmazonRDSClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonRDSConfig() {RegionEndpoint=region})
{
}
/// <summary>
/// Constructs AmazonRDSClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonRDSClient Configuration object.
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="clientConfig">The AmazonRDSClient Configuration Object</param>
public AmazonRDSClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonRDSConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, clientConfig)
{
}
/// <summary>
/// Constructs AmazonRDSClient with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="awsSessionToken">AWS Session Token</param>
public AmazonRDSClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonRDSConfig())
{
}
/// <summary>
/// Constructs AmazonRDSClient with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="awsSessionToken">AWS Session Token</param>
/// <param name="region">The region to connect.</param>
public AmazonRDSClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonRDSConfig{RegionEndpoint = region})
{
}
/// <summary>
/// Constructs AmazonRDSClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonRDSClient Configuration object.
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="awsSessionToken">AWS Session Token</param>
/// <param name="clientConfig">The AmazonRDSClient Configuration Object</param>
public AmazonRDSClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonRDSConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, clientConfig)
{
}
#endregion
#region Overrides
/// <summary>
/// Creates the signer for the service.
/// </summary>
protected override AbstractAWSSigner CreateSigner()
{
return new AWS4Signer();
}
/// <summary>
/// Customize the pipeline
/// </summary>
/// <param name="pipeline"></param>
protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
{
pipeline.AddHandlerBefore<Amazon.Runtime.Internal.Marshaller>(new Amazon.RDS.Internal.PreSignedUrlRequestHandler(this.Credentials));
}
/// <summary>
/// Capture metadata for the service.
/// </summary>
protected override IServiceMetadata ServiceMetadata
{
get
{
return serviceMetadata;
}
}
#endregion
#region Dispose
/// <summary>
/// Disposes the service client.
/// </summary>
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
}
#endregion
#region AddRoleToDBCluster
/// <summary>
/// Associates an Identity and Access Management (IAM) role from an Amazon Aurora DB cluster.
/// For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Integrating.Authorizing.html">Authorizing
/// Amazon Aurora MySQL to Access Other AWS Services on Your Behalf</a> in the <i>Amazon
/// Aurora User Guide</i>.
///
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AddRoleToDBCluster service method.</param>
///
/// <returns>The response from the AddRoleToDBCluster service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterRoleAlreadyExistsException">
/// The specified IAM role Amazon Resource Name (ARN) is already associated with the specified
/// DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterRoleQuotaExceededException">
/// You have exceeded the maximum number of IAM roles that can be associated with the
/// specified DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/AddRoleToDBCluster">REST API Reference for AddRoleToDBCluster Operation</seealso>
public virtual AddRoleToDBClusterResponse AddRoleToDBCluster(AddRoleToDBClusterRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AddRoleToDBClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = AddRoleToDBClusterResponseUnmarshaller.Instance;
return Invoke<AddRoleToDBClusterResponse>(request, options);
}
/// <summary>
/// Associates an Identity and Access Management (IAM) role from an Amazon Aurora DB cluster.
/// For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Integrating.Authorizing.html">Authorizing
/// Amazon Aurora MySQL to Access Other AWS Services on Your Behalf</a> in the <i>Amazon
/// Aurora User Guide</i>.
///
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AddRoleToDBCluster service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AddRoleToDBCluster service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterRoleAlreadyExistsException">
/// The specified IAM role Amazon Resource Name (ARN) is already associated with the specified
/// DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterRoleQuotaExceededException">
/// You have exceeded the maximum number of IAM roles that can be associated with the
/// specified DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/AddRoleToDBCluster">REST API Reference for AddRoleToDBCluster Operation</seealso>
public virtual Task<AddRoleToDBClusterResponse> AddRoleToDBClusterAsync(AddRoleToDBClusterRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AddRoleToDBClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = AddRoleToDBClusterResponseUnmarshaller.Instance;
return InvokeAsync<AddRoleToDBClusterResponse>(request, options, cancellationToken);
}
#endregion
#region AddRoleToDBInstance
/// <summary>
/// Associates an AWS Identity and Access Management (IAM) role with a DB instance.
///
/// <note>
/// <para>
/// To add a role to a DB instance, the status of the DB instance must be <code>available</code>.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AddRoleToDBInstance service method.</param>
///
/// <returns>The response from the AddRoleToDBInstance service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceRoleAlreadyExistsException">
/// The specified <code>RoleArn</code> or <code>FeatureName</code> value is already associated
/// with the DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceRoleQuotaExceededException">
/// You can't associate any more AWS Identity and Access Management (IAM) roles with the
/// DB instance because the quota has been reached.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/AddRoleToDBInstance">REST API Reference for AddRoleToDBInstance Operation</seealso>
public virtual AddRoleToDBInstanceResponse AddRoleToDBInstance(AddRoleToDBInstanceRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AddRoleToDBInstanceRequestMarshaller.Instance;
options.ResponseUnmarshaller = AddRoleToDBInstanceResponseUnmarshaller.Instance;
return Invoke<AddRoleToDBInstanceResponse>(request, options);
}
/// <summary>
/// Associates an AWS Identity and Access Management (IAM) role with a DB instance.
///
/// <note>
/// <para>
/// To add a role to a DB instance, the status of the DB instance must be <code>available</code>.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AddRoleToDBInstance service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AddRoleToDBInstance service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceRoleAlreadyExistsException">
/// The specified <code>RoleArn</code> or <code>FeatureName</code> value is already associated
/// with the DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceRoleQuotaExceededException">
/// You can't associate any more AWS Identity and Access Management (IAM) roles with the
/// DB instance because the quota has been reached.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/AddRoleToDBInstance">REST API Reference for AddRoleToDBInstance Operation</seealso>
public virtual Task<AddRoleToDBInstanceResponse> AddRoleToDBInstanceAsync(AddRoleToDBInstanceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AddRoleToDBInstanceRequestMarshaller.Instance;
options.ResponseUnmarshaller = AddRoleToDBInstanceResponseUnmarshaller.Instance;
return InvokeAsync<AddRoleToDBInstanceResponse>(request, options, cancellationToken);
}
#endregion
#region AddSourceIdentifierToSubscription
/// <summary>
/// Adds a source identifier to an existing RDS event notification subscription.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AddSourceIdentifierToSubscription service method.</param>
///
/// <returns>The response from the AddSourceIdentifierToSubscription service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.SourceNotFoundException">
/// The requested source could not be found.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SubscriptionNotFoundException">
/// The subscription name does not exist.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/AddSourceIdentifierToSubscription">REST API Reference for AddSourceIdentifierToSubscription Operation</seealso>
public virtual AddSourceIdentifierToSubscriptionResponse AddSourceIdentifierToSubscription(AddSourceIdentifierToSubscriptionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AddSourceIdentifierToSubscriptionRequestMarshaller.Instance;
options.ResponseUnmarshaller = AddSourceIdentifierToSubscriptionResponseUnmarshaller.Instance;
return Invoke<AddSourceIdentifierToSubscriptionResponse>(request, options);
}
/// <summary>
/// Adds a source identifier to an existing RDS event notification subscription.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AddSourceIdentifierToSubscription service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AddSourceIdentifierToSubscription service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.SourceNotFoundException">
/// The requested source could not be found.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SubscriptionNotFoundException">
/// The subscription name does not exist.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/AddSourceIdentifierToSubscription">REST API Reference for AddSourceIdentifierToSubscription Operation</seealso>
public virtual Task<AddSourceIdentifierToSubscriptionResponse> AddSourceIdentifierToSubscriptionAsync(AddSourceIdentifierToSubscriptionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AddSourceIdentifierToSubscriptionRequestMarshaller.Instance;
options.ResponseUnmarshaller = AddSourceIdentifierToSubscriptionResponseUnmarshaller.Instance;
return InvokeAsync<AddSourceIdentifierToSubscriptionResponse>(request, options, cancellationToken);
}
#endregion
#region AddTagsToResource
/// <summary>
/// Adds metadata tags to an Amazon RDS resource. These tags can also be used with cost
/// allocation reporting to track cost associated with Amazon RDS resources, or used in
/// a Condition statement in an IAM policy for Amazon RDS.
///
///
/// <para>
/// For an overview on tagging Amazon RDS resources, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.Tagging.html">Tagging
/// Amazon RDS Resources</a>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AddTagsToResource service method.</param>
///
/// <returns>The response from the AddTagsToResource service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyNotFoundException">
/// The specified proxy name doesn't correspond to a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyTargetGroupNotFoundException">
/// The specified target group isn't available for a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSnapshotNotFoundException">
/// <code>DBSnapshotIdentifier</code> doesn't refer to an existing DB snapshot.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/AddTagsToResource">REST API Reference for AddTagsToResource Operation</seealso>
public virtual AddTagsToResourceResponse AddTagsToResource(AddTagsToResourceRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AddTagsToResourceRequestMarshaller.Instance;
options.ResponseUnmarshaller = AddTagsToResourceResponseUnmarshaller.Instance;
return Invoke<AddTagsToResourceResponse>(request, options);
}
/// <summary>
/// Adds metadata tags to an Amazon RDS resource. These tags can also be used with cost
/// allocation reporting to track cost associated with Amazon RDS resources, or used in
/// a Condition statement in an IAM policy for Amazon RDS.
///
///
/// <para>
/// For an overview on tagging Amazon RDS resources, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.Tagging.html">Tagging
/// Amazon RDS Resources</a>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AddTagsToResource service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AddTagsToResource service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyNotFoundException">
/// The specified proxy name doesn't correspond to a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyTargetGroupNotFoundException">
/// The specified target group isn't available for a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSnapshotNotFoundException">
/// <code>DBSnapshotIdentifier</code> doesn't refer to an existing DB snapshot.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/AddTagsToResource">REST API Reference for AddTagsToResource Operation</seealso>
public virtual Task<AddTagsToResourceResponse> AddTagsToResourceAsync(AddTagsToResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AddTagsToResourceRequestMarshaller.Instance;
options.ResponseUnmarshaller = AddTagsToResourceResponseUnmarshaller.Instance;
return InvokeAsync<AddTagsToResourceResponse>(request, options, cancellationToken);
}
#endregion
#region ApplyPendingMaintenanceAction
/// <summary>
/// Applies a pending maintenance action to a resource (for example, to a DB instance).
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ApplyPendingMaintenanceAction service method.</param>
///
/// <returns>The response from the ApplyPendingMaintenanceAction service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.ResourceNotFoundException">
/// The specified resource ID was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ApplyPendingMaintenanceAction">REST API Reference for ApplyPendingMaintenanceAction Operation</seealso>
public virtual ApplyPendingMaintenanceActionResponse ApplyPendingMaintenanceAction(ApplyPendingMaintenanceActionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ApplyPendingMaintenanceActionRequestMarshaller.Instance;
options.ResponseUnmarshaller = ApplyPendingMaintenanceActionResponseUnmarshaller.Instance;
return Invoke<ApplyPendingMaintenanceActionResponse>(request, options);
}
/// <summary>
/// Applies a pending maintenance action to a resource (for example, to a DB instance).
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ApplyPendingMaintenanceAction service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ApplyPendingMaintenanceAction service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.ResourceNotFoundException">
/// The specified resource ID was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ApplyPendingMaintenanceAction">REST API Reference for ApplyPendingMaintenanceAction Operation</seealso>
public virtual Task<ApplyPendingMaintenanceActionResponse> ApplyPendingMaintenanceActionAsync(ApplyPendingMaintenanceActionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ApplyPendingMaintenanceActionRequestMarshaller.Instance;
options.ResponseUnmarshaller = ApplyPendingMaintenanceActionResponseUnmarshaller.Instance;
return InvokeAsync<ApplyPendingMaintenanceActionResponse>(request, options, cancellationToken);
}
#endregion
#region AuthorizeDBSecurityGroupIngress
/// <summary>
/// Enables ingress to a DBSecurityGroup using one of two forms of authorization. First,
/// EC2 or VPC security groups can be added to the DBSecurityGroup if the application
/// using the database is running on EC2 or VPC instances. Second, IP ranges are available
/// if the application accessing your database is running on the Internet. Required parameters
/// for this API are one of CIDR range, EC2SecurityGroupId for VPC, or (EC2SecurityGroupOwnerId
/// and either EC2SecurityGroupName or EC2SecurityGroupId for non-VPC).
///
/// <note>
/// <para>
/// You can't authorize ingress from an EC2 security group in one AWS Region to an Amazon
/// RDS DB instance in another. You can't authorize ingress from a VPC security group
/// in one VPC to an Amazon RDS DB instance in another.
/// </para>
/// </note>
/// <para>
/// For an overview of CIDR ranges, go to the <a href="http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing">Wikipedia
/// Tutorial</a>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AuthorizeDBSecurityGroupIngress service method.</param>
///
/// <returns>The response from the AuthorizeDBSecurityGroupIngress service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.AuthorizationAlreadyExistsException">
/// The specified CIDR IP range or Amazon EC2 security group is already authorized for
/// the specified DB security group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.AuthorizationQuotaExceededException">
/// The DB security group authorization quota has been reached.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSecurityGroupNotFoundException">
/// <code>DBSecurityGroupName</code> doesn't refer to an existing DB security group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBSecurityGroupStateException">
/// The state of the DB security group doesn't allow deletion.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/AuthorizeDBSecurityGroupIngress">REST API Reference for AuthorizeDBSecurityGroupIngress Operation</seealso>
public virtual AuthorizeDBSecurityGroupIngressResponse AuthorizeDBSecurityGroupIngress(AuthorizeDBSecurityGroupIngressRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AuthorizeDBSecurityGroupIngressRequestMarshaller.Instance;
options.ResponseUnmarshaller = AuthorizeDBSecurityGroupIngressResponseUnmarshaller.Instance;
return Invoke<AuthorizeDBSecurityGroupIngressResponse>(request, options);
}
/// <summary>
/// Enables ingress to a DBSecurityGroup using one of two forms of authorization. First,
/// EC2 or VPC security groups can be added to the DBSecurityGroup if the application
/// using the database is running on EC2 or VPC instances. Second, IP ranges are available
/// if the application accessing your database is running on the Internet. Required parameters
/// for this API are one of CIDR range, EC2SecurityGroupId for VPC, or (EC2SecurityGroupOwnerId
/// and either EC2SecurityGroupName or EC2SecurityGroupId for non-VPC).
///
/// <note>
/// <para>
/// You can't authorize ingress from an EC2 security group in one AWS Region to an Amazon
/// RDS DB instance in another. You can't authorize ingress from a VPC security group
/// in one VPC to an Amazon RDS DB instance in another.
/// </para>
/// </note>
/// <para>
/// For an overview of CIDR ranges, go to the <a href="http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing">Wikipedia
/// Tutorial</a>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AuthorizeDBSecurityGroupIngress service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AuthorizeDBSecurityGroupIngress service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.AuthorizationAlreadyExistsException">
/// The specified CIDR IP range or Amazon EC2 security group is already authorized for
/// the specified DB security group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.AuthorizationQuotaExceededException">
/// The DB security group authorization quota has been reached.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSecurityGroupNotFoundException">
/// <code>DBSecurityGroupName</code> doesn't refer to an existing DB security group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBSecurityGroupStateException">
/// The state of the DB security group doesn't allow deletion.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/AuthorizeDBSecurityGroupIngress">REST API Reference for AuthorizeDBSecurityGroupIngress Operation</seealso>
public virtual Task<AuthorizeDBSecurityGroupIngressResponse> AuthorizeDBSecurityGroupIngressAsync(AuthorizeDBSecurityGroupIngressRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AuthorizeDBSecurityGroupIngressRequestMarshaller.Instance;
options.ResponseUnmarshaller = AuthorizeDBSecurityGroupIngressResponseUnmarshaller.Instance;
return InvokeAsync<AuthorizeDBSecurityGroupIngressResponse>(request, options, cancellationToken);
}
#endregion
#region BacktrackDBCluster
/// <summary>
/// Backtracks a DB cluster to a specific time, without creating a new DB cluster.
///
///
/// <para>
/// For more information on backtracking, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Managing.Backtrack.html">
/// Backtracking an Aurora DB Cluster</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora MySQL DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the BacktrackDBCluster service method.</param>
///
/// <returns>The response from the BacktrackDBCluster service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/BacktrackDBCluster">REST API Reference for BacktrackDBCluster Operation</seealso>
public virtual BacktrackDBClusterResponse BacktrackDBCluster(BacktrackDBClusterRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = BacktrackDBClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = BacktrackDBClusterResponseUnmarshaller.Instance;
return Invoke<BacktrackDBClusterResponse>(request, options);
}
/// <summary>
/// Backtracks a DB cluster to a specific time, without creating a new DB cluster.
///
///
/// <para>
/// For more information on backtracking, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Managing.Backtrack.html">
/// Backtracking an Aurora DB Cluster</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora MySQL DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the BacktrackDBCluster service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the BacktrackDBCluster service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/BacktrackDBCluster">REST API Reference for BacktrackDBCluster Operation</seealso>
public virtual Task<BacktrackDBClusterResponse> BacktrackDBClusterAsync(BacktrackDBClusterRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = BacktrackDBClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = BacktrackDBClusterResponseUnmarshaller.Instance;
return InvokeAsync<BacktrackDBClusterResponse>(request, options, cancellationToken);
}
#endregion
#region CancelExportTask
/// <summary>
/// Cancels an export task in progress that is exporting a snapshot to Amazon S3. Any
/// data that has already been written to the S3 bucket isn't removed.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CancelExportTask service method.</param>
///
/// <returns>The response from the CancelExportTask service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.ExportTaskNotFoundException">
/// The export task doesn't exist.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidExportTaskStateException">
/// You can't cancel an export task that has completed.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CancelExportTask">REST API Reference for CancelExportTask Operation</seealso>
public virtual CancelExportTaskResponse CancelExportTask(CancelExportTaskRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CancelExportTaskRequestMarshaller.Instance;
options.ResponseUnmarshaller = CancelExportTaskResponseUnmarshaller.Instance;
return Invoke<CancelExportTaskResponse>(request, options);
}
/// <summary>
/// Cancels an export task in progress that is exporting a snapshot to Amazon S3. Any
/// data that has already been written to the S3 bucket isn't removed.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CancelExportTask service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CancelExportTask service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.ExportTaskNotFoundException">
/// The export task doesn't exist.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidExportTaskStateException">
/// You can't cancel an export task that has completed.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CancelExportTask">REST API Reference for CancelExportTask Operation</seealso>
public virtual Task<CancelExportTaskResponse> CancelExportTaskAsync(CancelExportTaskRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CancelExportTaskRequestMarshaller.Instance;
options.ResponseUnmarshaller = CancelExportTaskResponseUnmarshaller.Instance;
return InvokeAsync<CancelExportTaskResponse>(request, options, cancellationToken);
}
#endregion
#region CopyDBClusterParameterGroup
/// <summary>
/// Copies the specified DB cluster parameter group.
///
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CopyDBClusterParameterGroup service method.</param>
///
/// <returns>The response from the CopyDBClusterParameterGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupAlreadyExistsException">
/// A DB parameter group with the same name exists.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB parameter
/// groups.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CopyDBClusterParameterGroup">REST API Reference for CopyDBClusterParameterGroup Operation</seealso>
public virtual CopyDBClusterParameterGroupResponse CopyDBClusterParameterGroup(CopyDBClusterParameterGroupRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CopyDBClusterParameterGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = CopyDBClusterParameterGroupResponseUnmarshaller.Instance;
return Invoke<CopyDBClusterParameterGroupResponse>(request, options);
}
/// <summary>
/// Copies the specified DB cluster parameter group.
///
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CopyDBClusterParameterGroup service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CopyDBClusterParameterGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupAlreadyExistsException">
/// A DB parameter group with the same name exists.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB parameter
/// groups.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CopyDBClusterParameterGroup">REST API Reference for CopyDBClusterParameterGroup Operation</seealso>
public virtual Task<CopyDBClusterParameterGroupResponse> CopyDBClusterParameterGroupAsync(CopyDBClusterParameterGroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CopyDBClusterParameterGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = CopyDBClusterParameterGroupResponseUnmarshaller.Instance;
return InvokeAsync<CopyDBClusterParameterGroupResponse>(request, options, cancellationToken);
}
#endregion
#region CopyDBClusterSnapshot
/// <summary>
/// Copies a snapshot of a DB cluster.
///
///
/// <para>
/// To copy a DB cluster snapshot from a shared manual DB cluster snapshot, <code>SourceDBClusterSnapshotIdentifier</code>
/// must be the Amazon Resource Name (ARN) of the shared DB cluster snapshot.
/// </para>
///
/// <para>
/// You can copy an encrypted DB cluster snapshot from another AWS Region. In that case,
/// the AWS Region where you call the <code>CopyDBClusterSnapshot</code> action is the
/// destination AWS Region for the encrypted DB cluster snapshot to be copied to. To copy
/// an encrypted DB cluster snapshot from another AWS Region, you must provide the following
/// values:
/// </para>
/// <ul> <li>
/// <para>
/// <code>KmsKeyId</code> - The AWS Key Management System (AWS KMS) key identifier for
/// the key to use to encrypt the copy of the DB cluster snapshot in the destination AWS
/// Region.
/// </para>
/// </li> <li>
/// <para>
/// <code>PreSignedUrl</code> - A URL that contains a Signature Version 4 signed request
/// for the <code>CopyDBClusterSnapshot</code> action to be called in the source AWS Region
/// where the DB cluster snapshot is copied from. The pre-signed URL must be a valid request
/// for the <code>CopyDBClusterSnapshot</code> API action that can be executed in the
/// source AWS Region that contains the encrypted DB cluster snapshot to be copied.
/// </para>
///
/// <para>
/// The pre-signed URL request must contain the following parameter values:
/// </para>
/// <ul> <li>
/// <para>
/// <code>KmsKeyId</code> - The AWS KMS key identifier for the customer master key (CMK)
/// to use to encrypt the copy of the DB cluster snapshot in the destination AWS Region.
/// This is the same identifier for both the <code>CopyDBClusterSnapshot</code> action
/// that is called in the destination AWS Region, and the action contained in the pre-signed
/// URL.
/// </para>
/// </li> <li>
/// <para>
/// <code>DestinationRegion</code> - The name of the AWS Region that the DB cluster snapshot
/// is to be created in.
/// </para>
/// </li> <li>
/// <para>
/// <code>SourceDBClusterSnapshotIdentifier</code> - The DB cluster snapshot identifier
/// for the encrypted DB cluster snapshot to be copied. This identifier must be in the
/// Amazon Resource Name (ARN) format for the source AWS Region. For example, if you are
/// copying an encrypted DB cluster snapshot from the us-west-2 AWS Region, then your
/// <code>SourceDBClusterSnapshotIdentifier</code> looks like the following example: <code>arn:aws:rds:us-west-2:123456789012:cluster-snapshot:aurora-cluster1-snapshot-20161115</code>.
/// </para>
/// </li> </ul>
/// <para>
/// To learn how to generate a Signature Version 4 signed request, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html">
/// Authenticating Requests: Using Query Parameters (AWS Signature Version 4)</a> and
/// <a href="https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html">
/// Signature Version 4 Signing Process</a>.
/// </para>
/// <note>
/// <para>
/// If you are using an AWS SDK tool or the AWS CLI, you can specify <code>SourceRegion</code>
/// (or <code>--source-region</code> for the AWS CLI) instead of specifying <code>PreSignedUrl</code>
/// manually. Specifying <code>SourceRegion</code> autogenerates a pre-signed URL that
/// is a valid request for the operation that can be executed in the source AWS Region.
/// </para>
/// </note> </li> <li>
/// <para>
/// <code>TargetDBClusterSnapshotIdentifier</code> - The identifier for the new copy
/// of the DB cluster snapshot in the destination AWS Region.
/// </para>
/// </li> <li>
/// <para>
/// <code>SourceDBClusterSnapshotIdentifier</code> - The DB cluster snapshot identifier
/// for the encrypted DB cluster snapshot to be copied. This identifier must be in the
/// ARN format for the source AWS Region and is the same value as the <code>SourceDBClusterSnapshotIdentifier</code>
/// in the pre-signed URL.
/// </para>
/// </li> </ul>
/// <para>
/// To cancel the copy operation once it is in progress, delete the target DB cluster
/// snapshot identified by <code>TargetDBClusterSnapshotIdentifier</code> while that DB
/// cluster snapshot is in "copying" status.
/// </para>
///
/// <para>
/// For more information on copying encrypted DB cluster snapshots from one AWS Region
/// to another, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_CopySnapshot.html">
/// Copying a Snapshot</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
///
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CopyDBClusterSnapshot service method.</param>
///
/// <returns>The response from the CopyDBClusterSnapshot service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterSnapshotAlreadyExistsException">
/// The user already has a DB cluster snapshot with the given identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterSnapshotNotFoundException">
/// <code>DBClusterSnapshotIdentifier</code> doesn't refer to an existing DB cluster
/// snapshot.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterSnapshotStateException">
/// The supplied value isn't a valid DB cluster snapshot state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SnapshotQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB snapshots.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CopyDBClusterSnapshot">REST API Reference for CopyDBClusterSnapshot Operation</seealso>
public virtual CopyDBClusterSnapshotResponse CopyDBClusterSnapshot(CopyDBClusterSnapshotRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CopyDBClusterSnapshotRequestMarshaller.Instance;
options.ResponseUnmarshaller = CopyDBClusterSnapshotResponseUnmarshaller.Instance;
return Invoke<CopyDBClusterSnapshotResponse>(request, options);
}
/// <summary>
/// Copies a snapshot of a DB cluster.
///
///
/// <para>
/// To copy a DB cluster snapshot from a shared manual DB cluster snapshot, <code>SourceDBClusterSnapshotIdentifier</code>
/// must be the Amazon Resource Name (ARN) of the shared DB cluster snapshot.
/// </para>
///
/// <para>
/// You can copy an encrypted DB cluster snapshot from another AWS Region. In that case,
/// the AWS Region where you call the <code>CopyDBClusterSnapshot</code> action is the
/// destination AWS Region for the encrypted DB cluster snapshot to be copied to. To copy
/// an encrypted DB cluster snapshot from another AWS Region, you must provide the following
/// values:
/// </para>
/// <ul> <li>
/// <para>
/// <code>KmsKeyId</code> - The AWS Key Management System (AWS KMS) key identifier for
/// the key to use to encrypt the copy of the DB cluster snapshot in the destination AWS
/// Region.
/// </para>
/// </li> <li>
/// <para>
/// <code>PreSignedUrl</code> - A URL that contains a Signature Version 4 signed request
/// for the <code>CopyDBClusterSnapshot</code> action to be called in the source AWS Region
/// where the DB cluster snapshot is copied from. The pre-signed URL must be a valid request
/// for the <code>CopyDBClusterSnapshot</code> API action that can be executed in the
/// source AWS Region that contains the encrypted DB cluster snapshot to be copied.
/// </para>
///
/// <para>
/// The pre-signed URL request must contain the following parameter values:
/// </para>
/// <ul> <li>
/// <para>
/// <code>KmsKeyId</code> - The AWS KMS key identifier for the customer master key (CMK)
/// to use to encrypt the copy of the DB cluster snapshot in the destination AWS Region.
/// This is the same identifier for both the <code>CopyDBClusterSnapshot</code> action
/// that is called in the destination AWS Region, and the action contained in the pre-signed
/// URL.
/// </para>
/// </li> <li>
/// <para>
/// <code>DestinationRegion</code> - The name of the AWS Region that the DB cluster snapshot
/// is to be created in.
/// </para>
/// </li> <li>
/// <para>
/// <code>SourceDBClusterSnapshotIdentifier</code> - The DB cluster snapshot identifier
/// for the encrypted DB cluster snapshot to be copied. This identifier must be in the
/// Amazon Resource Name (ARN) format for the source AWS Region. For example, if you are
/// copying an encrypted DB cluster snapshot from the us-west-2 AWS Region, then your
/// <code>SourceDBClusterSnapshotIdentifier</code> looks like the following example: <code>arn:aws:rds:us-west-2:123456789012:cluster-snapshot:aurora-cluster1-snapshot-20161115</code>.
/// </para>
/// </li> </ul>
/// <para>
/// To learn how to generate a Signature Version 4 signed request, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html">
/// Authenticating Requests: Using Query Parameters (AWS Signature Version 4)</a> and
/// <a href="https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html">
/// Signature Version 4 Signing Process</a>.
/// </para>
/// <note>
/// <para>
/// If you are using an AWS SDK tool or the AWS CLI, you can specify <code>SourceRegion</code>
/// (or <code>--source-region</code> for the AWS CLI) instead of specifying <code>PreSignedUrl</code>
/// manually. Specifying <code>SourceRegion</code> autogenerates a pre-signed URL that
/// is a valid request for the operation that can be executed in the source AWS Region.
/// </para>
/// </note> </li> <li>
/// <para>
/// <code>TargetDBClusterSnapshotIdentifier</code> - The identifier for the new copy
/// of the DB cluster snapshot in the destination AWS Region.
/// </para>
/// </li> <li>
/// <para>
/// <code>SourceDBClusterSnapshotIdentifier</code> - The DB cluster snapshot identifier
/// for the encrypted DB cluster snapshot to be copied. This identifier must be in the
/// ARN format for the source AWS Region and is the same value as the <code>SourceDBClusterSnapshotIdentifier</code>
/// in the pre-signed URL.
/// </para>
/// </li> </ul>
/// <para>
/// To cancel the copy operation once it is in progress, delete the target DB cluster
/// snapshot identified by <code>TargetDBClusterSnapshotIdentifier</code> while that DB
/// cluster snapshot is in "copying" status.
/// </para>
///
/// <para>
/// For more information on copying encrypted DB cluster snapshots from one AWS Region
/// to another, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_CopySnapshot.html">
/// Copying a Snapshot</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
///
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CopyDBClusterSnapshot service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CopyDBClusterSnapshot service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterSnapshotAlreadyExistsException">
/// The user already has a DB cluster snapshot with the given identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterSnapshotNotFoundException">
/// <code>DBClusterSnapshotIdentifier</code> doesn't refer to an existing DB cluster
/// snapshot.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterSnapshotStateException">
/// The supplied value isn't a valid DB cluster snapshot state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SnapshotQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB snapshots.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CopyDBClusterSnapshot">REST API Reference for CopyDBClusterSnapshot Operation</seealso>
public virtual Task<CopyDBClusterSnapshotResponse> CopyDBClusterSnapshotAsync(CopyDBClusterSnapshotRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CopyDBClusterSnapshotRequestMarshaller.Instance;
options.ResponseUnmarshaller = CopyDBClusterSnapshotResponseUnmarshaller.Instance;
return InvokeAsync<CopyDBClusterSnapshotResponse>(request, options, cancellationToken);
}
#endregion
#region CopyDBParameterGroup
/// <summary>
/// Copies the specified DB parameter group.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CopyDBParameterGroup service method.</param>
///
/// <returns>The response from the CopyDBParameterGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupAlreadyExistsException">
/// A DB parameter group with the same name exists.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB parameter
/// groups.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CopyDBParameterGroup">REST API Reference for CopyDBParameterGroup Operation</seealso>
public virtual CopyDBParameterGroupResponse CopyDBParameterGroup(CopyDBParameterGroupRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CopyDBParameterGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = CopyDBParameterGroupResponseUnmarshaller.Instance;
return Invoke<CopyDBParameterGroupResponse>(request, options);
}
/// <summary>
/// Copies the specified DB parameter group.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CopyDBParameterGroup service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CopyDBParameterGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupAlreadyExistsException">
/// A DB parameter group with the same name exists.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB parameter
/// groups.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CopyDBParameterGroup">REST API Reference for CopyDBParameterGroup Operation</seealso>
public virtual Task<CopyDBParameterGroupResponse> CopyDBParameterGroupAsync(CopyDBParameterGroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CopyDBParameterGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = CopyDBParameterGroupResponseUnmarshaller.Instance;
return InvokeAsync<CopyDBParameterGroupResponse>(request, options, cancellationToken);
}
#endregion
#region CopyDBSnapshot
/// <summary>
/// Copies the specified DB snapshot. The source DB snapshot must be in the <code>available</code>
/// state.
///
///
/// <para>
/// You can copy a snapshot from one AWS Region to another. In that case, the AWS Region
/// where you call the <code>CopyDBSnapshot</code> action is the destination AWS Region
/// for the DB snapshot copy.
/// </para>
///
/// <para>
/// For more information about copying snapshots, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CopySnapshot.html#USER_CopyDBSnapshot">Copying
/// a DB Snapshot</a> in the <i>Amazon RDS User Guide.</i>
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CopyDBSnapshot service method.</param>
///
/// <returns>The response from the CopyDBSnapshot service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.CustomAvailabilityZoneNotFoundException">
/// <code>CustomAvailabilityZoneId</code> doesn't refer to an existing custom Availability
/// Zone identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSnapshotAlreadyExistsException">
/// <code>DBSnapshotIdentifier</code> is already used by an existing snapshot.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSnapshotNotFoundException">
/// <code>DBSnapshotIdentifier</code> doesn't refer to an existing DB snapshot.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBSnapshotStateException">
/// The state of the DB snapshot doesn't allow deletion.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SnapshotQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB snapshots.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CopyDBSnapshot">REST API Reference for CopyDBSnapshot Operation</seealso>
public virtual CopyDBSnapshotResponse CopyDBSnapshot(CopyDBSnapshotRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CopyDBSnapshotRequestMarshaller.Instance;
options.ResponseUnmarshaller = CopyDBSnapshotResponseUnmarshaller.Instance;
return Invoke<CopyDBSnapshotResponse>(request, options);
}
/// <summary>
/// Copies the specified DB snapshot. The source DB snapshot must be in the <code>available</code>
/// state.
///
///
/// <para>
/// You can copy a snapshot from one AWS Region to another. In that case, the AWS Region
/// where you call the <code>CopyDBSnapshot</code> action is the destination AWS Region
/// for the DB snapshot copy.
/// </para>
///
/// <para>
/// For more information about copying snapshots, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CopySnapshot.html#USER_CopyDBSnapshot">Copying
/// a DB Snapshot</a> in the <i>Amazon RDS User Guide.</i>
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CopyDBSnapshot service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CopyDBSnapshot service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.CustomAvailabilityZoneNotFoundException">
/// <code>CustomAvailabilityZoneId</code> doesn't refer to an existing custom Availability
/// Zone identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSnapshotAlreadyExistsException">
/// <code>DBSnapshotIdentifier</code> is already used by an existing snapshot.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSnapshotNotFoundException">
/// <code>DBSnapshotIdentifier</code> doesn't refer to an existing DB snapshot.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBSnapshotStateException">
/// The state of the DB snapshot doesn't allow deletion.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SnapshotQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB snapshots.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CopyDBSnapshot">REST API Reference for CopyDBSnapshot Operation</seealso>
public virtual Task<CopyDBSnapshotResponse> CopyDBSnapshotAsync(CopyDBSnapshotRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CopyDBSnapshotRequestMarshaller.Instance;
options.ResponseUnmarshaller = CopyDBSnapshotResponseUnmarshaller.Instance;
return InvokeAsync<CopyDBSnapshotResponse>(request, options, cancellationToken);
}
#endregion
#region CopyOptionGroup
/// <summary>
/// Copies the specified option group.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CopyOptionGroup service method.</param>
///
/// <returns>The response from the CopyOptionGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.OptionGroupAlreadyExistsException">
/// The option group you are trying to create already exists.
/// </exception>
/// <exception cref="Amazon.RDS.Model.OptionGroupNotFoundException">
/// The specified option group could not be found.
/// </exception>
/// <exception cref="Amazon.RDS.Model.OptionGroupQuotaExceededException">
/// The quota of 20 option groups was exceeded for this AWS account.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CopyOptionGroup">REST API Reference for CopyOptionGroup Operation</seealso>
public virtual CopyOptionGroupResponse CopyOptionGroup(CopyOptionGroupRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CopyOptionGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = CopyOptionGroupResponseUnmarshaller.Instance;
return Invoke<CopyOptionGroupResponse>(request, options);
}
/// <summary>
/// Copies the specified option group.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CopyOptionGroup service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CopyOptionGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.OptionGroupAlreadyExistsException">
/// The option group you are trying to create already exists.
/// </exception>
/// <exception cref="Amazon.RDS.Model.OptionGroupNotFoundException">
/// The specified option group could not be found.
/// </exception>
/// <exception cref="Amazon.RDS.Model.OptionGroupQuotaExceededException">
/// The quota of 20 option groups was exceeded for this AWS account.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CopyOptionGroup">REST API Reference for CopyOptionGroup Operation</seealso>
public virtual Task<CopyOptionGroupResponse> CopyOptionGroupAsync(CopyOptionGroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CopyOptionGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = CopyOptionGroupResponseUnmarshaller.Instance;
return InvokeAsync<CopyOptionGroupResponse>(request, options, cancellationToken);
}
#endregion
#region CreateCustomAvailabilityZone
/// <summary>
/// Creates a custom Availability Zone (AZ).
///
///
/// <para>
/// A custom AZ is an on-premises AZ that is integrated with a VMware vSphere cluster.
/// </para>
///
/// <para>
/// For more information about RDS on VMware, see the <a href="https://docs.aws.amazon.com/AmazonRDS/latest/RDSonVMwareUserGuide/rds-on-vmware.html">
/// RDS on VMware User Guide.</a>
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateCustomAvailabilityZone service method.</param>
///
/// <returns>The response from the CreateCustomAvailabilityZone service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.CustomAvailabilityZoneAlreadyExistsException">
/// <code>CustomAvailabilityZoneName</code> is already used by an existing custom Availability
/// Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.CustomAvailabilityZoneQuotaExceededException">
/// You have exceeded the maximum number of custom Availability Zones.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateCustomAvailabilityZone">REST API Reference for CreateCustomAvailabilityZone Operation</seealso>
public virtual CreateCustomAvailabilityZoneResponse CreateCustomAvailabilityZone(CreateCustomAvailabilityZoneRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateCustomAvailabilityZoneRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateCustomAvailabilityZoneResponseUnmarshaller.Instance;
return Invoke<CreateCustomAvailabilityZoneResponse>(request, options);
}
/// <summary>
/// Creates a custom Availability Zone (AZ).
///
///
/// <para>
/// A custom AZ is an on-premises AZ that is integrated with a VMware vSphere cluster.
/// </para>
///
/// <para>
/// For more information about RDS on VMware, see the <a href="https://docs.aws.amazon.com/AmazonRDS/latest/RDSonVMwareUserGuide/rds-on-vmware.html">
/// RDS on VMware User Guide.</a>
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateCustomAvailabilityZone service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateCustomAvailabilityZone service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.CustomAvailabilityZoneAlreadyExistsException">
/// <code>CustomAvailabilityZoneName</code> is already used by an existing custom Availability
/// Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.CustomAvailabilityZoneQuotaExceededException">
/// You have exceeded the maximum number of custom Availability Zones.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateCustomAvailabilityZone">REST API Reference for CreateCustomAvailabilityZone Operation</seealso>
public virtual Task<CreateCustomAvailabilityZoneResponse> CreateCustomAvailabilityZoneAsync(CreateCustomAvailabilityZoneRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateCustomAvailabilityZoneRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateCustomAvailabilityZoneResponseUnmarshaller.Instance;
return InvokeAsync<CreateCustomAvailabilityZoneResponse>(request, options, cancellationToken);
}
#endregion
#region CreateDBCluster
/// <summary>
/// Creates a new Amazon Aurora DB cluster.
///
///
/// <para>
/// You can use the <code>ReplicationSourceIdentifier</code> parameter to create the DB
/// cluster as a read replica of another DB cluster or Amazon RDS MySQL DB instance. For
/// cross-region replication where the DB cluster identified by <code>ReplicationSourceIdentifier</code>
/// is encrypted, you must also specify the <code>PreSignedUrl</code> parameter.
/// </para>
///
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateDBCluster service method.</param>
///
/// <returns>The response from the CreateDBCluster service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterAlreadyExistsException">
/// The user already has a DB cluster with the given identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterParameterGroupNotFoundException">
/// <code>DBClusterParameterGroupName</code> doesn't refer to an existing DB cluster
/// parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterQuotaExceededException">
/// The user attempted to create a new DB cluster and the user has already reached the
/// maximum allowed DB cluster quota.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupDoesNotCoverEnoughAZsException">
/// Subnets in the DB subnet group should cover at least two Availability Zones unless
/// there is only one Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupNotFoundException">
/// <code>DBSubnetGroupName</code> doesn't refer to an existing DB subnet group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DomainNotFoundException">
/// <code>Domain</code> doesn't refer to an existing Active Directory domain.
/// </exception>
/// <exception cref="Amazon.RDS.Model.GlobalClusterNotFoundException">
/// The <code>GlobalClusterIdentifier</code> doesn't refer to an existing global database
/// cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InsufficientStorageClusterCapacityException">
/// There is insufficient storage available for the current action. You might be able
/// to resolve this error by updating your subnet group to use different Availability
/// Zones that have more storage available.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBSubnetGroupStateException">
/// The DB subnet group cannot be deleted because it's in use.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidGlobalClusterStateException">
/// The global cluster is in an invalid state and can't perform the requested operation.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidSubnetException">
/// The requested subnet is invalid, or multiple subnets were requested that are not all
/// in a common VPC.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidVPCNetworkStateException">
/// The DB subnet group doesn't cover all Availability Zones after it's created because
/// of users' change.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageQuotaExceededException">
/// The request would result in the user exceeding the allowed amount of storage available
/// across all DB instances.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBCluster">REST API Reference for CreateDBCluster Operation</seealso>
public virtual CreateDBClusterResponse CreateDBCluster(CreateDBClusterRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateDBClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateDBClusterResponseUnmarshaller.Instance;
return Invoke<CreateDBClusterResponse>(request, options);
}
/// <summary>
/// Creates a new Amazon Aurora DB cluster.
///
///
/// <para>
/// You can use the <code>ReplicationSourceIdentifier</code> parameter to create the DB
/// cluster as a read replica of another DB cluster or Amazon RDS MySQL DB instance. For
/// cross-region replication where the DB cluster identified by <code>ReplicationSourceIdentifier</code>
/// is encrypted, you must also specify the <code>PreSignedUrl</code> parameter.
/// </para>
///
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateDBCluster service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateDBCluster service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterAlreadyExistsException">
/// The user already has a DB cluster with the given identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterParameterGroupNotFoundException">
/// <code>DBClusterParameterGroupName</code> doesn't refer to an existing DB cluster
/// parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterQuotaExceededException">
/// The user attempted to create a new DB cluster and the user has already reached the
/// maximum allowed DB cluster quota.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupDoesNotCoverEnoughAZsException">
/// Subnets in the DB subnet group should cover at least two Availability Zones unless
/// there is only one Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupNotFoundException">
/// <code>DBSubnetGroupName</code> doesn't refer to an existing DB subnet group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DomainNotFoundException">
/// <code>Domain</code> doesn't refer to an existing Active Directory domain.
/// </exception>
/// <exception cref="Amazon.RDS.Model.GlobalClusterNotFoundException">
/// The <code>GlobalClusterIdentifier</code> doesn't refer to an existing global database
/// cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InsufficientStorageClusterCapacityException">
/// There is insufficient storage available for the current action. You might be able
/// to resolve this error by updating your subnet group to use different Availability
/// Zones that have more storage available.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBSubnetGroupStateException">
/// The DB subnet group cannot be deleted because it's in use.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidGlobalClusterStateException">
/// The global cluster is in an invalid state and can't perform the requested operation.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidSubnetException">
/// The requested subnet is invalid, or multiple subnets were requested that are not all
/// in a common VPC.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidVPCNetworkStateException">
/// The DB subnet group doesn't cover all Availability Zones after it's created because
/// of users' change.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageQuotaExceededException">
/// The request would result in the user exceeding the allowed amount of storage available
/// across all DB instances.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBCluster">REST API Reference for CreateDBCluster Operation</seealso>
public virtual Task<CreateDBClusterResponse> CreateDBClusterAsync(CreateDBClusterRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateDBClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateDBClusterResponseUnmarshaller.Instance;
return InvokeAsync<CreateDBClusterResponse>(request, options, cancellationToken);
}
#endregion
#region CreateDBClusterEndpoint
/// <summary>
/// Creates a new custom endpoint and associates it with an Amazon Aurora DB cluster.
///
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateDBClusterEndpoint service method.</param>
///
/// <returns>The response from the CreateDBClusterEndpoint service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterEndpointAlreadyExistsException">
/// The specified custom endpoint can't be created because it already exists.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterEndpointQuotaExceededException">
/// The cluster already has the maximum number of custom endpoints.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBClusterEndpoint">REST API Reference for CreateDBClusterEndpoint Operation</seealso>
public virtual CreateDBClusterEndpointResponse CreateDBClusterEndpoint(CreateDBClusterEndpointRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateDBClusterEndpointRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateDBClusterEndpointResponseUnmarshaller.Instance;
return Invoke<CreateDBClusterEndpointResponse>(request, options);
}
/// <summary>
/// Creates a new custom endpoint and associates it with an Amazon Aurora DB cluster.
///
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateDBClusterEndpoint service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateDBClusterEndpoint service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterEndpointAlreadyExistsException">
/// The specified custom endpoint can't be created because it already exists.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterEndpointQuotaExceededException">
/// The cluster already has the maximum number of custom endpoints.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBClusterEndpoint">REST API Reference for CreateDBClusterEndpoint Operation</seealso>
public virtual Task<CreateDBClusterEndpointResponse> CreateDBClusterEndpointAsync(CreateDBClusterEndpointRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateDBClusterEndpointRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateDBClusterEndpointResponseUnmarshaller.Instance;
return InvokeAsync<CreateDBClusterEndpointResponse>(request, options, cancellationToken);
}
#endregion
#region CreateDBClusterParameterGroup
/// <summary>
/// Creates a new DB cluster parameter group.
///
///
/// <para>
/// Parameters in a DB cluster parameter group apply to all of the instances in a DB cluster.
/// </para>
///
/// <para>
/// A DB cluster parameter group is initially created with the default parameters for
/// the database engine used by instances in the DB cluster. To provide custom values
/// for any of the parameters, you must modify the group after creating it using <code>ModifyDBClusterParameterGroup</code>.
/// Once you've created a DB cluster parameter group, you need to associate it with your
/// DB cluster using <code>ModifyDBCluster</code>. When you associate a new DB cluster
/// parameter group with a running DB cluster, you need to reboot the DB instances in
/// the DB cluster without failover for the new DB cluster parameter group and associated
/// settings to take effect.
/// </para>
/// <important>
/// <para>
/// After you create a DB cluster parameter group, you should wait at least 5 minutes
/// before creating your first DB cluster that uses that DB cluster parameter group as
/// the default parameter group. This allows Amazon RDS to fully complete the create action
/// before the DB cluster parameter group is used as the default for a new DB cluster.
/// This is especially important for parameters that are critical when creating the default
/// database for a DB cluster, such as the character set for the default database defined
/// by the <code>character_set_database</code> parameter. You can use the <i>Parameter
/// Groups</i> option of the <a href="https://console.aws.amazon.com/rds/">Amazon RDS
/// console</a> or the <code>DescribeDBClusterParameters</code> action to verify that
/// your DB cluster parameter group has been created or modified.
/// </para>
/// </important>
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateDBClusterParameterGroup service method.</param>
///
/// <returns>The response from the CreateDBClusterParameterGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupAlreadyExistsException">
/// A DB parameter group with the same name exists.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB parameter
/// groups.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBClusterParameterGroup">REST API Reference for CreateDBClusterParameterGroup Operation</seealso>
public virtual CreateDBClusterParameterGroupResponse CreateDBClusterParameterGroup(CreateDBClusterParameterGroupRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateDBClusterParameterGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateDBClusterParameterGroupResponseUnmarshaller.Instance;
return Invoke<CreateDBClusterParameterGroupResponse>(request, options);
}
/// <summary>
/// Creates a new DB cluster parameter group.
///
///
/// <para>
/// Parameters in a DB cluster parameter group apply to all of the instances in a DB cluster.
/// </para>
///
/// <para>
/// A DB cluster parameter group is initially created with the default parameters for
/// the database engine used by instances in the DB cluster. To provide custom values
/// for any of the parameters, you must modify the group after creating it using <code>ModifyDBClusterParameterGroup</code>.
/// Once you've created a DB cluster parameter group, you need to associate it with your
/// DB cluster using <code>ModifyDBCluster</code>. When you associate a new DB cluster
/// parameter group with a running DB cluster, you need to reboot the DB instances in
/// the DB cluster without failover for the new DB cluster parameter group and associated
/// settings to take effect.
/// </para>
/// <important>
/// <para>
/// After you create a DB cluster parameter group, you should wait at least 5 minutes
/// before creating your first DB cluster that uses that DB cluster parameter group as
/// the default parameter group. This allows Amazon RDS to fully complete the create action
/// before the DB cluster parameter group is used as the default for a new DB cluster.
/// This is especially important for parameters that are critical when creating the default
/// database for a DB cluster, such as the character set for the default database defined
/// by the <code>character_set_database</code> parameter. You can use the <i>Parameter
/// Groups</i> option of the <a href="https://console.aws.amazon.com/rds/">Amazon RDS
/// console</a> or the <code>DescribeDBClusterParameters</code> action to verify that
/// your DB cluster parameter group has been created or modified.
/// </para>
/// </important>
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateDBClusterParameterGroup service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateDBClusterParameterGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupAlreadyExistsException">
/// A DB parameter group with the same name exists.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB parameter
/// groups.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBClusterParameterGroup">REST API Reference for CreateDBClusterParameterGroup Operation</seealso>
public virtual Task<CreateDBClusterParameterGroupResponse> CreateDBClusterParameterGroupAsync(CreateDBClusterParameterGroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateDBClusterParameterGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateDBClusterParameterGroupResponseUnmarshaller.Instance;
return InvokeAsync<CreateDBClusterParameterGroupResponse>(request, options, cancellationToken);
}
#endregion
#region CreateDBClusterSnapshot
/// <summary>
/// Creates a snapshot of a DB cluster. For more information on Amazon Aurora, see <a
/// href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
///
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateDBClusterSnapshot service method.</param>
///
/// <returns>The response from the CreateDBClusterSnapshot service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterSnapshotAlreadyExistsException">
/// The user already has a DB cluster snapshot with the given identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterSnapshotStateException">
/// The supplied value isn't a valid DB cluster snapshot state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SnapshotQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB snapshots.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBClusterSnapshot">REST API Reference for CreateDBClusterSnapshot Operation</seealso>
public virtual CreateDBClusterSnapshotResponse CreateDBClusterSnapshot(CreateDBClusterSnapshotRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateDBClusterSnapshotRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateDBClusterSnapshotResponseUnmarshaller.Instance;
return Invoke<CreateDBClusterSnapshotResponse>(request, options);
}
/// <summary>
/// Creates a snapshot of a DB cluster. For more information on Amazon Aurora, see <a
/// href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
///
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateDBClusterSnapshot service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateDBClusterSnapshot service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterSnapshotAlreadyExistsException">
/// The user already has a DB cluster snapshot with the given identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterSnapshotStateException">
/// The supplied value isn't a valid DB cluster snapshot state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SnapshotQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB snapshots.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBClusterSnapshot">REST API Reference for CreateDBClusterSnapshot Operation</seealso>
public virtual Task<CreateDBClusterSnapshotResponse> CreateDBClusterSnapshotAsync(CreateDBClusterSnapshotRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateDBClusterSnapshotRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateDBClusterSnapshotResponseUnmarshaller.Instance;
return InvokeAsync<CreateDBClusterSnapshotResponse>(request, options, cancellationToken);
}
#endregion
#region CreateDBInstance
/// <summary>
/// Creates a new DB instance.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateDBInstance service method.</param>
///
/// <returns>The response from the CreateDBInstance service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.AuthorizationNotFoundException">
/// The specified CIDR IP range or Amazon EC2 security group might not be authorized for
/// the specified DB security group.
///
///
/// <para>
/// Or, RDS might not be authorized to perform necessary actions using IAM on your behalf.
/// </para>
/// </exception>
/// <exception cref="Amazon.RDS.Model.BackupPolicyNotFoundException">
///
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceAlreadyExistsException">
/// The user already has a DB instance with the given identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSecurityGroupNotFoundException">
/// <code>DBSecurityGroupName</code> doesn't refer to an existing DB security group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupDoesNotCoverEnoughAZsException">
/// Subnets in the DB subnet group should cover at least two Availability Zones unless
/// there is only one Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupNotFoundException">
/// <code>DBSubnetGroupName</code> doesn't refer to an existing DB subnet group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DomainNotFoundException">
/// <code>Domain</code> doesn't refer to an existing Active Directory domain.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InstanceQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB instances.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InsufficientDBInstanceCapacityException">
/// The specified DB instance class isn't available in the specified Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidSubnetException">
/// The requested subnet is invalid, or multiple subnets were requested that are not all
/// in a common VPC.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidVPCNetworkStateException">
/// The DB subnet group doesn't cover all Availability Zones after it's created because
/// of users' change.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <exception cref="Amazon.RDS.Model.OptionGroupNotFoundException">
/// The specified option group could not be found.
/// </exception>
/// <exception cref="Amazon.RDS.Model.ProvisionedIopsNotAvailableInAZException">
/// Provisioned IOPS not available in the specified Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageQuotaExceededException">
/// The request would result in the user exceeding the allowed amount of storage available
/// across all DB instances.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageTypeNotSupportedException">
/// Storage of the <code>StorageType</code> specified can't be associated with the DB
/// instance.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBInstance">REST API Reference for CreateDBInstance Operation</seealso>
public virtual CreateDBInstanceResponse CreateDBInstance(CreateDBInstanceRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateDBInstanceRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateDBInstanceResponseUnmarshaller.Instance;
return Invoke<CreateDBInstanceResponse>(request, options);
}
/// <summary>
/// Creates a new DB instance.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateDBInstance service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateDBInstance service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.AuthorizationNotFoundException">
/// The specified CIDR IP range or Amazon EC2 security group might not be authorized for
/// the specified DB security group.
///
///
/// <para>
/// Or, RDS might not be authorized to perform necessary actions using IAM on your behalf.
/// </para>
/// </exception>
/// <exception cref="Amazon.RDS.Model.BackupPolicyNotFoundException">
///
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceAlreadyExistsException">
/// The user already has a DB instance with the given identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSecurityGroupNotFoundException">
/// <code>DBSecurityGroupName</code> doesn't refer to an existing DB security group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupDoesNotCoverEnoughAZsException">
/// Subnets in the DB subnet group should cover at least two Availability Zones unless
/// there is only one Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupNotFoundException">
/// <code>DBSubnetGroupName</code> doesn't refer to an existing DB subnet group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DomainNotFoundException">
/// <code>Domain</code> doesn't refer to an existing Active Directory domain.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InstanceQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB instances.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InsufficientDBInstanceCapacityException">
/// The specified DB instance class isn't available in the specified Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidSubnetException">
/// The requested subnet is invalid, or multiple subnets were requested that are not all
/// in a common VPC.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidVPCNetworkStateException">
/// The DB subnet group doesn't cover all Availability Zones after it's created because
/// of users' change.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <exception cref="Amazon.RDS.Model.OptionGroupNotFoundException">
/// The specified option group could not be found.
/// </exception>
/// <exception cref="Amazon.RDS.Model.ProvisionedIopsNotAvailableInAZException">
/// Provisioned IOPS not available in the specified Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageQuotaExceededException">
/// The request would result in the user exceeding the allowed amount of storage available
/// across all DB instances.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageTypeNotSupportedException">
/// Storage of the <code>StorageType</code> specified can't be associated with the DB
/// instance.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBInstance">REST API Reference for CreateDBInstance Operation</seealso>
public virtual Task<CreateDBInstanceResponse> CreateDBInstanceAsync(CreateDBInstanceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateDBInstanceRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateDBInstanceResponseUnmarshaller.Instance;
return InvokeAsync<CreateDBInstanceResponse>(request, options, cancellationToken);
}
#endregion
#region CreateDBInstanceReadReplica
/// <summary>
/// Creates a new DB instance that acts as a read replica for an existing source DB instance.
/// You can create a read replica for a DB instance running MySQL, MariaDB, Oracle, PostgreSQL,
/// or SQL Server. For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReadRepl.html">Working
/// with Read Replicas</a> in the <i>Amazon RDS User Guide</i>.
///
///
/// <para>
/// Amazon Aurora doesn't support this action. Call the <code>CreateDBInstance</code>
/// action to create a DB instance for an Aurora DB cluster.
/// </para>
///
/// <para>
/// All read replica DB instances are created with backups disabled. All other DB instance
/// attributes (including DB security groups and DB parameter groups) are inherited from
/// the source DB instance, except as specified.
/// </para>
/// <important>
/// <para>
/// Your source DB instance must have backup retention enabled.
/// </para>
/// </important>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateDBInstanceReadReplica service method.</param>
///
/// <returns>The response from the CreateDBInstanceReadReplica service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBInstanceAlreadyExistsException">
/// The user already has a DB instance with the given identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSecurityGroupNotFoundException">
/// <code>DBSecurityGroupName</code> doesn't refer to an existing DB security group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupDoesNotCoverEnoughAZsException">
/// Subnets in the DB subnet group should cover at least two Availability Zones unless
/// there is only one Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupNotAllowedException">
/// The DBSubnetGroup shouldn't be specified while creating read replicas that lie in
/// the same region as the source instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupNotFoundException">
/// <code>DBSubnetGroupName</code> doesn't refer to an existing DB subnet group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DomainNotFoundException">
/// <code>Domain</code> doesn't refer to an existing Active Directory domain.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InstanceQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB instances.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InsufficientDBInstanceCapacityException">
/// The specified DB instance class isn't available in the specified Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBSubnetGroupException">
/// The DBSubnetGroup doesn't belong to the same VPC as that of an existing cross-region
/// read replica of the same source instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidSubnetException">
/// The requested subnet is invalid, or multiple subnets were requested that are not all
/// in a common VPC.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidVPCNetworkStateException">
/// The DB subnet group doesn't cover all Availability Zones after it's created because
/// of users' change.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <exception cref="Amazon.RDS.Model.OptionGroupNotFoundException">
/// The specified option group could not be found.
/// </exception>
/// <exception cref="Amazon.RDS.Model.ProvisionedIopsNotAvailableInAZException">
/// Provisioned IOPS not available in the specified Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageQuotaExceededException">
/// The request would result in the user exceeding the allowed amount of storage available
/// across all DB instances.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageTypeNotSupportedException">
/// Storage of the <code>StorageType</code> specified can't be associated with the DB
/// instance.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBInstanceReadReplica">REST API Reference for CreateDBInstanceReadReplica Operation</seealso>
public virtual CreateDBInstanceReadReplicaResponse CreateDBInstanceReadReplica(CreateDBInstanceReadReplicaRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateDBInstanceReadReplicaRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateDBInstanceReadReplicaResponseUnmarshaller.Instance;
return Invoke<CreateDBInstanceReadReplicaResponse>(request, options);
}
/// <summary>
/// Creates a new DB instance that acts as a read replica for an existing source DB instance.
/// You can create a read replica for a DB instance running MySQL, MariaDB, Oracle, PostgreSQL,
/// or SQL Server. For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReadRepl.html">Working
/// with Read Replicas</a> in the <i>Amazon RDS User Guide</i>.
///
///
/// <para>
/// Amazon Aurora doesn't support this action. Call the <code>CreateDBInstance</code>
/// action to create a DB instance for an Aurora DB cluster.
/// </para>
///
/// <para>
/// All read replica DB instances are created with backups disabled. All other DB instance
/// attributes (including DB security groups and DB parameter groups) are inherited from
/// the source DB instance, except as specified.
/// </para>
/// <important>
/// <para>
/// Your source DB instance must have backup retention enabled.
/// </para>
/// </important>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateDBInstanceReadReplica service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateDBInstanceReadReplica service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBInstanceAlreadyExistsException">
/// The user already has a DB instance with the given identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSecurityGroupNotFoundException">
/// <code>DBSecurityGroupName</code> doesn't refer to an existing DB security group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupDoesNotCoverEnoughAZsException">
/// Subnets in the DB subnet group should cover at least two Availability Zones unless
/// there is only one Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupNotAllowedException">
/// The DBSubnetGroup shouldn't be specified while creating read replicas that lie in
/// the same region as the source instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupNotFoundException">
/// <code>DBSubnetGroupName</code> doesn't refer to an existing DB subnet group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DomainNotFoundException">
/// <code>Domain</code> doesn't refer to an existing Active Directory domain.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InstanceQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB instances.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InsufficientDBInstanceCapacityException">
/// The specified DB instance class isn't available in the specified Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBSubnetGroupException">
/// The DBSubnetGroup doesn't belong to the same VPC as that of an existing cross-region
/// read replica of the same source instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidSubnetException">
/// The requested subnet is invalid, or multiple subnets were requested that are not all
/// in a common VPC.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidVPCNetworkStateException">
/// The DB subnet group doesn't cover all Availability Zones after it's created because
/// of users' change.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <exception cref="Amazon.RDS.Model.OptionGroupNotFoundException">
/// The specified option group could not be found.
/// </exception>
/// <exception cref="Amazon.RDS.Model.ProvisionedIopsNotAvailableInAZException">
/// Provisioned IOPS not available in the specified Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageQuotaExceededException">
/// The request would result in the user exceeding the allowed amount of storage available
/// across all DB instances.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageTypeNotSupportedException">
/// Storage of the <code>StorageType</code> specified can't be associated with the DB
/// instance.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBInstanceReadReplica">REST API Reference for CreateDBInstanceReadReplica Operation</seealso>
public virtual Task<CreateDBInstanceReadReplicaResponse> CreateDBInstanceReadReplicaAsync(CreateDBInstanceReadReplicaRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateDBInstanceReadReplicaRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateDBInstanceReadReplicaResponseUnmarshaller.Instance;
return InvokeAsync<CreateDBInstanceReadReplicaResponse>(request, options, cancellationToken);
}
#endregion
#region CreateDBParameterGroup
/// <summary>
/// Creates a new DB parameter group.
///
///
/// <para>
/// A DB parameter group is initially created with the default parameters for the database
/// engine used by the DB instance. To provide custom values for any of the parameters,
/// you must modify the group after creating it using <i>ModifyDBParameterGroup</i>. Once
/// you've created a DB parameter group, you need to associate it with your DB instance
/// using <i>ModifyDBInstance</i>. When you associate a new DB parameter group with a
/// running DB instance, you need to reboot the DB instance without failover for the new
/// DB parameter group and associated settings to take effect.
/// </para>
/// <important>
/// <para>
/// After you create a DB parameter group, you should wait at least 5 minutes before creating
/// your first DB instance that uses that DB parameter group as the default parameter
/// group. This allows Amazon RDS to fully complete the create action before the parameter
/// group is used as the default for a new DB instance. This is especially important for
/// parameters that are critical when creating the default database for a DB instance,
/// such as the character set for the default database defined by the <code>character_set_database</code>
/// parameter. You can use the <i>Parameter Groups</i> option of the <a href="https://console.aws.amazon.com/rds/">Amazon
/// RDS console</a> or the <i>DescribeDBParameters</i> command to verify that your DB
/// parameter group has been created or modified.
/// </para>
/// </important>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateDBParameterGroup service method.</param>
///
/// <returns>The response from the CreateDBParameterGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupAlreadyExistsException">
/// A DB parameter group with the same name exists.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB parameter
/// groups.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBParameterGroup">REST API Reference for CreateDBParameterGroup Operation</seealso>
public virtual CreateDBParameterGroupResponse CreateDBParameterGroup(CreateDBParameterGroupRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateDBParameterGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateDBParameterGroupResponseUnmarshaller.Instance;
return Invoke<CreateDBParameterGroupResponse>(request, options);
}
/// <summary>
/// Creates a new DB parameter group.
///
///
/// <para>
/// A DB parameter group is initially created with the default parameters for the database
/// engine used by the DB instance. To provide custom values for any of the parameters,
/// you must modify the group after creating it using <i>ModifyDBParameterGroup</i>. Once
/// you've created a DB parameter group, you need to associate it with your DB instance
/// using <i>ModifyDBInstance</i>. When you associate a new DB parameter group with a
/// running DB instance, you need to reboot the DB instance without failover for the new
/// DB parameter group and associated settings to take effect.
/// </para>
/// <important>
/// <para>
/// After you create a DB parameter group, you should wait at least 5 minutes before creating
/// your first DB instance that uses that DB parameter group as the default parameter
/// group. This allows Amazon RDS to fully complete the create action before the parameter
/// group is used as the default for a new DB instance. This is especially important for
/// parameters that are critical when creating the default database for a DB instance,
/// such as the character set for the default database defined by the <code>character_set_database</code>
/// parameter. You can use the <i>Parameter Groups</i> option of the <a href="https://console.aws.amazon.com/rds/">Amazon
/// RDS console</a> or the <i>DescribeDBParameters</i> command to verify that your DB
/// parameter group has been created or modified.
/// </para>
/// </important>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateDBParameterGroup service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateDBParameterGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupAlreadyExistsException">
/// A DB parameter group with the same name exists.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB parameter
/// groups.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBParameterGroup">REST API Reference for CreateDBParameterGroup Operation</seealso>
public virtual Task<CreateDBParameterGroupResponse> CreateDBParameterGroupAsync(CreateDBParameterGroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateDBParameterGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateDBParameterGroupResponseUnmarshaller.Instance;
return InvokeAsync<CreateDBParameterGroupResponse>(request, options, cancellationToken);
}
#endregion
#region CreateDBProxy
/// <summary>
/// Creates a new DB proxy.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateDBProxy service method.</param>
///
/// <returns>The response from the CreateDBProxy service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBProxyAlreadyExistsException">
/// The specified proxy name must be unique for all proxies owned by your AWS account
/// in the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyQuotaExceededException">
/// Your AWS account already has the maximum number of proxies in the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidSubnetException">
/// The requested subnet is invalid, or multiple subnets were requested that are not all
/// in a common VPC.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBProxy">REST API Reference for CreateDBProxy Operation</seealso>
public virtual CreateDBProxyResponse CreateDBProxy(CreateDBProxyRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateDBProxyRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateDBProxyResponseUnmarshaller.Instance;
return Invoke<CreateDBProxyResponse>(request, options);
}
/// <summary>
/// Creates a new DB proxy.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateDBProxy service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateDBProxy service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBProxyAlreadyExistsException">
/// The specified proxy name must be unique for all proxies owned by your AWS account
/// in the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyQuotaExceededException">
/// Your AWS account already has the maximum number of proxies in the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidSubnetException">
/// The requested subnet is invalid, or multiple subnets were requested that are not all
/// in a common VPC.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBProxy">REST API Reference for CreateDBProxy Operation</seealso>
public virtual Task<CreateDBProxyResponse> CreateDBProxyAsync(CreateDBProxyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateDBProxyRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateDBProxyResponseUnmarshaller.Instance;
return InvokeAsync<CreateDBProxyResponse>(request, options, cancellationToken);
}
#endregion
#region CreateDBProxyEndpoint
/// <summary>
/// Creates a <code>DBProxyEndpoint</code>. Only applies to proxies that are associated
/// with Aurora DB clusters. You can use DB proxy endpoints to specify read/write or read-only
/// access to the DB cluster. You can also use DB proxy endpoints to access a DB proxy
/// through a different VPC than the proxy's default VPC.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateDBProxyEndpoint service method.</param>
///
/// <returns>The response from the CreateDBProxyEndpoint service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBProxyEndpointAlreadyExistsException">
/// The specified DB proxy endpoint name must be unique for all DB proxy endpoints owned
/// by your AWS account in the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyEndpointQuotaExceededException">
/// The DB proxy already has the maximum number of endpoints.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyNotFoundException">
/// The specified proxy name doesn't correspond to a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBProxyStateException">
/// The requested operation can't be performed while the proxy is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidSubnetException">
/// The requested subnet is invalid, or multiple subnets were requested that are not all
/// in a common VPC.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBProxyEndpoint">REST API Reference for CreateDBProxyEndpoint Operation</seealso>
public virtual CreateDBProxyEndpointResponse CreateDBProxyEndpoint(CreateDBProxyEndpointRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateDBProxyEndpointRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateDBProxyEndpointResponseUnmarshaller.Instance;
return Invoke<CreateDBProxyEndpointResponse>(request, options);
}
/// <summary>
/// Creates a <code>DBProxyEndpoint</code>. Only applies to proxies that are associated
/// with Aurora DB clusters. You can use DB proxy endpoints to specify read/write or read-only
/// access to the DB cluster. You can also use DB proxy endpoints to access a DB proxy
/// through a different VPC than the proxy's default VPC.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateDBProxyEndpoint service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateDBProxyEndpoint service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBProxyEndpointAlreadyExistsException">
/// The specified DB proxy endpoint name must be unique for all DB proxy endpoints owned
/// by your AWS account in the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyEndpointQuotaExceededException">
/// The DB proxy already has the maximum number of endpoints.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyNotFoundException">
/// The specified proxy name doesn't correspond to a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBProxyStateException">
/// The requested operation can't be performed while the proxy is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidSubnetException">
/// The requested subnet is invalid, or multiple subnets were requested that are not all
/// in a common VPC.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBProxyEndpoint">REST API Reference for CreateDBProxyEndpoint Operation</seealso>
public virtual Task<CreateDBProxyEndpointResponse> CreateDBProxyEndpointAsync(CreateDBProxyEndpointRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateDBProxyEndpointRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateDBProxyEndpointResponseUnmarshaller.Instance;
return InvokeAsync<CreateDBProxyEndpointResponse>(request, options, cancellationToken);
}
#endregion
#region CreateDBSecurityGroup
/// <summary>
/// Creates a new DB security group. DB security groups control access to a DB instance.
///
/// <note>
/// <para>
/// A DB security group controls access to EC2-Classic DB instances that are not in a
/// VPC.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateDBSecurityGroup service method.</param>
///
/// <returns>The response from the CreateDBSecurityGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBSecurityGroupAlreadyExistsException">
/// A DB security group with the name specified in <code>DBSecurityGroupName</code> already
/// exists.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSecurityGroupNotSupportedException">
/// A DB security group isn't allowed for this action.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSecurityGroupQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB security groups.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBSecurityGroup">REST API Reference for CreateDBSecurityGroup Operation</seealso>
public virtual CreateDBSecurityGroupResponse CreateDBSecurityGroup(CreateDBSecurityGroupRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateDBSecurityGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateDBSecurityGroupResponseUnmarshaller.Instance;
return Invoke<CreateDBSecurityGroupResponse>(request, options);
}
/// <summary>
/// Creates a new DB security group. DB security groups control access to a DB instance.
///
/// <note>
/// <para>
/// A DB security group controls access to EC2-Classic DB instances that are not in a
/// VPC.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateDBSecurityGroup service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateDBSecurityGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBSecurityGroupAlreadyExistsException">
/// A DB security group with the name specified in <code>DBSecurityGroupName</code> already
/// exists.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSecurityGroupNotSupportedException">
/// A DB security group isn't allowed for this action.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSecurityGroupQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB security groups.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBSecurityGroup">REST API Reference for CreateDBSecurityGroup Operation</seealso>
public virtual Task<CreateDBSecurityGroupResponse> CreateDBSecurityGroupAsync(CreateDBSecurityGroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateDBSecurityGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateDBSecurityGroupResponseUnmarshaller.Instance;
return InvokeAsync<CreateDBSecurityGroupResponse>(request, options, cancellationToken);
}
#endregion
#region CreateDBSnapshot
/// <summary>
/// Creates a snapshot of a DB instance. The source DB instance must be in the <code>available</code>
/// or <code>storage-optimization</code> state.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateDBSnapshot service method.</param>
///
/// <returns>The response from the CreateDBSnapshot service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSnapshotAlreadyExistsException">
/// <code>DBSnapshotIdentifier</code> is already used by an existing snapshot.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SnapshotQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB snapshots.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBSnapshot">REST API Reference for CreateDBSnapshot Operation</seealso>
public virtual CreateDBSnapshotResponse CreateDBSnapshot(CreateDBSnapshotRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateDBSnapshotRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateDBSnapshotResponseUnmarshaller.Instance;
return Invoke<CreateDBSnapshotResponse>(request, options);
}
/// <summary>
/// Creates a snapshot of a DB instance. The source DB instance must be in the <code>available</code>
/// or <code>storage-optimization</code> state.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateDBSnapshot service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateDBSnapshot service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSnapshotAlreadyExistsException">
/// <code>DBSnapshotIdentifier</code> is already used by an existing snapshot.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SnapshotQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB snapshots.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBSnapshot">REST API Reference for CreateDBSnapshot Operation</seealso>
public virtual Task<CreateDBSnapshotResponse> CreateDBSnapshotAsync(CreateDBSnapshotRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateDBSnapshotRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateDBSnapshotResponseUnmarshaller.Instance;
return InvokeAsync<CreateDBSnapshotResponse>(request, options, cancellationToken);
}
#endregion
#region CreateDBSubnetGroup
/// <summary>
/// Creates a new DB subnet group. DB subnet groups must contain at least one subnet in
/// at least two AZs in the AWS Region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateDBSubnetGroup service method.</param>
///
/// <returns>The response from the CreateDBSubnetGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupAlreadyExistsException">
/// <code>DBSubnetGroupName</code> is already used by an existing DB subnet group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupDoesNotCoverEnoughAZsException">
/// Subnets in the DB subnet group should cover at least two Availability Zones unless
/// there is only one Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB subnet groups.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetQuotaExceededException">
/// The request would result in the user exceeding the allowed number of subnets in a
/// DB subnet groups.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidSubnetException">
/// The requested subnet is invalid, or multiple subnets were requested that are not all
/// in a common VPC.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBSubnetGroup">REST API Reference for CreateDBSubnetGroup Operation</seealso>
public virtual CreateDBSubnetGroupResponse CreateDBSubnetGroup(CreateDBSubnetGroupRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateDBSubnetGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateDBSubnetGroupResponseUnmarshaller.Instance;
return Invoke<CreateDBSubnetGroupResponse>(request, options);
}
/// <summary>
/// Creates a new DB subnet group. DB subnet groups must contain at least one subnet in
/// at least two AZs in the AWS Region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateDBSubnetGroup service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateDBSubnetGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupAlreadyExistsException">
/// <code>DBSubnetGroupName</code> is already used by an existing DB subnet group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupDoesNotCoverEnoughAZsException">
/// Subnets in the DB subnet group should cover at least two Availability Zones unless
/// there is only one Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB subnet groups.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetQuotaExceededException">
/// The request would result in the user exceeding the allowed number of subnets in a
/// DB subnet groups.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidSubnetException">
/// The requested subnet is invalid, or multiple subnets were requested that are not all
/// in a common VPC.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBSubnetGroup">REST API Reference for CreateDBSubnetGroup Operation</seealso>
public virtual Task<CreateDBSubnetGroupResponse> CreateDBSubnetGroupAsync(CreateDBSubnetGroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateDBSubnetGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateDBSubnetGroupResponseUnmarshaller.Instance;
return InvokeAsync<CreateDBSubnetGroupResponse>(request, options, cancellationToken);
}
#endregion
#region CreateEventSubscription
/// <summary>
/// Creates an RDS event notification subscription. This action requires a topic Amazon
/// Resource Name (ARN) created by either the RDS console, the SNS console, or the SNS
/// API. To obtain an ARN with SNS, you must create a topic in Amazon SNS and subscribe
/// to the topic. The ARN is displayed in the SNS console.
///
///
/// <para>
/// You can specify the type of source (<code>SourceType</code>) that you want to be notified
/// of and provide a list of RDS sources (<code>SourceIds</code>) that triggers the events.
/// You can also provide a list of event categories (<code>EventCategories</code>) for
/// events that you want to be notified of. For example, you can specify <code>SourceType</code>
/// = <code>db-instance</code>, <code>SourceIds</code> = <code>mydbinstance1</code>, <code>mydbinstance2</code>
/// and <code>EventCategories</code> = <code>Availability</code>, <code>Backup</code>.
/// </para>
///
/// <para>
/// If you specify both the <code>SourceType</code> and <code>SourceIds</code>, such as
/// <code>SourceType</code> = <code>db-instance</code> and <code>SourceIdentifier</code>
/// = <code>myDBInstance1</code>, you are notified of all the <code>db-instance</code>
/// events for the specified source. If you specify a <code>SourceType</code> but do not
/// specify a <code>SourceIdentifier</code>, you receive notice of the events for that
/// source type for all your RDS sources. If you don't specify either the SourceType or
/// the <code>SourceIdentifier</code>, you are notified of events generated from all RDS
/// sources belonging to your customer account.
/// </para>
/// <note>
/// <para>
/// RDS event notification is only available for unencrypted SNS topics. If you specify
/// an encrypted SNS topic, event notifications aren't sent for the topic.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateEventSubscription service method.</param>
///
/// <returns>The response from the CreateEventSubscription service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.EventSubscriptionQuotaExceededException">
/// You have reached the maximum number of event subscriptions.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SNSInvalidTopicException">
/// SNS has responded that there is a problem with the SND topic specified.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SNSNoAuthorizationException">
/// You do not have permission to publish to the SNS topic ARN.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SNSTopicArnNotFoundException">
/// The SNS topic ARN does not exist.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SourceNotFoundException">
/// The requested source could not be found.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SubscriptionAlreadyExistException">
/// The supplied subscription name already exists.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SubscriptionCategoryNotFoundException">
/// The supplied category does not exist.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateEventSubscription">REST API Reference for CreateEventSubscription Operation</seealso>
public virtual CreateEventSubscriptionResponse CreateEventSubscription(CreateEventSubscriptionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateEventSubscriptionRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateEventSubscriptionResponseUnmarshaller.Instance;
return Invoke<CreateEventSubscriptionResponse>(request, options);
}
/// <summary>
/// Creates an RDS event notification subscription. This action requires a topic Amazon
/// Resource Name (ARN) created by either the RDS console, the SNS console, or the SNS
/// API. To obtain an ARN with SNS, you must create a topic in Amazon SNS and subscribe
/// to the topic. The ARN is displayed in the SNS console.
///
///
/// <para>
/// You can specify the type of source (<code>SourceType</code>) that you want to be notified
/// of and provide a list of RDS sources (<code>SourceIds</code>) that triggers the events.
/// You can also provide a list of event categories (<code>EventCategories</code>) for
/// events that you want to be notified of. For example, you can specify <code>SourceType</code>
/// = <code>db-instance</code>, <code>SourceIds</code> = <code>mydbinstance1</code>, <code>mydbinstance2</code>
/// and <code>EventCategories</code> = <code>Availability</code>, <code>Backup</code>.
/// </para>
///
/// <para>
/// If you specify both the <code>SourceType</code> and <code>SourceIds</code>, such as
/// <code>SourceType</code> = <code>db-instance</code> and <code>SourceIdentifier</code>
/// = <code>myDBInstance1</code>, you are notified of all the <code>db-instance</code>
/// events for the specified source. If you specify a <code>SourceType</code> but do not
/// specify a <code>SourceIdentifier</code>, you receive notice of the events for that
/// source type for all your RDS sources. If you don't specify either the SourceType or
/// the <code>SourceIdentifier</code>, you are notified of events generated from all RDS
/// sources belonging to your customer account.
/// </para>
/// <note>
/// <para>
/// RDS event notification is only available for unencrypted SNS topics. If you specify
/// an encrypted SNS topic, event notifications aren't sent for the topic.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateEventSubscription service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateEventSubscription service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.EventSubscriptionQuotaExceededException">
/// You have reached the maximum number of event subscriptions.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SNSInvalidTopicException">
/// SNS has responded that there is a problem with the SND topic specified.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SNSNoAuthorizationException">
/// You do not have permission to publish to the SNS topic ARN.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SNSTopicArnNotFoundException">
/// The SNS topic ARN does not exist.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SourceNotFoundException">
/// The requested source could not be found.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SubscriptionAlreadyExistException">
/// The supplied subscription name already exists.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SubscriptionCategoryNotFoundException">
/// The supplied category does not exist.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateEventSubscription">REST API Reference for CreateEventSubscription Operation</seealso>
public virtual Task<CreateEventSubscriptionResponse> CreateEventSubscriptionAsync(CreateEventSubscriptionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateEventSubscriptionRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateEventSubscriptionResponseUnmarshaller.Instance;
return InvokeAsync<CreateEventSubscriptionResponse>(request, options, cancellationToken);
}
#endregion
#region CreateGlobalCluster
/// <summary>
/// Creates an Aurora global database spread across multiple AWS Regions. The global
/// database contains a single primary cluster with read-write capability, and a read-only
/// secondary cluster that receives data from the primary cluster through high-speed replication
/// performed by the Aurora storage subsystem.
///
///
/// <para>
/// You can create a global database that is initially empty, and then add a primary
/// cluster and a secondary cluster to it. Or you can specify an existing Aurora cluster
/// during the create operation, and this cluster becomes the primary cluster of the global
/// database.
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateGlobalCluster service method.</param>
///
/// <returns>The response from the CreateGlobalCluster service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.GlobalClusterAlreadyExistsException">
/// The <code>GlobalClusterIdentifier</code> already exists. Choose a new global database
/// identifier (unique name) to create a new global database cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.GlobalClusterQuotaExceededException">
/// The number of global database clusters for this account is already at the maximum
/// allowed.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateGlobalCluster">REST API Reference for CreateGlobalCluster Operation</seealso>
public virtual CreateGlobalClusterResponse CreateGlobalCluster(CreateGlobalClusterRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateGlobalClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateGlobalClusterResponseUnmarshaller.Instance;
return Invoke<CreateGlobalClusterResponse>(request, options);
}
/// <summary>
/// Creates an Aurora global database spread across multiple AWS Regions. The global
/// database contains a single primary cluster with read-write capability, and a read-only
/// secondary cluster that receives data from the primary cluster through high-speed replication
/// performed by the Aurora storage subsystem.
///
///
/// <para>
/// You can create a global database that is initially empty, and then add a primary
/// cluster and a secondary cluster to it. Or you can specify an existing Aurora cluster
/// during the create operation, and this cluster becomes the primary cluster of the global
/// database.
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateGlobalCluster service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateGlobalCluster service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.GlobalClusterAlreadyExistsException">
/// The <code>GlobalClusterIdentifier</code> already exists. Choose a new global database
/// identifier (unique name) to create a new global database cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.GlobalClusterQuotaExceededException">
/// The number of global database clusters for this account is already at the maximum
/// allowed.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateGlobalCluster">REST API Reference for CreateGlobalCluster Operation</seealso>
public virtual Task<CreateGlobalClusterResponse> CreateGlobalClusterAsync(CreateGlobalClusterRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateGlobalClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateGlobalClusterResponseUnmarshaller.Instance;
return InvokeAsync<CreateGlobalClusterResponse>(request, options, cancellationToken);
}
#endregion
#region CreateOptionGroup
/// <summary>
/// Creates a new option group. You can create up to 20 option groups.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateOptionGroup service method.</param>
///
/// <returns>The response from the CreateOptionGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.OptionGroupAlreadyExistsException">
/// The option group you are trying to create already exists.
/// </exception>
/// <exception cref="Amazon.RDS.Model.OptionGroupQuotaExceededException">
/// The quota of 20 option groups was exceeded for this AWS account.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateOptionGroup">REST API Reference for CreateOptionGroup Operation</seealso>
public virtual CreateOptionGroupResponse CreateOptionGroup(CreateOptionGroupRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateOptionGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateOptionGroupResponseUnmarshaller.Instance;
return Invoke<CreateOptionGroupResponse>(request, options);
}
/// <summary>
/// Creates a new option group. You can create up to 20 option groups.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateOptionGroup service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateOptionGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.OptionGroupAlreadyExistsException">
/// The option group you are trying to create already exists.
/// </exception>
/// <exception cref="Amazon.RDS.Model.OptionGroupQuotaExceededException">
/// The quota of 20 option groups was exceeded for this AWS account.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateOptionGroup">REST API Reference for CreateOptionGroup Operation</seealso>
public virtual Task<CreateOptionGroupResponse> CreateOptionGroupAsync(CreateOptionGroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateOptionGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateOptionGroupResponseUnmarshaller.Instance;
return InvokeAsync<CreateOptionGroupResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteCustomAvailabilityZone
/// <summary>
/// Deletes a custom Availability Zone (AZ).
///
///
/// <para>
/// A custom AZ is an on-premises AZ that is integrated with a VMware vSphere cluster.
/// </para>
///
/// <para>
/// For more information about RDS on VMware, see the <a href="https://docs.aws.amazon.com/AmazonRDS/latest/RDSonVMwareUserGuide/rds-on-vmware.html">
/// RDS on VMware User Guide.</a>
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteCustomAvailabilityZone service method.</param>
///
/// <returns>The response from the DeleteCustomAvailabilityZone service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.CustomAvailabilityZoneNotFoundException">
/// <code>CustomAvailabilityZoneId</code> doesn't refer to an existing custom Availability
/// Zone identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteCustomAvailabilityZone">REST API Reference for DeleteCustomAvailabilityZone Operation</seealso>
public virtual DeleteCustomAvailabilityZoneResponse DeleteCustomAvailabilityZone(DeleteCustomAvailabilityZoneRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteCustomAvailabilityZoneRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteCustomAvailabilityZoneResponseUnmarshaller.Instance;
return Invoke<DeleteCustomAvailabilityZoneResponse>(request, options);
}
/// <summary>
/// Deletes a custom Availability Zone (AZ).
///
///
/// <para>
/// A custom AZ is an on-premises AZ that is integrated with a VMware vSphere cluster.
/// </para>
///
/// <para>
/// For more information about RDS on VMware, see the <a href="https://docs.aws.amazon.com/AmazonRDS/latest/RDSonVMwareUserGuide/rds-on-vmware.html">
/// RDS on VMware User Guide.</a>
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteCustomAvailabilityZone service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteCustomAvailabilityZone service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.CustomAvailabilityZoneNotFoundException">
/// <code>CustomAvailabilityZoneId</code> doesn't refer to an existing custom Availability
/// Zone identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteCustomAvailabilityZone">REST API Reference for DeleteCustomAvailabilityZone Operation</seealso>
public virtual Task<DeleteCustomAvailabilityZoneResponse> DeleteCustomAvailabilityZoneAsync(DeleteCustomAvailabilityZoneRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteCustomAvailabilityZoneRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteCustomAvailabilityZoneResponseUnmarshaller.Instance;
return InvokeAsync<DeleteCustomAvailabilityZoneResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteDBCluster
/// <summary>
/// The DeleteDBCluster action deletes a previously provisioned DB cluster. When you delete
/// a DB cluster, all automated backups for that DB cluster are deleted and can't be recovered.
/// Manual DB cluster snapshots of the specified DB cluster are not deleted.
///
///
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteDBCluster service method.</param>
///
/// <returns>The response from the DeleteDBCluster service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterSnapshotAlreadyExistsException">
/// The user already has a DB cluster snapshot with the given identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterSnapshotStateException">
/// The supplied value isn't a valid DB cluster snapshot state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SnapshotQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB snapshots.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBCluster">REST API Reference for DeleteDBCluster Operation</seealso>
public virtual DeleteDBClusterResponse DeleteDBCluster(DeleteDBClusterRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteDBClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteDBClusterResponseUnmarshaller.Instance;
return Invoke<DeleteDBClusterResponse>(request, options);
}
/// <summary>
/// The DeleteDBCluster action deletes a previously provisioned DB cluster. When you delete
/// a DB cluster, all automated backups for that DB cluster are deleted and can't be recovered.
/// Manual DB cluster snapshots of the specified DB cluster are not deleted.
///
///
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteDBCluster service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteDBCluster service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterSnapshotAlreadyExistsException">
/// The user already has a DB cluster snapshot with the given identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterSnapshotStateException">
/// The supplied value isn't a valid DB cluster snapshot state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SnapshotQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB snapshots.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBCluster">REST API Reference for DeleteDBCluster Operation</seealso>
public virtual Task<DeleteDBClusterResponse> DeleteDBClusterAsync(DeleteDBClusterRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteDBClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteDBClusterResponseUnmarshaller.Instance;
return InvokeAsync<DeleteDBClusterResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteDBClusterEndpoint
/// <summary>
/// Deletes a custom endpoint and removes it from an Amazon Aurora DB cluster.
///
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteDBClusterEndpoint service method.</param>
///
/// <returns>The response from the DeleteDBClusterEndpoint service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterEndpointNotFoundException">
/// The specified custom endpoint doesn't exist.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterEndpointStateException">
/// The requested operation can't be performed on the endpoint while the endpoint is in
/// this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBClusterEndpoint">REST API Reference for DeleteDBClusterEndpoint Operation</seealso>
public virtual DeleteDBClusterEndpointResponse DeleteDBClusterEndpoint(DeleteDBClusterEndpointRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteDBClusterEndpointRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteDBClusterEndpointResponseUnmarshaller.Instance;
return Invoke<DeleteDBClusterEndpointResponse>(request, options);
}
/// <summary>
/// Deletes a custom endpoint and removes it from an Amazon Aurora DB cluster.
///
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteDBClusterEndpoint service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteDBClusterEndpoint service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterEndpointNotFoundException">
/// The specified custom endpoint doesn't exist.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterEndpointStateException">
/// The requested operation can't be performed on the endpoint while the endpoint is in
/// this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBClusterEndpoint">REST API Reference for DeleteDBClusterEndpoint Operation</seealso>
public virtual Task<DeleteDBClusterEndpointResponse> DeleteDBClusterEndpointAsync(DeleteDBClusterEndpointRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteDBClusterEndpointRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteDBClusterEndpointResponseUnmarshaller.Instance;
return InvokeAsync<DeleteDBClusterEndpointResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteDBClusterParameterGroup
/// <summary>
/// Deletes a specified DB cluster parameter group. The DB cluster parameter group to
/// be deleted can't be associated with any DB clusters.
///
///
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteDBClusterParameterGroup service method.</param>
///
/// <returns>The response from the DeleteDBClusterParameterGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBParameterGroupStateException">
/// The DB parameter group is in use or is in an invalid state. If you are attempting
/// to delete the parameter group, you can't delete it when the parameter group is in
/// this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBClusterParameterGroup">REST API Reference for DeleteDBClusterParameterGroup Operation</seealso>
public virtual DeleteDBClusterParameterGroupResponse DeleteDBClusterParameterGroup(DeleteDBClusterParameterGroupRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteDBClusterParameterGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteDBClusterParameterGroupResponseUnmarshaller.Instance;
return Invoke<DeleteDBClusterParameterGroupResponse>(request, options);
}
/// <summary>
/// Deletes a specified DB cluster parameter group. The DB cluster parameter group to
/// be deleted can't be associated with any DB clusters.
///
///
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteDBClusterParameterGroup service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteDBClusterParameterGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBParameterGroupStateException">
/// The DB parameter group is in use or is in an invalid state. If you are attempting
/// to delete the parameter group, you can't delete it when the parameter group is in
/// this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBClusterParameterGroup">REST API Reference for DeleteDBClusterParameterGroup Operation</seealso>
public virtual Task<DeleteDBClusterParameterGroupResponse> DeleteDBClusterParameterGroupAsync(DeleteDBClusterParameterGroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteDBClusterParameterGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteDBClusterParameterGroupResponseUnmarshaller.Instance;
return InvokeAsync<DeleteDBClusterParameterGroupResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteDBClusterSnapshot
/// <summary>
/// Deletes a DB cluster snapshot. If the snapshot is being copied, the copy operation
/// is terminated.
///
/// <note>
/// <para>
/// The DB cluster snapshot must be in the <code>available</code> state to be deleted.
/// </para>
/// </note>
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteDBClusterSnapshot service method.</param>
///
/// <returns>The response from the DeleteDBClusterSnapshot service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterSnapshotNotFoundException">
/// <code>DBClusterSnapshotIdentifier</code> doesn't refer to an existing DB cluster
/// snapshot.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterSnapshotStateException">
/// The supplied value isn't a valid DB cluster snapshot state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBClusterSnapshot">REST API Reference for DeleteDBClusterSnapshot Operation</seealso>
public virtual DeleteDBClusterSnapshotResponse DeleteDBClusterSnapshot(DeleteDBClusterSnapshotRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteDBClusterSnapshotRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteDBClusterSnapshotResponseUnmarshaller.Instance;
return Invoke<DeleteDBClusterSnapshotResponse>(request, options);
}
/// <summary>
/// Deletes a DB cluster snapshot. If the snapshot is being copied, the copy operation
/// is terminated.
///
/// <note>
/// <para>
/// The DB cluster snapshot must be in the <code>available</code> state to be deleted.
/// </para>
/// </note>
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteDBClusterSnapshot service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteDBClusterSnapshot service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterSnapshotNotFoundException">
/// <code>DBClusterSnapshotIdentifier</code> doesn't refer to an existing DB cluster
/// snapshot.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterSnapshotStateException">
/// The supplied value isn't a valid DB cluster snapshot state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBClusterSnapshot">REST API Reference for DeleteDBClusterSnapshot Operation</seealso>
public virtual Task<DeleteDBClusterSnapshotResponse> DeleteDBClusterSnapshotAsync(DeleteDBClusterSnapshotRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteDBClusterSnapshotRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteDBClusterSnapshotResponseUnmarshaller.Instance;
return InvokeAsync<DeleteDBClusterSnapshotResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteDBInstance
/// <summary>
/// The DeleteDBInstance action deletes a previously provisioned DB instance. When you
/// delete a DB instance, all automated backups for that instance are deleted and can't
/// be recovered. Manual DB snapshots of the DB instance to be deleted by <code>DeleteDBInstance</code>
/// are not deleted.
///
///
/// <para>
/// If you request a final DB snapshot the status of the Amazon RDS DB instance is <code>deleting</code>
/// until the DB snapshot is created. The API action <code>DescribeDBInstance</code> is
/// used to monitor the status of this operation. The action can't be canceled or reverted
/// once submitted.
/// </para>
///
/// <para>
/// When a DB instance is in a failure state and has a status of <code>failed</code>,
/// <code>incompatible-restore</code>, or <code>incompatible-network</code>, you can only
/// delete it when you skip creation of the final snapshot with the <code>SkipFinalSnapshot</code>
/// parameter.
/// </para>
///
/// <para>
/// If the specified DB instance is part of an Amazon Aurora DB cluster, you can't delete
/// the DB instance if both of the following conditions are true:
/// </para>
/// <ul> <li>
/// <para>
/// The DB cluster is a read replica of another Amazon Aurora DB cluster.
/// </para>
/// </li> <li>
/// <para>
/// The DB instance is the only instance in the DB cluster.
/// </para>
/// </li> </ul>
/// <para>
/// To delete a DB instance in this case, first call the <code>PromoteReadReplicaDBCluster</code>
/// API action to promote the DB cluster so it's no longer a read replica. After the promotion
/// completes, then call the <code>DeleteDBInstance</code> API action to delete the final
/// instance in the DB cluster.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteDBInstance service method.</param>
///
/// <returns>The response from the DeleteDBInstance service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBInstanceAutomatedBackupQuotaExceededException">
/// The quota for retained automated backups was exceeded. This prevents you from retaining
/// any additional automated backups. The retained automated backups quota is the same
/// as your DB Instance quota.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSnapshotAlreadyExistsException">
/// <code>DBSnapshotIdentifier</code> is already used by an existing snapshot.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SnapshotQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB snapshots.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBInstance">REST API Reference for DeleteDBInstance Operation</seealso>
public virtual DeleteDBInstanceResponse DeleteDBInstance(DeleteDBInstanceRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteDBInstanceRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteDBInstanceResponseUnmarshaller.Instance;
return Invoke<DeleteDBInstanceResponse>(request, options);
}
/// <summary>
/// The DeleteDBInstance action deletes a previously provisioned DB instance. When you
/// delete a DB instance, all automated backups for that instance are deleted and can't
/// be recovered. Manual DB snapshots of the DB instance to be deleted by <code>DeleteDBInstance</code>
/// are not deleted.
///
///
/// <para>
/// If you request a final DB snapshot the status of the Amazon RDS DB instance is <code>deleting</code>
/// until the DB snapshot is created. The API action <code>DescribeDBInstance</code> is
/// used to monitor the status of this operation. The action can't be canceled or reverted
/// once submitted.
/// </para>
///
/// <para>
/// When a DB instance is in a failure state and has a status of <code>failed</code>,
/// <code>incompatible-restore</code>, or <code>incompatible-network</code>, you can only
/// delete it when you skip creation of the final snapshot with the <code>SkipFinalSnapshot</code>
/// parameter.
/// </para>
///
/// <para>
/// If the specified DB instance is part of an Amazon Aurora DB cluster, you can't delete
/// the DB instance if both of the following conditions are true:
/// </para>
/// <ul> <li>
/// <para>
/// The DB cluster is a read replica of another Amazon Aurora DB cluster.
/// </para>
/// </li> <li>
/// <para>
/// The DB instance is the only instance in the DB cluster.
/// </para>
/// </li> </ul>
/// <para>
/// To delete a DB instance in this case, first call the <code>PromoteReadReplicaDBCluster</code>
/// API action to promote the DB cluster so it's no longer a read replica. After the promotion
/// completes, then call the <code>DeleteDBInstance</code> API action to delete the final
/// instance in the DB cluster.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteDBInstance service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteDBInstance service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBInstanceAutomatedBackupQuotaExceededException">
/// The quota for retained automated backups was exceeded. This prevents you from retaining
/// any additional automated backups. The retained automated backups quota is the same
/// as your DB Instance quota.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSnapshotAlreadyExistsException">
/// <code>DBSnapshotIdentifier</code> is already used by an existing snapshot.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SnapshotQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB snapshots.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBInstance">REST API Reference for DeleteDBInstance Operation</seealso>
public virtual Task<DeleteDBInstanceResponse> DeleteDBInstanceAsync(DeleteDBInstanceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteDBInstanceRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteDBInstanceResponseUnmarshaller.Instance;
return InvokeAsync<DeleteDBInstanceResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteDBInstanceAutomatedBackup
/// <summary>
/// Deletes automated backups using the <code>DbiResourceId</code> value of the source
/// DB instance or the Amazon Resource Name (ARN) of the automated backups.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteDBInstanceAutomatedBackup service method.</param>
///
/// <returns>The response from the DeleteDBInstanceAutomatedBackup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBInstanceAutomatedBackupNotFoundException">
/// No automated backup for this DB instance was found.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceAutomatedBackupStateException">
/// The automated backup is in an invalid state. For example, this automated backup is
/// associated with an active instance.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBInstanceAutomatedBackup">REST API Reference for DeleteDBInstanceAutomatedBackup Operation</seealso>
public virtual DeleteDBInstanceAutomatedBackupResponse DeleteDBInstanceAutomatedBackup(DeleteDBInstanceAutomatedBackupRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteDBInstanceAutomatedBackupRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteDBInstanceAutomatedBackupResponseUnmarshaller.Instance;
return Invoke<DeleteDBInstanceAutomatedBackupResponse>(request, options);
}
/// <summary>
/// Deletes automated backups using the <code>DbiResourceId</code> value of the source
/// DB instance or the Amazon Resource Name (ARN) of the automated backups.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteDBInstanceAutomatedBackup service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteDBInstanceAutomatedBackup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBInstanceAutomatedBackupNotFoundException">
/// No automated backup for this DB instance was found.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceAutomatedBackupStateException">
/// The automated backup is in an invalid state. For example, this automated backup is
/// associated with an active instance.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBInstanceAutomatedBackup">REST API Reference for DeleteDBInstanceAutomatedBackup Operation</seealso>
public virtual Task<DeleteDBInstanceAutomatedBackupResponse> DeleteDBInstanceAutomatedBackupAsync(DeleteDBInstanceAutomatedBackupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteDBInstanceAutomatedBackupRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteDBInstanceAutomatedBackupResponseUnmarshaller.Instance;
return InvokeAsync<DeleteDBInstanceAutomatedBackupResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteDBParameterGroup
/// <summary>
/// Deletes a specified DB parameter group. The DB parameter group to be deleted can't
/// be associated with any DB instances.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteDBParameterGroup service method.</param>
///
/// <returns>The response from the DeleteDBParameterGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBParameterGroupStateException">
/// The DB parameter group is in use or is in an invalid state. If you are attempting
/// to delete the parameter group, you can't delete it when the parameter group is in
/// this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBParameterGroup">REST API Reference for DeleteDBParameterGroup Operation</seealso>
public virtual DeleteDBParameterGroupResponse DeleteDBParameterGroup(DeleteDBParameterGroupRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteDBParameterGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteDBParameterGroupResponseUnmarshaller.Instance;
return Invoke<DeleteDBParameterGroupResponse>(request, options);
}
/// <summary>
/// Deletes a specified DB parameter group. The DB parameter group to be deleted can't
/// be associated with any DB instances.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteDBParameterGroup service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteDBParameterGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBParameterGroupStateException">
/// The DB parameter group is in use or is in an invalid state. If you are attempting
/// to delete the parameter group, you can't delete it when the parameter group is in
/// this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBParameterGroup">REST API Reference for DeleteDBParameterGroup Operation</seealso>
public virtual Task<DeleteDBParameterGroupResponse> DeleteDBParameterGroupAsync(DeleteDBParameterGroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteDBParameterGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteDBParameterGroupResponseUnmarshaller.Instance;
return InvokeAsync<DeleteDBParameterGroupResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteDBProxy
/// <summary>
/// Deletes an existing DB proxy.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteDBProxy service method.</param>
///
/// <returns>The response from the DeleteDBProxy service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBProxyNotFoundException">
/// The specified proxy name doesn't correspond to a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBProxyStateException">
/// The requested operation can't be performed while the proxy is in this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBProxy">REST API Reference for DeleteDBProxy Operation</seealso>
public virtual DeleteDBProxyResponse DeleteDBProxy(DeleteDBProxyRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteDBProxyRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteDBProxyResponseUnmarshaller.Instance;
return Invoke<DeleteDBProxyResponse>(request, options);
}
/// <summary>
/// Deletes an existing DB proxy.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteDBProxy service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteDBProxy service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBProxyNotFoundException">
/// The specified proxy name doesn't correspond to a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBProxyStateException">
/// The requested operation can't be performed while the proxy is in this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBProxy">REST API Reference for DeleteDBProxy Operation</seealso>
public virtual Task<DeleteDBProxyResponse> DeleteDBProxyAsync(DeleteDBProxyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteDBProxyRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteDBProxyResponseUnmarshaller.Instance;
return InvokeAsync<DeleteDBProxyResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteDBProxyEndpoint
/// <summary>
/// Deletes a <code>DBProxyEndpoint</code>. Doing so removes the ability to access the
/// DB proxy using the endpoint that you defined. The endpoint that you delete might have
/// provided capabilities such as read/write or read-only operations, or using a different
/// VPC than the DB proxy's default VPC.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteDBProxyEndpoint service method.</param>
///
/// <returns>The response from the DeleteDBProxyEndpoint service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBProxyEndpointNotFoundException">
/// The DB proxy endpoint doesn't exist.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBProxyEndpointStateException">
/// You can't perform this operation while the DB proxy endpoint is in a particular state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBProxyEndpoint">REST API Reference for DeleteDBProxyEndpoint Operation</seealso>
public virtual DeleteDBProxyEndpointResponse DeleteDBProxyEndpoint(DeleteDBProxyEndpointRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteDBProxyEndpointRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteDBProxyEndpointResponseUnmarshaller.Instance;
return Invoke<DeleteDBProxyEndpointResponse>(request, options);
}
/// <summary>
/// Deletes a <code>DBProxyEndpoint</code>. Doing so removes the ability to access the
/// DB proxy using the endpoint that you defined. The endpoint that you delete might have
/// provided capabilities such as read/write or read-only operations, or using a different
/// VPC than the DB proxy's default VPC.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteDBProxyEndpoint service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteDBProxyEndpoint service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBProxyEndpointNotFoundException">
/// The DB proxy endpoint doesn't exist.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBProxyEndpointStateException">
/// You can't perform this operation while the DB proxy endpoint is in a particular state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBProxyEndpoint">REST API Reference for DeleteDBProxyEndpoint Operation</seealso>
public virtual Task<DeleteDBProxyEndpointResponse> DeleteDBProxyEndpointAsync(DeleteDBProxyEndpointRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteDBProxyEndpointRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteDBProxyEndpointResponseUnmarshaller.Instance;
return InvokeAsync<DeleteDBProxyEndpointResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteDBSecurityGroup
/// <summary>
/// Deletes a DB security group.
///
/// <note>
/// <para>
/// The specified DB security group must not be associated with any DB instances.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteDBSecurityGroup service method.</param>
///
/// <returns>The response from the DeleteDBSecurityGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBSecurityGroupNotFoundException">
/// <code>DBSecurityGroupName</code> doesn't refer to an existing DB security group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBSecurityGroupStateException">
/// The state of the DB security group doesn't allow deletion.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBSecurityGroup">REST API Reference for DeleteDBSecurityGroup Operation</seealso>
public virtual DeleteDBSecurityGroupResponse DeleteDBSecurityGroup(DeleteDBSecurityGroupRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteDBSecurityGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteDBSecurityGroupResponseUnmarshaller.Instance;
return Invoke<DeleteDBSecurityGroupResponse>(request, options);
}
/// <summary>
/// Deletes a DB security group.
///
/// <note>
/// <para>
/// The specified DB security group must not be associated with any DB instances.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteDBSecurityGroup service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteDBSecurityGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBSecurityGroupNotFoundException">
/// <code>DBSecurityGroupName</code> doesn't refer to an existing DB security group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBSecurityGroupStateException">
/// The state of the DB security group doesn't allow deletion.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBSecurityGroup">REST API Reference for DeleteDBSecurityGroup Operation</seealso>
public virtual Task<DeleteDBSecurityGroupResponse> DeleteDBSecurityGroupAsync(DeleteDBSecurityGroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteDBSecurityGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteDBSecurityGroupResponseUnmarshaller.Instance;
return InvokeAsync<DeleteDBSecurityGroupResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteDBSnapshot
/// <summary>
/// Deletes a DB snapshot. If the snapshot is being copied, the copy operation is terminated.
///
/// <note>
/// <para>
/// The DB snapshot must be in the <code>available</code> state to be deleted.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteDBSnapshot service method.</param>
///
/// <returns>The response from the DeleteDBSnapshot service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBSnapshotNotFoundException">
/// <code>DBSnapshotIdentifier</code> doesn't refer to an existing DB snapshot.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBSnapshotStateException">
/// The state of the DB snapshot doesn't allow deletion.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBSnapshot">REST API Reference for DeleteDBSnapshot Operation</seealso>
public virtual DeleteDBSnapshotResponse DeleteDBSnapshot(DeleteDBSnapshotRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteDBSnapshotRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteDBSnapshotResponseUnmarshaller.Instance;
return Invoke<DeleteDBSnapshotResponse>(request, options);
}
/// <summary>
/// Deletes a DB snapshot. If the snapshot is being copied, the copy operation is terminated.
///
/// <note>
/// <para>
/// The DB snapshot must be in the <code>available</code> state to be deleted.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteDBSnapshot service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteDBSnapshot service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBSnapshotNotFoundException">
/// <code>DBSnapshotIdentifier</code> doesn't refer to an existing DB snapshot.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBSnapshotStateException">
/// The state of the DB snapshot doesn't allow deletion.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBSnapshot">REST API Reference for DeleteDBSnapshot Operation</seealso>
public virtual Task<DeleteDBSnapshotResponse> DeleteDBSnapshotAsync(DeleteDBSnapshotRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteDBSnapshotRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteDBSnapshotResponseUnmarshaller.Instance;
return InvokeAsync<DeleteDBSnapshotResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteDBSubnetGroup
/// <summary>
/// Deletes a DB subnet group.
///
/// <note>
/// <para>
/// The specified database subnet group must not be associated with any DB instances.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteDBSubnetGroup service method.</param>
///
/// <returns>The response from the DeleteDBSubnetGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupNotFoundException">
/// <code>DBSubnetGroupName</code> doesn't refer to an existing DB subnet group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBSubnetGroupStateException">
/// The DB subnet group cannot be deleted because it's in use.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBSubnetStateException">
/// The DB subnet isn't in the <i>available</i> state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBSubnetGroup">REST API Reference for DeleteDBSubnetGroup Operation</seealso>
public virtual DeleteDBSubnetGroupResponse DeleteDBSubnetGroup(DeleteDBSubnetGroupRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteDBSubnetGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteDBSubnetGroupResponseUnmarshaller.Instance;
return Invoke<DeleteDBSubnetGroupResponse>(request, options);
}
/// <summary>
/// Deletes a DB subnet group.
///
/// <note>
/// <para>
/// The specified database subnet group must not be associated with any DB instances.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteDBSubnetGroup service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteDBSubnetGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupNotFoundException">
/// <code>DBSubnetGroupName</code> doesn't refer to an existing DB subnet group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBSubnetGroupStateException">
/// The DB subnet group cannot be deleted because it's in use.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBSubnetStateException">
/// The DB subnet isn't in the <i>available</i> state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBSubnetGroup">REST API Reference for DeleteDBSubnetGroup Operation</seealso>
public virtual Task<DeleteDBSubnetGroupResponse> DeleteDBSubnetGroupAsync(DeleteDBSubnetGroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteDBSubnetGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteDBSubnetGroupResponseUnmarshaller.Instance;
return InvokeAsync<DeleteDBSubnetGroupResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteEventSubscription
/// <summary>
/// Deletes an RDS event notification subscription.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteEventSubscription service method.</param>
///
/// <returns>The response from the DeleteEventSubscription service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.InvalidEventSubscriptionStateException">
/// This error can occur if someone else is modifying a subscription. You should retry
/// the action.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SubscriptionNotFoundException">
/// The subscription name does not exist.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteEventSubscription">REST API Reference for DeleteEventSubscription Operation</seealso>
public virtual DeleteEventSubscriptionResponse DeleteEventSubscription(DeleteEventSubscriptionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteEventSubscriptionRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteEventSubscriptionResponseUnmarshaller.Instance;
return Invoke<DeleteEventSubscriptionResponse>(request, options);
}
/// <summary>
/// Deletes an RDS event notification subscription.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteEventSubscription service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteEventSubscription service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.InvalidEventSubscriptionStateException">
/// This error can occur if someone else is modifying a subscription. You should retry
/// the action.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SubscriptionNotFoundException">
/// The subscription name does not exist.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteEventSubscription">REST API Reference for DeleteEventSubscription Operation</seealso>
public virtual Task<DeleteEventSubscriptionResponse> DeleteEventSubscriptionAsync(DeleteEventSubscriptionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteEventSubscriptionRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteEventSubscriptionResponseUnmarshaller.Instance;
return InvokeAsync<DeleteEventSubscriptionResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteGlobalCluster
/// <summary>
/// Deletes a global database cluster. The primary and secondary clusters must already
/// be detached or destroyed first.
///
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteGlobalCluster service method.</param>
///
/// <returns>The response from the DeleteGlobalCluster service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.GlobalClusterNotFoundException">
/// The <code>GlobalClusterIdentifier</code> doesn't refer to an existing global database
/// cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidGlobalClusterStateException">
/// The global cluster is in an invalid state and can't perform the requested operation.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteGlobalCluster">REST API Reference for DeleteGlobalCluster Operation</seealso>
public virtual DeleteGlobalClusterResponse DeleteGlobalCluster(DeleteGlobalClusterRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteGlobalClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteGlobalClusterResponseUnmarshaller.Instance;
return Invoke<DeleteGlobalClusterResponse>(request, options);
}
/// <summary>
/// Deletes a global database cluster. The primary and secondary clusters must already
/// be detached or destroyed first.
///
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteGlobalCluster service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteGlobalCluster service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.GlobalClusterNotFoundException">
/// The <code>GlobalClusterIdentifier</code> doesn't refer to an existing global database
/// cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidGlobalClusterStateException">
/// The global cluster is in an invalid state and can't perform the requested operation.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteGlobalCluster">REST API Reference for DeleteGlobalCluster Operation</seealso>
public virtual Task<DeleteGlobalClusterResponse> DeleteGlobalClusterAsync(DeleteGlobalClusterRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteGlobalClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteGlobalClusterResponseUnmarshaller.Instance;
return InvokeAsync<DeleteGlobalClusterResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteInstallationMedia
/// <summary>
/// Deletes the installation medium for a DB engine that requires an on-premises customer
/// provided license, such as Microsoft SQL Server.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteInstallationMedia service method.</param>
///
/// <returns>The response from the DeleteInstallationMedia service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.InstallationMediaNotFoundException">
/// <code>InstallationMediaID</code> doesn't refer to an existing installation medium.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteInstallationMedia">REST API Reference for DeleteInstallationMedia Operation</seealso>
public virtual DeleteInstallationMediaResponse DeleteInstallationMedia(DeleteInstallationMediaRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteInstallationMediaRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteInstallationMediaResponseUnmarshaller.Instance;
return Invoke<DeleteInstallationMediaResponse>(request, options);
}
/// <summary>
/// Deletes the installation medium for a DB engine that requires an on-premises customer
/// provided license, such as Microsoft SQL Server.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteInstallationMedia service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteInstallationMedia service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.InstallationMediaNotFoundException">
/// <code>InstallationMediaID</code> doesn't refer to an existing installation medium.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteInstallationMedia">REST API Reference for DeleteInstallationMedia Operation</seealso>
public virtual Task<DeleteInstallationMediaResponse> DeleteInstallationMediaAsync(DeleteInstallationMediaRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteInstallationMediaRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteInstallationMediaResponseUnmarshaller.Instance;
return InvokeAsync<DeleteInstallationMediaResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteOptionGroup
/// <summary>
/// Deletes an existing option group.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteOptionGroup service method.</param>
///
/// <returns>The response from the DeleteOptionGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.InvalidOptionGroupStateException">
/// The option group isn't in the <i>available</i> state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.OptionGroupNotFoundException">
/// The specified option group could not be found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteOptionGroup">REST API Reference for DeleteOptionGroup Operation</seealso>
public virtual DeleteOptionGroupResponse DeleteOptionGroup(DeleteOptionGroupRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteOptionGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteOptionGroupResponseUnmarshaller.Instance;
return Invoke<DeleteOptionGroupResponse>(request, options);
}
/// <summary>
/// Deletes an existing option group.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteOptionGroup service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteOptionGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.InvalidOptionGroupStateException">
/// The option group isn't in the <i>available</i> state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.OptionGroupNotFoundException">
/// The specified option group could not be found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteOptionGroup">REST API Reference for DeleteOptionGroup Operation</seealso>
public virtual Task<DeleteOptionGroupResponse> DeleteOptionGroupAsync(DeleteOptionGroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteOptionGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteOptionGroupResponseUnmarshaller.Instance;
return InvokeAsync<DeleteOptionGroupResponse>(request, options, cancellationToken);
}
#endregion
#region DeregisterDBProxyTargets
/// <summary>
/// Remove the association between one or more <code>DBProxyTarget</code> data structures
/// and a <code>DBProxyTargetGroup</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeregisterDBProxyTargets service method.</param>
///
/// <returns>The response from the DeregisterDBProxyTargets service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBProxyNotFoundException">
/// The specified proxy name doesn't correspond to a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyTargetGroupNotFoundException">
/// The specified target group isn't available for a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyTargetNotFoundException">
/// The specified RDS DB instance or Aurora DB cluster isn't available for a proxy owned
/// by your AWS account in the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBProxyStateException">
/// The requested operation can't be performed while the proxy is in this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeregisterDBProxyTargets">REST API Reference for DeregisterDBProxyTargets Operation</seealso>
public virtual DeregisterDBProxyTargetsResponse DeregisterDBProxyTargets(DeregisterDBProxyTargetsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeregisterDBProxyTargetsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeregisterDBProxyTargetsResponseUnmarshaller.Instance;
return Invoke<DeregisterDBProxyTargetsResponse>(request, options);
}
/// <summary>
/// Remove the association between one or more <code>DBProxyTarget</code> data structures
/// and a <code>DBProxyTargetGroup</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeregisterDBProxyTargets service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeregisterDBProxyTargets service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBProxyNotFoundException">
/// The specified proxy name doesn't correspond to a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyTargetGroupNotFoundException">
/// The specified target group isn't available for a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyTargetNotFoundException">
/// The specified RDS DB instance or Aurora DB cluster isn't available for a proxy owned
/// by your AWS account in the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBProxyStateException">
/// The requested operation can't be performed while the proxy is in this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeregisterDBProxyTargets">REST API Reference for DeregisterDBProxyTargets Operation</seealso>
public virtual Task<DeregisterDBProxyTargetsResponse> DeregisterDBProxyTargetsAsync(DeregisterDBProxyTargetsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeregisterDBProxyTargetsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeregisterDBProxyTargetsResponseUnmarshaller.Instance;
return InvokeAsync<DeregisterDBProxyTargetsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeAccountAttributes
/// <summary>
/// Lists all of the attributes for a customer account. The attributes include Amazon
/// RDS quotas for the account, such as the number of DB instances allowed. The description
/// for a quota includes the quota name, current usage toward that quota, and the quota's
/// maximum value.
///
///
/// <para>
/// This command doesn't take any parameters.
/// </para>
/// </summary>
///
/// <returns>The response from the DescribeAccountAttributes service method, as returned by RDS.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeAccountAttributes">REST API Reference for DescribeAccountAttributes Operation</seealso>
public virtual DescribeAccountAttributesResponse DescribeAccountAttributes()
{
return DescribeAccountAttributes(new DescribeAccountAttributesRequest());
}
/// <summary>
/// Lists all of the attributes for a customer account. The attributes include Amazon
/// RDS quotas for the account, such as the number of DB instances allowed. The description
/// for a quota includes the quota name, current usage toward that quota, and the quota's
/// maximum value.
///
///
/// <para>
/// This command doesn't take any parameters.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeAccountAttributes service method.</param>
///
/// <returns>The response from the DescribeAccountAttributes service method, as returned by RDS.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeAccountAttributes">REST API Reference for DescribeAccountAttributes Operation</seealso>
public virtual DescribeAccountAttributesResponse DescribeAccountAttributes(DescribeAccountAttributesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeAccountAttributesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeAccountAttributesResponseUnmarshaller.Instance;
return Invoke<DescribeAccountAttributesResponse>(request, options);
}
/// <summary>
/// Lists all of the attributes for a customer account. The attributes include Amazon
/// RDS quotas for the account, such as the number of DB instances allowed. The description
/// for a quota includes the quota name, current usage toward that quota, and the quota's
/// maximum value.
///
///
/// <para>
/// This command doesn't take any parameters.
/// </para>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeAccountAttributes service method, as returned by RDS.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeAccountAttributes">REST API Reference for DescribeAccountAttributes Operation</seealso>
public virtual Task<DescribeAccountAttributesResponse> DescribeAccountAttributesAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeAccountAttributesAsync(new DescribeAccountAttributesRequest(), cancellationToken);
}
/// <summary>
/// Lists all of the attributes for a customer account. The attributes include Amazon
/// RDS quotas for the account, such as the number of DB instances allowed. The description
/// for a quota includes the quota name, current usage toward that quota, and the quota's
/// maximum value.
///
///
/// <para>
/// This command doesn't take any parameters.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeAccountAttributes service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeAccountAttributes service method, as returned by RDS.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeAccountAttributes">REST API Reference for DescribeAccountAttributes Operation</seealso>
public virtual Task<DescribeAccountAttributesResponse> DescribeAccountAttributesAsync(DescribeAccountAttributesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeAccountAttributesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeAccountAttributesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeAccountAttributesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeCertificates
/// <summary>
/// Lists the set of CA certificates provided by Amazon RDS for this AWS account.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeCertificates service method.</param>
///
/// <returns>The response from the DescribeCertificates service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.CertificateNotFoundException">
/// <code>CertificateIdentifier</code> doesn't refer to an existing certificate.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeCertificates">REST API Reference for DescribeCertificates Operation</seealso>
public virtual DescribeCertificatesResponse DescribeCertificates(DescribeCertificatesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeCertificatesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeCertificatesResponseUnmarshaller.Instance;
return Invoke<DescribeCertificatesResponse>(request, options);
}
/// <summary>
/// Lists the set of CA certificates provided by Amazon RDS for this AWS account.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeCertificates service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeCertificates service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.CertificateNotFoundException">
/// <code>CertificateIdentifier</code> doesn't refer to an existing certificate.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeCertificates">REST API Reference for DescribeCertificates Operation</seealso>
public virtual Task<DescribeCertificatesResponse> DescribeCertificatesAsync(DescribeCertificatesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeCertificatesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeCertificatesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeCertificatesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeCustomAvailabilityZones
/// <summary>
/// Returns information about custom Availability Zones (AZs).
///
///
/// <para>
/// A custom AZ is an on-premises AZ that is integrated with a VMware vSphere cluster.
/// </para>
///
/// <para>
/// For more information about RDS on VMware, see the <a href="https://docs.aws.amazon.com/AmazonRDS/latest/RDSonVMwareUserGuide/rds-on-vmware.html">
/// RDS on VMware User Guide.</a>
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeCustomAvailabilityZones service method.</param>
///
/// <returns>The response from the DescribeCustomAvailabilityZones service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.CustomAvailabilityZoneNotFoundException">
/// <code>CustomAvailabilityZoneId</code> doesn't refer to an existing custom Availability
/// Zone identifier.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeCustomAvailabilityZones">REST API Reference for DescribeCustomAvailabilityZones Operation</seealso>
public virtual DescribeCustomAvailabilityZonesResponse DescribeCustomAvailabilityZones(DescribeCustomAvailabilityZonesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeCustomAvailabilityZonesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeCustomAvailabilityZonesResponseUnmarshaller.Instance;
return Invoke<DescribeCustomAvailabilityZonesResponse>(request, options);
}
/// <summary>
/// Returns information about custom Availability Zones (AZs).
///
///
/// <para>
/// A custom AZ is an on-premises AZ that is integrated with a VMware vSphere cluster.
/// </para>
///
/// <para>
/// For more information about RDS on VMware, see the <a href="https://docs.aws.amazon.com/AmazonRDS/latest/RDSonVMwareUserGuide/rds-on-vmware.html">
/// RDS on VMware User Guide.</a>
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeCustomAvailabilityZones service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeCustomAvailabilityZones service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.CustomAvailabilityZoneNotFoundException">
/// <code>CustomAvailabilityZoneId</code> doesn't refer to an existing custom Availability
/// Zone identifier.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeCustomAvailabilityZones">REST API Reference for DescribeCustomAvailabilityZones Operation</seealso>
public virtual Task<DescribeCustomAvailabilityZonesResponse> DescribeCustomAvailabilityZonesAsync(DescribeCustomAvailabilityZonesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeCustomAvailabilityZonesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeCustomAvailabilityZonesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeCustomAvailabilityZonesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeDBClusterBacktracks
/// <summary>
/// Returns information about backtracks for a DB cluster.
///
///
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora MySQL DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBClusterBacktracks service method.</param>
///
/// <returns>The response from the DescribeDBClusterBacktracks service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterBacktrackNotFoundException">
/// <code>BacktrackIdentifier</code> doesn't refer to an existing backtrack.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterBacktracks">REST API Reference for DescribeDBClusterBacktracks Operation</seealso>
public virtual DescribeDBClusterBacktracksResponse DescribeDBClusterBacktracks(DescribeDBClusterBacktracksRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBClusterBacktracksRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBClusterBacktracksResponseUnmarshaller.Instance;
return Invoke<DescribeDBClusterBacktracksResponse>(request, options);
}
/// <summary>
/// Returns information about backtracks for a DB cluster.
///
///
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora MySQL DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBClusterBacktracks service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeDBClusterBacktracks service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterBacktrackNotFoundException">
/// <code>BacktrackIdentifier</code> doesn't refer to an existing backtrack.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterBacktracks">REST API Reference for DescribeDBClusterBacktracks Operation</seealso>
public virtual Task<DescribeDBClusterBacktracksResponse> DescribeDBClusterBacktracksAsync(DescribeDBClusterBacktracksRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBClusterBacktracksRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBClusterBacktracksResponseUnmarshaller.Instance;
return InvokeAsync<DescribeDBClusterBacktracksResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeDBClusterEndpoints
/// <summary>
/// Returns information about endpoints for an Amazon Aurora DB cluster.
///
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBClusterEndpoints service method.</param>
///
/// <returns>The response from the DescribeDBClusterEndpoints service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterEndpoints">REST API Reference for DescribeDBClusterEndpoints Operation</seealso>
public virtual DescribeDBClusterEndpointsResponse DescribeDBClusterEndpoints(DescribeDBClusterEndpointsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBClusterEndpointsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBClusterEndpointsResponseUnmarshaller.Instance;
return Invoke<DescribeDBClusterEndpointsResponse>(request, options);
}
/// <summary>
/// Returns information about endpoints for an Amazon Aurora DB cluster.
///
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBClusterEndpoints service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeDBClusterEndpoints service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterEndpoints">REST API Reference for DescribeDBClusterEndpoints Operation</seealso>
public virtual Task<DescribeDBClusterEndpointsResponse> DescribeDBClusterEndpointsAsync(DescribeDBClusterEndpointsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBClusterEndpointsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBClusterEndpointsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeDBClusterEndpointsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeDBClusterParameterGroups
/// <summary>
/// Returns a list of <code>DBClusterParameterGroup</code> descriptions. If a <code>DBClusterParameterGroupName</code>
/// parameter is specified, the list will contain only the description of the specified
/// DB cluster parameter group.
///
///
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBClusterParameterGroups service method.</param>
///
/// <returns>The response from the DescribeDBClusterParameterGroups service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterParameterGroups">REST API Reference for DescribeDBClusterParameterGroups Operation</seealso>
public virtual DescribeDBClusterParameterGroupsResponse DescribeDBClusterParameterGroups(DescribeDBClusterParameterGroupsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBClusterParameterGroupsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBClusterParameterGroupsResponseUnmarshaller.Instance;
return Invoke<DescribeDBClusterParameterGroupsResponse>(request, options);
}
/// <summary>
/// Returns a list of <code>DBClusterParameterGroup</code> descriptions. If a <code>DBClusterParameterGroupName</code>
/// parameter is specified, the list will contain only the description of the specified
/// DB cluster parameter group.
///
///
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBClusterParameterGroups service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeDBClusterParameterGroups service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterParameterGroups">REST API Reference for DescribeDBClusterParameterGroups Operation</seealso>
public virtual Task<DescribeDBClusterParameterGroupsResponse> DescribeDBClusterParameterGroupsAsync(DescribeDBClusterParameterGroupsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBClusterParameterGroupsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBClusterParameterGroupsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeDBClusterParameterGroupsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeDBClusterParameters
/// <summary>
/// Returns the detailed parameter list for a particular DB cluster parameter group.
///
///
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBClusterParameters service method.</param>
///
/// <returns>The response from the DescribeDBClusterParameters service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterParameters">REST API Reference for DescribeDBClusterParameters Operation</seealso>
public virtual DescribeDBClusterParametersResponse DescribeDBClusterParameters(DescribeDBClusterParametersRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBClusterParametersRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBClusterParametersResponseUnmarshaller.Instance;
return Invoke<DescribeDBClusterParametersResponse>(request, options);
}
/// <summary>
/// Returns the detailed parameter list for a particular DB cluster parameter group.
///
///
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBClusterParameters service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeDBClusterParameters service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterParameters">REST API Reference for DescribeDBClusterParameters Operation</seealso>
public virtual Task<DescribeDBClusterParametersResponse> DescribeDBClusterParametersAsync(DescribeDBClusterParametersRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBClusterParametersRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBClusterParametersResponseUnmarshaller.Instance;
return InvokeAsync<DescribeDBClusterParametersResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeDBClusters
/// <summary>
/// Returns information about provisioned Aurora DB clusters. This API supports pagination.
///
///
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This operation can also return information for Amazon Neptune DB instances and Amazon
/// DocumentDB instances.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBClusters service method.</param>
///
/// <returns>The response from the DescribeDBClusters service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusters">REST API Reference for DescribeDBClusters Operation</seealso>
public virtual DescribeDBClustersResponse DescribeDBClusters(DescribeDBClustersRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBClustersRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBClustersResponseUnmarshaller.Instance;
return Invoke<DescribeDBClustersResponse>(request, options);
}
/// <summary>
/// Returns information about provisioned Aurora DB clusters. This API supports pagination.
///
///
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This operation can also return information for Amazon Neptune DB instances and Amazon
/// DocumentDB instances.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBClusters service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeDBClusters service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusters">REST API Reference for DescribeDBClusters Operation</seealso>
public virtual Task<DescribeDBClustersResponse> DescribeDBClustersAsync(DescribeDBClustersRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBClustersRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBClustersResponseUnmarshaller.Instance;
return InvokeAsync<DescribeDBClustersResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeDBClusterSnapshotAttributes
/// <summary>
/// Returns a list of DB cluster snapshot attribute names and values for a manual DB cluster
/// snapshot.
///
///
/// <para>
/// When sharing snapshots with other AWS accounts, <code>DescribeDBClusterSnapshotAttributes</code>
/// returns the <code>restore</code> attribute and a list of IDs for the AWS accounts
/// that are authorized to copy or restore the manual DB cluster snapshot. If <code>all</code>
/// is included in the list of values for the <code>restore</code> attribute, then the
/// manual DB cluster snapshot is public and can be copied or restored by all AWS accounts.
/// </para>
///
/// <para>
/// To add or remove access for an AWS account to copy or restore a manual DB cluster
/// snapshot, or to make the manual DB cluster snapshot public or private, use the <code>ModifyDBClusterSnapshotAttribute</code>
/// API action.
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBClusterSnapshotAttributes service method.</param>
///
/// <returns>The response from the DescribeDBClusterSnapshotAttributes service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterSnapshotNotFoundException">
/// <code>DBClusterSnapshotIdentifier</code> doesn't refer to an existing DB cluster
/// snapshot.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterSnapshotAttributes">REST API Reference for DescribeDBClusterSnapshotAttributes Operation</seealso>
public virtual DescribeDBClusterSnapshotAttributesResponse DescribeDBClusterSnapshotAttributes(DescribeDBClusterSnapshotAttributesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBClusterSnapshotAttributesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBClusterSnapshotAttributesResponseUnmarshaller.Instance;
return Invoke<DescribeDBClusterSnapshotAttributesResponse>(request, options);
}
/// <summary>
/// Returns a list of DB cluster snapshot attribute names and values for a manual DB cluster
/// snapshot.
///
///
/// <para>
/// When sharing snapshots with other AWS accounts, <code>DescribeDBClusterSnapshotAttributes</code>
/// returns the <code>restore</code> attribute and a list of IDs for the AWS accounts
/// that are authorized to copy or restore the manual DB cluster snapshot. If <code>all</code>
/// is included in the list of values for the <code>restore</code> attribute, then the
/// manual DB cluster snapshot is public and can be copied or restored by all AWS accounts.
/// </para>
///
/// <para>
/// To add or remove access for an AWS account to copy or restore a manual DB cluster
/// snapshot, or to make the manual DB cluster snapshot public or private, use the <code>ModifyDBClusterSnapshotAttribute</code>
/// API action.
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBClusterSnapshotAttributes service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeDBClusterSnapshotAttributes service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterSnapshotNotFoundException">
/// <code>DBClusterSnapshotIdentifier</code> doesn't refer to an existing DB cluster
/// snapshot.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterSnapshotAttributes">REST API Reference for DescribeDBClusterSnapshotAttributes Operation</seealso>
public virtual Task<DescribeDBClusterSnapshotAttributesResponse> DescribeDBClusterSnapshotAttributesAsync(DescribeDBClusterSnapshotAttributesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBClusterSnapshotAttributesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBClusterSnapshotAttributesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeDBClusterSnapshotAttributesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeDBClusterSnapshots
/// <summary>
/// Returns information about DB cluster snapshots. This API action supports pagination.
///
///
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBClusterSnapshots service method.</param>
///
/// <returns>The response from the DescribeDBClusterSnapshots service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterSnapshotNotFoundException">
/// <code>DBClusterSnapshotIdentifier</code> doesn't refer to an existing DB cluster
/// snapshot.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterSnapshots">REST API Reference for DescribeDBClusterSnapshots Operation</seealso>
public virtual DescribeDBClusterSnapshotsResponse DescribeDBClusterSnapshots(DescribeDBClusterSnapshotsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBClusterSnapshotsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBClusterSnapshotsResponseUnmarshaller.Instance;
return Invoke<DescribeDBClusterSnapshotsResponse>(request, options);
}
/// <summary>
/// Returns information about DB cluster snapshots. This API action supports pagination.
///
///
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBClusterSnapshots service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeDBClusterSnapshots service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterSnapshotNotFoundException">
/// <code>DBClusterSnapshotIdentifier</code> doesn't refer to an existing DB cluster
/// snapshot.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterSnapshots">REST API Reference for DescribeDBClusterSnapshots Operation</seealso>
public virtual Task<DescribeDBClusterSnapshotsResponse> DescribeDBClusterSnapshotsAsync(DescribeDBClusterSnapshotsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBClusterSnapshotsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBClusterSnapshotsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeDBClusterSnapshotsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeDBEngineVersions
/// <summary>
/// Returns a list of the available DB engines.
/// </summary>
///
/// <returns>The response from the DescribeDBEngineVersions service method, as returned by RDS.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBEngineVersions">REST API Reference for DescribeDBEngineVersions Operation</seealso>
public virtual DescribeDBEngineVersionsResponse DescribeDBEngineVersions()
{
return DescribeDBEngineVersions(new DescribeDBEngineVersionsRequest());
}
/// <summary>
/// Returns a list of the available DB engines.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBEngineVersions service method.</param>
///
/// <returns>The response from the DescribeDBEngineVersions service method, as returned by RDS.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBEngineVersions">REST API Reference for DescribeDBEngineVersions Operation</seealso>
public virtual DescribeDBEngineVersionsResponse DescribeDBEngineVersions(DescribeDBEngineVersionsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBEngineVersionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBEngineVersionsResponseUnmarshaller.Instance;
return Invoke<DescribeDBEngineVersionsResponse>(request, options);
}
/// <summary>
/// Returns a list of the available DB engines.
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeDBEngineVersions service method, as returned by RDS.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBEngineVersions">REST API Reference for DescribeDBEngineVersions Operation</seealso>
public virtual Task<DescribeDBEngineVersionsResponse> DescribeDBEngineVersionsAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeDBEngineVersionsAsync(new DescribeDBEngineVersionsRequest(), cancellationToken);
}
/// <summary>
/// Returns a list of the available DB engines.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBEngineVersions service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeDBEngineVersions service method, as returned by RDS.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBEngineVersions">REST API Reference for DescribeDBEngineVersions Operation</seealso>
public virtual Task<DescribeDBEngineVersionsResponse> DescribeDBEngineVersionsAsync(DescribeDBEngineVersionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBEngineVersionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBEngineVersionsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeDBEngineVersionsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeDBInstanceAutomatedBackups
/// <summary>
/// Displays backups for both current and deleted instances. For example, use this operation
/// to find details about automated backups for previously deleted instances. Current
/// instances with retention periods greater than zero (0) are returned for both the <code>DescribeDBInstanceAutomatedBackups</code>
/// and <code>DescribeDBInstances</code> operations.
///
///
/// <para>
/// All parameters are optional.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBInstanceAutomatedBackups service method.</param>
///
/// <returns>The response from the DescribeDBInstanceAutomatedBackups service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBInstanceAutomatedBackupNotFoundException">
/// No automated backup for this DB instance was found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBInstanceAutomatedBackups">REST API Reference for DescribeDBInstanceAutomatedBackups Operation</seealso>
public virtual DescribeDBInstanceAutomatedBackupsResponse DescribeDBInstanceAutomatedBackups(DescribeDBInstanceAutomatedBackupsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBInstanceAutomatedBackupsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBInstanceAutomatedBackupsResponseUnmarshaller.Instance;
return Invoke<DescribeDBInstanceAutomatedBackupsResponse>(request, options);
}
/// <summary>
/// Displays backups for both current and deleted instances. For example, use this operation
/// to find details about automated backups for previously deleted instances. Current
/// instances with retention periods greater than zero (0) are returned for both the <code>DescribeDBInstanceAutomatedBackups</code>
/// and <code>DescribeDBInstances</code> operations.
///
///
/// <para>
/// All parameters are optional.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBInstanceAutomatedBackups service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeDBInstanceAutomatedBackups service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBInstanceAutomatedBackupNotFoundException">
/// No automated backup for this DB instance was found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBInstanceAutomatedBackups">REST API Reference for DescribeDBInstanceAutomatedBackups Operation</seealso>
public virtual Task<DescribeDBInstanceAutomatedBackupsResponse> DescribeDBInstanceAutomatedBackupsAsync(DescribeDBInstanceAutomatedBackupsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBInstanceAutomatedBackupsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBInstanceAutomatedBackupsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeDBInstanceAutomatedBackupsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeDBInstances
/// <summary>
/// Returns information about provisioned RDS instances. This API supports pagination.
///
/// <note>
/// <para>
/// This operation can also return information for Amazon Neptune DB instances and Amazon
/// DocumentDB instances.
/// </para>
/// </note>
/// </summary>
///
/// <returns>The response from the DescribeDBInstances service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBInstances">REST API Reference for DescribeDBInstances Operation</seealso>
public virtual DescribeDBInstancesResponse DescribeDBInstances()
{
return DescribeDBInstances(new DescribeDBInstancesRequest());
}
/// <summary>
/// Returns information about provisioned RDS instances. This API supports pagination.
///
/// <note>
/// <para>
/// This operation can also return information for Amazon Neptune DB instances and Amazon
/// DocumentDB instances.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBInstances service method.</param>
///
/// <returns>The response from the DescribeDBInstances service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBInstances">REST API Reference for DescribeDBInstances Operation</seealso>
public virtual DescribeDBInstancesResponse DescribeDBInstances(DescribeDBInstancesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBInstancesResponseUnmarshaller.Instance;
return Invoke<DescribeDBInstancesResponse>(request, options);
}
/// <summary>
/// Returns information about provisioned RDS instances. This API supports pagination.
///
/// <note>
/// <para>
/// This operation can also return information for Amazon Neptune DB instances and Amazon
/// DocumentDB instances.
/// </para>
/// </note>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeDBInstances service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBInstances">REST API Reference for DescribeDBInstances Operation</seealso>
public virtual Task<DescribeDBInstancesResponse> DescribeDBInstancesAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeDBInstancesAsync(new DescribeDBInstancesRequest(), cancellationToken);
}
/// <summary>
/// Returns information about provisioned RDS instances. This API supports pagination.
///
/// <note>
/// <para>
/// This operation can also return information for Amazon Neptune DB instances and Amazon
/// DocumentDB instances.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBInstances service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeDBInstances service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBInstances">REST API Reference for DescribeDBInstances Operation</seealso>
public virtual Task<DescribeDBInstancesResponse> DescribeDBInstancesAsync(DescribeDBInstancesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBInstancesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeDBInstancesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeDBLogFiles
/// <summary>
/// Returns a list of DB log files for the DB instance.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBLogFiles service method.</param>
///
/// <returns>The response from the DescribeDBLogFiles service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBLogFiles">REST API Reference for DescribeDBLogFiles Operation</seealso>
public virtual DescribeDBLogFilesResponse DescribeDBLogFiles(DescribeDBLogFilesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBLogFilesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBLogFilesResponseUnmarshaller.Instance;
return Invoke<DescribeDBLogFilesResponse>(request, options);
}
/// <summary>
/// Returns a list of DB log files for the DB instance.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBLogFiles service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeDBLogFiles service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBLogFiles">REST API Reference for DescribeDBLogFiles Operation</seealso>
public virtual Task<DescribeDBLogFilesResponse> DescribeDBLogFilesAsync(DescribeDBLogFilesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBLogFilesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBLogFilesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeDBLogFilesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeDBParameterGroups
/// <summary>
/// Returns a list of <code>DBParameterGroup</code> descriptions. If a <code>DBParameterGroupName</code>
/// is specified, the list will contain only the description of the specified DB parameter
/// group.
/// </summary>
///
/// <returns>The response from the DescribeDBParameterGroups service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBParameterGroups">REST API Reference for DescribeDBParameterGroups Operation</seealso>
public virtual DescribeDBParameterGroupsResponse DescribeDBParameterGroups()
{
return DescribeDBParameterGroups(new DescribeDBParameterGroupsRequest());
}
/// <summary>
/// Returns a list of <code>DBParameterGroup</code> descriptions. If a <code>DBParameterGroupName</code>
/// is specified, the list will contain only the description of the specified DB parameter
/// group.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBParameterGroups service method.</param>
///
/// <returns>The response from the DescribeDBParameterGroups service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBParameterGroups">REST API Reference for DescribeDBParameterGroups Operation</seealso>
public virtual DescribeDBParameterGroupsResponse DescribeDBParameterGroups(DescribeDBParameterGroupsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBParameterGroupsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBParameterGroupsResponseUnmarshaller.Instance;
return Invoke<DescribeDBParameterGroupsResponse>(request, options);
}
/// <summary>
/// Returns a list of <code>DBParameterGroup</code> descriptions. If a <code>DBParameterGroupName</code>
/// is specified, the list will contain only the description of the specified DB parameter
/// group.
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeDBParameterGroups service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBParameterGroups">REST API Reference for DescribeDBParameterGroups Operation</seealso>
public virtual Task<DescribeDBParameterGroupsResponse> DescribeDBParameterGroupsAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeDBParameterGroupsAsync(new DescribeDBParameterGroupsRequest(), cancellationToken);
}
/// <summary>
/// Returns a list of <code>DBParameterGroup</code> descriptions. If a <code>DBParameterGroupName</code>
/// is specified, the list will contain only the description of the specified DB parameter
/// group.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBParameterGroups service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeDBParameterGroups service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBParameterGroups">REST API Reference for DescribeDBParameterGroups Operation</seealso>
public virtual Task<DescribeDBParameterGroupsResponse> DescribeDBParameterGroupsAsync(DescribeDBParameterGroupsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBParameterGroupsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBParameterGroupsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeDBParameterGroupsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeDBParameters
/// <summary>
/// Returns the detailed parameter list for a particular DB parameter group.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBParameters service method.</param>
///
/// <returns>The response from the DescribeDBParameters service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBParameters">REST API Reference for DescribeDBParameters Operation</seealso>
public virtual DescribeDBParametersResponse DescribeDBParameters(DescribeDBParametersRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBParametersRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBParametersResponseUnmarshaller.Instance;
return Invoke<DescribeDBParametersResponse>(request, options);
}
/// <summary>
/// Returns the detailed parameter list for a particular DB parameter group.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBParameters service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeDBParameters service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBParameters">REST API Reference for DescribeDBParameters Operation</seealso>
public virtual Task<DescribeDBParametersResponse> DescribeDBParametersAsync(DescribeDBParametersRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBParametersRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBParametersResponseUnmarshaller.Instance;
return InvokeAsync<DescribeDBParametersResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeDBProxies
/// <summary>
/// Returns information about DB proxies.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBProxies service method.</param>
///
/// <returns>The response from the DescribeDBProxies service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBProxyNotFoundException">
/// The specified proxy name doesn't correspond to a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBProxies">REST API Reference for DescribeDBProxies Operation</seealso>
public virtual DescribeDBProxiesResponse DescribeDBProxies(DescribeDBProxiesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBProxiesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBProxiesResponseUnmarshaller.Instance;
return Invoke<DescribeDBProxiesResponse>(request, options);
}
/// <summary>
/// Returns information about DB proxies.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBProxies service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeDBProxies service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBProxyNotFoundException">
/// The specified proxy name doesn't correspond to a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBProxies">REST API Reference for DescribeDBProxies Operation</seealso>
public virtual Task<DescribeDBProxiesResponse> DescribeDBProxiesAsync(DescribeDBProxiesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBProxiesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBProxiesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeDBProxiesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeDBProxyEndpoints
/// <summary>
/// Returns information about DB proxy endpoints.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBProxyEndpoints service method.</param>
///
/// <returns>The response from the DescribeDBProxyEndpoints service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBProxyEndpointNotFoundException">
/// The DB proxy endpoint doesn't exist.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyNotFoundException">
/// The specified proxy name doesn't correspond to a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBProxyEndpoints">REST API Reference for DescribeDBProxyEndpoints Operation</seealso>
public virtual DescribeDBProxyEndpointsResponse DescribeDBProxyEndpoints(DescribeDBProxyEndpointsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBProxyEndpointsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBProxyEndpointsResponseUnmarshaller.Instance;
return Invoke<DescribeDBProxyEndpointsResponse>(request, options);
}
/// <summary>
/// Returns information about DB proxy endpoints.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBProxyEndpoints service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeDBProxyEndpoints service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBProxyEndpointNotFoundException">
/// The DB proxy endpoint doesn't exist.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyNotFoundException">
/// The specified proxy name doesn't correspond to a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBProxyEndpoints">REST API Reference for DescribeDBProxyEndpoints Operation</seealso>
public virtual Task<DescribeDBProxyEndpointsResponse> DescribeDBProxyEndpointsAsync(DescribeDBProxyEndpointsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBProxyEndpointsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBProxyEndpointsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeDBProxyEndpointsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeDBProxyTargetGroups
/// <summary>
/// Returns information about DB proxy target groups, represented by <code>DBProxyTargetGroup</code>
/// data structures.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBProxyTargetGroups service method.</param>
///
/// <returns>The response from the DescribeDBProxyTargetGroups service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBProxyNotFoundException">
/// The specified proxy name doesn't correspond to a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyTargetGroupNotFoundException">
/// The specified target group isn't available for a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBProxyStateException">
/// The requested operation can't be performed while the proxy is in this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBProxyTargetGroups">REST API Reference for DescribeDBProxyTargetGroups Operation</seealso>
public virtual DescribeDBProxyTargetGroupsResponse DescribeDBProxyTargetGroups(DescribeDBProxyTargetGroupsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBProxyTargetGroupsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBProxyTargetGroupsResponseUnmarshaller.Instance;
return Invoke<DescribeDBProxyTargetGroupsResponse>(request, options);
}
/// <summary>
/// Returns information about DB proxy target groups, represented by <code>DBProxyTargetGroup</code>
/// data structures.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBProxyTargetGroups service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeDBProxyTargetGroups service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBProxyNotFoundException">
/// The specified proxy name doesn't correspond to a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyTargetGroupNotFoundException">
/// The specified target group isn't available for a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBProxyStateException">
/// The requested operation can't be performed while the proxy is in this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBProxyTargetGroups">REST API Reference for DescribeDBProxyTargetGroups Operation</seealso>
public virtual Task<DescribeDBProxyTargetGroupsResponse> DescribeDBProxyTargetGroupsAsync(DescribeDBProxyTargetGroupsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBProxyTargetGroupsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBProxyTargetGroupsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeDBProxyTargetGroupsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeDBProxyTargets
/// <summary>
/// Returns information about <code>DBProxyTarget</code> objects. This API supports pagination.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBProxyTargets service method.</param>
///
/// <returns>The response from the DescribeDBProxyTargets service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBProxyNotFoundException">
/// The specified proxy name doesn't correspond to a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyTargetGroupNotFoundException">
/// The specified target group isn't available for a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyTargetNotFoundException">
/// The specified RDS DB instance or Aurora DB cluster isn't available for a proxy owned
/// by your AWS account in the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBProxyStateException">
/// The requested operation can't be performed while the proxy is in this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBProxyTargets">REST API Reference for DescribeDBProxyTargets Operation</seealso>
public virtual DescribeDBProxyTargetsResponse DescribeDBProxyTargets(DescribeDBProxyTargetsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBProxyTargetsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBProxyTargetsResponseUnmarshaller.Instance;
return Invoke<DescribeDBProxyTargetsResponse>(request, options);
}
/// <summary>
/// Returns information about <code>DBProxyTarget</code> objects. This API supports pagination.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBProxyTargets service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeDBProxyTargets service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBProxyNotFoundException">
/// The specified proxy name doesn't correspond to a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyTargetGroupNotFoundException">
/// The specified target group isn't available for a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyTargetNotFoundException">
/// The specified RDS DB instance or Aurora DB cluster isn't available for a proxy owned
/// by your AWS account in the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBProxyStateException">
/// The requested operation can't be performed while the proxy is in this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBProxyTargets">REST API Reference for DescribeDBProxyTargets Operation</seealso>
public virtual Task<DescribeDBProxyTargetsResponse> DescribeDBProxyTargetsAsync(DescribeDBProxyTargetsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBProxyTargetsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBProxyTargetsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeDBProxyTargetsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeDBSecurityGroups
/// <summary>
/// Returns a list of <code>DBSecurityGroup</code> descriptions. If a <code>DBSecurityGroupName</code>
/// is specified, the list will contain only the descriptions of the specified DB security
/// group.
/// </summary>
///
/// <returns>The response from the DescribeDBSecurityGroups service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBSecurityGroupNotFoundException">
/// <code>DBSecurityGroupName</code> doesn't refer to an existing DB security group.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBSecurityGroups">REST API Reference for DescribeDBSecurityGroups Operation</seealso>
public virtual DescribeDBSecurityGroupsResponse DescribeDBSecurityGroups()
{
return DescribeDBSecurityGroups(new DescribeDBSecurityGroupsRequest());
}
/// <summary>
/// Returns a list of <code>DBSecurityGroup</code> descriptions. If a <code>DBSecurityGroupName</code>
/// is specified, the list will contain only the descriptions of the specified DB security
/// group.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBSecurityGroups service method.</param>
///
/// <returns>The response from the DescribeDBSecurityGroups service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBSecurityGroupNotFoundException">
/// <code>DBSecurityGroupName</code> doesn't refer to an existing DB security group.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBSecurityGroups">REST API Reference for DescribeDBSecurityGroups Operation</seealso>
public virtual DescribeDBSecurityGroupsResponse DescribeDBSecurityGroups(DescribeDBSecurityGroupsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBSecurityGroupsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBSecurityGroupsResponseUnmarshaller.Instance;
return Invoke<DescribeDBSecurityGroupsResponse>(request, options);
}
/// <summary>
/// Returns a list of <code>DBSecurityGroup</code> descriptions. If a <code>DBSecurityGroupName</code>
/// is specified, the list will contain only the descriptions of the specified DB security
/// group.
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeDBSecurityGroups service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBSecurityGroupNotFoundException">
/// <code>DBSecurityGroupName</code> doesn't refer to an existing DB security group.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBSecurityGroups">REST API Reference for DescribeDBSecurityGroups Operation</seealso>
public virtual Task<DescribeDBSecurityGroupsResponse> DescribeDBSecurityGroupsAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeDBSecurityGroupsAsync(new DescribeDBSecurityGroupsRequest(), cancellationToken);
}
/// <summary>
/// Returns a list of <code>DBSecurityGroup</code> descriptions. If a <code>DBSecurityGroupName</code>
/// is specified, the list will contain only the descriptions of the specified DB security
/// group.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBSecurityGroups service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeDBSecurityGroups service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBSecurityGroupNotFoundException">
/// <code>DBSecurityGroupName</code> doesn't refer to an existing DB security group.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBSecurityGroups">REST API Reference for DescribeDBSecurityGroups Operation</seealso>
public virtual Task<DescribeDBSecurityGroupsResponse> DescribeDBSecurityGroupsAsync(DescribeDBSecurityGroupsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBSecurityGroupsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBSecurityGroupsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeDBSecurityGroupsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeDBSnapshotAttributes
/// <summary>
/// Returns a list of DB snapshot attribute names and values for a manual DB snapshot.
///
///
/// <para>
/// When sharing snapshots with other AWS accounts, <code>DescribeDBSnapshotAttributes</code>
/// returns the <code>restore</code> attribute and a list of IDs for the AWS accounts
/// that are authorized to copy or restore the manual DB snapshot. If <code>all</code>
/// is included in the list of values for the <code>restore</code> attribute, then the
/// manual DB snapshot is public and can be copied or restored by all AWS accounts.
/// </para>
///
/// <para>
/// To add or remove access for an AWS account to copy or restore a manual DB snapshot,
/// or to make the manual DB snapshot public or private, use the <code>ModifyDBSnapshotAttribute</code>
/// API action.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBSnapshotAttributes service method.</param>
///
/// <returns>The response from the DescribeDBSnapshotAttributes service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBSnapshotNotFoundException">
/// <code>DBSnapshotIdentifier</code> doesn't refer to an existing DB snapshot.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBSnapshotAttributes">REST API Reference for DescribeDBSnapshotAttributes Operation</seealso>
public virtual DescribeDBSnapshotAttributesResponse DescribeDBSnapshotAttributes(DescribeDBSnapshotAttributesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBSnapshotAttributesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBSnapshotAttributesResponseUnmarshaller.Instance;
return Invoke<DescribeDBSnapshotAttributesResponse>(request, options);
}
/// <summary>
/// Returns a list of DB snapshot attribute names and values for a manual DB snapshot.
///
///
/// <para>
/// When sharing snapshots with other AWS accounts, <code>DescribeDBSnapshotAttributes</code>
/// returns the <code>restore</code> attribute and a list of IDs for the AWS accounts
/// that are authorized to copy or restore the manual DB snapshot. If <code>all</code>
/// is included in the list of values for the <code>restore</code> attribute, then the
/// manual DB snapshot is public and can be copied or restored by all AWS accounts.
/// </para>
///
/// <para>
/// To add or remove access for an AWS account to copy or restore a manual DB snapshot,
/// or to make the manual DB snapshot public or private, use the <code>ModifyDBSnapshotAttribute</code>
/// API action.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBSnapshotAttributes service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeDBSnapshotAttributes service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBSnapshotNotFoundException">
/// <code>DBSnapshotIdentifier</code> doesn't refer to an existing DB snapshot.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBSnapshotAttributes">REST API Reference for DescribeDBSnapshotAttributes Operation</seealso>
public virtual Task<DescribeDBSnapshotAttributesResponse> DescribeDBSnapshotAttributesAsync(DescribeDBSnapshotAttributesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBSnapshotAttributesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBSnapshotAttributesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeDBSnapshotAttributesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeDBSnapshots
/// <summary>
/// Returns information about DB snapshots. This API action supports pagination.
/// </summary>
///
/// <returns>The response from the DescribeDBSnapshots service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBSnapshotNotFoundException">
/// <code>DBSnapshotIdentifier</code> doesn't refer to an existing DB snapshot.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBSnapshots">REST API Reference for DescribeDBSnapshots Operation</seealso>
public virtual DescribeDBSnapshotsResponse DescribeDBSnapshots()
{
return DescribeDBSnapshots(new DescribeDBSnapshotsRequest());
}
/// <summary>
/// Returns information about DB snapshots. This API action supports pagination.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBSnapshots service method.</param>
///
/// <returns>The response from the DescribeDBSnapshots service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBSnapshotNotFoundException">
/// <code>DBSnapshotIdentifier</code> doesn't refer to an existing DB snapshot.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBSnapshots">REST API Reference for DescribeDBSnapshots Operation</seealso>
public virtual DescribeDBSnapshotsResponse DescribeDBSnapshots(DescribeDBSnapshotsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBSnapshotsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBSnapshotsResponseUnmarshaller.Instance;
return Invoke<DescribeDBSnapshotsResponse>(request, options);
}
/// <summary>
/// Returns information about DB snapshots. This API action supports pagination.
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeDBSnapshots service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBSnapshotNotFoundException">
/// <code>DBSnapshotIdentifier</code> doesn't refer to an existing DB snapshot.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBSnapshots">REST API Reference for DescribeDBSnapshots Operation</seealso>
public virtual Task<DescribeDBSnapshotsResponse> DescribeDBSnapshotsAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeDBSnapshotsAsync(new DescribeDBSnapshotsRequest(), cancellationToken);
}
/// <summary>
/// Returns information about DB snapshots. This API action supports pagination.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBSnapshots service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeDBSnapshots service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBSnapshotNotFoundException">
/// <code>DBSnapshotIdentifier</code> doesn't refer to an existing DB snapshot.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBSnapshots">REST API Reference for DescribeDBSnapshots Operation</seealso>
public virtual Task<DescribeDBSnapshotsResponse> DescribeDBSnapshotsAsync(DescribeDBSnapshotsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBSnapshotsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBSnapshotsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeDBSnapshotsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeDBSubnetGroups
/// <summary>
/// Returns a list of DBSubnetGroup descriptions. If a DBSubnetGroupName is specified,
/// the list will contain only the descriptions of the specified DBSubnetGroup.
///
///
/// <para>
/// For an overview of CIDR ranges, go to the <a href="http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing">Wikipedia
/// Tutorial</a>.
/// </para>
/// </summary>
///
/// <returns>The response from the DescribeDBSubnetGroups service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupNotFoundException">
/// <code>DBSubnetGroupName</code> doesn't refer to an existing DB subnet group.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBSubnetGroups">REST API Reference for DescribeDBSubnetGroups Operation</seealso>
public virtual DescribeDBSubnetGroupsResponse DescribeDBSubnetGroups()
{
return DescribeDBSubnetGroups(new DescribeDBSubnetGroupsRequest());
}
/// <summary>
/// Returns a list of DBSubnetGroup descriptions. If a DBSubnetGroupName is specified,
/// the list will contain only the descriptions of the specified DBSubnetGroup.
///
///
/// <para>
/// For an overview of CIDR ranges, go to the <a href="http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing">Wikipedia
/// Tutorial</a>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBSubnetGroups service method.</param>
///
/// <returns>The response from the DescribeDBSubnetGroups service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupNotFoundException">
/// <code>DBSubnetGroupName</code> doesn't refer to an existing DB subnet group.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBSubnetGroups">REST API Reference for DescribeDBSubnetGroups Operation</seealso>
public virtual DescribeDBSubnetGroupsResponse DescribeDBSubnetGroups(DescribeDBSubnetGroupsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBSubnetGroupsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBSubnetGroupsResponseUnmarshaller.Instance;
return Invoke<DescribeDBSubnetGroupsResponse>(request, options);
}
/// <summary>
/// Returns a list of DBSubnetGroup descriptions. If a DBSubnetGroupName is specified,
/// the list will contain only the descriptions of the specified DBSubnetGroup.
///
///
/// <para>
/// For an overview of CIDR ranges, go to the <a href="http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing">Wikipedia
/// Tutorial</a>.
/// </para>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeDBSubnetGroups service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupNotFoundException">
/// <code>DBSubnetGroupName</code> doesn't refer to an existing DB subnet group.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBSubnetGroups">REST API Reference for DescribeDBSubnetGroups Operation</seealso>
public virtual Task<DescribeDBSubnetGroupsResponse> DescribeDBSubnetGroupsAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeDBSubnetGroupsAsync(new DescribeDBSubnetGroupsRequest(), cancellationToken);
}
/// <summary>
/// Returns a list of DBSubnetGroup descriptions. If a DBSubnetGroupName is specified,
/// the list will contain only the descriptions of the specified DBSubnetGroup.
///
///
/// <para>
/// For an overview of CIDR ranges, go to the <a href="http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing">Wikipedia
/// Tutorial</a>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDBSubnetGroups service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeDBSubnetGroups service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupNotFoundException">
/// <code>DBSubnetGroupName</code> doesn't refer to an existing DB subnet group.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBSubnetGroups">REST API Reference for DescribeDBSubnetGroups Operation</seealso>
public virtual Task<DescribeDBSubnetGroupsResponse> DescribeDBSubnetGroupsAsync(DescribeDBSubnetGroupsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDBSubnetGroupsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDBSubnetGroupsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeDBSubnetGroupsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeEngineDefaultClusterParameters
/// <summary>
/// Returns the default engine and system parameter information for the cluster database
/// engine.
///
///
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeEngineDefaultClusterParameters service method.</param>
///
/// <returns>The response from the DescribeEngineDefaultClusterParameters service method, as returned by RDS.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeEngineDefaultClusterParameters">REST API Reference for DescribeEngineDefaultClusterParameters Operation</seealso>
public virtual DescribeEngineDefaultClusterParametersResponse DescribeEngineDefaultClusterParameters(DescribeEngineDefaultClusterParametersRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeEngineDefaultClusterParametersRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeEngineDefaultClusterParametersResponseUnmarshaller.Instance;
return Invoke<DescribeEngineDefaultClusterParametersResponse>(request, options);
}
/// <summary>
/// Returns the default engine and system parameter information for the cluster database
/// engine.
///
///
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeEngineDefaultClusterParameters service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeEngineDefaultClusterParameters service method, as returned by RDS.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeEngineDefaultClusterParameters">REST API Reference for DescribeEngineDefaultClusterParameters Operation</seealso>
public virtual Task<DescribeEngineDefaultClusterParametersResponse> DescribeEngineDefaultClusterParametersAsync(DescribeEngineDefaultClusterParametersRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeEngineDefaultClusterParametersRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeEngineDefaultClusterParametersResponseUnmarshaller.Instance;
return InvokeAsync<DescribeEngineDefaultClusterParametersResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeEngineDefaultParameters
/// <summary>
/// Returns the default engine and system parameter information for the specified database
/// engine.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeEngineDefaultParameters service method.</param>
///
/// <returns>The response from the DescribeEngineDefaultParameters service method, as returned by RDS.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeEngineDefaultParameters">REST API Reference for DescribeEngineDefaultParameters Operation</seealso>
public virtual DescribeEngineDefaultParametersResponse DescribeEngineDefaultParameters(DescribeEngineDefaultParametersRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeEngineDefaultParametersRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeEngineDefaultParametersResponseUnmarshaller.Instance;
return Invoke<DescribeEngineDefaultParametersResponse>(request, options);
}
/// <summary>
/// Returns the default engine and system parameter information for the specified database
/// engine.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeEngineDefaultParameters service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeEngineDefaultParameters service method, as returned by RDS.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeEngineDefaultParameters">REST API Reference for DescribeEngineDefaultParameters Operation</seealso>
public virtual Task<DescribeEngineDefaultParametersResponse> DescribeEngineDefaultParametersAsync(DescribeEngineDefaultParametersRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeEngineDefaultParametersRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeEngineDefaultParametersResponseUnmarshaller.Instance;
return InvokeAsync<DescribeEngineDefaultParametersResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeEventCategories
/// <summary>
/// Displays a list of categories for all event source types, or, if specified, for a
/// specified source type. You can see a list of the event categories and source types
/// in <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html">
/// Events</a> in the <i>Amazon RDS User Guide.</i>
/// </summary>
///
/// <returns>The response from the DescribeEventCategories service method, as returned by RDS.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeEventCategories">REST API Reference for DescribeEventCategories Operation</seealso>
public virtual DescribeEventCategoriesResponse DescribeEventCategories()
{
return DescribeEventCategories(new DescribeEventCategoriesRequest());
}
/// <summary>
/// Displays a list of categories for all event source types, or, if specified, for a
/// specified source type. You can see a list of the event categories and source types
/// in <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html">
/// Events</a> in the <i>Amazon RDS User Guide.</i>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeEventCategories service method.</param>
///
/// <returns>The response from the DescribeEventCategories service method, as returned by RDS.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeEventCategories">REST API Reference for DescribeEventCategories Operation</seealso>
public virtual DescribeEventCategoriesResponse DescribeEventCategories(DescribeEventCategoriesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeEventCategoriesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeEventCategoriesResponseUnmarshaller.Instance;
return Invoke<DescribeEventCategoriesResponse>(request, options);
}
/// <summary>
/// Displays a list of categories for all event source types, or, if specified, for a
/// specified source type. You can see a list of the event categories and source types
/// in <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html">
/// Events</a> in the <i>Amazon RDS User Guide.</i>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeEventCategories service method, as returned by RDS.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeEventCategories">REST API Reference for DescribeEventCategories Operation</seealso>
public virtual Task<DescribeEventCategoriesResponse> DescribeEventCategoriesAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeEventCategoriesAsync(new DescribeEventCategoriesRequest(), cancellationToken);
}
/// <summary>
/// Displays a list of categories for all event source types, or, if specified, for a
/// specified source type. You can see a list of the event categories and source types
/// in <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html">
/// Events</a> in the <i>Amazon RDS User Guide.</i>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeEventCategories service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeEventCategories service method, as returned by RDS.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeEventCategories">REST API Reference for DescribeEventCategories Operation</seealso>
public virtual Task<DescribeEventCategoriesResponse> DescribeEventCategoriesAsync(DescribeEventCategoriesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeEventCategoriesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeEventCategoriesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeEventCategoriesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeEvents
/// <summary>
/// Returns events related to DB instances, DB clusters, DB parameter groups, DB security
/// groups, DB snapshots, and DB cluster snapshots for the past 14 days. Events specific
/// to a particular DB instances, DB clusters, DB parameter groups, DB security groups,
/// DB snapshots, and DB cluster snapshots group can be obtained by providing the name
/// as a parameter.
///
/// <note>
/// <para>
/// By default, the past hour of events are returned.
/// </para>
/// </note>
/// </summary>
///
/// <returns>The response from the DescribeEvents service method, as returned by RDS.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeEvents">REST API Reference for DescribeEvents Operation</seealso>
public virtual DescribeEventsResponse DescribeEvents()
{
return DescribeEvents(new DescribeEventsRequest());
}
/// <summary>
/// Returns events related to DB instances, DB clusters, DB parameter groups, DB security
/// groups, DB snapshots, and DB cluster snapshots for the past 14 days. Events specific
/// to a particular DB instances, DB clusters, DB parameter groups, DB security groups,
/// DB snapshots, and DB cluster snapshots group can be obtained by providing the name
/// as a parameter.
///
/// <note>
/// <para>
/// By default, the past hour of events are returned.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeEvents service method.</param>
///
/// <returns>The response from the DescribeEvents service method, as returned by RDS.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeEvents">REST API Reference for DescribeEvents Operation</seealso>
public virtual DescribeEventsResponse DescribeEvents(DescribeEventsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeEventsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeEventsResponseUnmarshaller.Instance;
return Invoke<DescribeEventsResponse>(request, options);
}
/// <summary>
/// Returns events related to DB instances, DB clusters, DB parameter groups, DB security
/// groups, DB snapshots, and DB cluster snapshots for the past 14 days. Events specific
/// to a particular DB instances, DB clusters, DB parameter groups, DB security groups,
/// DB snapshots, and DB cluster snapshots group can be obtained by providing the name
/// as a parameter.
///
/// <note>
/// <para>
/// By default, the past hour of events are returned.
/// </para>
/// </note>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeEvents service method, as returned by RDS.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeEvents">REST API Reference for DescribeEvents Operation</seealso>
public virtual Task<DescribeEventsResponse> DescribeEventsAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeEventsAsync(new DescribeEventsRequest(), cancellationToken);
}
/// <summary>
/// Returns events related to DB instances, DB clusters, DB parameter groups, DB security
/// groups, DB snapshots, and DB cluster snapshots for the past 14 days. Events specific
/// to a particular DB instances, DB clusters, DB parameter groups, DB security groups,
/// DB snapshots, and DB cluster snapshots group can be obtained by providing the name
/// as a parameter.
///
/// <note>
/// <para>
/// By default, the past hour of events are returned.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeEvents service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeEvents service method, as returned by RDS.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeEvents">REST API Reference for DescribeEvents Operation</seealso>
public virtual Task<DescribeEventsResponse> DescribeEventsAsync(DescribeEventsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeEventsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeEventsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeEventsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeEventSubscriptions
/// <summary>
/// Lists all the subscription descriptions for a customer account. The description for
/// a subscription includes <code>SubscriptionName</code>, <code>SNSTopicARN</code>, <code>CustomerID</code>,
/// <code>SourceType</code>, <code>SourceID</code>, <code>CreationTime</code>, and <code>Status</code>.
///
///
/// <para>
/// If you specify a <code>SubscriptionName</code>, lists the description for that subscription.
/// </para>
/// </summary>
///
/// <returns>The response from the DescribeEventSubscriptions service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.SubscriptionNotFoundException">
/// The subscription name does not exist.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeEventSubscriptions">REST API Reference for DescribeEventSubscriptions Operation</seealso>
public virtual DescribeEventSubscriptionsResponse DescribeEventSubscriptions()
{
return DescribeEventSubscriptions(new DescribeEventSubscriptionsRequest());
}
/// <summary>
/// Lists all the subscription descriptions for a customer account. The description for
/// a subscription includes <code>SubscriptionName</code>, <code>SNSTopicARN</code>, <code>CustomerID</code>,
/// <code>SourceType</code>, <code>SourceID</code>, <code>CreationTime</code>, and <code>Status</code>.
///
///
/// <para>
/// If you specify a <code>SubscriptionName</code>, lists the description for that subscription.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeEventSubscriptions service method.</param>
///
/// <returns>The response from the DescribeEventSubscriptions service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.SubscriptionNotFoundException">
/// The subscription name does not exist.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeEventSubscriptions">REST API Reference for DescribeEventSubscriptions Operation</seealso>
public virtual DescribeEventSubscriptionsResponse DescribeEventSubscriptions(DescribeEventSubscriptionsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeEventSubscriptionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeEventSubscriptionsResponseUnmarshaller.Instance;
return Invoke<DescribeEventSubscriptionsResponse>(request, options);
}
/// <summary>
/// Lists all the subscription descriptions for a customer account. The description for
/// a subscription includes <code>SubscriptionName</code>, <code>SNSTopicARN</code>, <code>CustomerID</code>,
/// <code>SourceType</code>, <code>SourceID</code>, <code>CreationTime</code>, and <code>Status</code>.
///
///
/// <para>
/// If you specify a <code>SubscriptionName</code>, lists the description for that subscription.
/// </para>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeEventSubscriptions service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.SubscriptionNotFoundException">
/// The subscription name does not exist.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeEventSubscriptions">REST API Reference for DescribeEventSubscriptions Operation</seealso>
public virtual Task<DescribeEventSubscriptionsResponse> DescribeEventSubscriptionsAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeEventSubscriptionsAsync(new DescribeEventSubscriptionsRequest(), cancellationToken);
}
/// <summary>
/// Lists all the subscription descriptions for a customer account. The description for
/// a subscription includes <code>SubscriptionName</code>, <code>SNSTopicARN</code>, <code>CustomerID</code>,
/// <code>SourceType</code>, <code>SourceID</code>, <code>CreationTime</code>, and <code>Status</code>.
///
///
/// <para>
/// If you specify a <code>SubscriptionName</code>, lists the description for that subscription.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeEventSubscriptions service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeEventSubscriptions service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.SubscriptionNotFoundException">
/// The subscription name does not exist.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeEventSubscriptions">REST API Reference for DescribeEventSubscriptions Operation</seealso>
public virtual Task<DescribeEventSubscriptionsResponse> DescribeEventSubscriptionsAsync(DescribeEventSubscriptionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeEventSubscriptionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeEventSubscriptionsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeEventSubscriptionsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeExportTasks
/// <summary>
/// Returns information about a snapshot export to Amazon S3. This API operation supports
/// pagination.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeExportTasks service method.</param>
///
/// <returns>The response from the DescribeExportTasks service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.ExportTaskNotFoundException">
/// The export task doesn't exist.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeExportTasks">REST API Reference for DescribeExportTasks Operation</seealso>
public virtual DescribeExportTasksResponse DescribeExportTasks(DescribeExportTasksRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeExportTasksRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeExportTasksResponseUnmarshaller.Instance;
return Invoke<DescribeExportTasksResponse>(request, options);
}
/// <summary>
/// Returns information about a snapshot export to Amazon S3. This API operation supports
/// pagination.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeExportTasks service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeExportTasks service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.ExportTaskNotFoundException">
/// The export task doesn't exist.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeExportTasks">REST API Reference for DescribeExportTasks Operation</seealso>
public virtual Task<DescribeExportTasksResponse> DescribeExportTasksAsync(DescribeExportTasksRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeExportTasksRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeExportTasksResponseUnmarshaller.Instance;
return InvokeAsync<DescribeExportTasksResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeGlobalClusters
/// <summary>
/// Returns information about Aurora global database clusters. This API supports pagination.
///
///
///
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeGlobalClusters service method.</param>
///
/// <returns>The response from the DescribeGlobalClusters service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.GlobalClusterNotFoundException">
/// The <code>GlobalClusterIdentifier</code> doesn't refer to an existing global database
/// cluster.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeGlobalClusters">REST API Reference for DescribeGlobalClusters Operation</seealso>
public virtual DescribeGlobalClustersResponse DescribeGlobalClusters(DescribeGlobalClustersRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeGlobalClustersRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeGlobalClustersResponseUnmarshaller.Instance;
return Invoke<DescribeGlobalClustersResponse>(request, options);
}
/// <summary>
/// Returns information about Aurora global database clusters. This API supports pagination.
///
///
///
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeGlobalClusters service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeGlobalClusters service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.GlobalClusterNotFoundException">
/// The <code>GlobalClusterIdentifier</code> doesn't refer to an existing global database
/// cluster.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeGlobalClusters">REST API Reference for DescribeGlobalClusters Operation</seealso>
public virtual Task<DescribeGlobalClustersResponse> DescribeGlobalClustersAsync(DescribeGlobalClustersRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeGlobalClustersRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeGlobalClustersResponseUnmarshaller.Instance;
return InvokeAsync<DescribeGlobalClustersResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeInstallationMedia
/// <summary>
/// Describes the available installation media for a DB engine that requires an on-premises
/// customer provided license, such as Microsoft SQL Server.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeInstallationMedia service method.</param>
///
/// <returns>The response from the DescribeInstallationMedia service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.InstallationMediaNotFoundException">
/// <code>InstallationMediaID</code> doesn't refer to an existing installation medium.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeInstallationMedia">REST API Reference for DescribeInstallationMedia Operation</seealso>
public virtual DescribeInstallationMediaResponse DescribeInstallationMedia(DescribeInstallationMediaRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeInstallationMediaRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeInstallationMediaResponseUnmarshaller.Instance;
return Invoke<DescribeInstallationMediaResponse>(request, options);
}
/// <summary>
/// Describes the available installation media for a DB engine that requires an on-premises
/// customer provided license, such as Microsoft SQL Server.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeInstallationMedia service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeInstallationMedia service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.InstallationMediaNotFoundException">
/// <code>InstallationMediaID</code> doesn't refer to an existing installation medium.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeInstallationMedia">REST API Reference for DescribeInstallationMedia Operation</seealso>
public virtual Task<DescribeInstallationMediaResponse> DescribeInstallationMediaAsync(DescribeInstallationMediaRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeInstallationMediaRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeInstallationMediaResponseUnmarshaller.Instance;
return InvokeAsync<DescribeInstallationMediaResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeOptionGroupOptions
/// <summary>
/// Describes all available options.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeOptionGroupOptions service method.</param>
///
/// <returns>The response from the DescribeOptionGroupOptions service method, as returned by RDS.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeOptionGroupOptions">REST API Reference for DescribeOptionGroupOptions Operation</seealso>
public virtual DescribeOptionGroupOptionsResponse DescribeOptionGroupOptions(DescribeOptionGroupOptionsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeOptionGroupOptionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeOptionGroupOptionsResponseUnmarshaller.Instance;
return Invoke<DescribeOptionGroupOptionsResponse>(request, options);
}
/// <summary>
/// Describes all available options.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeOptionGroupOptions service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeOptionGroupOptions service method, as returned by RDS.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeOptionGroupOptions">REST API Reference for DescribeOptionGroupOptions Operation</seealso>
public virtual Task<DescribeOptionGroupOptionsResponse> DescribeOptionGroupOptionsAsync(DescribeOptionGroupOptionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeOptionGroupOptionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeOptionGroupOptionsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeOptionGroupOptionsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeOptionGroups
/// <summary>
/// Describes the available option groups.
/// </summary>
///
/// <returns>The response from the DescribeOptionGroups service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.OptionGroupNotFoundException">
/// The specified option group could not be found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeOptionGroups">REST API Reference for DescribeOptionGroups Operation</seealso>
public virtual DescribeOptionGroupsResponse DescribeOptionGroups()
{
return DescribeOptionGroups(new DescribeOptionGroupsRequest());
}
/// <summary>
/// Describes the available option groups.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeOptionGroups service method.</param>
///
/// <returns>The response from the DescribeOptionGroups service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.OptionGroupNotFoundException">
/// The specified option group could not be found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeOptionGroups">REST API Reference for DescribeOptionGroups Operation</seealso>
public virtual DescribeOptionGroupsResponse DescribeOptionGroups(DescribeOptionGroupsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeOptionGroupsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeOptionGroupsResponseUnmarshaller.Instance;
return Invoke<DescribeOptionGroupsResponse>(request, options);
}
/// <summary>
/// Describes the available option groups.
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeOptionGroups service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.OptionGroupNotFoundException">
/// The specified option group could not be found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeOptionGroups">REST API Reference for DescribeOptionGroups Operation</seealso>
public virtual Task<DescribeOptionGroupsResponse> DescribeOptionGroupsAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeOptionGroupsAsync(new DescribeOptionGroupsRequest(), cancellationToken);
}
/// <summary>
/// Describes the available option groups.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeOptionGroups service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeOptionGroups service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.OptionGroupNotFoundException">
/// The specified option group could not be found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeOptionGroups">REST API Reference for DescribeOptionGroups Operation</seealso>
public virtual Task<DescribeOptionGroupsResponse> DescribeOptionGroupsAsync(DescribeOptionGroupsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeOptionGroupsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeOptionGroupsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeOptionGroupsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeOrderableDBInstanceOptions
/// <summary>
/// Returns a list of orderable DB instance options for the specified engine.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeOrderableDBInstanceOptions service method.</param>
///
/// <returns>The response from the DescribeOrderableDBInstanceOptions service method, as returned by RDS.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeOrderableDBInstanceOptions">REST API Reference for DescribeOrderableDBInstanceOptions Operation</seealso>
public virtual DescribeOrderableDBInstanceOptionsResponse DescribeOrderableDBInstanceOptions(DescribeOrderableDBInstanceOptionsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeOrderableDBInstanceOptionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeOrderableDBInstanceOptionsResponseUnmarshaller.Instance;
return Invoke<DescribeOrderableDBInstanceOptionsResponse>(request, options);
}
/// <summary>
/// Returns a list of orderable DB instance options for the specified engine.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeOrderableDBInstanceOptions service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeOrderableDBInstanceOptions service method, as returned by RDS.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeOrderableDBInstanceOptions">REST API Reference for DescribeOrderableDBInstanceOptions Operation</seealso>
public virtual Task<DescribeOrderableDBInstanceOptionsResponse> DescribeOrderableDBInstanceOptionsAsync(DescribeOrderableDBInstanceOptionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeOrderableDBInstanceOptionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeOrderableDBInstanceOptionsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeOrderableDBInstanceOptionsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribePendingMaintenanceActions
/// <summary>
/// Returns a list of resources (for example, DB instances) that have at least one pending
/// maintenance action.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribePendingMaintenanceActions service method.</param>
///
/// <returns>The response from the DescribePendingMaintenanceActions service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.ResourceNotFoundException">
/// The specified resource ID was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribePendingMaintenanceActions">REST API Reference for DescribePendingMaintenanceActions Operation</seealso>
public virtual DescribePendingMaintenanceActionsResponse DescribePendingMaintenanceActions(DescribePendingMaintenanceActionsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribePendingMaintenanceActionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribePendingMaintenanceActionsResponseUnmarshaller.Instance;
return Invoke<DescribePendingMaintenanceActionsResponse>(request, options);
}
/// <summary>
/// Returns a list of resources (for example, DB instances) that have at least one pending
/// maintenance action.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribePendingMaintenanceActions service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribePendingMaintenanceActions service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.ResourceNotFoundException">
/// The specified resource ID was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribePendingMaintenanceActions">REST API Reference for DescribePendingMaintenanceActions Operation</seealso>
public virtual Task<DescribePendingMaintenanceActionsResponse> DescribePendingMaintenanceActionsAsync(DescribePendingMaintenanceActionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribePendingMaintenanceActionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribePendingMaintenanceActionsResponseUnmarshaller.Instance;
return InvokeAsync<DescribePendingMaintenanceActionsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeReservedDBInstances
/// <summary>
/// Returns information about reserved DB instances for this account, or about a specified
/// reserved DB instance.
/// </summary>
///
/// <returns>The response from the DescribeReservedDBInstances service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.ReservedDBInstanceNotFoundException">
/// The specified reserved DB Instance not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeReservedDBInstances">REST API Reference for DescribeReservedDBInstances Operation</seealso>
public virtual DescribeReservedDBInstancesResponse DescribeReservedDBInstances()
{
return DescribeReservedDBInstances(new DescribeReservedDBInstancesRequest());
}
/// <summary>
/// Returns information about reserved DB instances for this account, or about a specified
/// reserved DB instance.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeReservedDBInstances service method.</param>
///
/// <returns>The response from the DescribeReservedDBInstances service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.ReservedDBInstanceNotFoundException">
/// The specified reserved DB Instance not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeReservedDBInstances">REST API Reference for DescribeReservedDBInstances Operation</seealso>
public virtual DescribeReservedDBInstancesResponse DescribeReservedDBInstances(DescribeReservedDBInstancesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeReservedDBInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeReservedDBInstancesResponseUnmarshaller.Instance;
return Invoke<DescribeReservedDBInstancesResponse>(request, options);
}
/// <summary>
/// Returns information about reserved DB instances for this account, or about a specified
/// reserved DB instance.
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeReservedDBInstances service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.ReservedDBInstanceNotFoundException">
/// The specified reserved DB Instance not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeReservedDBInstances">REST API Reference for DescribeReservedDBInstances Operation</seealso>
public virtual Task<DescribeReservedDBInstancesResponse> DescribeReservedDBInstancesAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeReservedDBInstancesAsync(new DescribeReservedDBInstancesRequest(), cancellationToken);
}
/// <summary>
/// Returns information about reserved DB instances for this account, or about a specified
/// reserved DB instance.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeReservedDBInstances service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeReservedDBInstances service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.ReservedDBInstanceNotFoundException">
/// The specified reserved DB Instance not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeReservedDBInstances">REST API Reference for DescribeReservedDBInstances Operation</seealso>
public virtual Task<DescribeReservedDBInstancesResponse> DescribeReservedDBInstancesAsync(DescribeReservedDBInstancesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeReservedDBInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeReservedDBInstancesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeReservedDBInstancesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeReservedDBInstancesOfferings
/// <summary>
/// Lists available reserved DB instance offerings.
/// </summary>
///
/// <returns>The response from the DescribeReservedDBInstancesOfferings service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.ReservedDBInstancesOfferingNotFoundException">
/// Specified offering does not exist.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeReservedDBInstancesOfferings">REST API Reference for DescribeReservedDBInstancesOfferings Operation</seealso>
public virtual DescribeReservedDBInstancesOfferingsResponse DescribeReservedDBInstancesOfferings()
{
return DescribeReservedDBInstancesOfferings(new DescribeReservedDBInstancesOfferingsRequest());
}
/// <summary>
/// Lists available reserved DB instance offerings.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeReservedDBInstancesOfferings service method.</param>
///
/// <returns>The response from the DescribeReservedDBInstancesOfferings service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.ReservedDBInstancesOfferingNotFoundException">
/// Specified offering does not exist.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeReservedDBInstancesOfferings">REST API Reference for DescribeReservedDBInstancesOfferings Operation</seealso>
public virtual DescribeReservedDBInstancesOfferingsResponse DescribeReservedDBInstancesOfferings(DescribeReservedDBInstancesOfferingsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeReservedDBInstancesOfferingsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeReservedDBInstancesOfferingsResponseUnmarshaller.Instance;
return Invoke<DescribeReservedDBInstancesOfferingsResponse>(request, options);
}
/// <summary>
/// Lists available reserved DB instance offerings.
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeReservedDBInstancesOfferings service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.ReservedDBInstancesOfferingNotFoundException">
/// Specified offering does not exist.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeReservedDBInstancesOfferings">REST API Reference for DescribeReservedDBInstancesOfferings Operation</seealso>
public virtual Task<DescribeReservedDBInstancesOfferingsResponse> DescribeReservedDBInstancesOfferingsAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeReservedDBInstancesOfferingsAsync(new DescribeReservedDBInstancesOfferingsRequest(), cancellationToken);
}
/// <summary>
/// Lists available reserved DB instance offerings.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeReservedDBInstancesOfferings service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeReservedDBInstancesOfferings service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.ReservedDBInstancesOfferingNotFoundException">
/// Specified offering does not exist.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeReservedDBInstancesOfferings">REST API Reference for DescribeReservedDBInstancesOfferings Operation</seealso>
public virtual Task<DescribeReservedDBInstancesOfferingsResponse> DescribeReservedDBInstancesOfferingsAsync(DescribeReservedDBInstancesOfferingsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeReservedDBInstancesOfferingsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeReservedDBInstancesOfferingsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeReservedDBInstancesOfferingsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeSourceRegions
/// <summary>
/// Returns a list of the source AWS Regions where the current AWS Region can create a
/// read replica, copy a DB snapshot from, or replicate automated backups from. This API
/// action supports pagination.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeSourceRegions service method.</param>
///
/// <returns>The response from the DescribeSourceRegions service method, as returned by RDS.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeSourceRegions">REST API Reference for DescribeSourceRegions Operation</seealso>
public virtual DescribeSourceRegionsResponse DescribeSourceRegions(DescribeSourceRegionsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeSourceRegionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeSourceRegionsResponseUnmarshaller.Instance;
return Invoke<DescribeSourceRegionsResponse>(request, options);
}
/// <summary>
/// Returns a list of the source AWS Regions where the current AWS Region can create a
/// read replica, copy a DB snapshot from, or replicate automated backups from. This API
/// action supports pagination.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeSourceRegions service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeSourceRegions service method, as returned by RDS.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeSourceRegions">REST API Reference for DescribeSourceRegions Operation</seealso>
public virtual Task<DescribeSourceRegionsResponse> DescribeSourceRegionsAsync(DescribeSourceRegionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeSourceRegionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeSourceRegionsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeSourceRegionsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeValidDBInstanceModifications
/// <summary>
/// You can call <code>DescribeValidDBInstanceModifications</code> to learn what modifications
/// you can make to your DB instance. You can use this information when you call <code>ModifyDBInstance</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeValidDBInstanceModifications service method.</param>
///
/// <returns>The response from the DescribeValidDBInstanceModifications service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeValidDBInstanceModifications">REST API Reference for DescribeValidDBInstanceModifications Operation</seealso>
public virtual DescribeValidDBInstanceModificationsResponse DescribeValidDBInstanceModifications(DescribeValidDBInstanceModificationsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeValidDBInstanceModificationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeValidDBInstanceModificationsResponseUnmarshaller.Instance;
return Invoke<DescribeValidDBInstanceModificationsResponse>(request, options);
}
/// <summary>
/// You can call <code>DescribeValidDBInstanceModifications</code> to learn what modifications
/// you can make to your DB instance. You can use this information when you call <code>ModifyDBInstance</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeValidDBInstanceModifications service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeValidDBInstanceModifications service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeValidDBInstanceModifications">REST API Reference for DescribeValidDBInstanceModifications Operation</seealso>
public virtual Task<DescribeValidDBInstanceModificationsResponse> DescribeValidDBInstanceModificationsAsync(DescribeValidDBInstanceModificationsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeValidDBInstanceModificationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeValidDBInstanceModificationsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeValidDBInstanceModificationsResponse>(request, options, cancellationToken);
}
#endregion
#region DownloadDBLogFilePortion
/// <summary>
/// Downloads all or a portion of the specified log file, up to 1 MB in size.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DownloadDBLogFilePortion service method.</param>
///
/// <returns>The response from the DownloadDBLogFilePortion service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBLogFileNotFoundException">
/// <code>LogFileName</code> doesn't refer to an existing DB log file.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DownloadDBLogFilePortion">REST API Reference for DownloadDBLogFilePortion Operation</seealso>
public virtual DownloadDBLogFilePortionResponse DownloadDBLogFilePortion(DownloadDBLogFilePortionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DownloadDBLogFilePortionRequestMarshaller.Instance;
options.ResponseUnmarshaller = DownloadDBLogFilePortionResponseUnmarshaller.Instance;
return Invoke<DownloadDBLogFilePortionResponse>(request, options);
}
/// <summary>
/// Downloads all or a portion of the specified log file, up to 1 MB in size.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DownloadDBLogFilePortion service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DownloadDBLogFilePortion service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBLogFileNotFoundException">
/// <code>LogFileName</code> doesn't refer to an existing DB log file.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DownloadDBLogFilePortion">REST API Reference for DownloadDBLogFilePortion Operation</seealso>
public virtual Task<DownloadDBLogFilePortionResponse> DownloadDBLogFilePortionAsync(DownloadDBLogFilePortionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DownloadDBLogFilePortionRequestMarshaller.Instance;
options.ResponseUnmarshaller = DownloadDBLogFilePortionResponseUnmarshaller.Instance;
return InvokeAsync<DownloadDBLogFilePortionResponse>(request, options, cancellationToken);
}
#endregion
#region FailoverDBCluster
/// <summary>
/// Forces a failover for a DB cluster.
///
///
/// <para>
/// A failover for a DB cluster promotes one of the Aurora Replicas (read-only instances)
/// in the DB cluster to be the primary instance (the cluster writer).
/// </para>
///
/// <para>
/// Amazon Aurora will automatically fail over to an Aurora Replica, if one exists, when
/// the primary instance fails. You can force a failover when you want to simulate a failure
/// of a primary instance for testing. Because each instance in a DB cluster has its own
/// endpoint address, you will need to clean up and re-establish any existing connections
/// that use those endpoint addresses when the failover is complete.
/// </para>
///
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the FailoverDBCluster service method.</param>
///
/// <returns>The response from the FailoverDBCluster service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/FailoverDBCluster">REST API Reference for FailoverDBCluster Operation</seealso>
public virtual FailoverDBClusterResponse FailoverDBCluster(FailoverDBClusterRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = FailoverDBClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = FailoverDBClusterResponseUnmarshaller.Instance;
return Invoke<FailoverDBClusterResponse>(request, options);
}
/// <summary>
/// Forces a failover for a DB cluster.
///
///
/// <para>
/// A failover for a DB cluster promotes one of the Aurora Replicas (read-only instances)
/// in the DB cluster to be the primary instance (the cluster writer).
/// </para>
///
/// <para>
/// Amazon Aurora will automatically fail over to an Aurora Replica, if one exists, when
/// the primary instance fails. You can force a failover when you want to simulate a failure
/// of a primary instance for testing. Because each instance in a DB cluster has its own
/// endpoint address, you will need to clean up and re-establish any existing connections
/// that use those endpoint addresses when the failover is complete.
/// </para>
///
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the FailoverDBCluster service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the FailoverDBCluster service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/FailoverDBCluster">REST API Reference for FailoverDBCluster Operation</seealso>
public virtual Task<FailoverDBClusterResponse> FailoverDBClusterAsync(FailoverDBClusterRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = FailoverDBClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = FailoverDBClusterResponseUnmarshaller.Instance;
return InvokeAsync<FailoverDBClusterResponse>(request, options, cancellationToken);
}
#endregion
#region FailoverGlobalCluster
/// <summary>
/// Initiates the failover process for an Aurora global database (<a>GlobalCluster</a>).
///
///
/// <para>
/// A failover for an Aurora global database promotes one of secondary read-only DB clusters
/// to be the primary DB cluster and demotes the primary DB cluster to being a secondary
/// (read-only) DB cluster. In other words, the role of the current primary DB cluster
/// and the selected (target) DB cluster are switched. The selected secondary DB cluster
/// assumes full read/write capabilities for the Aurora global database.
/// </para>
///
/// <para>
/// For more information about failing over an Amazon Aurora global database, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database-disaster-recovery.html#aurora-global-database-disaster-recovery.managed-failover">Managed
/// planned failover for Amazon Aurora global databases</a> in the <i>Amazon Aurora User
/// Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action applies to <a>GlobalCluster</a> (Aurora global databases) only. Use this
/// action only on healthy Aurora global databases with running Aurora DB clusters and
/// no Region-wide outages, to test disaster recovery scenarios or to reconfigure your
/// Aurora global database topology.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the FailoverGlobalCluster service method.</param>
///
/// <returns>The response from the FailoverGlobalCluster service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.GlobalClusterNotFoundException">
/// The <code>GlobalClusterIdentifier</code> doesn't refer to an existing global database
/// cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidGlobalClusterStateException">
/// The global cluster is in an invalid state and can't perform the requested operation.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/FailoverGlobalCluster">REST API Reference for FailoverGlobalCluster Operation</seealso>
public virtual FailoverGlobalClusterResponse FailoverGlobalCluster(FailoverGlobalClusterRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = FailoverGlobalClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = FailoverGlobalClusterResponseUnmarshaller.Instance;
return Invoke<FailoverGlobalClusterResponse>(request, options);
}
/// <summary>
/// Initiates the failover process for an Aurora global database (<a>GlobalCluster</a>).
///
///
/// <para>
/// A failover for an Aurora global database promotes one of secondary read-only DB clusters
/// to be the primary DB cluster and demotes the primary DB cluster to being a secondary
/// (read-only) DB cluster. In other words, the role of the current primary DB cluster
/// and the selected (target) DB cluster are switched. The selected secondary DB cluster
/// assumes full read/write capabilities for the Aurora global database.
/// </para>
///
/// <para>
/// For more information about failing over an Amazon Aurora global database, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database-disaster-recovery.html#aurora-global-database-disaster-recovery.managed-failover">Managed
/// planned failover for Amazon Aurora global databases</a> in the <i>Amazon Aurora User
/// Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action applies to <a>GlobalCluster</a> (Aurora global databases) only. Use this
/// action only on healthy Aurora global databases with running Aurora DB clusters and
/// no Region-wide outages, to test disaster recovery scenarios or to reconfigure your
/// Aurora global database topology.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the FailoverGlobalCluster service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the FailoverGlobalCluster service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.GlobalClusterNotFoundException">
/// The <code>GlobalClusterIdentifier</code> doesn't refer to an existing global database
/// cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidGlobalClusterStateException">
/// The global cluster is in an invalid state and can't perform the requested operation.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/FailoverGlobalCluster">REST API Reference for FailoverGlobalCluster Operation</seealso>
public virtual Task<FailoverGlobalClusterResponse> FailoverGlobalClusterAsync(FailoverGlobalClusterRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = FailoverGlobalClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = FailoverGlobalClusterResponseUnmarshaller.Instance;
return InvokeAsync<FailoverGlobalClusterResponse>(request, options, cancellationToken);
}
#endregion
#region ImportInstallationMedia
/// <summary>
/// Imports the installation media for a DB engine that requires an on-premises customer
/// provided license, such as SQL Server.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ImportInstallationMedia service method.</param>
///
/// <returns>The response from the ImportInstallationMedia service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.CustomAvailabilityZoneNotFoundException">
/// <code>CustomAvailabilityZoneId</code> doesn't refer to an existing custom Availability
/// Zone identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InstallationMediaAlreadyExistsException">
/// The specified installation medium has already been imported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ImportInstallationMedia">REST API Reference for ImportInstallationMedia Operation</seealso>
public virtual ImportInstallationMediaResponse ImportInstallationMedia(ImportInstallationMediaRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ImportInstallationMediaRequestMarshaller.Instance;
options.ResponseUnmarshaller = ImportInstallationMediaResponseUnmarshaller.Instance;
return Invoke<ImportInstallationMediaResponse>(request, options);
}
/// <summary>
/// Imports the installation media for a DB engine that requires an on-premises customer
/// provided license, such as SQL Server.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ImportInstallationMedia service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ImportInstallationMedia service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.CustomAvailabilityZoneNotFoundException">
/// <code>CustomAvailabilityZoneId</code> doesn't refer to an existing custom Availability
/// Zone identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InstallationMediaAlreadyExistsException">
/// The specified installation medium has already been imported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ImportInstallationMedia">REST API Reference for ImportInstallationMedia Operation</seealso>
public virtual Task<ImportInstallationMediaResponse> ImportInstallationMediaAsync(ImportInstallationMediaRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ImportInstallationMediaRequestMarshaller.Instance;
options.ResponseUnmarshaller = ImportInstallationMediaResponseUnmarshaller.Instance;
return InvokeAsync<ImportInstallationMediaResponse>(request, options, cancellationToken);
}
#endregion
#region ListTagsForResource
/// <summary>
/// Lists all tags on an Amazon RDS resource.
///
///
/// <para>
/// For an overview on tagging an Amazon RDS resource, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.Tagging.html">Tagging
/// Amazon RDS Resources</a> in the <i>Amazon RDS User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListTagsForResource service method.</param>
///
/// <returns>The response from the ListTagsForResource service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyNotFoundException">
/// The specified proxy name doesn't correspond to a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyTargetGroupNotFoundException">
/// The specified target group isn't available for a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSnapshotNotFoundException">
/// <code>DBSnapshotIdentifier</code> doesn't refer to an existing DB snapshot.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ListTagsForResource">REST API Reference for ListTagsForResource Operation</seealso>
public virtual ListTagsForResourceResponse ListTagsForResource(ListTagsForResourceRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListTagsForResourceRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListTagsForResourceResponseUnmarshaller.Instance;
return Invoke<ListTagsForResourceResponse>(request, options);
}
/// <summary>
/// Lists all tags on an Amazon RDS resource.
///
///
/// <para>
/// For an overview on tagging an Amazon RDS resource, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.Tagging.html">Tagging
/// Amazon RDS Resources</a> in the <i>Amazon RDS User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListTagsForResource service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ListTagsForResource service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyNotFoundException">
/// The specified proxy name doesn't correspond to a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyTargetGroupNotFoundException">
/// The specified target group isn't available for a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSnapshotNotFoundException">
/// <code>DBSnapshotIdentifier</code> doesn't refer to an existing DB snapshot.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ListTagsForResource">REST API Reference for ListTagsForResource Operation</seealso>
public virtual Task<ListTagsForResourceResponse> ListTagsForResourceAsync(ListTagsForResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListTagsForResourceRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListTagsForResourceResponseUnmarshaller.Instance;
return InvokeAsync<ListTagsForResourceResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyCertificates
/// <summary>
/// Override the system-default Secure Sockets Layer/Transport Layer Security (SSL/TLS)
/// certificate for Amazon RDS for new DB instances temporarily, or remove the override.
///
///
/// <para>
/// By using this operation, you can specify an RDS-approved SSL/TLS certificate for new
/// DB instances that is different from the default certificate provided by RDS. You can
/// also use this operation to remove the override, so that new DB instances use the default
/// certificate provided by RDS.
/// </para>
///
/// <para>
/// You might need to override the default certificate in the following situations:
/// </para>
/// <ul> <li>
/// <para>
/// You already migrated your applications to support the latest certificate authority
/// (CA) certificate, but the new CA certificate is not yet the RDS default CA certificate
/// for the specified AWS Region.
/// </para>
/// </li> <li>
/// <para>
/// RDS has already moved to a new default CA certificate for the specified AWS Region,
/// but you are still in the process of supporting the new CA certificate. In this case,
/// you temporarily need additional time to finish your application changes.
/// </para>
/// </li> </ul>
/// <para>
/// For more information about rotating your SSL/TLS certificate for RDS DB engines, see
/// <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL-certificate-rotation.html">
/// Rotating Your SSL/TLS Certificate</a> in the <i>Amazon RDS User Guide</i>.
/// </para>
///
/// <para>
/// For more information about rotating your SSL/TLS certificate for Aurora DB engines,
/// see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.SSL-certificate-rotation.html">
/// Rotating Your SSL/TLS Certificate</a> in the <i>Amazon Aurora User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyCertificates service method.</param>
///
/// <returns>The response from the ModifyCertificates service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.CertificateNotFoundException">
/// <code>CertificateIdentifier</code> doesn't refer to an existing certificate.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyCertificates">REST API Reference for ModifyCertificates Operation</seealso>
public virtual ModifyCertificatesResponse ModifyCertificates(ModifyCertificatesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyCertificatesRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyCertificatesResponseUnmarshaller.Instance;
return Invoke<ModifyCertificatesResponse>(request, options);
}
/// <summary>
/// Override the system-default Secure Sockets Layer/Transport Layer Security (SSL/TLS)
/// certificate for Amazon RDS for new DB instances temporarily, or remove the override.
///
///
/// <para>
/// By using this operation, you can specify an RDS-approved SSL/TLS certificate for new
/// DB instances that is different from the default certificate provided by RDS. You can
/// also use this operation to remove the override, so that new DB instances use the default
/// certificate provided by RDS.
/// </para>
///
/// <para>
/// You might need to override the default certificate in the following situations:
/// </para>
/// <ul> <li>
/// <para>
/// You already migrated your applications to support the latest certificate authority
/// (CA) certificate, but the new CA certificate is not yet the RDS default CA certificate
/// for the specified AWS Region.
/// </para>
/// </li> <li>
/// <para>
/// RDS has already moved to a new default CA certificate for the specified AWS Region,
/// but you are still in the process of supporting the new CA certificate. In this case,
/// you temporarily need additional time to finish your application changes.
/// </para>
/// </li> </ul>
/// <para>
/// For more information about rotating your SSL/TLS certificate for RDS DB engines, see
/// <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL-certificate-rotation.html">
/// Rotating Your SSL/TLS Certificate</a> in the <i>Amazon RDS User Guide</i>.
/// </para>
///
/// <para>
/// For more information about rotating your SSL/TLS certificate for Aurora DB engines,
/// see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.SSL-certificate-rotation.html">
/// Rotating Your SSL/TLS Certificate</a> in the <i>Amazon Aurora User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyCertificates service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyCertificates service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.CertificateNotFoundException">
/// <code>CertificateIdentifier</code> doesn't refer to an existing certificate.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyCertificates">REST API Reference for ModifyCertificates Operation</seealso>
public virtual Task<ModifyCertificatesResponse> ModifyCertificatesAsync(ModifyCertificatesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyCertificatesRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyCertificatesResponseUnmarshaller.Instance;
return InvokeAsync<ModifyCertificatesResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyCurrentDBClusterCapacity
/// <summary>
/// Set the capacity of an Aurora Serverless DB cluster to a specific value.
///
///
/// <para>
/// Aurora Serverless scales seamlessly based on the workload on the DB cluster. In some
/// cases, the capacity might not scale fast enough to meet a sudden change in workload,
/// such as a large number of new transactions. Call <code>ModifyCurrentDBClusterCapacity</code>
/// to set the capacity explicitly.
/// </para>
///
/// <para>
/// After this call sets the DB cluster capacity, Aurora Serverless can automatically
/// scale the DB cluster based on the cooldown period for scaling up and the cooldown
/// period for scaling down.
/// </para>
///
/// <para>
/// For more information about Aurora Serverless, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html">Using
/// Amazon Aurora Serverless</a> in the <i>Amazon Aurora User Guide</i>.
/// </para>
/// <important>
/// <para>
/// If you call <code>ModifyCurrentDBClusterCapacity</code> with the default <code>TimeoutAction</code>,
/// connections that prevent Aurora Serverless from finding a scaling point might be dropped.
/// For more information about scaling points, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.how-it-works.html#aurora-serverless.how-it-works.auto-scaling">
/// Autoscaling for Aurora Serverless</a> in the <i>Amazon Aurora User Guide</i>.
/// </para>
/// </important> <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyCurrentDBClusterCapacity service method.</param>
///
/// <returns>The response from the ModifyCurrentDBClusterCapacity service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterCapacityException">
/// <code>Capacity</code> isn't a valid Aurora Serverless DB cluster capacity. Valid
/// capacity values are <code>2</code>, <code>4</code>, <code>8</code>, <code>16</code>,
/// <code>32</code>, <code>64</code>, <code>128</code>, and <code>256</code>.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyCurrentDBClusterCapacity">REST API Reference for ModifyCurrentDBClusterCapacity Operation</seealso>
public virtual ModifyCurrentDBClusterCapacityResponse ModifyCurrentDBClusterCapacity(ModifyCurrentDBClusterCapacityRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyCurrentDBClusterCapacityRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyCurrentDBClusterCapacityResponseUnmarshaller.Instance;
return Invoke<ModifyCurrentDBClusterCapacityResponse>(request, options);
}
/// <summary>
/// Set the capacity of an Aurora Serverless DB cluster to a specific value.
///
///
/// <para>
/// Aurora Serverless scales seamlessly based on the workload on the DB cluster. In some
/// cases, the capacity might not scale fast enough to meet a sudden change in workload,
/// such as a large number of new transactions. Call <code>ModifyCurrentDBClusterCapacity</code>
/// to set the capacity explicitly.
/// </para>
///
/// <para>
/// After this call sets the DB cluster capacity, Aurora Serverless can automatically
/// scale the DB cluster based on the cooldown period for scaling up and the cooldown
/// period for scaling down.
/// </para>
///
/// <para>
/// For more information about Aurora Serverless, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html">Using
/// Amazon Aurora Serverless</a> in the <i>Amazon Aurora User Guide</i>.
/// </para>
/// <important>
/// <para>
/// If you call <code>ModifyCurrentDBClusterCapacity</code> with the default <code>TimeoutAction</code>,
/// connections that prevent Aurora Serverless from finding a scaling point might be dropped.
/// For more information about scaling points, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.how-it-works.html#aurora-serverless.how-it-works.auto-scaling">
/// Autoscaling for Aurora Serverless</a> in the <i>Amazon Aurora User Guide</i>.
/// </para>
/// </important> <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyCurrentDBClusterCapacity service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyCurrentDBClusterCapacity service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterCapacityException">
/// <code>Capacity</code> isn't a valid Aurora Serverless DB cluster capacity. Valid
/// capacity values are <code>2</code>, <code>4</code>, <code>8</code>, <code>16</code>,
/// <code>32</code>, <code>64</code>, <code>128</code>, and <code>256</code>.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyCurrentDBClusterCapacity">REST API Reference for ModifyCurrentDBClusterCapacity Operation</seealso>
public virtual Task<ModifyCurrentDBClusterCapacityResponse> ModifyCurrentDBClusterCapacityAsync(ModifyCurrentDBClusterCapacityRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyCurrentDBClusterCapacityRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyCurrentDBClusterCapacityResponseUnmarshaller.Instance;
return InvokeAsync<ModifyCurrentDBClusterCapacityResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyDBCluster
/// <summary>
/// Modify a setting for an Amazon Aurora DB cluster. You can change one or more database
/// configuration parameters by specifying these parameters and the new values in the
/// request. For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
///
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyDBCluster service method.</param>
///
/// <returns>The response from the ModifyDBCluster service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterAlreadyExistsException">
/// The user already has a DB cluster with the given identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterParameterGroupNotFoundException">
/// <code>DBClusterParameterGroupName</code> doesn't refer to an existing DB cluster
/// parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupNotFoundException">
/// <code>DBSubnetGroupName</code> doesn't refer to an existing DB subnet group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DomainNotFoundException">
/// <code>Domain</code> doesn't refer to an existing Active Directory domain.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBSecurityGroupStateException">
/// The state of the DB security group doesn't allow deletion.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBSubnetGroupStateException">
/// The DB subnet group cannot be deleted because it's in use.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidSubnetException">
/// The requested subnet is invalid, or multiple subnets were requested that are not all
/// in a common VPC.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidVPCNetworkStateException">
/// The DB subnet group doesn't cover all Availability Zones after it's created because
/// of users' change.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageQuotaExceededException">
/// The request would result in the user exceeding the allowed amount of storage available
/// across all DB instances.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBCluster">REST API Reference for ModifyDBCluster Operation</seealso>
public virtual ModifyDBClusterResponse ModifyDBCluster(ModifyDBClusterRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyDBClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyDBClusterResponseUnmarshaller.Instance;
return Invoke<ModifyDBClusterResponse>(request, options);
}
/// <summary>
/// Modify a setting for an Amazon Aurora DB cluster. You can change one or more database
/// configuration parameters by specifying these parameters and the new values in the
/// request. For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
///
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyDBCluster service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyDBCluster service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterAlreadyExistsException">
/// The user already has a DB cluster with the given identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterParameterGroupNotFoundException">
/// <code>DBClusterParameterGroupName</code> doesn't refer to an existing DB cluster
/// parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupNotFoundException">
/// <code>DBSubnetGroupName</code> doesn't refer to an existing DB subnet group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DomainNotFoundException">
/// <code>Domain</code> doesn't refer to an existing Active Directory domain.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBSecurityGroupStateException">
/// The state of the DB security group doesn't allow deletion.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBSubnetGroupStateException">
/// The DB subnet group cannot be deleted because it's in use.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidSubnetException">
/// The requested subnet is invalid, or multiple subnets were requested that are not all
/// in a common VPC.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidVPCNetworkStateException">
/// The DB subnet group doesn't cover all Availability Zones after it's created because
/// of users' change.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageQuotaExceededException">
/// The request would result in the user exceeding the allowed amount of storage available
/// across all DB instances.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBCluster">REST API Reference for ModifyDBCluster Operation</seealso>
public virtual Task<ModifyDBClusterResponse> ModifyDBClusterAsync(ModifyDBClusterRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyDBClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyDBClusterResponseUnmarshaller.Instance;
return InvokeAsync<ModifyDBClusterResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyDBClusterEndpoint
/// <summary>
/// Modifies the properties of an endpoint in an Amazon Aurora DB cluster.
///
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyDBClusterEndpoint service method.</param>
///
/// <returns>The response from the ModifyDBClusterEndpoint service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterEndpointNotFoundException">
/// The specified custom endpoint doesn't exist.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterEndpointStateException">
/// The requested operation can't be performed on the endpoint while the endpoint is in
/// this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBClusterEndpoint">REST API Reference for ModifyDBClusterEndpoint Operation</seealso>
public virtual ModifyDBClusterEndpointResponse ModifyDBClusterEndpoint(ModifyDBClusterEndpointRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyDBClusterEndpointRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyDBClusterEndpointResponseUnmarshaller.Instance;
return Invoke<ModifyDBClusterEndpointResponse>(request, options);
}
/// <summary>
/// Modifies the properties of an endpoint in an Amazon Aurora DB cluster.
///
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyDBClusterEndpoint service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyDBClusterEndpoint service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterEndpointNotFoundException">
/// The specified custom endpoint doesn't exist.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterEndpointStateException">
/// The requested operation can't be performed on the endpoint while the endpoint is in
/// this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBClusterEndpoint">REST API Reference for ModifyDBClusterEndpoint Operation</seealso>
public virtual Task<ModifyDBClusterEndpointResponse> ModifyDBClusterEndpointAsync(ModifyDBClusterEndpointRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyDBClusterEndpointRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyDBClusterEndpointResponseUnmarshaller.Instance;
return InvokeAsync<ModifyDBClusterEndpointResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyDBClusterParameterGroup
/// <summary>
/// Modifies the parameters of a DB cluster parameter group. To modify more than one
/// parameter, submit a list of the following: <code>ParameterName</code>, <code>ParameterValue</code>,
/// and <code>ApplyMethod</code>. A maximum of 20 parameters can be modified in a single
/// request.
///
///
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// Changes to dynamic parameters are applied immediately. Changes to static parameters
/// require a reboot without failover to the DB cluster associated with the parameter
/// group before the change can take effect.
/// </para>
/// </note> <important>
/// <para>
/// After you create a DB cluster parameter group, you should wait at least 5 minutes
/// before creating your first DB cluster that uses that DB cluster parameter group as
/// the default parameter group. This allows Amazon RDS to fully complete the create action
/// before the parameter group is used as the default for a new DB cluster. This is especially
/// important for parameters that are critical when creating the default database for
/// a DB cluster, such as the character set for the default database defined by the <code>character_set_database</code>
/// parameter. You can use the <i>Parameter Groups</i> option of the <a href="https://console.aws.amazon.com/rds/">Amazon
/// RDS console</a> or the <code>DescribeDBClusterParameters</code> action to verify that
/// your DB cluster parameter group has been created or modified.
/// </para>
///
/// <para>
/// If the modified DB cluster parameter group is used by an Aurora Serverless cluster,
/// Aurora applies the update immediately. The cluster restart might interrupt your workload.
/// In that case, your application must reopen any connections and retry any transactions
/// that were active when the parameter changes took effect.
/// </para>
/// </important> <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyDBClusterParameterGroup service method.</param>
///
/// <returns>The response from the ModifyDBClusterParameterGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBParameterGroupStateException">
/// The DB parameter group is in use or is in an invalid state. If you are attempting
/// to delete the parameter group, you can't delete it when the parameter group is in
/// this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBClusterParameterGroup">REST API Reference for ModifyDBClusterParameterGroup Operation</seealso>
public virtual ModifyDBClusterParameterGroupResponse ModifyDBClusterParameterGroup(ModifyDBClusterParameterGroupRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyDBClusterParameterGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyDBClusterParameterGroupResponseUnmarshaller.Instance;
return Invoke<ModifyDBClusterParameterGroupResponse>(request, options);
}
/// <summary>
/// Modifies the parameters of a DB cluster parameter group. To modify more than one
/// parameter, submit a list of the following: <code>ParameterName</code>, <code>ParameterValue</code>,
/// and <code>ApplyMethod</code>. A maximum of 20 parameters can be modified in a single
/// request.
///
///
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// Changes to dynamic parameters are applied immediately. Changes to static parameters
/// require a reboot without failover to the DB cluster associated with the parameter
/// group before the change can take effect.
/// </para>
/// </note> <important>
/// <para>
/// After you create a DB cluster parameter group, you should wait at least 5 minutes
/// before creating your first DB cluster that uses that DB cluster parameter group as
/// the default parameter group. This allows Amazon RDS to fully complete the create action
/// before the parameter group is used as the default for a new DB cluster. This is especially
/// important for parameters that are critical when creating the default database for
/// a DB cluster, such as the character set for the default database defined by the <code>character_set_database</code>
/// parameter. You can use the <i>Parameter Groups</i> option of the <a href="https://console.aws.amazon.com/rds/">Amazon
/// RDS console</a> or the <code>DescribeDBClusterParameters</code> action to verify that
/// your DB cluster parameter group has been created or modified.
/// </para>
///
/// <para>
/// If the modified DB cluster parameter group is used by an Aurora Serverless cluster,
/// Aurora applies the update immediately. The cluster restart might interrupt your workload.
/// In that case, your application must reopen any connections and retry any transactions
/// that were active when the parameter changes took effect.
/// </para>
/// </important> <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyDBClusterParameterGroup service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyDBClusterParameterGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBParameterGroupStateException">
/// The DB parameter group is in use or is in an invalid state. If you are attempting
/// to delete the parameter group, you can't delete it when the parameter group is in
/// this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBClusterParameterGroup">REST API Reference for ModifyDBClusterParameterGroup Operation</seealso>
public virtual Task<ModifyDBClusterParameterGroupResponse> ModifyDBClusterParameterGroupAsync(ModifyDBClusterParameterGroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyDBClusterParameterGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyDBClusterParameterGroupResponseUnmarshaller.Instance;
return InvokeAsync<ModifyDBClusterParameterGroupResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyDBClusterSnapshotAttribute
/// <summary>
/// Adds an attribute and values to, or removes an attribute and values from, a manual
/// DB cluster snapshot.
///
///
/// <para>
/// To share a manual DB cluster snapshot with other AWS accounts, specify <code>restore</code>
/// as the <code>AttributeName</code> and use the <code>ValuesToAdd</code> parameter to
/// add a list of IDs of the AWS accounts that are authorized to restore the manual DB
/// cluster snapshot. Use the value <code>all</code> to make the manual DB cluster snapshot
/// public, which means that it can be copied or restored by all AWS accounts.
/// </para>
/// <note>
/// <para>
/// Don't add the <code>all</code> value for any manual DB cluster snapshots that contain
/// private information that you don't want available to all AWS accounts.
/// </para>
/// </note>
/// <para>
/// If a manual DB cluster snapshot is encrypted, it can be shared, but only by specifying
/// a list of authorized AWS account IDs for the <code>ValuesToAdd</code> parameter. You
/// can't use <code>all</code> as a value for that parameter in this case.
/// </para>
///
/// <para>
/// To view which AWS accounts have access to copy or restore a manual DB cluster snapshot,
/// or whether a manual DB cluster snapshot is public or private, use the <a>DescribeDBClusterSnapshotAttributes</a>
/// API action. The accounts are returned as values for the <code>restore</code> attribute.
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyDBClusterSnapshotAttribute service method.</param>
///
/// <returns>The response from the ModifyDBClusterSnapshotAttribute service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterSnapshotNotFoundException">
/// <code>DBClusterSnapshotIdentifier</code> doesn't refer to an existing DB cluster
/// snapshot.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterSnapshotStateException">
/// The supplied value isn't a valid DB cluster snapshot state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SharedSnapshotQuotaExceededException">
/// You have exceeded the maximum number of accounts that you can share a manual DB snapshot
/// with.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBClusterSnapshotAttribute">REST API Reference for ModifyDBClusterSnapshotAttribute Operation</seealso>
public virtual ModifyDBClusterSnapshotAttributeResponse ModifyDBClusterSnapshotAttribute(ModifyDBClusterSnapshotAttributeRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyDBClusterSnapshotAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyDBClusterSnapshotAttributeResponseUnmarshaller.Instance;
return Invoke<ModifyDBClusterSnapshotAttributeResponse>(request, options);
}
/// <summary>
/// Adds an attribute and values to, or removes an attribute and values from, a manual
/// DB cluster snapshot.
///
///
/// <para>
/// To share a manual DB cluster snapshot with other AWS accounts, specify <code>restore</code>
/// as the <code>AttributeName</code> and use the <code>ValuesToAdd</code> parameter to
/// add a list of IDs of the AWS accounts that are authorized to restore the manual DB
/// cluster snapshot. Use the value <code>all</code> to make the manual DB cluster snapshot
/// public, which means that it can be copied or restored by all AWS accounts.
/// </para>
/// <note>
/// <para>
/// Don't add the <code>all</code> value for any manual DB cluster snapshots that contain
/// private information that you don't want available to all AWS accounts.
/// </para>
/// </note>
/// <para>
/// If a manual DB cluster snapshot is encrypted, it can be shared, but only by specifying
/// a list of authorized AWS account IDs for the <code>ValuesToAdd</code> parameter. You
/// can't use <code>all</code> as a value for that parameter in this case.
/// </para>
///
/// <para>
/// To view which AWS accounts have access to copy or restore a manual DB cluster snapshot,
/// or whether a manual DB cluster snapshot is public or private, use the <a>DescribeDBClusterSnapshotAttributes</a>
/// API action. The accounts are returned as values for the <code>restore</code> attribute.
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyDBClusterSnapshotAttribute service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyDBClusterSnapshotAttribute service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterSnapshotNotFoundException">
/// <code>DBClusterSnapshotIdentifier</code> doesn't refer to an existing DB cluster
/// snapshot.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterSnapshotStateException">
/// The supplied value isn't a valid DB cluster snapshot state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SharedSnapshotQuotaExceededException">
/// You have exceeded the maximum number of accounts that you can share a manual DB snapshot
/// with.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBClusterSnapshotAttribute">REST API Reference for ModifyDBClusterSnapshotAttribute Operation</seealso>
public virtual Task<ModifyDBClusterSnapshotAttributeResponse> ModifyDBClusterSnapshotAttributeAsync(ModifyDBClusterSnapshotAttributeRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyDBClusterSnapshotAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyDBClusterSnapshotAttributeResponseUnmarshaller.Instance;
return InvokeAsync<ModifyDBClusterSnapshotAttributeResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyDBInstance
/// <summary>
/// Modifies settings for a DB instance. You can change one or more database configuration
/// parameters by specifying these parameters and the new values in the request. To learn
/// what modifications you can make to your DB instance, call <code>DescribeValidDBInstanceModifications</code>
/// before you call <code>ModifyDBInstance</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyDBInstance service method.</param>
///
/// <returns>The response from the ModifyDBInstance service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.AuthorizationNotFoundException">
/// The specified CIDR IP range or Amazon EC2 security group might not be authorized for
/// the specified DB security group.
///
///
/// <para>
/// Or, RDS might not be authorized to perform necessary actions using IAM on your behalf.
/// </para>
/// </exception>
/// <exception cref="Amazon.RDS.Model.BackupPolicyNotFoundException">
///
/// </exception>
/// <exception cref="Amazon.RDS.Model.CertificateNotFoundException">
/// <code>CertificateIdentifier</code> doesn't refer to an existing certificate.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceAlreadyExistsException">
/// The user already has a DB instance with the given identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSecurityGroupNotFoundException">
/// <code>DBSecurityGroupName</code> doesn't refer to an existing DB security group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBUpgradeDependencyFailureException">
/// The DB upgrade failed because a resource the DB depends on can't be modified.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DomainNotFoundException">
/// <code>Domain</code> doesn't refer to an existing Active Directory domain.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InsufficientDBInstanceCapacityException">
/// The specified DB instance class isn't available in the specified Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBSecurityGroupStateException">
/// The state of the DB security group doesn't allow deletion.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidVPCNetworkStateException">
/// The DB subnet group doesn't cover all Availability Zones after it's created because
/// of users' change.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <exception cref="Amazon.RDS.Model.OptionGroupNotFoundException">
/// The specified option group could not be found.
/// </exception>
/// <exception cref="Amazon.RDS.Model.ProvisionedIopsNotAvailableInAZException">
/// Provisioned IOPS not available in the specified Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageQuotaExceededException">
/// The request would result in the user exceeding the allowed amount of storage available
/// across all DB instances.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageTypeNotSupportedException">
/// Storage of the <code>StorageType</code> specified can't be associated with the DB
/// instance.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBInstance">REST API Reference for ModifyDBInstance Operation</seealso>
public virtual ModifyDBInstanceResponse ModifyDBInstance(ModifyDBInstanceRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyDBInstanceRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyDBInstanceResponseUnmarshaller.Instance;
return Invoke<ModifyDBInstanceResponse>(request, options);
}
/// <summary>
/// Modifies settings for a DB instance. You can change one or more database configuration
/// parameters by specifying these parameters and the new values in the request. To learn
/// what modifications you can make to your DB instance, call <code>DescribeValidDBInstanceModifications</code>
/// before you call <code>ModifyDBInstance</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyDBInstance service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyDBInstance service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.AuthorizationNotFoundException">
/// The specified CIDR IP range or Amazon EC2 security group might not be authorized for
/// the specified DB security group.
///
///
/// <para>
/// Or, RDS might not be authorized to perform necessary actions using IAM on your behalf.
/// </para>
/// </exception>
/// <exception cref="Amazon.RDS.Model.BackupPolicyNotFoundException">
///
/// </exception>
/// <exception cref="Amazon.RDS.Model.CertificateNotFoundException">
/// <code>CertificateIdentifier</code> doesn't refer to an existing certificate.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceAlreadyExistsException">
/// The user already has a DB instance with the given identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSecurityGroupNotFoundException">
/// <code>DBSecurityGroupName</code> doesn't refer to an existing DB security group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBUpgradeDependencyFailureException">
/// The DB upgrade failed because a resource the DB depends on can't be modified.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DomainNotFoundException">
/// <code>Domain</code> doesn't refer to an existing Active Directory domain.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InsufficientDBInstanceCapacityException">
/// The specified DB instance class isn't available in the specified Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBSecurityGroupStateException">
/// The state of the DB security group doesn't allow deletion.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidVPCNetworkStateException">
/// The DB subnet group doesn't cover all Availability Zones after it's created because
/// of users' change.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <exception cref="Amazon.RDS.Model.OptionGroupNotFoundException">
/// The specified option group could not be found.
/// </exception>
/// <exception cref="Amazon.RDS.Model.ProvisionedIopsNotAvailableInAZException">
/// Provisioned IOPS not available in the specified Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageQuotaExceededException">
/// The request would result in the user exceeding the allowed amount of storage available
/// across all DB instances.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageTypeNotSupportedException">
/// Storage of the <code>StorageType</code> specified can't be associated with the DB
/// instance.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBInstance">REST API Reference for ModifyDBInstance Operation</seealso>
public virtual Task<ModifyDBInstanceResponse> ModifyDBInstanceAsync(ModifyDBInstanceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyDBInstanceRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyDBInstanceResponseUnmarshaller.Instance;
return InvokeAsync<ModifyDBInstanceResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyDBParameterGroup
/// <summary>
/// Modifies the parameters of a DB parameter group. To modify more than one parameter,
/// submit a list of the following: <code>ParameterName</code>, <code>ParameterValue</code>,
/// and <code>ApplyMethod</code>. A maximum of 20 parameters can be modified in a single
/// request.
///
/// <note>
/// <para>
/// Changes to dynamic parameters are applied immediately. Changes to static parameters
/// require a reboot without failover to the DB instance associated with the parameter
/// group before the change can take effect.
/// </para>
/// </note> <important>
/// <para>
/// After you modify a DB parameter group, you should wait at least 5 minutes before creating
/// your first DB instance that uses that DB parameter group as the default parameter
/// group. This allows Amazon RDS to fully complete the modify action before the parameter
/// group is used as the default for a new DB instance. This is especially important for
/// parameters that are critical when creating the default database for a DB instance,
/// such as the character set for the default database defined by the <code>character_set_database</code>
/// parameter. You can use the <i>Parameter Groups</i> option of the <a href="https://console.aws.amazon.com/rds/">Amazon
/// RDS console</a> or the <i>DescribeDBParameters</i> command to verify that your DB
/// parameter group has been created or modified.
/// </para>
/// </important>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyDBParameterGroup service method.</param>
///
/// <returns>The response from the ModifyDBParameterGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBParameterGroupStateException">
/// The DB parameter group is in use or is in an invalid state. If you are attempting
/// to delete the parameter group, you can't delete it when the parameter group is in
/// this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBParameterGroup">REST API Reference for ModifyDBParameterGroup Operation</seealso>
public virtual ModifyDBParameterGroupResponse ModifyDBParameterGroup(ModifyDBParameterGroupRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyDBParameterGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyDBParameterGroupResponseUnmarshaller.Instance;
return Invoke<ModifyDBParameterGroupResponse>(request, options);
}
/// <summary>
/// Modifies the parameters of a DB parameter group. To modify more than one parameter,
/// submit a list of the following: <code>ParameterName</code>, <code>ParameterValue</code>,
/// and <code>ApplyMethod</code>. A maximum of 20 parameters can be modified in a single
/// request.
///
/// <note>
/// <para>
/// Changes to dynamic parameters are applied immediately. Changes to static parameters
/// require a reboot without failover to the DB instance associated with the parameter
/// group before the change can take effect.
/// </para>
/// </note> <important>
/// <para>
/// After you modify a DB parameter group, you should wait at least 5 minutes before creating
/// your first DB instance that uses that DB parameter group as the default parameter
/// group. This allows Amazon RDS to fully complete the modify action before the parameter
/// group is used as the default for a new DB instance. This is especially important for
/// parameters that are critical when creating the default database for a DB instance,
/// such as the character set for the default database defined by the <code>character_set_database</code>
/// parameter. You can use the <i>Parameter Groups</i> option of the <a href="https://console.aws.amazon.com/rds/">Amazon
/// RDS console</a> or the <i>DescribeDBParameters</i> command to verify that your DB
/// parameter group has been created or modified.
/// </para>
/// </important>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyDBParameterGroup service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyDBParameterGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBParameterGroupStateException">
/// The DB parameter group is in use or is in an invalid state. If you are attempting
/// to delete the parameter group, you can't delete it when the parameter group is in
/// this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBParameterGroup">REST API Reference for ModifyDBParameterGroup Operation</seealso>
public virtual Task<ModifyDBParameterGroupResponse> ModifyDBParameterGroupAsync(ModifyDBParameterGroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyDBParameterGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyDBParameterGroupResponseUnmarshaller.Instance;
return InvokeAsync<ModifyDBParameterGroupResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyDBProxy
/// <summary>
/// Changes the settings for an existing DB proxy.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyDBProxy service method.</param>
///
/// <returns>The response from the ModifyDBProxy service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBProxyAlreadyExistsException">
/// The specified proxy name must be unique for all proxies owned by your AWS account
/// in the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyNotFoundException">
/// The specified proxy name doesn't correspond to a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBProxyStateException">
/// The requested operation can't be performed while the proxy is in this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBProxy">REST API Reference for ModifyDBProxy Operation</seealso>
public virtual ModifyDBProxyResponse ModifyDBProxy(ModifyDBProxyRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyDBProxyRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyDBProxyResponseUnmarshaller.Instance;
return Invoke<ModifyDBProxyResponse>(request, options);
}
/// <summary>
/// Changes the settings for an existing DB proxy.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyDBProxy service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyDBProxy service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBProxyAlreadyExistsException">
/// The specified proxy name must be unique for all proxies owned by your AWS account
/// in the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyNotFoundException">
/// The specified proxy name doesn't correspond to a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBProxyStateException">
/// The requested operation can't be performed while the proxy is in this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBProxy">REST API Reference for ModifyDBProxy Operation</seealso>
public virtual Task<ModifyDBProxyResponse> ModifyDBProxyAsync(ModifyDBProxyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyDBProxyRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyDBProxyResponseUnmarshaller.Instance;
return InvokeAsync<ModifyDBProxyResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyDBProxyEndpoint
/// <summary>
/// Changes the settings for an existing DB proxy endpoint.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyDBProxyEndpoint service method.</param>
///
/// <returns>The response from the ModifyDBProxyEndpoint service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBProxyEndpointAlreadyExistsException">
/// The specified DB proxy endpoint name must be unique for all DB proxy endpoints owned
/// by your AWS account in the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyEndpointNotFoundException">
/// The DB proxy endpoint doesn't exist.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBProxyEndpointStateException">
/// You can't perform this operation while the DB proxy endpoint is in a particular state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBProxyStateException">
/// The requested operation can't be performed while the proxy is in this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBProxyEndpoint">REST API Reference for ModifyDBProxyEndpoint Operation</seealso>
public virtual ModifyDBProxyEndpointResponse ModifyDBProxyEndpoint(ModifyDBProxyEndpointRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyDBProxyEndpointRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyDBProxyEndpointResponseUnmarshaller.Instance;
return Invoke<ModifyDBProxyEndpointResponse>(request, options);
}
/// <summary>
/// Changes the settings for an existing DB proxy endpoint.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyDBProxyEndpoint service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyDBProxyEndpoint service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBProxyEndpointAlreadyExistsException">
/// The specified DB proxy endpoint name must be unique for all DB proxy endpoints owned
/// by your AWS account in the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyEndpointNotFoundException">
/// The DB proxy endpoint doesn't exist.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBProxyEndpointStateException">
/// You can't perform this operation while the DB proxy endpoint is in a particular state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBProxyStateException">
/// The requested operation can't be performed while the proxy is in this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBProxyEndpoint">REST API Reference for ModifyDBProxyEndpoint Operation</seealso>
public virtual Task<ModifyDBProxyEndpointResponse> ModifyDBProxyEndpointAsync(ModifyDBProxyEndpointRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyDBProxyEndpointRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyDBProxyEndpointResponseUnmarshaller.Instance;
return InvokeAsync<ModifyDBProxyEndpointResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyDBProxyTargetGroup
/// <summary>
/// Modifies the properties of a <code>DBProxyTargetGroup</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyDBProxyTargetGroup service method.</param>
///
/// <returns>The response from the ModifyDBProxyTargetGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBProxyNotFoundException">
/// The specified proxy name doesn't correspond to a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyTargetGroupNotFoundException">
/// The specified target group isn't available for a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBProxyStateException">
/// The requested operation can't be performed while the proxy is in this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBProxyTargetGroup">REST API Reference for ModifyDBProxyTargetGroup Operation</seealso>
public virtual ModifyDBProxyTargetGroupResponse ModifyDBProxyTargetGroup(ModifyDBProxyTargetGroupRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyDBProxyTargetGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyDBProxyTargetGroupResponseUnmarshaller.Instance;
return Invoke<ModifyDBProxyTargetGroupResponse>(request, options);
}
/// <summary>
/// Modifies the properties of a <code>DBProxyTargetGroup</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyDBProxyTargetGroup service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyDBProxyTargetGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBProxyNotFoundException">
/// The specified proxy name doesn't correspond to a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyTargetGroupNotFoundException">
/// The specified target group isn't available for a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBProxyStateException">
/// The requested operation can't be performed while the proxy is in this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBProxyTargetGroup">REST API Reference for ModifyDBProxyTargetGroup Operation</seealso>
public virtual Task<ModifyDBProxyTargetGroupResponse> ModifyDBProxyTargetGroupAsync(ModifyDBProxyTargetGroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyDBProxyTargetGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyDBProxyTargetGroupResponseUnmarshaller.Instance;
return InvokeAsync<ModifyDBProxyTargetGroupResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyDBSnapshot
/// <summary>
/// Updates a manual DB snapshot with a new engine version. The snapshot can be encrypted
/// or unencrypted, but not shared or public.
///
///
/// <para>
/// Amazon RDS supports upgrading DB snapshots for MySQL, Oracle, and PostgreSQL.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyDBSnapshot service method.</param>
///
/// <returns>The response from the ModifyDBSnapshot service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBSnapshotNotFoundException">
/// <code>DBSnapshotIdentifier</code> doesn't refer to an existing DB snapshot.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBSnapshot">REST API Reference for ModifyDBSnapshot Operation</seealso>
public virtual ModifyDBSnapshotResponse ModifyDBSnapshot(ModifyDBSnapshotRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyDBSnapshotRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyDBSnapshotResponseUnmarshaller.Instance;
return Invoke<ModifyDBSnapshotResponse>(request, options);
}
/// <summary>
/// Updates a manual DB snapshot with a new engine version. The snapshot can be encrypted
/// or unencrypted, but not shared or public.
///
///
/// <para>
/// Amazon RDS supports upgrading DB snapshots for MySQL, Oracle, and PostgreSQL.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyDBSnapshot service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyDBSnapshot service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBSnapshotNotFoundException">
/// <code>DBSnapshotIdentifier</code> doesn't refer to an existing DB snapshot.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBSnapshot">REST API Reference for ModifyDBSnapshot Operation</seealso>
public virtual Task<ModifyDBSnapshotResponse> ModifyDBSnapshotAsync(ModifyDBSnapshotRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyDBSnapshotRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyDBSnapshotResponseUnmarshaller.Instance;
return InvokeAsync<ModifyDBSnapshotResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyDBSnapshotAttribute
/// <summary>
/// Adds an attribute and values to, or removes an attribute and values from, a manual
/// DB snapshot.
///
///
/// <para>
/// To share a manual DB snapshot with other AWS accounts, specify <code>restore</code>
/// as the <code>AttributeName</code> and use the <code>ValuesToAdd</code> parameter to
/// add a list of IDs of the AWS accounts that are authorized to restore the manual DB
/// snapshot. Uses the value <code>all</code> to make the manual DB snapshot public, which
/// means it can be copied or restored by all AWS accounts.
/// </para>
/// <note>
/// <para>
/// Don't add the <code>all</code> value for any manual DB snapshots that contain private
/// information that you don't want available to all AWS accounts.
/// </para>
/// </note>
/// <para>
/// If the manual DB snapshot is encrypted, it can be shared, but only by specifying a
/// list of authorized AWS account IDs for the <code>ValuesToAdd</code> parameter. You
/// can't use <code>all</code> as a value for that parameter in this case.
/// </para>
///
/// <para>
/// To view which AWS accounts have access to copy or restore a manual DB snapshot, or
/// whether a manual DB snapshot public or private, use the <a>DescribeDBSnapshotAttributes</a>
/// API action. The accounts are returned as values for the <code>restore</code> attribute.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyDBSnapshotAttribute service method.</param>
///
/// <returns>The response from the ModifyDBSnapshotAttribute service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBSnapshotNotFoundException">
/// <code>DBSnapshotIdentifier</code> doesn't refer to an existing DB snapshot.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBSnapshotStateException">
/// The state of the DB snapshot doesn't allow deletion.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SharedSnapshotQuotaExceededException">
/// You have exceeded the maximum number of accounts that you can share a manual DB snapshot
/// with.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBSnapshotAttribute">REST API Reference for ModifyDBSnapshotAttribute Operation</seealso>
public virtual ModifyDBSnapshotAttributeResponse ModifyDBSnapshotAttribute(ModifyDBSnapshotAttributeRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyDBSnapshotAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyDBSnapshotAttributeResponseUnmarshaller.Instance;
return Invoke<ModifyDBSnapshotAttributeResponse>(request, options);
}
/// <summary>
/// Adds an attribute and values to, or removes an attribute and values from, a manual
/// DB snapshot.
///
///
/// <para>
/// To share a manual DB snapshot with other AWS accounts, specify <code>restore</code>
/// as the <code>AttributeName</code> and use the <code>ValuesToAdd</code> parameter to
/// add a list of IDs of the AWS accounts that are authorized to restore the manual DB
/// snapshot. Uses the value <code>all</code> to make the manual DB snapshot public, which
/// means it can be copied or restored by all AWS accounts.
/// </para>
/// <note>
/// <para>
/// Don't add the <code>all</code> value for any manual DB snapshots that contain private
/// information that you don't want available to all AWS accounts.
/// </para>
/// </note>
/// <para>
/// If the manual DB snapshot is encrypted, it can be shared, but only by specifying a
/// list of authorized AWS account IDs for the <code>ValuesToAdd</code> parameter. You
/// can't use <code>all</code> as a value for that parameter in this case.
/// </para>
///
/// <para>
/// To view which AWS accounts have access to copy or restore a manual DB snapshot, or
/// whether a manual DB snapshot public or private, use the <a>DescribeDBSnapshotAttributes</a>
/// API action. The accounts are returned as values for the <code>restore</code> attribute.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyDBSnapshotAttribute service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyDBSnapshotAttribute service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBSnapshotNotFoundException">
/// <code>DBSnapshotIdentifier</code> doesn't refer to an existing DB snapshot.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBSnapshotStateException">
/// The state of the DB snapshot doesn't allow deletion.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SharedSnapshotQuotaExceededException">
/// You have exceeded the maximum number of accounts that you can share a manual DB snapshot
/// with.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBSnapshotAttribute">REST API Reference for ModifyDBSnapshotAttribute Operation</seealso>
public virtual Task<ModifyDBSnapshotAttributeResponse> ModifyDBSnapshotAttributeAsync(ModifyDBSnapshotAttributeRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyDBSnapshotAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyDBSnapshotAttributeResponseUnmarshaller.Instance;
return InvokeAsync<ModifyDBSnapshotAttributeResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyDBSubnetGroup
/// <summary>
/// Modifies an existing DB subnet group. DB subnet groups must contain at least one subnet
/// in at least two AZs in the AWS Region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyDBSubnetGroup service method.</param>
///
/// <returns>The response from the ModifyDBSubnetGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupDoesNotCoverEnoughAZsException">
/// Subnets in the DB subnet group should cover at least two Availability Zones unless
/// there is only one Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupNotFoundException">
/// <code>DBSubnetGroupName</code> doesn't refer to an existing DB subnet group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetQuotaExceededException">
/// The request would result in the user exceeding the allowed number of subnets in a
/// DB subnet groups.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidSubnetException">
/// The requested subnet is invalid, or multiple subnets were requested that are not all
/// in a common VPC.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SubnetAlreadyInUseException">
/// The DB subnet is already in use in the Availability Zone.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBSubnetGroup">REST API Reference for ModifyDBSubnetGroup Operation</seealso>
public virtual ModifyDBSubnetGroupResponse ModifyDBSubnetGroup(ModifyDBSubnetGroupRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyDBSubnetGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyDBSubnetGroupResponseUnmarshaller.Instance;
return Invoke<ModifyDBSubnetGroupResponse>(request, options);
}
/// <summary>
/// Modifies an existing DB subnet group. DB subnet groups must contain at least one subnet
/// in at least two AZs in the AWS Region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyDBSubnetGroup service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyDBSubnetGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupDoesNotCoverEnoughAZsException">
/// Subnets in the DB subnet group should cover at least two Availability Zones unless
/// there is only one Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupNotFoundException">
/// <code>DBSubnetGroupName</code> doesn't refer to an existing DB subnet group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetQuotaExceededException">
/// The request would result in the user exceeding the allowed number of subnets in a
/// DB subnet groups.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidSubnetException">
/// The requested subnet is invalid, or multiple subnets were requested that are not all
/// in a common VPC.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SubnetAlreadyInUseException">
/// The DB subnet is already in use in the Availability Zone.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBSubnetGroup">REST API Reference for ModifyDBSubnetGroup Operation</seealso>
public virtual Task<ModifyDBSubnetGroupResponse> ModifyDBSubnetGroupAsync(ModifyDBSubnetGroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyDBSubnetGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyDBSubnetGroupResponseUnmarshaller.Instance;
return InvokeAsync<ModifyDBSubnetGroupResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyEventSubscription
/// <summary>
/// Modifies an existing RDS event notification subscription. You can't modify the source
/// identifiers using this call. To change source identifiers for a subscription, use
/// the <code>AddSourceIdentifierToSubscription</code> and <code>RemoveSourceIdentifierFromSubscription</code>
/// calls.
///
///
/// <para>
/// You can see a list of the event categories for a given source type (<code>SourceType</code>)
/// in <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html">Events</a>
/// in the <i>Amazon RDS User Guide</i> or by using the <code>DescribeEventCategories</code>
/// operation.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyEventSubscription service method.</param>
///
/// <returns>The response from the ModifyEventSubscription service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.EventSubscriptionQuotaExceededException">
/// You have reached the maximum number of event subscriptions.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SNSInvalidTopicException">
/// SNS has responded that there is a problem with the SND topic specified.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SNSNoAuthorizationException">
/// You do not have permission to publish to the SNS topic ARN.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SNSTopicArnNotFoundException">
/// The SNS topic ARN does not exist.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SubscriptionCategoryNotFoundException">
/// The supplied category does not exist.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SubscriptionNotFoundException">
/// The subscription name does not exist.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyEventSubscription">REST API Reference for ModifyEventSubscription Operation</seealso>
public virtual ModifyEventSubscriptionResponse ModifyEventSubscription(ModifyEventSubscriptionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyEventSubscriptionRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyEventSubscriptionResponseUnmarshaller.Instance;
return Invoke<ModifyEventSubscriptionResponse>(request, options);
}
/// <summary>
/// Modifies an existing RDS event notification subscription. You can't modify the source
/// identifiers using this call. To change source identifiers for a subscription, use
/// the <code>AddSourceIdentifierToSubscription</code> and <code>RemoveSourceIdentifierFromSubscription</code>
/// calls.
///
///
/// <para>
/// You can see a list of the event categories for a given source type (<code>SourceType</code>)
/// in <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html">Events</a>
/// in the <i>Amazon RDS User Guide</i> or by using the <code>DescribeEventCategories</code>
/// operation.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyEventSubscription service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyEventSubscription service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.EventSubscriptionQuotaExceededException">
/// You have reached the maximum number of event subscriptions.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SNSInvalidTopicException">
/// SNS has responded that there is a problem with the SND topic specified.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SNSNoAuthorizationException">
/// You do not have permission to publish to the SNS topic ARN.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SNSTopicArnNotFoundException">
/// The SNS topic ARN does not exist.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SubscriptionCategoryNotFoundException">
/// The supplied category does not exist.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SubscriptionNotFoundException">
/// The subscription name does not exist.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyEventSubscription">REST API Reference for ModifyEventSubscription Operation</seealso>
public virtual Task<ModifyEventSubscriptionResponse> ModifyEventSubscriptionAsync(ModifyEventSubscriptionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyEventSubscriptionRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyEventSubscriptionResponseUnmarshaller.Instance;
return InvokeAsync<ModifyEventSubscriptionResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyGlobalCluster
/// <summary>
/// Modify a setting for an Amazon Aurora global cluster. You can change one or more
/// database configuration parameters by specifying these parameters and the new values
/// in the request. For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
///
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyGlobalCluster service method.</param>
///
/// <returns>The response from the ModifyGlobalCluster service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.GlobalClusterNotFoundException">
/// The <code>GlobalClusterIdentifier</code> doesn't refer to an existing global database
/// cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidGlobalClusterStateException">
/// The global cluster is in an invalid state and can't perform the requested operation.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyGlobalCluster">REST API Reference for ModifyGlobalCluster Operation</seealso>
public virtual ModifyGlobalClusterResponse ModifyGlobalCluster(ModifyGlobalClusterRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyGlobalClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyGlobalClusterResponseUnmarshaller.Instance;
return Invoke<ModifyGlobalClusterResponse>(request, options);
}
/// <summary>
/// Modify a setting for an Amazon Aurora global cluster. You can change one or more
/// database configuration parameters by specifying these parameters and the new values
/// in the request. For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
///
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyGlobalCluster service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyGlobalCluster service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.GlobalClusterNotFoundException">
/// The <code>GlobalClusterIdentifier</code> doesn't refer to an existing global database
/// cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidGlobalClusterStateException">
/// The global cluster is in an invalid state and can't perform the requested operation.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyGlobalCluster">REST API Reference for ModifyGlobalCluster Operation</seealso>
public virtual Task<ModifyGlobalClusterResponse> ModifyGlobalClusterAsync(ModifyGlobalClusterRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyGlobalClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyGlobalClusterResponseUnmarshaller.Instance;
return InvokeAsync<ModifyGlobalClusterResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyOptionGroup
/// <summary>
/// Modifies an existing option group.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyOptionGroup service method.</param>
///
/// <returns>The response from the ModifyOptionGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.InvalidOptionGroupStateException">
/// The option group isn't in the <i>available</i> state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.OptionGroupNotFoundException">
/// The specified option group could not be found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyOptionGroup">REST API Reference for ModifyOptionGroup Operation</seealso>
public virtual ModifyOptionGroupResponse ModifyOptionGroup(ModifyOptionGroupRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyOptionGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyOptionGroupResponseUnmarshaller.Instance;
return Invoke<ModifyOptionGroupResponse>(request, options);
}
/// <summary>
/// Modifies an existing option group.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyOptionGroup service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyOptionGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.InvalidOptionGroupStateException">
/// The option group isn't in the <i>available</i> state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.OptionGroupNotFoundException">
/// The specified option group could not be found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyOptionGroup">REST API Reference for ModifyOptionGroup Operation</seealso>
public virtual Task<ModifyOptionGroupResponse> ModifyOptionGroupAsync(ModifyOptionGroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyOptionGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyOptionGroupResponseUnmarshaller.Instance;
return InvokeAsync<ModifyOptionGroupResponse>(request, options, cancellationToken);
}
#endregion
#region PromoteReadReplica
/// <summary>
/// Promotes a read replica DB instance to a standalone DB instance.
///
/// <note> <ul> <li>
/// <para>
/// Backup duration is a function of the amount of changes to the database since the previous
/// backup. If you plan to promote a read replica to a standalone instance, we recommend
/// that you enable backups and complete at least one backup prior to promotion. In addition,
/// a read replica cannot be promoted to a standalone instance when it is in the <code>backing-up</code>
/// status. If you have enabled backups on your read replica, configure the automated
/// backup window so that daily backups do not interfere with read replica promotion.
/// </para>
/// </li> <li>
/// <para>
/// This command doesn't apply to Aurora MySQL and Aurora PostgreSQL.
/// </para>
/// </li> </ul> </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PromoteReadReplica service method.</param>
///
/// <returns>The response from the PromoteReadReplica service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/PromoteReadReplica">REST API Reference for PromoteReadReplica Operation</seealso>
public virtual PromoteReadReplicaResponse PromoteReadReplica(PromoteReadReplicaRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = PromoteReadReplicaRequestMarshaller.Instance;
options.ResponseUnmarshaller = PromoteReadReplicaResponseUnmarshaller.Instance;
return Invoke<PromoteReadReplicaResponse>(request, options);
}
/// <summary>
/// Promotes a read replica DB instance to a standalone DB instance.
///
/// <note> <ul> <li>
/// <para>
/// Backup duration is a function of the amount of changes to the database since the previous
/// backup. If you plan to promote a read replica to a standalone instance, we recommend
/// that you enable backups and complete at least one backup prior to promotion. In addition,
/// a read replica cannot be promoted to a standalone instance when it is in the <code>backing-up</code>
/// status. If you have enabled backups on your read replica, configure the automated
/// backup window so that daily backups do not interfere with read replica promotion.
/// </para>
/// </li> <li>
/// <para>
/// This command doesn't apply to Aurora MySQL and Aurora PostgreSQL.
/// </para>
/// </li> </ul> </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PromoteReadReplica service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the PromoteReadReplica service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/PromoteReadReplica">REST API Reference for PromoteReadReplica Operation</seealso>
public virtual Task<PromoteReadReplicaResponse> PromoteReadReplicaAsync(PromoteReadReplicaRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = PromoteReadReplicaRequestMarshaller.Instance;
options.ResponseUnmarshaller = PromoteReadReplicaResponseUnmarshaller.Instance;
return InvokeAsync<PromoteReadReplicaResponse>(request, options, cancellationToken);
}
#endregion
#region PromoteReadReplicaDBCluster
/// <summary>
/// Promotes a read replica DB cluster to a standalone DB cluster.
///
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PromoteReadReplicaDBCluster service method.</param>
///
/// <returns>The response from the PromoteReadReplicaDBCluster service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/PromoteReadReplicaDBCluster">REST API Reference for PromoteReadReplicaDBCluster Operation</seealso>
public virtual PromoteReadReplicaDBClusterResponse PromoteReadReplicaDBCluster(PromoteReadReplicaDBClusterRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = PromoteReadReplicaDBClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = PromoteReadReplicaDBClusterResponseUnmarshaller.Instance;
return Invoke<PromoteReadReplicaDBClusterResponse>(request, options);
}
/// <summary>
/// Promotes a read replica DB cluster to a standalone DB cluster.
///
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PromoteReadReplicaDBCluster service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the PromoteReadReplicaDBCluster service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/PromoteReadReplicaDBCluster">REST API Reference for PromoteReadReplicaDBCluster Operation</seealso>
public virtual Task<PromoteReadReplicaDBClusterResponse> PromoteReadReplicaDBClusterAsync(PromoteReadReplicaDBClusterRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = PromoteReadReplicaDBClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = PromoteReadReplicaDBClusterResponseUnmarshaller.Instance;
return InvokeAsync<PromoteReadReplicaDBClusterResponse>(request, options, cancellationToken);
}
#endregion
#region PurchaseReservedDBInstancesOffering
/// <summary>
/// Purchases a reserved DB instance offering.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PurchaseReservedDBInstancesOffering service method.</param>
///
/// <returns>The response from the PurchaseReservedDBInstancesOffering service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.ReservedDBInstanceAlreadyExistsException">
/// User already has a reservation with the given identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.ReservedDBInstanceQuotaExceededException">
/// Request would exceed the user's DB Instance quota.
/// </exception>
/// <exception cref="Amazon.RDS.Model.ReservedDBInstancesOfferingNotFoundException">
/// Specified offering does not exist.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/PurchaseReservedDBInstancesOffering">REST API Reference for PurchaseReservedDBInstancesOffering Operation</seealso>
public virtual PurchaseReservedDBInstancesOfferingResponse PurchaseReservedDBInstancesOffering(PurchaseReservedDBInstancesOfferingRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = PurchaseReservedDBInstancesOfferingRequestMarshaller.Instance;
options.ResponseUnmarshaller = PurchaseReservedDBInstancesOfferingResponseUnmarshaller.Instance;
return Invoke<PurchaseReservedDBInstancesOfferingResponse>(request, options);
}
/// <summary>
/// Purchases a reserved DB instance offering.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PurchaseReservedDBInstancesOffering service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the PurchaseReservedDBInstancesOffering service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.ReservedDBInstanceAlreadyExistsException">
/// User already has a reservation with the given identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.ReservedDBInstanceQuotaExceededException">
/// Request would exceed the user's DB Instance quota.
/// </exception>
/// <exception cref="Amazon.RDS.Model.ReservedDBInstancesOfferingNotFoundException">
/// Specified offering does not exist.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/PurchaseReservedDBInstancesOffering">REST API Reference for PurchaseReservedDBInstancesOffering Operation</seealso>
public virtual Task<PurchaseReservedDBInstancesOfferingResponse> PurchaseReservedDBInstancesOfferingAsync(PurchaseReservedDBInstancesOfferingRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = PurchaseReservedDBInstancesOfferingRequestMarshaller.Instance;
options.ResponseUnmarshaller = PurchaseReservedDBInstancesOfferingResponseUnmarshaller.Instance;
return InvokeAsync<PurchaseReservedDBInstancesOfferingResponse>(request, options, cancellationToken);
}
#endregion
#region RebootDBInstance
/// <summary>
/// You might need to reboot your DB instance, usually for maintenance reasons. For example,
/// if you make certain modifications, or if you change the DB parameter group associated
/// with the DB instance, you must reboot the instance for the changes to take effect.
///
///
///
/// <para>
/// Rebooting a DB instance restarts the database engine service. Rebooting a DB instance
/// results in a momentary outage, during which the DB instance status is set to rebooting.
///
/// </para>
///
/// <para>
/// For more information about rebooting, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_RebootInstance.html">Rebooting
/// a DB Instance</a> in the <i>Amazon RDS User Guide.</i>
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RebootDBInstance service method.</param>
///
/// <returns>The response from the RebootDBInstance service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RebootDBInstance">REST API Reference for RebootDBInstance Operation</seealso>
public virtual RebootDBInstanceResponse RebootDBInstance(RebootDBInstanceRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RebootDBInstanceRequestMarshaller.Instance;
options.ResponseUnmarshaller = RebootDBInstanceResponseUnmarshaller.Instance;
return Invoke<RebootDBInstanceResponse>(request, options);
}
/// <summary>
/// You might need to reboot your DB instance, usually for maintenance reasons. For example,
/// if you make certain modifications, or if you change the DB parameter group associated
/// with the DB instance, you must reboot the instance for the changes to take effect.
///
///
///
/// <para>
/// Rebooting a DB instance restarts the database engine service. Rebooting a DB instance
/// results in a momentary outage, during which the DB instance status is set to rebooting.
///
/// </para>
///
/// <para>
/// For more information about rebooting, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_RebootInstance.html">Rebooting
/// a DB Instance</a> in the <i>Amazon RDS User Guide.</i>
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RebootDBInstance service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RebootDBInstance service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RebootDBInstance">REST API Reference for RebootDBInstance Operation</seealso>
public virtual Task<RebootDBInstanceResponse> RebootDBInstanceAsync(RebootDBInstanceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RebootDBInstanceRequestMarshaller.Instance;
options.ResponseUnmarshaller = RebootDBInstanceResponseUnmarshaller.Instance;
return InvokeAsync<RebootDBInstanceResponse>(request, options, cancellationToken);
}
#endregion
#region RegisterDBProxyTargets
/// <summary>
/// Associate one or more <code>DBProxyTarget</code> data structures with a <code>DBProxyTargetGroup</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RegisterDBProxyTargets service method.</param>
///
/// <returns>The response from the RegisterDBProxyTargets service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyNotFoundException">
/// The specified proxy name doesn't correspond to a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyTargetAlreadyRegisteredException">
/// The proxy is already associated with the specified RDS DB instance or Aurora DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyTargetGroupNotFoundException">
/// The specified target group isn't available for a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InsufficientAvailableIPsInSubnetException">
/// The requested operation can't be performed because there aren't enough available IP
/// addresses in the proxy's subnets. Add more CIDR blocks to the VPC or remove IP address
/// that aren't required from the subnets.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBProxyStateException">
/// The requested operation can't be performed while the proxy is in this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RegisterDBProxyTargets">REST API Reference for RegisterDBProxyTargets Operation</seealso>
public virtual RegisterDBProxyTargetsResponse RegisterDBProxyTargets(RegisterDBProxyTargetsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RegisterDBProxyTargetsRequestMarshaller.Instance;
options.ResponseUnmarshaller = RegisterDBProxyTargetsResponseUnmarshaller.Instance;
return Invoke<RegisterDBProxyTargetsResponse>(request, options);
}
/// <summary>
/// Associate one or more <code>DBProxyTarget</code> data structures with a <code>DBProxyTargetGroup</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RegisterDBProxyTargets service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RegisterDBProxyTargets service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyNotFoundException">
/// The specified proxy name doesn't correspond to a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyTargetAlreadyRegisteredException">
/// The proxy is already associated with the specified RDS DB instance or Aurora DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyTargetGroupNotFoundException">
/// The specified target group isn't available for a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InsufficientAvailableIPsInSubnetException">
/// The requested operation can't be performed because there aren't enough available IP
/// addresses in the proxy's subnets. Add more CIDR blocks to the VPC or remove IP address
/// that aren't required from the subnets.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBProxyStateException">
/// The requested operation can't be performed while the proxy is in this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RegisterDBProxyTargets">REST API Reference for RegisterDBProxyTargets Operation</seealso>
public virtual Task<RegisterDBProxyTargetsResponse> RegisterDBProxyTargetsAsync(RegisterDBProxyTargetsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RegisterDBProxyTargetsRequestMarshaller.Instance;
options.ResponseUnmarshaller = RegisterDBProxyTargetsResponseUnmarshaller.Instance;
return InvokeAsync<RegisterDBProxyTargetsResponse>(request, options, cancellationToken);
}
#endregion
#region RemoveFromGlobalCluster
/// <summary>
/// Detaches an Aurora secondary cluster from an Aurora global database cluster. The
/// cluster becomes a standalone cluster with read-write capability instead of being read-only
/// and receiving data from a primary cluster in a different region.
///
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RemoveFromGlobalCluster service method.</param>
///
/// <returns>The response from the RemoveFromGlobalCluster service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.GlobalClusterNotFoundException">
/// The <code>GlobalClusterIdentifier</code> doesn't refer to an existing global database
/// cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidGlobalClusterStateException">
/// The global cluster is in an invalid state and can't perform the requested operation.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RemoveFromGlobalCluster">REST API Reference for RemoveFromGlobalCluster Operation</seealso>
public virtual RemoveFromGlobalClusterResponse RemoveFromGlobalCluster(RemoveFromGlobalClusterRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RemoveFromGlobalClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = RemoveFromGlobalClusterResponseUnmarshaller.Instance;
return Invoke<RemoveFromGlobalClusterResponse>(request, options);
}
/// <summary>
/// Detaches an Aurora secondary cluster from an Aurora global database cluster. The
/// cluster becomes a standalone cluster with read-write capability instead of being read-only
/// and receiving data from a primary cluster in a different region.
///
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RemoveFromGlobalCluster service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RemoveFromGlobalCluster service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.GlobalClusterNotFoundException">
/// The <code>GlobalClusterIdentifier</code> doesn't refer to an existing global database
/// cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidGlobalClusterStateException">
/// The global cluster is in an invalid state and can't perform the requested operation.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RemoveFromGlobalCluster">REST API Reference for RemoveFromGlobalCluster Operation</seealso>
public virtual Task<RemoveFromGlobalClusterResponse> RemoveFromGlobalClusterAsync(RemoveFromGlobalClusterRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RemoveFromGlobalClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = RemoveFromGlobalClusterResponseUnmarshaller.Instance;
return InvokeAsync<RemoveFromGlobalClusterResponse>(request, options, cancellationToken);
}
#endregion
#region RemoveRoleFromDBCluster
/// <summary>
/// Disassociates an AWS Identity and Access Management (IAM) role from an Amazon Aurora
/// DB cluster. For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Integrating.Authorizing.html">Authorizing
/// Amazon Aurora MySQL to Access Other AWS Services on Your Behalf </a> in the <i>Amazon
/// Aurora User Guide</i>.
///
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RemoveRoleFromDBCluster service method.</param>
///
/// <returns>The response from the RemoveRoleFromDBCluster service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterRoleNotFoundException">
/// The specified IAM role Amazon Resource Name (ARN) isn't associated with the specified
/// DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RemoveRoleFromDBCluster">REST API Reference for RemoveRoleFromDBCluster Operation</seealso>
public virtual RemoveRoleFromDBClusterResponse RemoveRoleFromDBCluster(RemoveRoleFromDBClusterRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RemoveRoleFromDBClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = RemoveRoleFromDBClusterResponseUnmarshaller.Instance;
return Invoke<RemoveRoleFromDBClusterResponse>(request, options);
}
/// <summary>
/// Disassociates an AWS Identity and Access Management (IAM) role from an Amazon Aurora
/// DB cluster. For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Integrating.Authorizing.html">Authorizing
/// Amazon Aurora MySQL to Access Other AWS Services on Your Behalf </a> in the <i>Amazon
/// Aurora User Guide</i>.
///
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RemoveRoleFromDBCluster service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RemoveRoleFromDBCluster service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterRoleNotFoundException">
/// The specified IAM role Amazon Resource Name (ARN) isn't associated with the specified
/// DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RemoveRoleFromDBCluster">REST API Reference for RemoveRoleFromDBCluster Operation</seealso>
public virtual Task<RemoveRoleFromDBClusterResponse> RemoveRoleFromDBClusterAsync(RemoveRoleFromDBClusterRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RemoveRoleFromDBClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = RemoveRoleFromDBClusterResponseUnmarshaller.Instance;
return InvokeAsync<RemoveRoleFromDBClusterResponse>(request, options, cancellationToken);
}
#endregion
#region RemoveRoleFromDBInstance
/// <summary>
/// Disassociates an AWS Identity and Access Management (IAM) role from a DB instance.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RemoveRoleFromDBInstance service method.</param>
///
/// <returns>The response from the RemoveRoleFromDBInstance service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceRoleNotFoundException">
/// The specified <code>RoleArn</code> value doesn't match the specified feature for the
/// DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RemoveRoleFromDBInstance">REST API Reference for RemoveRoleFromDBInstance Operation</seealso>
public virtual RemoveRoleFromDBInstanceResponse RemoveRoleFromDBInstance(RemoveRoleFromDBInstanceRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RemoveRoleFromDBInstanceRequestMarshaller.Instance;
options.ResponseUnmarshaller = RemoveRoleFromDBInstanceResponseUnmarshaller.Instance;
return Invoke<RemoveRoleFromDBInstanceResponse>(request, options);
}
/// <summary>
/// Disassociates an AWS Identity and Access Management (IAM) role from a DB instance.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RemoveRoleFromDBInstance service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RemoveRoleFromDBInstance service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceRoleNotFoundException">
/// The specified <code>RoleArn</code> value doesn't match the specified feature for the
/// DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RemoveRoleFromDBInstance">REST API Reference for RemoveRoleFromDBInstance Operation</seealso>
public virtual Task<RemoveRoleFromDBInstanceResponse> RemoveRoleFromDBInstanceAsync(RemoveRoleFromDBInstanceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RemoveRoleFromDBInstanceRequestMarshaller.Instance;
options.ResponseUnmarshaller = RemoveRoleFromDBInstanceResponseUnmarshaller.Instance;
return InvokeAsync<RemoveRoleFromDBInstanceResponse>(request, options, cancellationToken);
}
#endregion
#region RemoveSourceIdentifierFromSubscription
/// <summary>
/// Removes a source identifier from an existing RDS event notification subscription.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RemoveSourceIdentifierFromSubscription service method.</param>
///
/// <returns>The response from the RemoveSourceIdentifierFromSubscription service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.SourceNotFoundException">
/// The requested source could not be found.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SubscriptionNotFoundException">
/// The subscription name does not exist.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RemoveSourceIdentifierFromSubscription">REST API Reference for RemoveSourceIdentifierFromSubscription Operation</seealso>
public virtual RemoveSourceIdentifierFromSubscriptionResponse RemoveSourceIdentifierFromSubscription(RemoveSourceIdentifierFromSubscriptionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RemoveSourceIdentifierFromSubscriptionRequestMarshaller.Instance;
options.ResponseUnmarshaller = RemoveSourceIdentifierFromSubscriptionResponseUnmarshaller.Instance;
return Invoke<RemoveSourceIdentifierFromSubscriptionResponse>(request, options);
}
/// <summary>
/// Removes a source identifier from an existing RDS event notification subscription.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RemoveSourceIdentifierFromSubscription service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RemoveSourceIdentifierFromSubscription service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.SourceNotFoundException">
/// The requested source could not be found.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SubscriptionNotFoundException">
/// The subscription name does not exist.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RemoveSourceIdentifierFromSubscription">REST API Reference for RemoveSourceIdentifierFromSubscription Operation</seealso>
public virtual Task<RemoveSourceIdentifierFromSubscriptionResponse> RemoveSourceIdentifierFromSubscriptionAsync(RemoveSourceIdentifierFromSubscriptionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RemoveSourceIdentifierFromSubscriptionRequestMarshaller.Instance;
options.ResponseUnmarshaller = RemoveSourceIdentifierFromSubscriptionResponseUnmarshaller.Instance;
return InvokeAsync<RemoveSourceIdentifierFromSubscriptionResponse>(request, options, cancellationToken);
}
#endregion
#region RemoveTagsFromResource
/// <summary>
/// Removes metadata tags from an Amazon RDS resource.
///
///
/// <para>
/// For an overview on tagging an Amazon RDS resource, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.Tagging.html">Tagging
/// Amazon RDS Resources</a> in the <i>Amazon RDS User Guide.</i>
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RemoveTagsFromResource service method.</param>
///
/// <returns>The response from the RemoveTagsFromResource service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyNotFoundException">
/// The specified proxy name doesn't correspond to a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyTargetGroupNotFoundException">
/// The specified target group isn't available for a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSnapshotNotFoundException">
/// <code>DBSnapshotIdentifier</code> doesn't refer to an existing DB snapshot.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RemoveTagsFromResource">REST API Reference for RemoveTagsFromResource Operation</seealso>
public virtual RemoveTagsFromResourceResponse RemoveTagsFromResource(RemoveTagsFromResourceRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RemoveTagsFromResourceRequestMarshaller.Instance;
options.ResponseUnmarshaller = RemoveTagsFromResourceResponseUnmarshaller.Instance;
return Invoke<RemoveTagsFromResourceResponse>(request, options);
}
/// <summary>
/// Removes metadata tags from an Amazon RDS resource.
///
///
/// <para>
/// For an overview on tagging an Amazon RDS resource, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.Tagging.html">Tagging
/// Amazon RDS Resources</a> in the <i>Amazon RDS User Guide.</i>
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RemoveTagsFromResource service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RemoveTagsFromResource service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyNotFoundException">
/// The specified proxy name doesn't correspond to a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBProxyTargetGroupNotFoundException">
/// The specified target group isn't available for a proxy owned by your AWS account in
/// the specified AWS Region.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSnapshotNotFoundException">
/// <code>DBSnapshotIdentifier</code> doesn't refer to an existing DB snapshot.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RemoveTagsFromResource">REST API Reference for RemoveTagsFromResource Operation</seealso>
public virtual Task<RemoveTagsFromResourceResponse> RemoveTagsFromResourceAsync(RemoveTagsFromResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RemoveTagsFromResourceRequestMarshaller.Instance;
options.ResponseUnmarshaller = RemoveTagsFromResourceResponseUnmarshaller.Instance;
return InvokeAsync<RemoveTagsFromResourceResponse>(request, options, cancellationToken);
}
#endregion
#region ResetDBClusterParameterGroup
/// <summary>
/// Modifies the parameters of a DB cluster parameter group to the default value. To
/// reset specific parameters submit a list of the following: <code>ParameterName</code>
/// and <code>ApplyMethod</code>. To reset the entire DB cluster parameter group, specify
/// the <code>DBClusterParameterGroupName</code> and <code>ResetAllParameters</code> parameters.
///
///
///
/// <para>
/// When resetting the entire group, dynamic parameters are updated immediately and static
/// parameters are set to <code>pending-reboot</code> to take effect on the next DB instance
/// restart or <code>RebootDBInstance</code> request. You must call <code>RebootDBInstance</code>
/// for every DB instance in your DB cluster that you want the updated static parameter
/// to apply to.
/// </para>
///
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ResetDBClusterParameterGroup service method.</param>
///
/// <returns>The response from the ResetDBClusterParameterGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBParameterGroupStateException">
/// The DB parameter group is in use or is in an invalid state. If you are attempting
/// to delete the parameter group, you can't delete it when the parameter group is in
/// this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ResetDBClusterParameterGroup">REST API Reference for ResetDBClusterParameterGroup Operation</seealso>
public virtual ResetDBClusterParameterGroupResponse ResetDBClusterParameterGroup(ResetDBClusterParameterGroupRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ResetDBClusterParameterGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = ResetDBClusterParameterGroupResponseUnmarshaller.Instance;
return Invoke<ResetDBClusterParameterGroupResponse>(request, options);
}
/// <summary>
/// Modifies the parameters of a DB cluster parameter group to the default value. To
/// reset specific parameters submit a list of the following: <code>ParameterName</code>
/// and <code>ApplyMethod</code>. To reset the entire DB cluster parameter group, specify
/// the <code>DBClusterParameterGroupName</code> and <code>ResetAllParameters</code> parameters.
///
///
///
/// <para>
/// When resetting the entire group, dynamic parameters are updated immediately and static
/// parameters are set to <code>pending-reboot</code> to take effect on the next DB instance
/// restart or <code>RebootDBInstance</code> request. You must call <code>RebootDBInstance</code>
/// for every DB instance in your DB cluster that you want the updated static parameter
/// to apply to.
/// </para>
///
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ResetDBClusterParameterGroup service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ResetDBClusterParameterGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBParameterGroupStateException">
/// The DB parameter group is in use or is in an invalid state. If you are attempting
/// to delete the parameter group, you can't delete it when the parameter group is in
/// this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ResetDBClusterParameterGroup">REST API Reference for ResetDBClusterParameterGroup Operation</seealso>
public virtual Task<ResetDBClusterParameterGroupResponse> ResetDBClusterParameterGroupAsync(ResetDBClusterParameterGroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ResetDBClusterParameterGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = ResetDBClusterParameterGroupResponseUnmarshaller.Instance;
return InvokeAsync<ResetDBClusterParameterGroupResponse>(request, options, cancellationToken);
}
#endregion
#region ResetDBParameterGroup
/// <summary>
/// Modifies the parameters of a DB parameter group to the engine/system default value.
/// To reset specific parameters, provide a list of the following: <code>ParameterName</code>
/// and <code>ApplyMethod</code>. To reset the entire DB parameter group, specify the
/// <code>DBParameterGroup</code> name and <code>ResetAllParameters</code> parameters.
/// When resetting the entire group, dynamic parameters are updated immediately and static
/// parameters are set to <code>pending-reboot</code> to take effect on the next DB instance
/// restart or <code>RebootDBInstance</code> request.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ResetDBParameterGroup service method.</param>
///
/// <returns>The response from the ResetDBParameterGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBParameterGroupStateException">
/// The DB parameter group is in use or is in an invalid state. If you are attempting
/// to delete the parameter group, you can't delete it when the parameter group is in
/// this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ResetDBParameterGroup">REST API Reference for ResetDBParameterGroup Operation</seealso>
public virtual ResetDBParameterGroupResponse ResetDBParameterGroup(ResetDBParameterGroupRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ResetDBParameterGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = ResetDBParameterGroupResponseUnmarshaller.Instance;
return Invoke<ResetDBParameterGroupResponse>(request, options);
}
/// <summary>
/// Modifies the parameters of a DB parameter group to the engine/system default value.
/// To reset specific parameters, provide a list of the following: <code>ParameterName</code>
/// and <code>ApplyMethod</code>. To reset the entire DB parameter group, specify the
/// <code>DBParameterGroup</code> name and <code>ResetAllParameters</code> parameters.
/// When resetting the entire group, dynamic parameters are updated immediately and static
/// parameters are set to <code>pending-reboot</code> to take effect on the next DB instance
/// restart or <code>RebootDBInstance</code> request.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ResetDBParameterGroup service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ResetDBParameterGroup service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBParameterGroupStateException">
/// The DB parameter group is in use or is in an invalid state. If you are attempting
/// to delete the parameter group, you can't delete it when the parameter group is in
/// this state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ResetDBParameterGroup">REST API Reference for ResetDBParameterGroup Operation</seealso>
public virtual Task<ResetDBParameterGroupResponse> ResetDBParameterGroupAsync(ResetDBParameterGroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ResetDBParameterGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = ResetDBParameterGroupResponseUnmarshaller.Instance;
return InvokeAsync<ResetDBParameterGroupResponse>(request, options, cancellationToken);
}
#endregion
#region RestoreDBClusterFromS3
/// <summary>
/// Creates an Amazon Aurora DB cluster from MySQL data stored in an Amazon S3 bucket.
/// Amazon RDS must be authorized to access the Amazon S3 bucket and the data must be
/// created using the Percona XtraBackup utility as described in <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Migrating.ExtMySQL.html#AuroraMySQL.Migrating.ExtMySQL.S3">
/// Migrating Data from MySQL by Using an Amazon S3 Bucket</a> in the <i>Amazon Aurora
/// User Guide</i>.
///
/// <note>
/// <para>
/// This action only restores the DB cluster, not the DB instances for that DB cluster.
/// You must invoke the <code>CreateDBInstance</code> action to create DB instances for
/// the restored DB cluster, specifying the identifier of the restored DB cluster in <code>DBClusterIdentifier</code>.
/// You can create DB instances only after the <code>RestoreDBClusterFromS3</code> action
/// has completed and the DB cluster is available.
/// </para>
/// </note>
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters. The source DB engine must be MySQL.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RestoreDBClusterFromS3 service method.</param>
///
/// <returns>The response from the RestoreDBClusterFromS3 service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterAlreadyExistsException">
/// The user already has a DB cluster with the given identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterParameterGroupNotFoundException">
/// <code>DBClusterParameterGroupName</code> doesn't refer to an existing DB cluster
/// parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterQuotaExceededException">
/// The user attempted to create a new DB cluster and the user has already reached the
/// maximum allowed DB cluster quota.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupNotFoundException">
/// <code>DBSubnetGroupName</code> doesn't refer to an existing DB subnet group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DomainNotFoundException">
/// <code>Domain</code> doesn't refer to an existing Active Directory domain.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InsufficientStorageClusterCapacityException">
/// There is insufficient storage available for the current action. You might be able
/// to resolve this error by updating your subnet group to use different Availability
/// Zones that have more storage available.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBSubnetGroupStateException">
/// The DB subnet group cannot be deleted because it's in use.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidS3BucketException">
/// The specified Amazon S3 bucket name can't be found or Amazon RDS isn't authorized
/// to access the specified Amazon S3 bucket. Verify the <b>SourceS3BucketName</b> and
/// <b>S3IngestionRoleArn</b> values and try again.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidSubnetException">
/// The requested subnet is invalid, or multiple subnets were requested that are not all
/// in a common VPC.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidVPCNetworkStateException">
/// The DB subnet group doesn't cover all Availability Zones after it's created because
/// of users' change.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageQuotaExceededException">
/// The request would result in the user exceeding the allowed amount of storage available
/// across all DB instances.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBClusterFromS3">REST API Reference for RestoreDBClusterFromS3 Operation</seealso>
public virtual RestoreDBClusterFromS3Response RestoreDBClusterFromS3(RestoreDBClusterFromS3Request request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RestoreDBClusterFromS3RequestMarshaller.Instance;
options.ResponseUnmarshaller = RestoreDBClusterFromS3ResponseUnmarshaller.Instance;
return Invoke<RestoreDBClusterFromS3Response>(request, options);
}
/// <summary>
/// Creates an Amazon Aurora DB cluster from MySQL data stored in an Amazon S3 bucket.
/// Amazon RDS must be authorized to access the Amazon S3 bucket and the data must be
/// created using the Percona XtraBackup utility as described in <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Migrating.ExtMySQL.html#AuroraMySQL.Migrating.ExtMySQL.S3">
/// Migrating Data from MySQL by Using an Amazon S3 Bucket</a> in the <i>Amazon Aurora
/// User Guide</i>.
///
/// <note>
/// <para>
/// This action only restores the DB cluster, not the DB instances for that DB cluster.
/// You must invoke the <code>CreateDBInstance</code> action to create DB instances for
/// the restored DB cluster, specifying the identifier of the restored DB cluster in <code>DBClusterIdentifier</code>.
/// You can create DB instances only after the <code>RestoreDBClusterFromS3</code> action
/// has completed and the DB cluster is available.
/// </para>
/// </note>
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters. The source DB engine must be MySQL.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RestoreDBClusterFromS3 service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RestoreDBClusterFromS3 service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterAlreadyExistsException">
/// The user already has a DB cluster with the given identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterParameterGroupNotFoundException">
/// <code>DBClusterParameterGroupName</code> doesn't refer to an existing DB cluster
/// parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterQuotaExceededException">
/// The user attempted to create a new DB cluster and the user has already reached the
/// maximum allowed DB cluster quota.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupNotFoundException">
/// <code>DBSubnetGroupName</code> doesn't refer to an existing DB subnet group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DomainNotFoundException">
/// <code>Domain</code> doesn't refer to an existing Active Directory domain.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InsufficientStorageClusterCapacityException">
/// There is insufficient storage available for the current action. You might be able
/// to resolve this error by updating your subnet group to use different Availability
/// Zones that have more storage available.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBSubnetGroupStateException">
/// The DB subnet group cannot be deleted because it's in use.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidS3BucketException">
/// The specified Amazon S3 bucket name can't be found or Amazon RDS isn't authorized
/// to access the specified Amazon S3 bucket. Verify the <b>SourceS3BucketName</b> and
/// <b>S3IngestionRoleArn</b> values and try again.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidSubnetException">
/// The requested subnet is invalid, or multiple subnets were requested that are not all
/// in a common VPC.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidVPCNetworkStateException">
/// The DB subnet group doesn't cover all Availability Zones after it's created because
/// of users' change.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageQuotaExceededException">
/// The request would result in the user exceeding the allowed amount of storage available
/// across all DB instances.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBClusterFromS3">REST API Reference for RestoreDBClusterFromS3 Operation</seealso>
public virtual Task<RestoreDBClusterFromS3Response> RestoreDBClusterFromS3Async(RestoreDBClusterFromS3Request request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RestoreDBClusterFromS3RequestMarshaller.Instance;
options.ResponseUnmarshaller = RestoreDBClusterFromS3ResponseUnmarshaller.Instance;
return InvokeAsync<RestoreDBClusterFromS3Response>(request, options, cancellationToken);
}
#endregion
#region RestoreDBClusterFromSnapshot
/// <summary>
/// Creates a new DB cluster from a DB snapshot or DB cluster snapshot. This action only
/// applies to Aurora DB clusters.
///
///
/// <para>
/// The target DB cluster is created from the source snapshot with a default configuration.
/// If you don't specify a security group, the new DB cluster is associated with the default
/// security group.
/// </para>
/// <note>
/// <para>
/// This action only restores the DB cluster, not the DB instances for that DB cluster.
/// You must invoke the <code>CreateDBInstance</code> action to create DB instances for
/// the restored DB cluster, specifying the identifier of the restored DB cluster in <code>DBClusterIdentifier</code>.
/// You can create DB instances only after the <code>RestoreDBClusterFromSnapshot</code>
/// action has completed and the DB cluster is available.
/// </para>
/// </note>
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RestoreDBClusterFromSnapshot service method.</param>
///
/// <returns>The response from the RestoreDBClusterFromSnapshot service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterAlreadyExistsException">
/// The user already has a DB cluster with the given identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterParameterGroupNotFoundException">
/// <code>DBClusterParameterGroupName</code> doesn't refer to an existing DB cluster
/// parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterQuotaExceededException">
/// The user attempted to create a new DB cluster and the user has already reached the
/// maximum allowed DB cluster quota.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterSnapshotNotFoundException">
/// <code>DBClusterSnapshotIdentifier</code> doesn't refer to an existing DB cluster
/// snapshot.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSnapshotNotFoundException">
/// <code>DBSnapshotIdentifier</code> doesn't refer to an existing DB snapshot.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupNotFoundException">
/// <code>DBSubnetGroupName</code> doesn't refer to an existing DB subnet group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DomainNotFoundException">
/// <code>Domain</code> doesn't refer to an existing Active Directory domain.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InsufficientDBClusterCapacityException">
/// The DB cluster doesn't have enough capacity for the current operation.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InsufficientStorageClusterCapacityException">
/// There is insufficient storage available for the current action. You might be able
/// to resolve this error by updating your subnet group to use different Availability
/// Zones that have more storage available.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterSnapshotStateException">
/// The supplied value isn't a valid DB cluster snapshot state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBSnapshotStateException">
/// The state of the DB snapshot doesn't allow deletion.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidRestoreException">
/// Cannot restore from VPC backup to non-VPC DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidSubnetException">
/// The requested subnet is invalid, or multiple subnets were requested that are not all
/// in a common VPC.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidVPCNetworkStateException">
/// The DB subnet group doesn't cover all Availability Zones after it's created because
/// of users' change.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <exception cref="Amazon.RDS.Model.OptionGroupNotFoundException">
/// The specified option group could not be found.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageQuotaExceededException">
/// The request would result in the user exceeding the allowed amount of storage available
/// across all DB instances.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBClusterFromSnapshot">REST API Reference for RestoreDBClusterFromSnapshot Operation</seealso>
public virtual RestoreDBClusterFromSnapshotResponse RestoreDBClusterFromSnapshot(RestoreDBClusterFromSnapshotRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RestoreDBClusterFromSnapshotRequestMarshaller.Instance;
options.ResponseUnmarshaller = RestoreDBClusterFromSnapshotResponseUnmarshaller.Instance;
return Invoke<RestoreDBClusterFromSnapshotResponse>(request, options);
}
/// <summary>
/// Creates a new DB cluster from a DB snapshot or DB cluster snapshot. This action only
/// applies to Aurora DB clusters.
///
///
/// <para>
/// The target DB cluster is created from the source snapshot with a default configuration.
/// If you don't specify a security group, the new DB cluster is associated with the default
/// security group.
/// </para>
/// <note>
/// <para>
/// This action only restores the DB cluster, not the DB instances for that DB cluster.
/// You must invoke the <code>CreateDBInstance</code> action to create DB instances for
/// the restored DB cluster, specifying the identifier of the restored DB cluster in <code>DBClusterIdentifier</code>.
/// You can create DB instances only after the <code>RestoreDBClusterFromSnapshot</code>
/// action has completed and the DB cluster is available.
/// </para>
/// </note>
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RestoreDBClusterFromSnapshot service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RestoreDBClusterFromSnapshot service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterAlreadyExistsException">
/// The user already has a DB cluster with the given identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterParameterGroupNotFoundException">
/// <code>DBClusterParameterGroupName</code> doesn't refer to an existing DB cluster
/// parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterQuotaExceededException">
/// The user attempted to create a new DB cluster and the user has already reached the
/// maximum allowed DB cluster quota.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterSnapshotNotFoundException">
/// <code>DBClusterSnapshotIdentifier</code> doesn't refer to an existing DB cluster
/// snapshot.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSnapshotNotFoundException">
/// <code>DBSnapshotIdentifier</code> doesn't refer to an existing DB snapshot.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupNotFoundException">
/// <code>DBSubnetGroupName</code> doesn't refer to an existing DB subnet group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DomainNotFoundException">
/// <code>Domain</code> doesn't refer to an existing Active Directory domain.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InsufficientDBClusterCapacityException">
/// The DB cluster doesn't have enough capacity for the current operation.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InsufficientStorageClusterCapacityException">
/// There is insufficient storage available for the current action. You might be able
/// to resolve this error by updating your subnet group to use different Availability
/// Zones that have more storage available.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterSnapshotStateException">
/// The supplied value isn't a valid DB cluster snapshot state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBSnapshotStateException">
/// The state of the DB snapshot doesn't allow deletion.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidRestoreException">
/// Cannot restore from VPC backup to non-VPC DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidSubnetException">
/// The requested subnet is invalid, or multiple subnets were requested that are not all
/// in a common VPC.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidVPCNetworkStateException">
/// The DB subnet group doesn't cover all Availability Zones after it's created because
/// of users' change.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <exception cref="Amazon.RDS.Model.OptionGroupNotFoundException">
/// The specified option group could not be found.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageQuotaExceededException">
/// The request would result in the user exceeding the allowed amount of storage available
/// across all DB instances.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBClusterFromSnapshot">REST API Reference for RestoreDBClusterFromSnapshot Operation</seealso>
public virtual Task<RestoreDBClusterFromSnapshotResponse> RestoreDBClusterFromSnapshotAsync(RestoreDBClusterFromSnapshotRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RestoreDBClusterFromSnapshotRequestMarshaller.Instance;
options.ResponseUnmarshaller = RestoreDBClusterFromSnapshotResponseUnmarshaller.Instance;
return InvokeAsync<RestoreDBClusterFromSnapshotResponse>(request, options, cancellationToken);
}
#endregion
#region RestoreDBClusterToPointInTime
/// <summary>
/// Restores a DB cluster to an arbitrary point in time. Users can restore to any point
/// in time before <code>LatestRestorableTime</code> for up to <code>BackupRetentionPeriod</code>
/// days. The target DB cluster is created from the source DB cluster with the same configuration
/// as the original DB cluster, except that the new DB cluster is created with the default
/// DB security group.
///
/// <note>
/// <para>
/// This action only restores the DB cluster, not the DB instances for that DB cluster.
/// You must invoke the <code>CreateDBInstance</code> action to create DB instances for
/// the restored DB cluster, specifying the identifier of the restored DB cluster in <code>DBClusterIdentifier</code>.
/// You can create DB instances only after the <code>RestoreDBClusterToPointInTime</code>
/// action has completed and the DB cluster is available.
/// </para>
/// </note>
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RestoreDBClusterToPointInTime service method.</param>
///
/// <returns>The response from the RestoreDBClusterToPointInTime service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterAlreadyExistsException">
/// The user already has a DB cluster with the given identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterParameterGroupNotFoundException">
/// <code>DBClusterParameterGroupName</code> doesn't refer to an existing DB cluster
/// parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterQuotaExceededException">
/// The user attempted to create a new DB cluster and the user has already reached the
/// maximum allowed DB cluster quota.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterSnapshotNotFoundException">
/// <code>DBClusterSnapshotIdentifier</code> doesn't refer to an existing DB cluster
/// snapshot.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupNotFoundException">
/// <code>DBSubnetGroupName</code> doesn't refer to an existing DB subnet group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DomainNotFoundException">
/// <code>Domain</code> doesn't refer to an existing Active Directory domain.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InsufficientDBClusterCapacityException">
/// The DB cluster doesn't have enough capacity for the current operation.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InsufficientStorageClusterCapacityException">
/// There is insufficient storage available for the current action. You might be able
/// to resolve this error by updating your subnet group to use different Availability
/// Zones that have more storage available.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterSnapshotStateException">
/// The supplied value isn't a valid DB cluster snapshot state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBSnapshotStateException">
/// The state of the DB snapshot doesn't allow deletion.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidRestoreException">
/// Cannot restore from VPC backup to non-VPC DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidSubnetException">
/// The requested subnet is invalid, or multiple subnets were requested that are not all
/// in a common VPC.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidVPCNetworkStateException">
/// The DB subnet group doesn't cover all Availability Zones after it's created because
/// of users' change.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <exception cref="Amazon.RDS.Model.OptionGroupNotFoundException">
/// The specified option group could not be found.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageQuotaExceededException">
/// The request would result in the user exceeding the allowed amount of storage available
/// across all DB instances.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBClusterToPointInTime">REST API Reference for RestoreDBClusterToPointInTime Operation</seealso>
public virtual RestoreDBClusterToPointInTimeResponse RestoreDBClusterToPointInTime(RestoreDBClusterToPointInTimeRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RestoreDBClusterToPointInTimeRequestMarshaller.Instance;
options.ResponseUnmarshaller = RestoreDBClusterToPointInTimeResponseUnmarshaller.Instance;
return Invoke<RestoreDBClusterToPointInTimeResponse>(request, options);
}
/// <summary>
/// Restores a DB cluster to an arbitrary point in time. Users can restore to any point
/// in time before <code>LatestRestorableTime</code> for up to <code>BackupRetentionPeriod</code>
/// days. The target DB cluster is created from the source DB cluster with the same configuration
/// as the original DB cluster, except that the new DB cluster is created with the default
/// DB security group.
///
/// <note>
/// <para>
/// This action only restores the DB cluster, not the DB instances for that DB cluster.
/// You must invoke the <code>CreateDBInstance</code> action to create DB instances for
/// the restored DB cluster, specifying the identifier of the restored DB cluster in <code>DBClusterIdentifier</code>.
/// You can create DB instances only after the <code>RestoreDBClusterToPointInTime</code>
/// action has completed and the DB cluster is available.
/// </para>
/// </note>
/// <para>
/// For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">
/// What Is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RestoreDBClusterToPointInTime service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RestoreDBClusterToPointInTime service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterAlreadyExistsException">
/// The user already has a DB cluster with the given identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterParameterGroupNotFoundException">
/// <code>DBClusterParameterGroupName</code> doesn't refer to an existing DB cluster
/// parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterQuotaExceededException">
/// The user attempted to create a new DB cluster and the user has already reached the
/// maximum allowed DB cluster quota.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterSnapshotNotFoundException">
/// <code>DBClusterSnapshotIdentifier</code> doesn't refer to an existing DB cluster
/// snapshot.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupNotFoundException">
/// <code>DBSubnetGroupName</code> doesn't refer to an existing DB subnet group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DomainNotFoundException">
/// <code>Domain</code> doesn't refer to an existing Active Directory domain.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InsufficientDBClusterCapacityException">
/// The DB cluster doesn't have enough capacity for the current operation.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InsufficientStorageClusterCapacityException">
/// There is insufficient storage available for the current action. You might be able
/// to resolve this error by updating your subnet group to use different Availability
/// Zones that have more storage available.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterSnapshotStateException">
/// The supplied value isn't a valid DB cluster snapshot state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBSnapshotStateException">
/// The state of the DB snapshot doesn't allow deletion.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidRestoreException">
/// Cannot restore from VPC backup to non-VPC DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidSubnetException">
/// The requested subnet is invalid, or multiple subnets were requested that are not all
/// in a common VPC.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidVPCNetworkStateException">
/// The DB subnet group doesn't cover all Availability Zones after it's created because
/// of users' change.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <exception cref="Amazon.RDS.Model.OptionGroupNotFoundException">
/// The specified option group could not be found.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageQuotaExceededException">
/// The request would result in the user exceeding the allowed amount of storage available
/// across all DB instances.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBClusterToPointInTime">REST API Reference for RestoreDBClusterToPointInTime Operation</seealso>
public virtual Task<RestoreDBClusterToPointInTimeResponse> RestoreDBClusterToPointInTimeAsync(RestoreDBClusterToPointInTimeRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RestoreDBClusterToPointInTimeRequestMarshaller.Instance;
options.ResponseUnmarshaller = RestoreDBClusterToPointInTimeResponseUnmarshaller.Instance;
return InvokeAsync<RestoreDBClusterToPointInTimeResponse>(request, options, cancellationToken);
}
#endregion
#region RestoreDBInstanceFromDBSnapshot
/// <summary>
/// Creates a new DB instance from a DB snapshot. The target database is created from
/// the source database restore point with most of the source's original configuration,
/// including the default security group and DB parameter group. By default, the new DB
/// instance is created as a Single-AZ deployment, except when the instance is a SQL Server
/// instance that has an option group associated with mirroring. In this case, the instance
/// becomes a Multi-AZ deployment, not a Single-AZ deployment.
///
///
/// <para>
/// If you want to replace your original DB instance with the new, restored DB instance,
/// then rename your original DB instance before you call the RestoreDBInstanceFromDBSnapshot
/// action. RDS doesn't allow two DB instances with the same name. After you have renamed
/// your original DB instance with a different identifier, then you can pass the original
/// name of the DB instance as the DBInstanceIdentifier in the call to the RestoreDBInstanceFromDBSnapshot
/// action. The result is that you replace the original DB instance with the DB instance
/// created from the snapshot.
/// </para>
///
/// <para>
/// If you are restoring from a shared manual DB snapshot, the <code>DBSnapshotIdentifier</code>
/// must be the ARN of the shared DB snapshot.
/// </para>
/// <note>
/// <para>
/// This command doesn't apply to Aurora MySQL and Aurora PostgreSQL. For Aurora, use
/// <code>RestoreDBClusterFromSnapshot</code>.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RestoreDBInstanceFromDBSnapshot service method.</param>
///
/// <returns>The response from the RestoreDBInstanceFromDBSnapshot service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.AuthorizationNotFoundException">
/// The specified CIDR IP range or Amazon EC2 security group might not be authorized for
/// the specified DB security group.
///
///
/// <para>
/// Or, RDS might not be authorized to perform necessary actions using IAM on your behalf.
/// </para>
/// </exception>
/// <exception cref="Amazon.RDS.Model.BackupPolicyNotFoundException">
///
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceAlreadyExistsException">
/// The user already has a DB instance with the given identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSecurityGroupNotFoundException">
/// <code>DBSecurityGroupName</code> doesn't refer to an existing DB security group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSnapshotNotFoundException">
/// <code>DBSnapshotIdentifier</code> doesn't refer to an existing DB snapshot.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupDoesNotCoverEnoughAZsException">
/// Subnets in the DB subnet group should cover at least two Availability Zones unless
/// there is only one Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupNotFoundException">
/// <code>DBSubnetGroupName</code> doesn't refer to an existing DB subnet group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DomainNotFoundException">
/// <code>Domain</code> doesn't refer to an existing Active Directory domain.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InstanceQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB instances.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InsufficientDBInstanceCapacityException">
/// The specified DB instance class isn't available in the specified Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBSnapshotStateException">
/// The state of the DB snapshot doesn't allow deletion.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidRestoreException">
/// Cannot restore from VPC backup to non-VPC DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidSubnetException">
/// The requested subnet is invalid, or multiple subnets were requested that are not all
/// in a common VPC.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidVPCNetworkStateException">
/// The DB subnet group doesn't cover all Availability Zones after it's created because
/// of users' change.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <exception cref="Amazon.RDS.Model.OptionGroupNotFoundException">
/// The specified option group could not be found.
/// </exception>
/// <exception cref="Amazon.RDS.Model.ProvisionedIopsNotAvailableInAZException">
/// Provisioned IOPS not available in the specified Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageQuotaExceededException">
/// The request would result in the user exceeding the allowed amount of storage available
/// across all DB instances.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageTypeNotSupportedException">
/// Storage of the <code>StorageType</code> specified can't be associated with the DB
/// instance.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBInstanceFromDBSnapshot">REST API Reference for RestoreDBInstanceFromDBSnapshot Operation</seealso>
public virtual RestoreDBInstanceFromDBSnapshotResponse RestoreDBInstanceFromDBSnapshot(RestoreDBInstanceFromDBSnapshotRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RestoreDBInstanceFromDBSnapshotRequestMarshaller.Instance;
options.ResponseUnmarshaller = RestoreDBInstanceFromDBSnapshotResponseUnmarshaller.Instance;
return Invoke<RestoreDBInstanceFromDBSnapshotResponse>(request, options);
}
/// <summary>
/// Creates a new DB instance from a DB snapshot. The target database is created from
/// the source database restore point with most of the source's original configuration,
/// including the default security group and DB parameter group. By default, the new DB
/// instance is created as a Single-AZ deployment, except when the instance is a SQL Server
/// instance that has an option group associated with mirroring. In this case, the instance
/// becomes a Multi-AZ deployment, not a Single-AZ deployment.
///
///
/// <para>
/// If you want to replace your original DB instance with the new, restored DB instance,
/// then rename your original DB instance before you call the RestoreDBInstanceFromDBSnapshot
/// action. RDS doesn't allow two DB instances with the same name. After you have renamed
/// your original DB instance with a different identifier, then you can pass the original
/// name of the DB instance as the DBInstanceIdentifier in the call to the RestoreDBInstanceFromDBSnapshot
/// action. The result is that you replace the original DB instance with the DB instance
/// created from the snapshot.
/// </para>
///
/// <para>
/// If you are restoring from a shared manual DB snapshot, the <code>DBSnapshotIdentifier</code>
/// must be the ARN of the shared DB snapshot.
/// </para>
/// <note>
/// <para>
/// This command doesn't apply to Aurora MySQL and Aurora PostgreSQL. For Aurora, use
/// <code>RestoreDBClusterFromSnapshot</code>.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RestoreDBInstanceFromDBSnapshot service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RestoreDBInstanceFromDBSnapshot service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.AuthorizationNotFoundException">
/// The specified CIDR IP range or Amazon EC2 security group might not be authorized for
/// the specified DB security group.
///
///
/// <para>
/// Or, RDS might not be authorized to perform necessary actions using IAM on your behalf.
/// </para>
/// </exception>
/// <exception cref="Amazon.RDS.Model.BackupPolicyNotFoundException">
///
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceAlreadyExistsException">
/// The user already has a DB instance with the given identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSecurityGroupNotFoundException">
/// <code>DBSecurityGroupName</code> doesn't refer to an existing DB security group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSnapshotNotFoundException">
/// <code>DBSnapshotIdentifier</code> doesn't refer to an existing DB snapshot.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupDoesNotCoverEnoughAZsException">
/// Subnets in the DB subnet group should cover at least two Availability Zones unless
/// there is only one Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupNotFoundException">
/// <code>DBSubnetGroupName</code> doesn't refer to an existing DB subnet group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DomainNotFoundException">
/// <code>Domain</code> doesn't refer to an existing Active Directory domain.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InstanceQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB instances.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InsufficientDBInstanceCapacityException">
/// The specified DB instance class isn't available in the specified Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBSnapshotStateException">
/// The state of the DB snapshot doesn't allow deletion.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidRestoreException">
/// Cannot restore from VPC backup to non-VPC DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidSubnetException">
/// The requested subnet is invalid, or multiple subnets were requested that are not all
/// in a common VPC.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidVPCNetworkStateException">
/// The DB subnet group doesn't cover all Availability Zones after it's created because
/// of users' change.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <exception cref="Amazon.RDS.Model.OptionGroupNotFoundException">
/// The specified option group could not be found.
/// </exception>
/// <exception cref="Amazon.RDS.Model.ProvisionedIopsNotAvailableInAZException">
/// Provisioned IOPS not available in the specified Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageQuotaExceededException">
/// The request would result in the user exceeding the allowed amount of storage available
/// across all DB instances.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageTypeNotSupportedException">
/// Storage of the <code>StorageType</code> specified can't be associated with the DB
/// instance.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBInstanceFromDBSnapshot">REST API Reference for RestoreDBInstanceFromDBSnapshot Operation</seealso>
public virtual Task<RestoreDBInstanceFromDBSnapshotResponse> RestoreDBInstanceFromDBSnapshotAsync(RestoreDBInstanceFromDBSnapshotRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RestoreDBInstanceFromDBSnapshotRequestMarshaller.Instance;
options.ResponseUnmarshaller = RestoreDBInstanceFromDBSnapshotResponseUnmarshaller.Instance;
return InvokeAsync<RestoreDBInstanceFromDBSnapshotResponse>(request, options, cancellationToken);
}
#endregion
#region RestoreDBInstanceFromS3
/// <summary>
/// Amazon Relational Database Service (Amazon RDS) supports importing MySQL databases
/// by using backup files. You can create a backup of your on-premises database, store
/// it on Amazon Simple Storage Service (Amazon S3), and then restore the backup file
/// onto a new Amazon RDS DB instance running MySQL. For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/MySQL.Procedural.Importing.html">Importing
/// Data into an Amazon RDS MySQL DB Instance</a> in the <i>Amazon RDS User Guide.</i>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RestoreDBInstanceFromS3 service method.</param>
///
/// <returns>The response from the RestoreDBInstanceFromS3 service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.AuthorizationNotFoundException">
/// The specified CIDR IP range or Amazon EC2 security group might not be authorized for
/// the specified DB security group.
///
///
/// <para>
/// Or, RDS might not be authorized to perform necessary actions using IAM on your behalf.
/// </para>
/// </exception>
/// <exception cref="Amazon.RDS.Model.BackupPolicyNotFoundException">
///
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceAlreadyExistsException">
/// The user already has a DB instance with the given identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSecurityGroupNotFoundException">
/// <code>DBSecurityGroupName</code> doesn't refer to an existing DB security group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupDoesNotCoverEnoughAZsException">
/// Subnets in the DB subnet group should cover at least two Availability Zones unless
/// there is only one Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupNotFoundException">
/// <code>DBSubnetGroupName</code> doesn't refer to an existing DB subnet group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InstanceQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB instances.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InsufficientDBInstanceCapacityException">
/// The specified DB instance class isn't available in the specified Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidS3BucketException">
/// The specified Amazon S3 bucket name can't be found or Amazon RDS isn't authorized
/// to access the specified Amazon S3 bucket. Verify the <b>SourceS3BucketName</b> and
/// <b>S3IngestionRoleArn</b> values and try again.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidSubnetException">
/// The requested subnet is invalid, or multiple subnets were requested that are not all
/// in a common VPC.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidVPCNetworkStateException">
/// The DB subnet group doesn't cover all Availability Zones after it's created because
/// of users' change.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <exception cref="Amazon.RDS.Model.OptionGroupNotFoundException">
/// The specified option group could not be found.
/// </exception>
/// <exception cref="Amazon.RDS.Model.ProvisionedIopsNotAvailableInAZException">
/// Provisioned IOPS not available in the specified Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageQuotaExceededException">
/// The request would result in the user exceeding the allowed amount of storage available
/// across all DB instances.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageTypeNotSupportedException">
/// Storage of the <code>StorageType</code> specified can't be associated with the DB
/// instance.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBInstanceFromS3">REST API Reference for RestoreDBInstanceFromS3 Operation</seealso>
public virtual RestoreDBInstanceFromS3Response RestoreDBInstanceFromS3(RestoreDBInstanceFromS3Request request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RestoreDBInstanceFromS3RequestMarshaller.Instance;
options.ResponseUnmarshaller = RestoreDBInstanceFromS3ResponseUnmarshaller.Instance;
return Invoke<RestoreDBInstanceFromS3Response>(request, options);
}
/// <summary>
/// Amazon Relational Database Service (Amazon RDS) supports importing MySQL databases
/// by using backup files. You can create a backup of your on-premises database, store
/// it on Amazon Simple Storage Service (Amazon S3), and then restore the backup file
/// onto a new Amazon RDS DB instance running MySQL. For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/MySQL.Procedural.Importing.html">Importing
/// Data into an Amazon RDS MySQL DB Instance</a> in the <i>Amazon RDS User Guide.</i>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RestoreDBInstanceFromS3 service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RestoreDBInstanceFromS3 service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.AuthorizationNotFoundException">
/// The specified CIDR IP range or Amazon EC2 security group might not be authorized for
/// the specified DB security group.
///
///
/// <para>
/// Or, RDS might not be authorized to perform necessary actions using IAM on your behalf.
/// </para>
/// </exception>
/// <exception cref="Amazon.RDS.Model.BackupPolicyNotFoundException">
///
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceAlreadyExistsException">
/// The user already has a DB instance with the given identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSecurityGroupNotFoundException">
/// <code>DBSecurityGroupName</code> doesn't refer to an existing DB security group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupDoesNotCoverEnoughAZsException">
/// Subnets in the DB subnet group should cover at least two Availability Zones unless
/// there is only one Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupNotFoundException">
/// <code>DBSubnetGroupName</code> doesn't refer to an existing DB subnet group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InstanceQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB instances.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InsufficientDBInstanceCapacityException">
/// The specified DB instance class isn't available in the specified Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidS3BucketException">
/// The specified Amazon S3 bucket name can't be found or Amazon RDS isn't authorized
/// to access the specified Amazon S3 bucket. Verify the <b>SourceS3BucketName</b> and
/// <b>S3IngestionRoleArn</b> values and try again.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidSubnetException">
/// The requested subnet is invalid, or multiple subnets were requested that are not all
/// in a common VPC.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidVPCNetworkStateException">
/// The DB subnet group doesn't cover all Availability Zones after it's created because
/// of users' change.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <exception cref="Amazon.RDS.Model.OptionGroupNotFoundException">
/// The specified option group could not be found.
/// </exception>
/// <exception cref="Amazon.RDS.Model.ProvisionedIopsNotAvailableInAZException">
/// Provisioned IOPS not available in the specified Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageQuotaExceededException">
/// The request would result in the user exceeding the allowed amount of storage available
/// across all DB instances.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageTypeNotSupportedException">
/// Storage of the <code>StorageType</code> specified can't be associated with the DB
/// instance.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBInstanceFromS3">REST API Reference for RestoreDBInstanceFromS3 Operation</seealso>
public virtual Task<RestoreDBInstanceFromS3Response> RestoreDBInstanceFromS3Async(RestoreDBInstanceFromS3Request request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RestoreDBInstanceFromS3RequestMarshaller.Instance;
options.ResponseUnmarshaller = RestoreDBInstanceFromS3ResponseUnmarshaller.Instance;
return InvokeAsync<RestoreDBInstanceFromS3Response>(request, options, cancellationToken);
}
#endregion
#region RestoreDBInstanceToPointInTime
/// <summary>
/// Restores a DB instance to an arbitrary point in time. You can restore to any point
/// in time before the time identified by the LatestRestorableTime property. You can restore
/// to a point up to the number of days specified by the BackupRetentionPeriod property.
///
///
/// <para>
/// The target database is created with most of the original configuration, but in a system-selected
/// Availability Zone, with the default security group, the default subnet group, and
/// the default DB parameter group. By default, the new DB instance is created as a single-AZ
/// deployment except when the instance is a SQL Server instance that has an option group
/// that is associated with mirroring; in this case, the instance becomes a mirrored deployment
/// and not a single-AZ deployment.
/// </para>
/// <note>
/// <para>
/// This command doesn't apply to Aurora MySQL and Aurora PostgreSQL. For Aurora, use
/// <code>RestoreDBClusterToPointInTime</code>.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RestoreDBInstanceToPointInTime service method.</param>
///
/// <returns>The response from the RestoreDBInstanceToPointInTime service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.AuthorizationNotFoundException">
/// The specified CIDR IP range or Amazon EC2 security group might not be authorized for
/// the specified DB security group.
///
///
/// <para>
/// Or, RDS might not be authorized to perform necessary actions using IAM on your behalf.
/// </para>
/// </exception>
/// <exception cref="Amazon.RDS.Model.BackupPolicyNotFoundException">
///
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceAlreadyExistsException">
/// The user already has a DB instance with the given identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceAutomatedBackupNotFoundException">
/// No automated backup for this DB instance was found.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSecurityGroupNotFoundException">
/// <code>DBSecurityGroupName</code> doesn't refer to an existing DB security group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupDoesNotCoverEnoughAZsException">
/// Subnets in the DB subnet group should cover at least two Availability Zones unless
/// there is only one Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupNotFoundException">
/// <code>DBSubnetGroupName</code> doesn't refer to an existing DB subnet group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DomainNotFoundException">
/// <code>Domain</code> doesn't refer to an existing Active Directory domain.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InstanceQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB instances.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InsufficientDBInstanceCapacityException">
/// The specified DB instance class isn't available in the specified Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidRestoreException">
/// Cannot restore from VPC backup to non-VPC DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidSubnetException">
/// The requested subnet is invalid, or multiple subnets were requested that are not all
/// in a common VPC.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidVPCNetworkStateException">
/// The DB subnet group doesn't cover all Availability Zones after it's created because
/// of users' change.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <exception cref="Amazon.RDS.Model.OptionGroupNotFoundException">
/// The specified option group could not be found.
/// </exception>
/// <exception cref="Amazon.RDS.Model.PointInTimeRestoreNotEnabledException">
/// <code>SourceDBInstanceIdentifier</code> refers to a DB instance with <code>BackupRetentionPeriod</code>
/// equal to 0.
/// </exception>
/// <exception cref="Amazon.RDS.Model.ProvisionedIopsNotAvailableInAZException">
/// Provisioned IOPS not available in the specified Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageQuotaExceededException">
/// The request would result in the user exceeding the allowed amount of storage available
/// across all DB instances.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageTypeNotSupportedException">
/// Storage of the <code>StorageType</code> specified can't be associated with the DB
/// instance.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBInstanceToPointInTime">REST API Reference for RestoreDBInstanceToPointInTime Operation</seealso>
public virtual RestoreDBInstanceToPointInTimeResponse RestoreDBInstanceToPointInTime(RestoreDBInstanceToPointInTimeRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RestoreDBInstanceToPointInTimeRequestMarshaller.Instance;
options.ResponseUnmarshaller = RestoreDBInstanceToPointInTimeResponseUnmarshaller.Instance;
return Invoke<RestoreDBInstanceToPointInTimeResponse>(request, options);
}
/// <summary>
/// Restores a DB instance to an arbitrary point in time. You can restore to any point
/// in time before the time identified by the LatestRestorableTime property. You can restore
/// to a point up to the number of days specified by the BackupRetentionPeriod property.
///
///
/// <para>
/// The target database is created with most of the original configuration, but in a system-selected
/// Availability Zone, with the default security group, the default subnet group, and
/// the default DB parameter group. By default, the new DB instance is created as a single-AZ
/// deployment except when the instance is a SQL Server instance that has an option group
/// that is associated with mirroring; in this case, the instance becomes a mirrored deployment
/// and not a single-AZ deployment.
/// </para>
/// <note>
/// <para>
/// This command doesn't apply to Aurora MySQL and Aurora PostgreSQL. For Aurora, use
/// <code>RestoreDBClusterToPointInTime</code>.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RestoreDBInstanceToPointInTime service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RestoreDBInstanceToPointInTime service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.AuthorizationNotFoundException">
/// The specified CIDR IP range or Amazon EC2 security group might not be authorized for
/// the specified DB security group.
///
///
/// <para>
/// Or, RDS might not be authorized to perform necessary actions using IAM on your behalf.
/// </para>
/// </exception>
/// <exception cref="Amazon.RDS.Model.BackupPolicyNotFoundException">
///
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceAlreadyExistsException">
/// The user already has a DB instance with the given identifier.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceAutomatedBackupNotFoundException">
/// No automated backup for this DB instance was found.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBParameterGroupNotFoundException">
/// <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSecurityGroupNotFoundException">
/// <code>DBSecurityGroupName</code> doesn't refer to an existing DB security group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupDoesNotCoverEnoughAZsException">
/// Subnets in the DB subnet group should cover at least two Availability Zones unless
/// there is only one Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupNotFoundException">
/// <code>DBSubnetGroupName</code> doesn't refer to an existing DB subnet group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DomainNotFoundException">
/// <code>Domain</code> doesn't refer to an existing Active Directory domain.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InstanceQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB instances.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InsufficientDBInstanceCapacityException">
/// The specified DB instance class isn't available in the specified Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidRestoreException">
/// Cannot restore from VPC backup to non-VPC DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidSubnetException">
/// The requested subnet is invalid, or multiple subnets were requested that are not all
/// in a common VPC.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidVPCNetworkStateException">
/// The DB subnet group doesn't cover all Availability Zones after it's created because
/// of users' change.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <exception cref="Amazon.RDS.Model.OptionGroupNotFoundException">
/// The specified option group could not be found.
/// </exception>
/// <exception cref="Amazon.RDS.Model.PointInTimeRestoreNotEnabledException">
/// <code>SourceDBInstanceIdentifier</code> refers to a DB instance with <code>BackupRetentionPeriod</code>
/// equal to 0.
/// </exception>
/// <exception cref="Amazon.RDS.Model.ProvisionedIopsNotAvailableInAZException">
/// Provisioned IOPS not available in the specified Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageQuotaExceededException">
/// The request would result in the user exceeding the allowed amount of storage available
/// across all DB instances.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageTypeNotSupportedException">
/// Storage of the <code>StorageType</code> specified can't be associated with the DB
/// instance.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBInstanceToPointInTime">REST API Reference for RestoreDBInstanceToPointInTime Operation</seealso>
public virtual Task<RestoreDBInstanceToPointInTimeResponse> RestoreDBInstanceToPointInTimeAsync(RestoreDBInstanceToPointInTimeRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RestoreDBInstanceToPointInTimeRequestMarshaller.Instance;
options.ResponseUnmarshaller = RestoreDBInstanceToPointInTimeResponseUnmarshaller.Instance;
return InvokeAsync<RestoreDBInstanceToPointInTimeResponse>(request, options, cancellationToken);
}
#endregion
#region RevokeDBSecurityGroupIngress
/// <summary>
/// Revokes ingress from a DBSecurityGroup for previously authorized IP ranges or EC2
/// or VPC security groups. Required parameters for this API are one of CIDRIP, EC2SecurityGroupId
/// for VPC, or (EC2SecurityGroupOwnerId and either EC2SecurityGroupName or EC2SecurityGroupId).
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RevokeDBSecurityGroupIngress service method.</param>
///
/// <returns>The response from the RevokeDBSecurityGroupIngress service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.AuthorizationNotFoundException">
/// The specified CIDR IP range or Amazon EC2 security group might not be authorized for
/// the specified DB security group.
///
///
/// <para>
/// Or, RDS might not be authorized to perform necessary actions using IAM on your behalf.
/// </para>
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSecurityGroupNotFoundException">
/// <code>DBSecurityGroupName</code> doesn't refer to an existing DB security group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBSecurityGroupStateException">
/// The state of the DB security group doesn't allow deletion.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RevokeDBSecurityGroupIngress">REST API Reference for RevokeDBSecurityGroupIngress Operation</seealso>
public virtual RevokeDBSecurityGroupIngressResponse RevokeDBSecurityGroupIngress(RevokeDBSecurityGroupIngressRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RevokeDBSecurityGroupIngressRequestMarshaller.Instance;
options.ResponseUnmarshaller = RevokeDBSecurityGroupIngressResponseUnmarshaller.Instance;
return Invoke<RevokeDBSecurityGroupIngressResponse>(request, options);
}
/// <summary>
/// Revokes ingress from a DBSecurityGroup for previously authorized IP ranges or EC2
/// or VPC security groups. Required parameters for this API are one of CIDRIP, EC2SecurityGroupId
/// for VPC, or (EC2SecurityGroupOwnerId and either EC2SecurityGroupName or EC2SecurityGroupId).
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RevokeDBSecurityGroupIngress service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RevokeDBSecurityGroupIngress service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.AuthorizationNotFoundException">
/// The specified CIDR IP range or Amazon EC2 security group might not be authorized for
/// the specified DB security group.
///
///
/// <para>
/// Or, RDS might not be authorized to perform necessary actions using IAM on your behalf.
/// </para>
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSecurityGroupNotFoundException">
/// <code>DBSecurityGroupName</code> doesn't refer to an existing DB security group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBSecurityGroupStateException">
/// The state of the DB security group doesn't allow deletion.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RevokeDBSecurityGroupIngress">REST API Reference for RevokeDBSecurityGroupIngress Operation</seealso>
public virtual Task<RevokeDBSecurityGroupIngressResponse> RevokeDBSecurityGroupIngressAsync(RevokeDBSecurityGroupIngressRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RevokeDBSecurityGroupIngressRequestMarshaller.Instance;
options.ResponseUnmarshaller = RevokeDBSecurityGroupIngressResponseUnmarshaller.Instance;
return InvokeAsync<RevokeDBSecurityGroupIngressResponse>(request, options, cancellationToken);
}
#endregion
#region StartActivityStream
/// <summary>
/// Starts a database activity stream to monitor activity on the database. For more information,
/// see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/DBActivityStreams.html">Database
/// Activity Streams</a> in the <i>Amazon Aurora User Guide</i>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartActivityStream service method.</param>
///
/// <returns>The response from the StartActivityStream service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <exception cref="Amazon.RDS.Model.ResourceNotFoundException">
/// The specified resource ID was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StartActivityStream">REST API Reference for StartActivityStream Operation</seealso>
public virtual StartActivityStreamResponse StartActivityStream(StartActivityStreamRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StartActivityStreamRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartActivityStreamResponseUnmarshaller.Instance;
return Invoke<StartActivityStreamResponse>(request, options);
}
/// <summary>
/// Starts a database activity stream to monitor activity on the database. For more information,
/// see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/DBActivityStreams.html">Database
/// Activity Streams</a> in the <i>Amazon Aurora User Guide</i>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartActivityStream service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StartActivityStream service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <exception cref="Amazon.RDS.Model.ResourceNotFoundException">
/// The specified resource ID was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StartActivityStream">REST API Reference for StartActivityStream Operation</seealso>
public virtual Task<StartActivityStreamResponse> StartActivityStreamAsync(StartActivityStreamRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = StartActivityStreamRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartActivityStreamResponseUnmarshaller.Instance;
return InvokeAsync<StartActivityStreamResponse>(request, options, cancellationToken);
}
#endregion
#region StartDBCluster
/// <summary>
/// Starts an Amazon Aurora DB cluster that was stopped using the AWS console, the stop-db-cluster
/// AWS CLI command, or the StopDBCluster action.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-cluster-stop-start.html">
/// Stopping and Starting an Aurora Cluster</a> in the <i>Amazon Aurora User Guide.</i>
///
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartDBCluster service method.</param>
///
/// <returns>The response from the StartDBCluster service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StartDBCluster">REST API Reference for StartDBCluster Operation</seealso>
public virtual StartDBClusterResponse StartDBCluster(StartDBClusterRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StartDBClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartDBClusterResponseUnmarshaller.Instance;
return Invoke<StartDBClusterResponse>(request, options);
}
/// <summary>
/// Starts an Amazon Aurora DB cluster that was stopped using the AWS console, the stop-db-cluster
/// AWS CLI command, or the StopDBCluster action.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-cluster-stop-start.html">
/// Stopping and Starting an Aurora Cluster</a> in the <i>Amazon Aurora User Guide.</i>
///
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartDBCluster service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StartDBCluster service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StartDBCluster">REST API Reference for StartDBCluster Operation</seealso>
public virtual Task<StartDBClusterResponse> StartDBClusterAsync(StartDBClusterRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = StartDBClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartDBClusterResponseUnmarshaller.Instance;
return InvokeAsync<StartDBClusterResponse>(request, options, cancellationToken);
}
#endregion
#region StartDBInstance
/// <summary>
/// Starts an Amazon RDS DB instance that was stopped using the AWS console, the stop-db-instance
/// AWS CLI command, or the StopDBInstance action.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_StartInstance.html">
/// Starting an Amazon RDS DB instance That Was Previously Stopped</a> in the <i>Amazon
/// RDS User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This command doesn't apply to Aurora MySQL and Aurora PostgreSQL. For Aurora DB clusters,
/// use <code>StartDBCluster</code> instead.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartDBInstance service method.</param>
///
/// <returns>The response from the StartDBInstance service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.AuthorizationNotFoundException">
/// The specified CIDR IP range or Amazon EC2 security group might not be authorized for
/// the specified DB security group.
///
///
/// <para>
/// Or, RDS might not be authorized to perform necessary actions using IAM on your behalf.
/// </para>
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupDoesNotCoverEnoughAZsException">
/// Subnets in the DB subnet group should cover at least two Availability Zones unless
/// there is only one Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupNotFoundException">
/// <code>DBSubnetGroupName</code> doesn't refer to an existing DB subnet group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InsufficientDBInstanceCapacityException">
/// The specified DB instance class isn't available in the specified Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidSubnetException">
/// The requested subnet is invalid, or multiple subnets were requested that are not all
/// in a common VPC.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidVPCNetworkStateException">
/// The DB subnet group doesn't cover all Availability Zones after it's created because
/// of users' change.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StartDBInstance">REST API Reference for StartDBInstance Operation</seealso>
public virtual StartDBInstanceResponse StartDBInstance(StartDBInstanceRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StartDBInstanceRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartDBInstanceResponseUnmarshaller.Instance;
return Invoke<StartDBInstanceResponse>(request, options);
}
/// <summary>
/// Starts an Amazon RDS DB instance that was stopped using the AWS console, the stop-db-instance
/// AWS CLI command, or the StopDBInstance action.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_StartInstance.html">
/// Starting an Amazon RDS DB instance That Was Previously Stopped</a> in the <i>Amazon
/// RDS User Guide.</i>
/// </para>
/// <note>
/// <para>
/// This command doesn't apply to Aurora MySQL and Aurora PostgreSQL. For Aurora DB clusters,
/// use <code>StartDBCluster</code> instead.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartDBInstance service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StartDBInstance service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.AuthorizationNotFoundException">
/// The specified CIDR IP range or Amazon EC2 security group might not be authorized for
/// the specified DB security group.
///
///
/// <para>
/// Or, RDS might not be authorized to perform necessary actions using IAM on your behalf.
/// </para>
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupDoesNotCoverEnoughAZsException">
/// Subnets in the DB subnet group should cover at least two Availability Zones unless
/// there is only one Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSubnetGroupNotFoundException">
/// <code>DBSubnetGroupName</code> doesn't refer to an existing DB subnet group.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InsufficientDBInstanceCapacityException">
/// The specified DB instance class isn't available in the specified Availability Zone.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidSubnetException">
/// The requested subnet is invalid, or multiple subnets were requested that are not all
/// in a common VPC.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidVPCNetworkStateException">
/// The DB subnet group doesn't cover all Availability Zones after it's created because
/// of users' change.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StartDBInstance">REST API Reference for StartDBInstance Operation</seealso>
public virtual Task<StartDBInstanceResponse> StartDBInstanceAsync(StartDBInstanceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = StartDBInstanceRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartDBInstanceResponseUnmarshaller.Instance;
return InvokeAsync<StartDBInstanceResponse>(request, options, cancellationToken);
}
#endregion
#region StartDBInstanceAutomatedBackupsReplication
/// <summary>
/// Enables replication of automated backups to a different AWS Region.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReplicateBackups.html">
/// Replicating Automated Backups to Another AWS Region</a> in the <i>Amazon RDS User
/// Guide.</i>
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartDBInstanceAutomatedBackupsReplication service method.</param>
///
/// <returns>The response from the StartDBInstanceAutomatedBackupsReplication service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBInstanceAutomatedBackupQuotaExceededException">
/// The quota for retained automated backups was exceeded. This prevents you from retaining
/// any additional automated backups. The retained automated backups quota is the same
/// as your DB Instance quota.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageTypeNotSupportedException">
/// Storage of the <code>StorageType</code> specified can't be associated with the DB
/// instance.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StartDBInstanceAutomatedBackupsReplication">REST API Reference for StartDBInstanceAutomatedBackupsReplication Operation</seealso>
public virtual StartDBInstanceAutomatedBackupsReplicationResponse StartDBInstanceAutomatedBackupsReplication(StartDBInstanceAutomatedBackupsReplicationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StartDBInstanceAutomatedBackupsReplicationRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartDBInstanceAutomatedBackupsReplicationResponseUnmarshaller.Instance;
return Invoke<StartDBInstanceAutomatedBackupsReplicationResponse>(request, options);
}
/// <summary>
/// Enables replication of automated backups to a different AWS Region.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReplicateBackups.html">
/// Replicating Automated Backups to Another AWS Region</a> in the <i>Amazon RDS User
/// Guide.</i>
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartDBInstanceAutomatedBackupsReplication service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StartDBInstanceAutomatedBackupsReplication service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBInstanceAutomatedBackupQuotaExceededException">
/// The quota for retained automated backups was exceeded. This prevents you from retaining
/// any additional automated backups. The retained automated backups quota is the same
/// as your DB Instance quota.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <exception cref="Amazon.RDS.Model.StorageTypeNotSupportedException">
/// Storage of the <code>StorageType</code> specified can't be associated with the DB
/// instance.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StartDBInstanceAutomatedBackupsReplication">REST API Reference for StartDBInstanceAutomatedBackupsReplication Operation</seealso>
public virtual Task<StartDBInstanceAutomatedBackupsReplicationResponse> StartDBInstanceAutomatedBackupsReplicationAsync(StartDBInstanceAutomatedBackupsReplicationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = StartDBInstanceAutomatedBackupsReplicationRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartDBInstanceAutomatedBackupsReplicationResponseUnmarshaller.Instance;
return InvokeAsync<StartDBInstanceAutomatedBackupsReplicationResponse>(request, options, cancellationToken);
}
#endregion
#region StartExportTask
/// <summary>
/// Starts an export of a snapshot to Amazon S3. The provided IAM role must have access
/// to the S3 bucket.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartExportTask service method.</param>
///
/// <returns>The response from the StartExportTask service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterSnapshotNotFoundException">
/// <code>DBClusterSnapshotIdentifier</code> doesn't refer to an existing DB cluster
/// snapshot.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSnapshotNotFoundException">
/// <code>DBSnapshotIdentifier</code> doesn't refer to an existing DB snapshot.
/// </exception>
/// <exception cref="Amazon.RDS.Model.ExportTaskAlreadyExistsException">
/// You can't start an export task that's already running.
/// </exception>
/// <exception cref="Amazon.RDS.Model.IamRoleMissingPermissionsException">
/// The IAM role requires additional permissions to export to an Amazon S3 bucket.
/// </exception>
/// <exception cref="Amazon.RDS.Model.IamRoleNotFoundException">
/// The IAM role is missing for exporting to an Amazon S3 bucket.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidExportOnlyException">
/// The export is invalid for exporting to an Amazon S3 bucket.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidExportSourceStateException">
/// The state of the export snapshot is invalid for exporting to an Amazon S3 bucket.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidS3BucketException">
/// The specified Amazon S3 bucket name can't be found or Amazon RDS isn't authorized
/// to access the specified Amazon S3 bucket. Verify the <b>SourceS3BucketName</b> and
/// <b>S3IngestionRoleArn</b> values and try again.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StartExportTask">REST API Reference for StartExportTask Operation</seealso>
public virtual StartExportTaskResponse StartExportTask(StartExportTaskRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StartExportTaskRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartExportTaskResponseUnmarshaller.Instance;
return Invoke<StartExportTaskResponse>(request, options);
}
/// <summary>
/// Starts an export of a snapshot to Amazon S3. The provided IAM role must have access
/// to the S3 bucket.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartExportTask service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StartExportTask service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterSnapshotNotFoundException">
/// <code>DBClusterSnapshotIdentifier</code> doesn't refer to an existing DB cluster
/// snapshot.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSnapshotNotFoundException">
/// <code>DBSnapshotIdentifier</code> doesn't refer to an existing DB snapshot.
/// </exception>
/// <exception cref="Amazon.RDS.Model.ExportTaskAlreadyExistsException">
/// You can't start an export task that's already running.
/// </exception>
/// <exception cref="Amazon.RDS.Model.IamRoleMissingPermissionsException">
/// The IAM role requires additional permissions to export to an Amazon S3 bucket.
/// </exception>
/// <exception cref="Amazon.RDS.Model.IamRoleNotFoundException">
/// The IAM role is missing for exporting to an Amazon S3 bucket.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidExportOnlyException">
/// The export is invalid for exporting to an Amazon S3 bucket.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidExportSourceStateException">
/// The state of the export snapshot is invalid for exporting to an Amazon S3 bucket.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidS3BucketException">
/// The specified Amazon S3 bucket name can't be found or Amazon RDS isn't authorized
/// to access the specified Amazon S3 bucket. Verify the <b>SourceS3BucketName</b> and
/// <b>S3IngestionRoleArn</b> values and try again.
/// </exception>
/// <exception cref="Amazon.RDS.Model.KMSKeyNotAccessibleException">
/// An error occurred accessing an AWS KMS key.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StartExportTask">REST API Reference for StartExportTask Operation</seealso>
public virtual Task<StartExportTaskResponse> StartExportTaskAsync(StartExportTaskRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = StartExportTaskRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartExportTaskResponseUnmarshaller.Instance;
return InvokeAsync<StartExportTaskResponse>(request, options, cancellationToken);
}
#endregion
#region StopActivityStream
/// <summary>
/// Stops a database activity stream that was started using the AWS console, the <code>start-activity-stream</code>
/// AWS CLI command, or the <code>StartActivityStream</code> action.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/DBActivityStreams.html">Database
/// Activity Streams</a> in the <i>Amazon Aurora User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopActivityStream service method.</param>
///
/// <returns>The response from the StopActivityStream service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.ResourceNotFoundException">
/// The specified resource ID was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StopActivityStream">REST API Reference for StopActivityStream Operation</seealso>
public virtual StopActivityStreamResponse StopActivityStream(StopActivityStreamRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StopActivityStreamRequestMarshaller.Instance;
options.ResponseUnmarshaller = StopActivityStreamResponseUnmarshaller.Instance;
return Invoke<StopActivityStreamResponse>(request, options);
}
/// <summary>
/// Stops a database activity stream that was started using the AWS console, the <code>start-activity-stream</code>
/// AWS CLI command, or the <code>StartActivityStream</code> action.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/DBActivityStreams.html">Database
/// Activity Streams</a> in the <i>Amazon Aurora User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopActivityStream service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StopActivityStream service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.ResourceNotFoundException">
/// The specified resource ID was not found.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StopActivityStream">REST API Reference for StopActivityStream Operation</seealso>
public virtual Task<StopActivityStreamResponse> StopActivityStreamAsync(StopActivityStreamRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = StopActivityStreamRequestMarshaller.Instance;
options.ResponseUnmarshaller = StopActivityStreamResponseUnmarshaller.Instance;
return InvokeAsync<StopActivityStreamResponse>(request, options, cancellationToken);
}
#endregion
#region StopDBCluster
/// <summary>
/// Stops an Amazon Aurora DB cluster. When you stop a DB cluster, Aurora retains the
/// DB cluster's metadata, including its endpoints and DB parameter groups. Aurora also
/// retains the transaction logs so you can do a point-in-time restore if necessary.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-cluster-stop-start.html">
/// Stopping and Starting an Aurora Cluster</a> in the <i>Amazon Aurora User Guide.</i>
///
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopDBCluster service method.</param>
///
/// <returns>The response from the StopDBCluster service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StopDBCluster">REST API Reference for StopDBCluster Operation</seealso>
public virtual StopDBClusterResponse StopDBCluster(StopDBClusterRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StopDBClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = StopDBClusterResponseUnmarshaller.Instance;
return Invoke<StopDBClusterResponse>(request, options);
}
/// <summary>
/// Stops an Amazon Aurora DB cluster. When you stop a DB cluster, Aurora retains the
/// DB cluster's metadata, including its endpoints and DB parameter groups. Aurora also
/// retains the transaction logs so you can do a point-in-time restore if necessary.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-cluster-stop-start.html">
/// Stopping and Starting an Aurora Cluster</a> in the <i>Amazon Aurora User Guide.</i>
///
/// </para>
/// <note>
/// <para>
/// This action only applies to Aurora DB clusters.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopDBCluster service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StopDBCluster service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBClusterNotFoundException">
/// <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StopDBCluster">REST API Reference for StopDBCluster Operation</seealso>
public virtual Task<StopDBClusterResponse> StopDBClusterAsync(StopDBClusterRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = StopDBClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = StopDBClusterResponseUnmarshaller.Instance;
return InvokeAsync<StopDBClusterResponse>(request, options, cancellationToken);
}
#endregion
#region StopDBInstance
/// <summary>
/// Stops an Amazon RDS DB instance. When you stop a DB instance, Amazon RDS retains
/// the DB instance's metadata, including its endpoint, DB parameter group, and option
/// group membership. Amazon RDS also retains the transaction logs so you can do a point-in-time
/// restore if necessary.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_StopInstance.html">
/// Stopping an Amazon RDS DB Instance Temporarily</a> in the <i>Amazon RDS User Guide.</i>
///
/// </para>
/// <note>
/// <para>
/// This command doesn't apply to Aurora MySQL and Aurora PostgreSQL. For Aurora clusters,
/// use <code>StopDBCluster</code> instead.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopDBInstance service method.</param>
///
/// <returns>The response from the StopDBInstance service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSnapshotAlreadyExistsException">
/// <code>DBSnapshotIdentifier</code> is already used by an existing snapshot.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SnapshotQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB snapshots.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StopDBInstance">REST API Reference for StopDBInstance Operation</seealso>
public virtual StopDBInstanceResponse StopDBInstance(StopDBInstanceRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StopDBInstanceRequestMarshaller.Instance;
options.ResponseUnmarshaller = StopDBInstanceResponseUnmarshaller.Instance;
return Invoke<StopDBInstanceResponse>(request, options);
}
/// <summary>
/// Stops an Amazon RDS DB instance. When you stop a DB instance, Amazon RDS retains
/// the DB instance's metadata, including its endpoint, DB parameter group, and option
/// group membership. Amazon RDS also retains the transaction logs so you can do a point-in-time
/// restore if necessary.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_StopInstance.html">
/// Stopping an Amazon RDS DB Instance Temporarily</a> in the <i>Amazon RDS User Guide.</i>
///
/// </para>
/// <note>
/// <para>
/// This command doesn't apply to Aurora MySQL and Aurora PostgreSQL. For Aurora clusters,
/// use <code>StopDBCluster</code> instead.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopDBInstance service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StopDBInstance service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.DBSnapshotAlreadyExistsException">
/// <code>DBSnapshotIdentifier</code> is already used by an existing snapshot.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBClusterStateException">
/// The requested operation can't be performed while the cluster is in this state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <exception cref="Amazon.RDS.Model.SnapshotQuotaExceededException">
/// The request would result in the user exceeding the allowed number of DB snapshots.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StopDBInstance">REST API Reference for StopDBInstance Operation</seealso>
public virtual Task<StopDBInstanceResponse> StopDBInstanceAsync(StopDBInstanceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = StopDBInstanceRequestMarshaller.Instance;
options.ResponseUnmarshaller = StopDBInstanceResponseUnmarshaller.Instance;
return InvokeAsync<StopDBInstanceResponse>(request, options, cancellationToken);
}
#endregion
#region StopDBInstanceAutomatedBackupsReplication
/// <summary>
/// Stops automated backup replication for a DB instance.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReplicateBackups.html">
/// Replicating Automated Backups to Another AWS Region</a> in the <i>Amazon RDS User
/// Guide.</i>
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopDBInstanceAutomatedBackupsReplication service method.</param>
///
/// <returns>The response from the StopDBInstanceAutomatedBackupsReplication service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StopDBInstanceAutomatedBackupsReplication">REST API Reference for StopDBInstanceAutomatedBackupsReplication Operation</seealso>
public virtual StopDBInstanceAutomatedBackupsReplicationResponse StopDBInstanceAutomatedBackupsReplication(StopDBInstanceAutomatedBackupsReplicationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StopDBInstanceAutomatedBackupsReplicationRequestMarshaller.Instance;
options.ResponseUnmarshaller = StopDBInstanceAutomatedBackupsReplicationResponseUnmarshaller.Instance;
return Invoke<StopDBInstanceAutomatedBackupsReplicationResponse>(request, options);
}
/// <summary>
/// Stops automated backup replication for a DB instance.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReplicateBackups.html">
/// Replicating Automated Backups to Another AWS Region</a> in the <i>Amazon RDS User
/// Guide.</i>
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopDBInstanceAutomatedBackupsReplication service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StopDBInstanceAutomatedBackupsReplication service method, as returned by RDS.</returns>
/// <exception cref="Amazon.RDS.Model.DBInstanceNotFoundException">
/// <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
/// </exception>
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
/// The DB instance isn't in a valid state.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StopDBInstanceAutomatedBackupsReplication">REST API Reference for StopDBInstanceAutomatedBackupsReplication Operation</seealso>
public virtual Task<StopDBInstanceAutomatedBackupsReplicationResponse> StopDBInstanceAutomatedBackupsReplicationAsync(StopDBInstanceAutomatedBackupsReplicationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = StopDBInstanceAutomatedBackupsReplicationRequestMarshaller.Instance;
options.ResponseUnmarshaller = StopDBInstanceAutomatedBackupsReplicationResponseUnmarshaller.Instance;
return InvokeAsync<StopDBInstanceAutomatedBackupsReplicationResponse>(request, options, cancellationToken);
}
#endregion
}
} | 57.438506 | 272 | 0.667815 | [
"Apache-2.0"
] | KenHundley/aws-sdk-net | sdk/src/Services/RDS/Generated/_bcl45/AmazonRDSClient.cs | 721,083 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace Jaxis_Break_It.Controllers
{
public class HomeController : Controller
{
public IActionResult Index()
{
return View();
}
public IActionResult Error()
{
return View();
}
}
}
| 16.666667 | 44 | 0.61 | [
"MIT"
] | adunndevster/Jaxis-Break-It | src/Jaxis-Break-It/Controllers/HomeController.cs | 402 | C# |
using GrocerySupplyManagementApp.DTOs;
using GrocerySupplyManagementApp.Entities;
using GrocerySupplyManagementApp.Repositories.Interfaces;
using GrocerySupplyManagementApp.Services.Interfaces;
using GrocerySupplyManagementApp.ViewModels;
using System.Collections.Generic;
namespace GrocerySupplyManagementApp.Services
{
public class IncomeExpenseService : IIncomeExpenseService
{
private readonly IIncomeExpenseRepository _incomeExpenseRepository;
public IncomeExpenseService(IIncomeExpenseRepository incomeExpenseRepository)
{
_incomeExpenseRepository = incomeExpenseRepository;
}
public decimal GetTotalIncome(string endOfDay)
{
return _incomeExpenseRepository.GetTotalIncome(endOfDay);
}
public decimal GetTotalExpense(string endOfDay)
{
return _incomeExpenseRepository.GetTotalExpense(endOfDay);
}
public decimal GetTotalIncome(IncomeTransactionFilter incomeTransactionFilter)
{
return _incomeExpenseRepository.GetTotalIncome(incomeTransactionFilter);
}
public decimal GetTotalExpense(ExpenseTransactionFilter expenseTransactionFilter)
{
return _incomeExpenseRepository.GetTotalExpense(expenseTransactionFilter);
}
public IEnumerable<IncomeTransactionView> GetIncomeTransactions(IncomeTransactionFilter incomeTransactionFilter)
{
return _incomeExpenseRepository.GetIncomeTransactions(incomeTransactionFilter);
}
public IEnumerable<ExpenseTransactionView> GetExpenseTransactions(ExpenseTransactionFilter expenseTransactionFilter)
{
return _incomeExpenseRepository.GetExpenseTransactions(expenseTransactionFilter);
}
public IEnumerable<IncomeTransactionView> GetSalesProfit(IncomeTransactionFilter incomeTransactionFilter)
{
return _incomeExpenseRepository.GetSalesProfit(incomeTransactionFilter);
}
public decimal GetTotalDeliveryCharge(IncomeTransactionFilter incomeTransactionFilter)
{
return _incomeExpenseRepository.GetTotalDeliveryCharge(incomeTransactionFilter);
}
public IEnumerable<IncomeTransactionView> GetDeliveryChargeTransactions(IncomeTransactionFilter incomeTransactionFilter)
{
return _incomeExpenseRepository.GetDeliveryChargeTransactions(incomeTransactionFilter);
}
public decimal GetTotalSalesDiscount(ExpenseTransactionFilter expenseTransactionFilter)
{
return _incomeExpenseRepository.GetTotalSalesDiscount(expenseTransactionFilter);
}
public IEnumerable<ExpenseTransactionView> GetSalesDiscountTransactions(ExpenseTransactionFilter expenseTransactionFilter)
{
return _incomeExpenseRepository.GetSalesDiscountTransactions(expenseTransactionFilter);
}
public IncomeExpense GetLastIncomeExpense(string type, string addedBy)
{
return _incomeExpenseRepository.GetLastIncomeExpense(type, addedBy);
}
public IncomeExpense AddIncomeExpense(IncomeExpense incomeExpense)
{
return _incomeExpenseRepository.AddIncomeExpense(incomeExpense);
}
public IncomeExpense AddIncome(IncomeExpense incomeExpense, BankTransaction bankTransaction, string username)
{
return _incomeExpenseRepository.AddIncome(incomeExpense, bankTransaction, username);
}
public IncomeExpense AddExpense(IncomeExpense incomeExpense, BankTransaction bankTransaction, string username)
{
return _incomeExpenseRepository.AddExpense(incomeExpense, bankTransaction, username);
}
public bool DeleteIncomeExpense(long id, string type)
{
return _incomeExpenseRepository.DeleteIncomeExpense(id, type);
}
}
}
| 39.32 | 130 | 0.743133 | [
"MIT"
] | amanandhar/SamyuktaManabSoftwares | SamyuktaManabSoftwares/GrocerySupplyManagementApp/Services/IncomeExpenseService.cs | 3,934 | C# |
using System.IO;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Newtonsoft.Json;
using stellar_dotnet_sdk.responses;
using stellar_dotnet_sdk.responses.page;
namespace stellar_dotnet_sdk_test.responses
{
[TestClass]
public class AccountPageDeserializerTest
{
[TestMethod]
public void TestDeserializeAccountPage()
{
var json = File.ReadAllText(Path.Combine("testdata", "accountPage.json"));
var accountsPage = JsonSingleton.GetInstance<Page<AccountResponse>>(json);
AssertTestData(accountsPage);
}
[TestMethod]
public void TestSerializeDeserializeAccountPage()
{
var json = File.ReadAllText(Path.Combine("testdata", "accountPage.json"));
var accountsPage = JsonSingleton.GetInstance<Page<AccountResponse>>(json);
var serialized = JsonConvert.SerializeObject(accountsPage);
var back = JsonConvert.DeserializeObject<Page<AccountResponse>>(serialized);
AssertTestData(back);
}
public static void AssertTestData(Page<AccountResponse> accountsPage)
{
Assert.AreEqual(accountsPage.Records[0].KeyPair.AccountId,
"GAAZI4TCR3TY5OJHCTJC2A4QSY6CJWJH5IAJTGKIN2ER7LBNVKOCCWN7");
Assert.AreEqual(accountsPage.Records[0].PagingToken, "1");
Assert.AreEqual(accountsPage.Records[9].KeyPair.AccountId,
"GACFGMEV7A5H44O3K4EN6GRQ4SA543YJBZTKGNKPEMEQEAJFO4Q7ENG6");
Assert.AreEqual(accountsPage.Links.Next.Href, "/accounts?order=asc&limit=10&cursor=86861418598401");
Assert.AreEqual(accountsPage.Links.Prev.Href, "/accounts?order=desc&limit=10&cursor=1");
Assert.AreEqual(accountsPage.Links.Self.Href, "/accounts?order=asc&limit=10&cursor=");
}
}
} | 44.904762 | 113 | 0.672853 | [
"Apache-2.0"
] | henryhwang/dotnet-stellar-sdk | stellar-dotnet-sdk-test/responses/AccountPageDeserializerTest.cs | 1,888 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Flurl.Http;
using Flurl;
using eRestoran.Model;
using System.Windows.Forms;
using eRestoran.Model.Requests;
namespace eRestoran.WinUI
{
public class APIService
{
public static string KorisnickoIme { get; set; }
public static string Lozinka{ get; set; }
private string _route = null;
public APIService(string route)
{
_route = route;
}
public async Task<T> Get<T>(object search)
{
var url = $"{Properties.Settings.Default.APIUrl}/{_route}";
if (search != null)
{
url += "?";
url += await search.ToQueryString();
}
var result = await url.WithBasicAuth(KorisnickoIme, Lozinka).GetJsonAsync<T>();
return result;
}
public async Task<Model.Korisnici> Authenticate(KorisnikAuthenticationRequest request)
{
try
{
var url = $"{Properties.Settings.Default.APIUrl}/Korisnici/Auth";
return await url.WithBasicAuth(KorisnickoIme, Lozinka).PostJsonAsync(request).ReceiveJson<Model.Korisnici>();
}
catch (FlurlHttpException ex)
{
var errors = await ex.GetResponseJsonAsync<Dictionary<string, string[]>>();
var stringBuilder = new StringBuilder();
foreach (var error in errors)
{
stringBuilder.AppendLine($"{error.Key}, ${string.Join(",", error.Value)}");
}
MessageBox.Show(stringBuilder.ToString(), "Greška", MessageBoxButtons.OK, MessageBoxIcon.Error);
return default(Model.Korisnici);
}
}
public async Task<T> Insert<T>(object request)
{
var url = Properties.Settings.Default.APIUrl+"/"+_route;
var result = await url.WithBasicAuth(KorisnickoIme, Lozinka).PostJsonAsync(request).ReceiveJson<T>();
return result;
}
public async Task<bool> Delete<T>(int id)
{
var url = $"{Properties.Settings.Default.APIUrl}/{_route}/{id}";
var result = await url.WithBasicAuth(KorisnickoIme, Lozinka).DeleteAsync().ReceiveJson<bool>();
return result;
}
public async Task<T> Update<T>(int id, object request)
{
try
{
var url = $"{Properties.Settings.Default.APIUrl}/{_route}/{id}";
return await url.WithBasicAuth(KorisnickoIme, Lozinka).PutJsonAsync(request).ReceiveJson<T>();
}
catch (FlurlHttpException ex)
{
var errors = await ex.GetResponseJsonAsync<Dictionary<string, string[]>>();
var stringBuilder = new StringBuilder();
foreach (var error in errors)
{
stringBuilder.AppendLine($"{error.Key}, ${string.Join(",", error.Value)}");
}
MessageBox.Show(stringBuilder.ToString(), "Greška", MessageBoxButtons.OK, MessageBoxIcon.Error);
return default(T);
}
}
public async Task<T> GetById<T>(object id)
{
var url = $"{Properties.Settings.Default.APIUrl}/{_route}/{id}";
var result = await url.WithBasicAuth(KorisnickoIme, Lozinka).GetJsonAsync<T>();
return result;
}
public async Task<T> UpdateStatusDostave<T>(int id, int statusID)
{
var url = $"{Properties.Settings.Default.APIUrl}/{_route}/{id}/Status/{statusID}";
return await url.WithBasicAuth(KorisnickoIme, Lozinka).PatchJsonAsync(null).ReceiveJson<T>();
}
}
}
| 34.633929 | 125 | 0.566125 | [
"MIT"
] | azra-imamovic/RS2-eRestoran | eRestoran/eRestoran.WinUI/APIService.cs | 3,883 | C# |
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using BuildXL.Utilities;
using System;
using System.Diagnostics.ContractsLight;
using System.Runtime.InteropServices;
namespace BuildXL.Native.Streams
{
/// <summary>
/// Buffer for operatins on an <see cref="AsyncFileStream" />. This class manages the contents and pinning of a backing byte buffer.
/// Since this buffer is targetted at async operation in which buffer filling / flushing (actual I/O requests) are fully separate from
/// stream reads and writes, it tracks a <see cref="BufferState" /> (the buffer may be locked during a background operation to fill or flush it;
/// it is either a read buffer or a write buffer if not locked) and a <see cref="BufferLockReason" /> (fill or flush, when locked).
///
/// This class is not thread safe.
/// </summary>
public sealed class FileBuffer : IDisposable
{
/// <summary>
/// Overall state. This state indicates if the buffer is presently usable for reading or writing.
/// </summary>
public enum BufferState
{
/// <summary>
/// Empty buffer.
/// </summary>
Empty,
/// <summary>
/// Buffer contains readable bytes.
/// </summary>
Read,
/// <summary>
/// Buffer contains written bytes.
/// </summary>
Write,
/// <summary>
/// Buffer is locked, and not readable or writable until an associated flush or fill operation completes.
/// </summary>
Locked,
}
/// <summary>
/// Completion status of a read or write operation.
/// </summary>
public enum BufferOperationStatus
{
/// <summary>
/// Operation completed, without filling or exhausting the buffer.
/// </summary>
CapacityRemaining,
/// <summary>
/// Buffer is empty following a read; refill required to get more bytes.
/// </summary>
ReadExhausted,
/// <summary>
/// Write buffer is full, or a read cannot proceed yet (flush required to become a read buffer).
/// </summary>
FlushRequired,
}
/// <summary>
/// Reason for being in the <see cref="BufferState.Locked"/> state.
/// </summary>
private enum BufferLockReason
{
/// <summary>
/// Not locked.
/// </summary>
None,
/// <summary>
/// Fill (background read from disk)
/// </summary>
Fill,
/// <summary>
/// Flush (background write to disk)
/// </summary>
Flush,
}
private GCHandle m_lockedStateGCHandle;
private byte[] Buffer => m_pooledBufferWrapper.Instance;
private PooledObjectWrapper<byte[]> m_pooledBufferWrapper;
private int m_bufferSize;
private BufferState m_currentBufferState;
private BufferLockReason m_lockReason;
private int m_bufferFilledSize;
private int m_bufferPosition;
/// <nodoc />
public FileBuffer(int bufferSize)
{
Contract.Requires(bufferSize > 0);
m_pooledBufferWrapper = Pools.ByteArrayPool.GetInstance(bufferSize);
m_bufferSize = bufferSize;
}
/// <summary>
/// Current state. See <see cref="BufferState"/>
/// </summary>
public BufferState State
{
get { return m_currentBufferState; }
}
/// <summary>
/// Buffer size
/// </summary>
public int Capacity
{
get { return m_bufferSize; }
}
/// <summary>
/// Attempts to read bytes. This may require a flush (if presently a write buffer) or a fill
/// (if no readable bytes are available), as indicated by the returned status.
/// </summary>
public BufferOperationStatus Read(byte[] buffer, int offset, int count, out int bytesRead)
{
Contract.Requires(State != BufferState.Locked);
if (count == 0)
{
bytesRead = 0;
return BufferOperationStatus.CapacityRemaining;
}
if (m_currentBufferState == BufferState.Write)
{
bytesRead = 0;
return BufferOperationStatus.FlushRequired;
}
if (m_currentBufferState == BufferState.Empty)
{
bytesRead = 0;
return BufferOperationStatus.ReadExhausted;
}
Contract.Assert(m_currentBufferState == BufferState.Read);
int maxReadable = m_bufferFilledSize - m_bufferPosition;
int bytesToCopy = Math.Min(count, maxReadable);
Contract.Assume(bytesToCopy > 0, "BufferType should have been empty.");
System.Buffer.BlockCopy(Buffer, m_bufferPosition, buffer, offset, bytesToCopy);
m_bufferPosition += bytesToCopy;
Contract.Assert(m_bufferPosition <= m_bufferFilledSize);
bytesRead = bytesToCopy;
if (m_bufferPosition == m_bufferFilledSize)
{
Discard();
return BufferOperationStatus.ReadExhausted;
}
else
{
return BufferOperationStatus.CapacityRemaining;
}
}
/// <summary>
/// Attempts to write bytes. This may require a flush (if presently full and a write buffer).
/// If presently a read buffer, the read buffer contents are silently discarded.
/// </summary>
public BufferOperationStatus Write(byte[] buffer, int offset, int count, out int bytesWritten)
{
Contract.Requires(State != BufferState.Locked);
if (count == 0)
{
bytesWritten = 0;
return BufferOperationStatus.CapacityRemaining;
}
if (m_currentBufferState == BufferState.Read)
{
// TODO: Counter?
Discard();
}
Contract.Assert(m_currentBufferState == BufferState.Write || m_currentBufferState == BufferState.Empty);
m_currentBufferState = BufferState.Write;
if (m_bufferPosition == m_bufferSize)
{
bytesWritten = 0;
return BufferOperationStatus.FlushRequired;
}
int maxWritable = m_bufferSize - m_bufferPosition;
Contract.Assert(maxWritable > 0);
int bytesToCopy = Math.Min(count, maxWritable);
System.Buffer.BlockCopy(buffer, offset, Buffer, m_bufferPosition, bytesToCopy);
m_bufferPosition += bytesToCopy;
Contract.Assert(m_bufferPosition <= m_bufferSize);
bytesWritten = bytesToCopy;
return (m_bufferPosition == m_bufferSize) ? BufferOperationStatus.FlushRequired : BufferOperationStatus.CapacityRemaining;
}
private void Lock(BufferLockReason lockReason)
{
Contract.Requires(lockReason != BufferLockReason.None);
Contract.Requires(State == BufferState.Empty || State == BufferState.Write);
m_lockReason = lockReason;
m_currentBufferState = BufferState.Locked;
Contract.Assume(!m_lockedStateGCHandle.IsAllocated);
m_lockedStateGCHandle = GCHandle.Alloc(Buffer, GCHandleType.Pinned);
}
private void Unlock(BufferState newState)
{
Contract.Requires(State == BufferState.Locked);
Contract.Requires(newState != BufferState.Locked);
m_lockReason = BufferLockReason.None;
m_currentBufferState = newState;
m_lockedStateGCHandle.Free();
}
/// <summary>
/// Transitions the buffer to the <see cref="BufferState.Locked"/> state, and returns a buffer pointer
/// for a native fill operation. <see cref="FinishFillAndUnlock"/> should be called to complete this.
/// </summary>
public unsafe void LockForFill(out byte* pinnedBuffer, out int pinnedBufferLength)
{
Contract.Requires(State == BufferState.Empty);
Lock(BufferLockReason.Fill);
pinnedBuffer = (byte*)m_lockedStateGCHandle.AddrOfPinnedObject();
pinnedBufferLength = m_bufferSize;
}
/// <summary>
/// Transitions the buffer to the <see cref="BufferState.Locked"/> state, and returns a buffer pointer
/// for a native fill operation. <see cref="FinishFlushAndUnlock"/> should be called to complete this
/// and enter <see cref="BufferState.Read"/>.
/// </summary>
public unsafe void LockForFlush(out byte* pinnedBuffer, out int bytesToFlush)
{
Contract.Requires(State == BufferState.Write);
Lock(BufferLockReason.Flush);
pinnedBuffer = (byte*)m_lockedStateGCHandle.AddrOfPinnedObject();
bytesToFlush = m_bufferPosition;
}
/// <summary>
/// Finishes a flush operation. This transitions the buffer out of the <see cref="BufferState.Locked"/> state.
/// </summary>
public void FinishFlushAndUnlock(int numberOfBytesFlushed)
{
Contract.Requires(State == BufferState.Locked);
Contract.Requires(numberOfBytesFlushed >= 0);
Contract.Assume(m_lockReason == BufferLockReason.Flush);
bool entirelyFlushed = numberOfBytesFlushed == m_bufferPosition;
Contract.Assume(numberOfBytesFlushed <= m_bufferPosition, "Too many bytes flushed; number of bytes to flush is indicated by LockForFlush");
if (entirelyFlushed)
{
m_bufferFilledSize = 0;
m_bufferPosition = 0;
}
// TODO: Must handle partial flushes for writable AsyncFileStreams to work.
Contract.Assume(entirelyFlushed);
Unlock(entirelyFlushed ? BufferState.Empty : BufferState.Write);
}
/// <summary>
/// Finishes a fill operation. This transitions the buffer out of the <see cref="BufferState.Locked"/> state.
/// </summary>
public void FinishFillAndUnlock(int numberOfBytesFilled)
{
Contract.Requires(State == BufferState.Locked);
Contract.Requires(numberOfBytesFilled >= 0 && numberOfBytesFilled <= Capacity);
Contract.Assume(m_lockReason == BufferLockReason.Fill);
m_bufferFilledSize = numberOfBytesFilled;
m_bufferPosition = 0;
Unlock(numberOfBytesFilled == 0 ? BufferState.Empty : BufferState.Read);
}
/// <summary>
/// Discards the current buffer, if doing so does not cause data loss (i.e., there are not un-flushed written bytes in the buffer).
/// </summary>
public void Discard()
{
Contract.Requires(State == BufferState.Read || State == BufferState.Empty);
m_bufferFilledSize = 0;
m_bufferPosition = 0;
m_currentBufferState = BufferState.Empty;
}
/// <summary>
/// Dispose the current FileBuffer. All pooled resources should be returned.
/// </summary>
public void Dispose()
{
m_pooledBufferWrapper.Dispose();
}
}
}
| 37.845912 | 152 | 0.570004 | [
"MIT"
] | MatisseHack/BuildXL | Public/Src/Utilities/Native/Streams/FileBuffer.cs | 12,035 | C# |
using System.Linq;
using Equinox.Domain.Interfaces;
using Equinox.Domain.Models;
using Equinox.Infra.Data.Context;
namespace Equinox.Infra.Data.Repository
{
public class CustomerRepository : Repository<Customer>, ICustomerRepository
{
public CustomerRepository(EquinoxContext context)
:base(context)
{
}
public Customer GetByEmail(string email)
{
return Find(c => c.Email == email).FirstOrDefault();
}
}
}
| 22.818182 | 80 | 0.643426 | [
"MIT"
] | GuilhermeEsteves/EquinoxProject | src/Equinox.Infra.Data/Repository/CustomerRepository.cs | 504 | C# |
namespace Nacos.V2.Config.Impl
{
using Microsoft.Extensions.Logging;
using Nacos.V2.Common;
using Nacos.V2.Config.Abst;
using Nacos.V2.Config.FilterImpl;
using Nacos.V2.Config.Utils;
using Nacos.V2.Utils;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Threading.Tasks;
public class ClientWorker : IDisposable
{
private readonly ILogger _logger;
private ConfigFilterChainManager _configFilterChainManager;
private ConcurrentDictionary<string, CacheData> _cacheMap = new ConcurrentDictionary<string, CacheData>();
private IConfigTransportClient _agent;
public ClientWorker(ILogger logger, ConfigFilterChainManager configFilterChainManager, NacosSdkOptions options)
{
_logger = logger;
_configFilterChainManager = configFilterChainManager;
ServerListManager serverListManager = new ServerListManager(logger, options);
_agent = options.ConfigUseRpc
? new ConfigRpcTransportClient(logger, options, serverListManager, _cacheMap)
: new ConfigHttpTransportClient(logger, options, serverListManager, _cacheMap);
}
public async Task AddTenantListeners(string dataId, string group, List<IListener> listeners)
{
group = ParamUtils.Null2DefaultGroup(group);
string tenant = _agent.GetTenant();
CacheData cache = AddCacheDataIfAbsent(dataId, group, tenant);
foreach (var listener in listeners)
{
cache.AddListener(listener);
}
if (!cache.IsListenSuccess)
{
await _agent.NotifyListenConfigAsync();
}
}
internal async Task AddTenantListenersWithContent(string dataId, string group, string content, List<IListener> listeners)
{
group = ParamUtils.Null2DefaultGroup(group);
string tenant = _agent.GetTenant();
CacheData cache = AddCacheDataIfAbsent(dataId, group, tenant);
cache.SetContent(content);
foreach (var listener in listeners)
{
cache.AddListener(listener);
}
// if current cache is already at listening status,do not notify.
if (!cache.IsListenSuccess)
{
await _agent.NotifyListenConfigAsync();
}
}
public async Task RemoveTenantListener(string dataId, string group, IListener listener)
{
group = ParamUtils.Null2DefaultGroup(group);
string tenant = _agent.GetTenant();
CacheData cache = GetCache(dataId, group, tenant);
if (cache != null)
{
cache.RemoveListener(listener);
if ((cache.GetListeners()?.Count ?? 0) > 0)
{
await _agent.RemoveCacheAsync(dataId, group);
}
}
}
public CacheData AddCacheDataIfAbsent(string dataId, string group, string tenant)
{
CacheData cache = GetCache(dataId, group, tenant);
if (cache != null) return cache;
string key = GroupKey.GetKey(dataId, group, tenant);
CacheData cacheFromMap = GetCache(dataId, group, tenant);
// multiple listeners on the same dataid+group and race condition,so double check again
// other listener thread beat me to set to cacheMap
if (cacheFromMap != null)
{
cache = cacheFromMap;
// reset so that server not hang this check
cache.IsInitializing = true;
}
else
{
cache = new CacheData(_configFilterChainManager, _agent.GetName(), dataId, group, tenant);
int taskId = _cacheMap.Count / CacheData.PerTaskConfigSize;
cache.TaskId = taskId;
}
_cacheMap.AddOrUpdate(key, cache, (x, y) => cache);
_logger?.LogInformation("[{0}] [subscribe] {1}", this._agent.GetName(), key);
return cache;
}
public CacheData GetCache(string dataId, string group)
=> GetCache(dataId, group, TenantUtil.GetUserTenantForAcm());
public CacheData GetCache(string dataId, string group, string tenant)
{
if (dataId == null || group == null) throw new ArgumentException();
return _cacheMap.TryGetValue(GroupKey.GetKeyTenant(dataId, group, tenant), out var cache) ? cache : null;
}
internal void RemoveCache(string dataId, string group, string tenant = null)
{
string groupKey = tenant == null ? GroupKey.GetKey(dataId, group) : GroupKey.GetKeyTenant(dataId, group, tenant);
_cacheMap.TryRemove(groupKey, out _);
_logger?.LogInformation("[{0}] [unsubscribe] {1}", this._agent.GetName(), groupKey);
}
public async Task<bool> RemoveConfig(string dataId, string group, string tenant, string tag)
=> await _agent.RemoveConfigAsync(dataId, group, tenant, tag);
public async Task<bool> PublishConfig(string dataId, string group, string tenant, string appName, string tag, string betaIps,
string content, string encryptedDataKey, string casMd5, string type)
=> await _agent.PublishConfigAsync(dataId, group, tenant, appName, tag, betaIps, content, encryptedDataKey, casMd5, type);
public Task<ConfigResponse> GetServerConfig(string dataId, string group, string tenant, long readTimeout, bool notify)
{
if (group.IsNullOrWhiteSpace()) group = Constants.DEFAULT_GROUP;
return this._agent.QueryConfigAsync(dataId, group, tenant, readTimeout, notify);
}
public string GetAgentName() => this._agent.GetName();
internal bool IsHealthServer() => this._agent.GetIsHealthServer();
public void Dispose()
{
}
}
}
| 37.598765 | 134 | 0.61714 | [
"Apache-2.0"
] | pengweiqhca/nacos-sdk-csharp | src/Nacos/V2/Config/Impl/ClientWorker.cs | 6,093 | C# |
using System;
namespace FluentValidation.Extensions.Br.Test
{
public class TestExtensionsValidator : InlineValidator<Person>
{
public TestExtensionsValidator()
{ }
public TestExtensionsValidator(params Action<TestExtensionsValidator>[] actionList)
{
foreach (var action in actionList) action.Invoke(this);
}
}
}
| 23.6875 | 91 | 0.670185 | [
"MIT"
] | jcalijurio/FluentValidation.Extensions.Br | test/FluentValidation.Extensions.Br.Test/TestExtensionsValidator.cs | 381 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace WorkingWithData.Models
{
public class Tag
{
public Tag()
{
this.Tweets = new HashSet<Tweet>();
}
public int Id { get; set; }
public string Text { get; set; }
public virtual ICollection<Tweet> Tweets { get; set; }
}
} | 18.47619 | 62 | 0.585052 | [
"MIT"
] | Ico093/TelerikAcademy | MVC/Homework/04.WorkingWithData/WorkingWithData/WorkingWithData/Models/Tag.cs | 390 | C# |
using System;
using BattleAxe;
/// <summary>
/// Based on select * from bxl.Logs
/// </summary>
namespace bxl.Model {
public class Log : IBattleAxe {
public object this[string property] {
get {
switch (property) {
case "LogId": return LogId;
case "TemplateId": return TemplateId;
case "RanBy": return RanBy;
case "Occurred": return Occurred;
case "Results": return Results;
case "Notes": return Notes;
default:
return null;
}
}
set {
switch (property) {
case "LogId": this.LogId = value is int ? (int)value : value != null ? Convert.ToInt32(value) : 0; break;
case "TemplateId": this.TemplateId = value is int ? (int)value : value != null ? Convert.ToInt32(value) : 0; break;
case "RanBy": this.RanBy = value is string ? (string)value : value != null ? Convert.ToString(value) : System.String.Empty; break;
case "Occurred": this.Occurred = value is DateTime ? (DateTime)value : value != null ? Convert.ToDateTime(value) : System.DateTime.MinValue; break;
case "Results": this.Results = value is string ? (string)value : value != null ? Convert.ToString(value) : System.String.Empty; break;
case "Notes": this.Notes = value is string ? (string)value : value != null ? Convert.ToString(value) : System.String.Empty; break;
default:
break;
}
}
}
public int LogId { get; set; }
public int TemplateId { get; set; }
public string RanBy { get; set; }
public DateTime Occurred { get; set; }
public string Results { get; set; }
public string Notes { get; set; }
public void Update() =>
Data.Log.Update.Execute(this);
}
} | 45.466667 | 167 | 0.520039 | [
"MIT"
] | DNCarroll/bxl | bxl/Model/Log.cs | 2,048 | C# |
// Copyright (c) Autofac Project. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
using System.Globalization;
namespace Autofac.Core.Registration;
/// <summary>
/// A service was requested that cannot be provided by the container. To avoid this exception, either register a component
/// to provide the required service, check for service registration using IsRegistered(), or use the ResolveOptional()
/// method to resolve an optional dependency.
/// </summary>
/// <remarks>This exception is fatal. See <see cref="DependencyResolutionException"/> for more information.</remarks>
public class ComponentNotRegisteredException : DependencyResolutionException
{
/// <summary>
/// Initializes a new instance of the <see cref="ComponentNotRegisteredException"/> class.
/// </summary>
/// <param name="service">The service.</param>
public ComponentNotRegisteredException(Service service)
: base(FormatMessage(service))
{
}
/// <summary>
/// Initializes a new instance of the <see cref="ComponentNotRegisteredException"/> class.
/// </summary>
/// <param name="service">The service.</param>
/// <param name="innerException">The inner exception.</param>
public ComponentNotRegisteredException(Service service, Exception innerException)
: base(FormatMessage(service), innerException)
{
}
private static string FormatMessage(Service service)
{
if (service == null)
{
throw new ArgumentNullException(nameof(service));
}
return string.Format(CultureInfo.CurrentCulture, ComponentNotRegisteredExceptionResources.Message, service);
}
}
| 38.4 | 122 | 0.714699 | [
"MIT"
] | rcdailey/Autofac | src/Autofac/Core/Registration/ComponentNotRegisteredException.cs | 1,730 | C# |
using TMPro;
using UnityEngine;
using UnityEngine.UI;
namespace NikolayTrofimovDZ3
{
public class UILesson3 : MonoBehaviour
{
public Button LogInButton;
public TextMeshProUGUI TextLabel;
public Toggle SuccessTogle;
public Button PhotonDisconnectButton;
}
} | 20.133333 | 45 | 0.711921 | [
"MIT"
] | Nick2712/gb0122 | Assets/Scripts/Lesson3/UILesson3.cs | 302 | C# |
//
// Copyright © Microsoft Corporation, All Rights Reserved
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS
// OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
// ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A
// PARTICULAR PURPOSE, MERCHANTABILITY OR NON-INFRINGEMENT.
//
// See the Apache License, Version 2.0 for the specific language
// governing permissions and limitations under the License.
using System.Security.Cryptography;
using Microsoft.Azure.KeyVault.WebKey;
using Newtonsoft.Json;
using Xunit;
namespace KeyVault.WebKey.Tests
{
public class TestSerialization
{
[Fact]
public void KeyVaultWebKeyTestRoundtripAes()
{
Aes aes = Aes.Create();
var keyOriginal = CreateJsonWebKey(aes);
var keyString = keyOriginal.ToString();
var keyRecovered = JsonConvert.DeserializeObject<JsonWebKey>(keyString);
Assert.Equal(keyOriginal, keyRecovered);
}
[Fact]
public void KeyVaultWebKeyTestRoundtripRsaPublic()
{
RSA rsa = RSA.Create();
var keyOriginal = CreateJsonWebKey(rsa.ExportParameters(true));
var keyString = keyOriginal.ToString();
var keyRecovered = JsonConvert.DeserializeObject<JsonWebKey>(keyString);
Assert.Equal(keyOriginal, keyRecovered);
}
[Fact]
public void KeyVaultWebKeyTestRoundtripRsaPrivate()
{
RSA rsa = RSA.Create();
var keyOriginal = CreateJsonWebKey(rsa.ExportParameters(true));
var keyString = keyOriginal.ToString();
var keyRecovered = JsonConvert.DeserializeObject<JsonWebKey>(keyString);
Assert.Equal(keyOriginal, keyRecovered);
}
[Fact]
public void KeyVaultWebKeyTestRoundtripOperations()
{
Aes aes = Aes.Create();
var keyOriginal = CreateJsonWebKey(aes);
keyOriginal.KeyOps = JsonWebKeyOperation.AllOperations;
var keyString = keyOriginal.ToString();
var keyRecovered = JsonConvert.DeserializeObject<JsonWebKey>(keyString);
Assert.Equal(keyOriginal, keyRecovered);
}
/// <summary>
/// Converts a RSAParameters object to a WebKey of type RSA.
/// </summary>
/// <param name="rsaParameters">The RSA parameters object to convert</param>
/// <returns>A WebKey representing the RSA object</returns>
private JsonWebKey CreateJsonWebKey(RSAParameters rsaParameters)
{
var key = new JsonWebKey
{
Kty = JsonWebKeyType.Rsa,
E = rsaParameters.Exponent,
N = rsaParameters.Modulus,
D = rsaParameters.D,
DP = rsaParameters.DP,
DQ = rsaParameters.DQ,
QI = rsaParameters.InverseQ,
P = rsaParameters.P,
Q = rsaParameters.Q
};
return key;
}
/// <summary>
/// Converts an AES object to a WebKey of type Octet
/// </summary>
/// <param name="aesProvider"></param>
/// <returns></returns>
private JsonWebKey CreateJsonWebKey(Aes aesProvider)
{
if (aesProvider == null)
throw new System.ArgumentNullException("aesProvider");
var key = new JsonWebKey
{
Kty = JsonWebKeyType.Octet,
K = aesProvider.Key
};
return key;
}
}
}
| 30.944 | 84 | 0.604188 | [
"Apache-2.0"
] | CerebralMischief/azure-sdk-for-net | src/KeyVault/KeyVault.Tests/WebKeySerializationTest.cs | 3,871 | C# |
using BEPUphysics;
using BEPUphysics.Character;
using BEPUutilities;
using FixMath.NET;
using Microsoft.Xna.Framework.Input;
namespace BEPUphysicsDemos.AlternateMovement
{
/// <summary>
/// Handles input and movement of a character in the game.
/// Acts as a simple 'front end' for the bookkeeping and math of the character controller.
/// </summary>
public class SphereCharacterControllerInput
{
/// <summary>
/// Camera to use for input.
/// </summary>
public Camera Camera;
/// <summary>
/// Gets the camera control scheme used by this input manager.
/// </summary>
public FixedOffsetCameraControlScheme CameraControlScheme { get; private set; }
/// <summary>
/// Physics representation of the character.
/// </summary>
public SphereCharacterController CharacterController;
/// <summary>
/// Gets whether the character controller's input management is being used.
/// </summary>
public bool IsActive { get; private set; }
/// <summary>
/// Owning space of the character.
/// </summary>
public Space Space { get; private set; }
/// <summary>
/// Constructs the character and internal physics character controller.
/// </summary>
/// <param name="owningSpace">Space to add the character to.</param>
/// <param name="camera">Camera to attach to the character.</param>
/// <param name="game">The running game.</param>
public SphereCharacterControllerInput(Space owningSpace, Camera camera, DemosGame game)
{
CharacterController = new SphereCharacterController();
Camera = camera;
CameraControlScheme = new FixedOffsetCameraControlScheme(CharacterController.Body, camera, game);
Space = owningSpace;
}
/// <summary>
/// Gives the character control over the Camera and movement input.
/// </summary>
public void Activate()
{
if (!IsActive)
{
IsActive = true;
Space.Add(CharacterController);
CharacterController.Body.Position = Camera.Position - CameraControlScheme.CameraOffset;
}
}
/// <summary>
/// Returns input control to the Camera.
/// </summary>
public void Deactivate()
{
if (IsActive)
{
IsActive = false;
Space.Remove(CharacterController);
}
}
/// <summary>
/// Handles the input and movement of the character.
/// </summary>
/// <param name="dt">Time since last frame in simulation seconds.</param>
/// <param name="previousKeyboardInput">The last frame's keyboard state.</param>
/// <param name="keyboardInput">The current frame's keyboard state.</param>
/// <param name="previousGamePadInput">The last frame's gamepad state.</param>
/// <param name="gamePadInput">The current frame's keyboard state.</param>
public void Update(Fix64 dt, KeyboardState previousKeyboardInput, KeyboardState keyboardInput, GamePadState previousGamePadInput, GamePadState gamePadInput)
{
if (IsActive)
{
CameraControlScheme.Update(dt);
Vector2 totalMovement = Vector2.Zero;
#if XBOX360
totalMovement += new Vector2(gamePadInput.ThumbSticks.Left.X, gamePadInput.ThumbSticks.Left.Y);
CharacterController.HorizontalMotionConstraint.SpeedScale = Math.Min(totalMovement.Length(), 1); //Don't trust the game pad to output perfectly normalized values.
CharacterController.HorizontalMotionConstraint.MovementDirection = totalMovement;
CharacterController.StanceManager.DesiredStance = gamePadInput.IsButtonDown(Buttons.RightStick) ? Stance.Crouching : Stance.Standing;
//Jumping
if (previousGamePadInput.IsButtonUp(Buttons.LeftStick) && gamePadInput.IsButtonDown(Buttons.LeftStick))
{
CharacterController.Jump();
}
#else
//Collect the movement impulses.
if (keyboardInput.IsKeyDown(Keys.E))
{
totalMovement += new Vector2(0, 1);
}
if (keyboardInput.IsKeyDown(Keys.D))
{
totalMovement += new Vector2(0, -1);
}
if (keyboardInput.IsKeyDown(Keys.S))
{
totalMovement += new Vector2(-1, 0);
}
if (keyboardInput.IsKeyDown(Keys.F))
{
totalMovement += new Vector2(1, 0);
}
if (totalMovement == Vector2.Zero)
CharacterController.HorizontalMotionConstraint.MovementDirection = Vector2.Zero;
else
CharacterController.HorizontalMotionConstraint.MovementDirection = Vector2.Normalize(totalMovement);
//Jumping
if (previousKeyboardInput.IsKeyUp(Keys.A) && keyboardInput.IsKeyDown(Keys.A))
{
CharacterController.Jump();
}
#endif
CharacterController.ViewDirection = Camera.WorldMatrix.Forward;
}
}
}
} | 37.82 | 179 | 0.564428 | [
"MIT"
] | RossNordby/bepuphysics1int | BEPUphysicsDemos/Alternate Movement/SphereCharacterControllerInput.cs | 5,673 | C# |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.