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 |
|---|---|---|---|---|---|---|---|---|
namespace FloydPink.Flickr.Downloadr.UnitTests.HelperTests {
using NUnit.Framework;
using Repository.Helpers;
[TestFixture]
public class CryptTests {
private const string CryptKey = "kn98nkgg90sknka242342234038234(&9883!@%^";
[Test]
public void WillEncryptDecryptToken() {
var token = "08kkh4208234n23ZS97Hj40u24";
Assert.AreEqual(token, Crypt.Decrypt(Crypt.Encrypt(token, CryptKey), CryptKey));
}
}
}
| 30.0625 | 92 | 0.66736 | [
"MIT"
] | pyliu/flickr-downloadr-gtk | source/FloydPink.Flickr.Downloadr.UnitTests/HelperTests/CryptTests.cs | 483 | C# |
// Description: Entity Framework Bulk Operations & Utilities (EF Bulk SaveChanges, Insert, Update, Delete, Merge | LINQ Query Cache, Deferred, Filter, IncludeFilter, IncludeOptimize | Audit)
// Website & Documentation: https://github.com/zzzprojects/Entity-Framework-Plus
// Forum & Issues: https://github.com/zzzprojects/EntityFramework-Plus/issues
// License: https://github.com/zzzprojects/EntityFramework-Plus/blob/master/LICENSE
// More projects: http://www.zzzprojects.com/
// Copyright © ZZZ Projects Inc. 2014 - 2016. All rights reserved.
#if !EFCORE
using System.Collections.ObjectModel;
using System.Data.Entity;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Z.EntityFramework.Plus;
namespace Z.Test.EntityFramework.Plus
{
public partial class QueryFilter_DbSet_Filter
{
[TestMethod]
public void WithInclude_ManyFilter_Disabled()
{
TestContext.DeleteAll(x => x.Inheritance_Interface_Entities);
TestContext.DeleteAll(x => x.Inheritance_Interface_Entities_LazyLoading);
using (var ctx = new TestContext())
{
var list = TestContext.Insert(ctx, x => x.Inheritance_Interface_Entities, 10);
var left = ctx.Inheritance_Interface_Entities_LazyLoading.Add(new Inheritance_Interface_Entity_LazyLoading());
left.Rights = new Collection<Inheritance_Interface_Entity>();
list.ForEach(x => left.Rights.Add(x));
ctx.SaveChanges();
}
using (var ctx = new TestContext(true, enableFilter1: false, enableFilter2: false, enableFilter3: false, enableFilter4: false))
{
var rights = ctx.Inheritance_Interface_Entities_LazyLoading.Filter(
QueryFilterHelper.Filter.Filter1,
QueryFilterHelper.Filter.Filter2,
QueryFilterHelper.Filter.Filter3,
QueryFilterHelper.Filter.Filter4).Include(x => x.Rights).ToList().SelectMany(x => x.Rights);
Assert.AreEqual(35, rights.Sum(x => x.ColumnInt));
}
}
}
}
#endif | 44.916667 | 191 | 0.672542 | [
"MIT"
] | Ahmed-Abdelhameed/EntityFramework-Plus | src/Z.Test.EntityFramework.Plus.EFCore.Shared/QueryFilter/DbSet_Filter/WithInclude/ManyFilter_Disabled.cs | 2,159 | 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.
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Diagnostics.Monitoring;
using Microsoft.Diagnostics.NETCore.Client;
using Microsoft.Extensions.Logging;
using Xunit;
using Xunit.Abstractions;
using Xunit.Extensions;
namespace DotnetMonitor.UnitTests
{
public class DiagnosticsMonitorTests
{
private readonly ITestOutputHelper _output;
public DiagnosticsMonitorTests(ITestOutputHelper output)
{
_output = output;
}
[SkippableFact]
public async Task TestDiagnosticsEventPipeProcessorLogs()
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
throw new SkipTestException("Unstable test on OSX");
}
var outputStream = new MemoryStream();
await using (var testExecution = StartTraceeProcess("LoggerRemoteTest"))
{
//TestRunner should account for start delay to make sure that the diagnostic pipe is available.
var loggerFactory = new LoggerFactory(new[] { new StreamingLoggerProvider(outputStream, LogFormat.Json) });
DiagnosticsEventPipeProcessor diagnosticsEventPipeProcessor = new DiagnosticsEventPipeProcessor(
PipeMode.Logs,
loggerFactory);
var client = new DiagnosticsClient(testExecution.TestRunner.Pid);
var processingTask = diagnosticsEventPipeProcessor.Process(client, testExecution.TestRunner.Pid, TimeSpan.FromSeconds(10), CancellationToken.None);
//Add a small delay to make sure diagnostic processor had a chance to initialize
await Task.Delay(1000);
//Send signal to proceed with event collection
testExecution.Start();
await processingTask;
await diagnosticsEventPipeProcessor.DisposeAsync();
loggerFactory.Dispose();
}
outputStream.Position = 0L;
Assert.True(outputStream.Length > 0, "No data written by logging process.");
using var reader = new StreamReader(outputStream);
string firstMessage = reader.ReadLine();
Assert.NotNull(firstMessage);
LoggerTestResult result = JsonSerializer.Deserialize<LoggerTestResult>(firstMessage);
Assert.Equal("Some warning message with 6", result.Message);
Assert.Equal("LoggerRemoteTest", result.Category);
Assert.Equal("Warning", result.LogLevel);
Assert.Equal("0", result.EventId);
Validate(result.Scopes, ("BoolValue", "true"), ("StringValue", "test"), ("IntValue", "5"));
Validate(result.Arguments, ("arg", "6"));
string secondMessage = reader.ReadLine();
Assert.NotNull(secondMessage);
result = JsonSerializer.Deserialize<LoggerTestResult>(secondMessage);
Assert.Equal("Another message", result.Message);
Assert.Equal("LoggerRemoteTest", result.Category);
Assert.Equal("Warning", result.LogLevel);
Assert.Equal("0", result.EventId);
Assert.Equal(0, result.Scopes.Count);
//We are expecting only the original format
Assert.Equal(1, result.Arguments.Count);
}
private static void Validate(IDictionary<string, JsonElement> values, params (string key, object value)[] expectedValues)
{
Assert.NotNull(values);
foreach(var expectedValue in expectedValues)
{
Assert.True(values.TryGetValue(expectedValue.key, out JsonElement value));
//TODO For now this will always be a string
Assert.Equal(expectedValue.value, value.GetString());
}
}
private RemoteTestExecution StartTraceeProcess(string loggerCategory)
{
return RemoteTestExecution.StartProcess(CommonHelper.GetTraceePath("EventPipeTracee") + " " + loggerCategory, _output);
}
private sealed class LoggerTestResult
{
public string Category { get; set; }
public string LogLevel { get; set; }
public string EventId { get; set; }
public string Message { get; set; }
public IDictionary<string, JsonElement> Arguments { get; set; }
public IDictionary<string, JsonElement> Scopes { get; set; }
}
}
}
| 39.743802 | 163 | 0.640258 | [
"MIT"
] | kevingosse/diagnostics | src/tests/dotnet-monitor/DiagnosticsMonitorTests.cs | 4,809 | C# |
using System.IO;
using CP77.CR2W.Reflection;
using FastMember;
using static CP77.CR2W.Types.Enums;
namespace CP77.CR2W.Types
{
[REDMeta]
public class worldProxyMeshAdvancedBuildParams : CVariable
{
[Ordinal(0)] [RED("boundingBoxSyncParams")] public worldProxyBoundingBoxSyncParams BoundingBoxSyncParams { get; set; }
[Ordinal(1)] [RED("misc")] public worldProxyMiscAdvancedParams Misc { get; set; }
[Ordinal(2)] [RED("rayBias")] public CFloat RayBias { get; set; }
[Ordinal(3)] [RED("rayMaxDistance")] public CFloat RayMaxDistance { get; set; }
[Ordinal(4)] [RED("surfaceFlattenParams")] public worldProxySurfaceFlattenParams SurfaceFlattenParams { get; set; }
public worldProxyMeshAdvancedBuildParams(CR2WFile cr2w, CVariable parent, string name) : base(cr2w, parent, name) { }
}
}
| 41.25 | 122 | 0.732121 | [
"MIT"
] | Eingin/CP77Tools | CP77.CR2W/Types/cp77/worldProxyMeshAdvancedBuildParams.cs | 806 | C# |
namespace NUSA
{
partial class NUSAForm
{
/// <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();
this.mainTabControl = new System.Windows.Forms.TabControl();
this.tabLaptops = new System.Windows.Forms.TabPage();
this.dataGridViewLaptops = new System.Windows.Forms.DataGridView();
this.CostName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.CostProcessor = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.CostRAM = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.CostHDD = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.CostBattery = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.CostAC = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.CostComment = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.CostPurchaseDate = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.CostLotNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.CostTrackNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.CostBodyPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.CostACPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.CostRAMPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.CostHDDPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.CostBatteryPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.CostCaddyPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.CostCustomPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.CostShippingPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.CostUnlockPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.CostBuyPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.CostSellPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.CostCoursePrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.laptopContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.deleteLaptopMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.createLaptopMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.editLaptopMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.panelSearch = new System.Windows.Forms.Panel();
this.buttonSearch = new System.Windows.Forms.Button();
this.textSearch = new System.Windows.Forms.TextBox();
this.labelSearch = new System.Windows.Forms.Label();
this.tabInvoices = new System.Windows.Forms.TabPage();
this.buttonAddItem = new System.Windows.Forms.Button();
this.mainTabControl.SuspendLayout();
this.tabLaptops.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridViewLaptops)).BeginInit();
this.laptopContextMenu.SuspendLayout();
this.panelSearch.SuspendLayout();
this.SuspendLayout();
//
// mainTabControl
//
this.mainTabControl.Controls.Add(this.tabLaptops);
this.mainTabControl.Controls.Add(this.tabInvoices);
this.mainTabControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.mainTabControl.Location = new System.Drawing.Point(0, 0);
this.mainTabControl.Name = "mainTabControl";
this.mainTabControl.SelectedIndex = 0;
this.mainTabControl.Size = new System.Drawing.Size(1196, 673);
this.mainTabControl.TabIndex = 0;
//
// tabLaptops
//
this.tabLaptops.Controls.Add(this.dataGridViewLaptops);
this.tabLaptops.Controls.Add(this.panelSearch);
this.tabLaptops.Location = new System.Drawing.Point(4, 24);
this.tabLaptops.Name = "tabLaptops";
this.tabLaptops.Padding = new System.Windows.Forms.Padding(3);
this.tabLaptops.Size = new System.Drawing.Size(1188, 645);
this.tabLaptops.TabIndex = 0;
this.tabLaptops.Text = "Ноутбуки";
this.tabLaptops.UseVisualStyleBackColor = true;
//
// dataGridViewLaptops
//
this.dataGridViewLaptops.AllowUserToAddRows = false;
this.dataGridViewLaptops.AllowUserToDeleteRows = false;
this.dataGridViewLaptops.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridViewLaptops.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.CostName,
this.CostProcessor,
this.CostRAM,
this.CostHDD,
this.CostBattery,
this.CostAC,
this.CostComment,
this.CostPurchaseDate,
this.CostLotNumber,
this.CostTrackNumber,
this.CostBodyPrice,
this.CostACPrice,
this.CostRAMPrice,
this.CostHDDPrice,
this.CostBatteryPrice,
this.CostCaddyPrice,
this.CostCustomPrice,
this.CostShippingPrice,
this.CostUnlockPrice,
this.CostBuyPrice,
this.CostSellPrice,
this.CostCoursePrice});
this.dataGridViewLaptops.ContextMenuStrip = this.laptopContextMenu;
this.dataGridViewLaptops.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridViewLaptops.Location = new System.Drawing.Point(3, 71);
this.dataGridViewLaptops.Name = "dataGridViewLaptops";
this.dataGridViewLaptops.ReadOnly = true;
this.dataGridViewLaptops.RowTemplate.Height = 25;
this.dataGridViewLaptops.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridViewLaptops.Size = new System.Drawing.Size(1182, 571);
this.dataGridViewLaptops.TabIndex = 1;
//
// CostName
//
this.CostName.DataPropertyName = "CostPrice.Name";
this.CostName.HeaderText = "Назва";
this.CostName.Name = "CostName";
this.CostName.ReadOnly = true;
//
// CostProcessor
//
this.CostProcessor.HeaderText = "Процесор";
this.CostProcessor.Name = "CostProcessor";
this.CostProcessor.ReadOnly = true;
//
// CostRAM
//
this.CostRAM.HeaderText = "Оперативка";
this.CostRAM.Name = "CostRAM";
this.CostRAM.ReadOnly = true;
//
// CostHDD
//
this.CostHDD.DataPropertyName = "CostPrice.HDD";
this.CostHDD.HeaderText = "HDD";
this.CostHDD.Name = "CostHDD";
this.CostHDD.ReadOnly = true;
//
// CostBattery
//
this.CostBattery.DataPropertyName = "CostPrice.Battery";
this.CostBattery.HeaderText = "Батарея";
this.CostBattery.Name = "CostBattery";
this.CostBattery.ReadOnly = true;
//
// CostAC
//
this.CostAC.HeaderText = "AC";
this.CostAC.Name = "CostAC";
this.CostAC.ReadOnly = true;
//
// CostComment
//
this.CostComment.HeaderText = "Comment";
this.CostComment.Name = "CostComment";
this.CostComment.ReadOnly = true;
//
// CostPurchaseDate
//
this.CostPurchaseDate.HeaderText = "Дата покупки";
this.CostPurchaseDate.Name = "CostPurchaseDate";
this.CostPurchaseDate.ReadOnly = true;
//
// CostLotNumber
//
this.CostLotNumber.HeaderText = "Номер лота";
this.CostLotNumber.Name = "CostLotNumber";
this.CostLotNumber.ReadOnly = true;
//
// CostTrackNumber
//
this.CostTrackNumber.HeaderText = "Track";
this.CostTrackNumber.Name = "CostTrackNumber";
this.CostTrackNumber.ReadOnly = true;
//
// CostBodyPrice
//
this.CostBodyPrice.HeaderText = "Купив";
this.CostBodyPrice.Name = "CostBodyPrice";
this.CostBodyPrice.ReadOnly = true;
//
// CostACPrice
//
this.CostACPrice.HeaderText = "Зарядка";
this.CostACPrice.Name = "CostACPrice";
this.CostACPrice.ReadOnly = true;
//
// CostRAMPrice
//
this.CostRAMPrice.HeaderText = "RAM";
this.CostRAMPrice.Name = "CostRAMPrice";
this.CostRAMPrice.ReadOnly = true;
//
// CostHDDPrice
//
this.CostHDDPrice.HeaderText = "Хард";
this.CostHDDPrice.Name = "CostHDDPrice";
this.CostHDDPrice.ReadOnly = true;
//
// CostBatteryPrice
//
this.CostBatteryPrice.HeaderText = "Батарея";
this.CostBatteryPrice.Name = "CostBatteryPrice";
this.CostBatteryPrice.ReadOnly = true;
//
// CostCaddyPrice
//
this.CostCaddyPrice.HeaderText = "Caddy";
this.CostCaddyPrice.Name = "CostCaddyPrice";
this.CostCaddyPrice.ReadOnly = true;
//
// CostCustomPrice
//
this.CostCustomPrice.HeaderText = "Розмитнення";
this.CostCustomPrice.Name = "CostCustomPrice";
this.CostCustomPrice.ReadOnly = true;
//
// CostShippingPrice
//
this.CostShippingPrice.HeaderText = "Доставка";
this.CostShippingPrice.Name = "CostShippingPrice";
this.CostShippingPrice.ReadOnly = true;
//
// CostUnlockPrice
//
this.CostUnlockPrice.HeaderText = "Unlock";
this.CostUnlockPrice.Name = "CostUnlockPrice";
this.CostUnlockPrice.ReadOnly = true;
//
// CostBuyPrice
//
this.CostBuyPrice.HeaderText = "Собівартість";
this.CostBuyPrice.Name = "CostBuyPrice";
this.CostBuyPrice.ReadOnly = true;
//
// CostSellPrice
//
this.CostSellPrice.HeaderText = "Продаж";
this.CostSellPrice.Name = "CostSellPrice";
this.CostSellPrice.ReadOnly = true;
//
// CostCoursePrice
//
this.CostCoursePrice.HeaderText = "Курс";
this.CostCoursePrice.Name = "CostCoursePrice";
this.CostCoursePrice.ReadOnly = true;
//
// laptopContextMenu
//
this.laptopContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.deleteLaptopMenuItem,
this.createLaptopMenuItem,
this.editLaptopMenuItem});
this.laptopContextMenu.Name = "laptopContextMenu";
this.laptopContextMenu.Size = new System.Drawing.Size(181, 70);
//
// deleteLaptopMenuItem
//
this.deleteLaptopMenuItem.Name = "deleteLaptopMenuItem";
this.deleteLaptopMenuItem.Size = new System.Drawing.Size(180, 22);
this.deleteLaptopMenuItem.Text = "Видалити";
this.deleteLaptopMenuItem.Click += new System.EventHandler(this.deleteLaptopMenuItem_Click);
//
// createLaptopMenuItem
//
this.createLaptopMenuItem.Name = "createLaptopMenuItem";
this.createLaptopMenuItem.Size = new System.Drawing.Size(180, 22);
this.createLaptopMenuItem.Text = "Створити";
this.createLaptopMenuItem.Click += new System.EventHandler(this.createLaptopMenuItem_Click);
//
// editLaptopMenuItem
//
this.editLaptopMenuItem.Name = "editLaptopMenuItem";
this.editLaptopMenuItem.Size = new System.Drawing.Size(180, 22);
this.editLaptopMenuItem.Text = "toolStripMenuItem1";
//
// panelSearch
//
this.panelSearch.Controls.Add(this.buttonAddItem);
this.panelSearch.Controls.Add(this.buttonSearch);
this.panelSearch.Controls.Add(this.textSearch);
this.panelSearch.Controls.Add(this.labelSearch);
this.panelSearch.Dock = System.Windows.Forms.DockStyle.Top;
this.panelSearch.Location = new System.Drawing.Point(3, 3);
this.panelSearch.Name = "panelSearch";
this.panelSearch.Size = new System.Drawing.Size(1182, 68);
this.panelSearch.TabIndex = 0;
//
// buttonSearch
//
this.buttonSearch.Location = new System.Drawing.Point(865, 20);
this.buttonSearch.Name = "buttonSearch";
this.buttonSearch.Size = new System.Drawing.Size(75, 23);
this.buttonSearch.TabIndex = 2;
this.buttonSearch.Text = "Шукати";
this.buttonSearch.UseVisualStyleBackColor = true;
//
// textSearch
//
this.textSearch.Location = new System.Drawing.Point(87, 21);
this.textSearch.Name = "textSearch";
this.textSearch.Size = new System.Drawing.Size(759, 23);
this.textSearch.TabIndex = 1;
//
// labelSearch
//
this.labelSearch.AutoSize = true;
this.labelSearch.Location = new System.Drawing.Point(19, 24);
this.labelSearch.Name = "labelSearch";
this.labelSearch.Size = new System.Drawing.Size(49, 15);
this.labelSearch.TabIndex = 0;
this.labelSearch.Text = "Пошук:";
//
// tabInvoices
//
this.tabInvoices.Location = new System.Drawing.Point(4, 24);
this.tabInvoices.Name = "tabInvoices";
this.tabInvoices.Padding = new System.Windows.Forms.Padding(3);
this.tabInvoices.Size = new System.Drawing.Size(1188, 645);
this.tabInvoices.TabIndex = 1;
this.tabInvoices.Text = "Накладні";
this.tabInvoices.UseVisualStyleBackColor = true;
//
// buttonAddItem
//
this.buttonAddItem.Location = new System.Drawing.Point(1077, 20);
this.buttonAddItem.Name = "buttonAddItem";
this.buttonAddItem.Size = new System.Drawing.Size(75, 23);
this.buttonAddItem.TabIndex = 3;
this.buttonAddItem.Text = "Add";
this.buttonAddItem.UseVisualStyleBackColor = true;
this.buttonAddItem.Click += new System.EventHandler(this.buttonAddItem_Click);
//
// NUSAForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1196, 673);
this.Controls.Add(this.mainTabControl);
this.Name = "NUSAForm";
this.Text = "NUSA v.1.0";
this.Load += new System.EventHandler(this.NUSAForm_Load);
this.mainTabControl.ResumeLayout(false);
this.tabLaptops.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dataGridViewLaptops)).EndInit();
this.laptopContextMenu.ResumeLayout(false);
this.panelSearch.ResumeLayout(false);
this.panelSearch.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TabControl mainTabControl;
private System.Windows.Forms.TabPage tabLaptops;
private System.Windows.Forms.TabPage tabInvoices;
private System.Windows.Forms.DataGridView dataGridViewLaptops;
private System.Windows.Forms.Panel panelSearch;
private System.Windows.Forms.Button buttonSearch;
private System.Windows.Forms.TextBox textSearch;
private System.Windows.Forms.Label labelSearch;
private System.Windows.Forms.DataGridViewTextBoxColumn CostName;
private System.Windows.Forms.DataGridViewTextBoxColumn CostProcessor;
private System.Windows.Forms.DataGridViewTextBoxColumn CostRAM;
private System.Windows.Forms.DataGridViewTextBoxColumn CostHDD;
private System.Windows.Forms.DataGridViewTextBoxColumn CostBattery;
private System.Windows.Forms.DataGridViewTextBoxColumn CostAC;
private System.Windows.Forms.DataGridViewTextBoxColumn CostComment;
private System.Windows.Forms.DataGridViewTextBoxColumn CostPurchaseDate;
private System.Windows.Forms.DataGridViewTextBoxColumn CostLotNumber;
private System.Windows.Forms.DataGridViewTextBoxColumn CostTrackNumber;
private System.Windows.Forms.DataGridViewTextBoxColumn CostBodyPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn CostACPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn CostRAMPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn CostHDDPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn CostBatteryPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn CostCaddyPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn CostCustomPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn CostShippingPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn CostUnlockPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn CostBuyPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn CostSellPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn CostCoursePrice;
private System.Windows.Forms.ContextMenuStrip laptopContextMenu;
private System.Windows.Forms.ToolStripMenuItem deleteLaptopMenuItem;
private System.Windows.Forms.ToolStripMenuItem createLaptopMenuItem;
private System.Windows.Forms.ToolStripMenuItem editLaptopMenuItem;
private System.Windows.Forms.Button buttonAddItem;
}
}
| 47.264423 | 137 | 0.613315 | [
"MIT"
] | denism122/NUSA | MainForm.Designer.cs | 19,821 | C# |
namespace org.nxbre
{
using System;
using System.Xml.XPath;
using net.ideaity.util;
using org.nxbre.rule;
/// <summary>
/// This interface defines the Flow Engine (FE) of NxBRE.
/// </summary>
/// <author>David Dossot</author>
/// <version>2.5</version>
public interface IFlowEngine : IInitializable, IBREDispatcher, ICloneable
{
/// <summary> Returns or Sets the RuleContext in it's current state.
/// If the developer wishes to have a private copy, make sure
/// to use Clone().
/// This method allows developers to provide an already populated BRERuleContext.
/// This is provided to allow for RuleFactories that have already been created, thus
/// allowing a more stateful RuleFactory
/// </summary>
/// <returns> The RuleContext in its current state</returns>
IBRERuleContext RuleContext
{
get;
set;
}
/// <summary> Returns the loaded XML Rules in the native NxBRE syntax
/// </summary>
/// <returns> The loaded XmlDocumentRules</returns>
XPathDocument XmlDocumentRules
{
get;
}
/// <summary> Running state of the engine, i.e. when processing.
/// </summary>
/// <returns> True if the engine is processing. </returns>
bool Running
{
get;
}
/// <summary> Execute the BRE.
/// </summary>
/// <returns> True if successful, False otherwise
/// </returns>
bool Process();
/// <summary> Execute the BRE but only do all the globals and a certain set.
/// </summary>
/// <returns> True if successful, False otherwise
/// </returns>
bool Process(object aId);
/// <summary> Violently stop the BRE
/// </summary>
void Stop();
/// <summary>Reset the context's call stack and results
/// </summary>
void Reset();
}
}
| 26.956522 | 89 | 0.616129 | [
"MIT"
] | Peidyen/NxBRE | NxBRE2/Source/org/nxbre/IFlowEngine.cs | 1,860 | C# |
using Microsoft.Extensions.Configuration;
using System.Xml;
using Zhoubin.Infrastructure.Common.Config;
namespace Zhoubin.Infrastructure.Common.Test.Config
{
public sealed class Entity : ConfigEntityBase
{
public string Propety { get { return GetValue<string>("Propety"); } set { SetValue("Propety", value); } }
public string Propety1 { get { return GetValue<string>("Propety1"); } set { SetValue("Propety1", value); } }
}
}
| 35 | 116 | 0.705495 | [
"Apache-2.0"
] | cdzhoubin/Infrastructure.Net.Core | Source/Test/Common.Test/Config/Entity.cs | 457 | C# |
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information.
namespace System.Data.Entity.Core.Common.CommandTrees.Internal
{
using System.Collections.Generic;
using System.Collections.ObjectModel;
internal sealed class DbExpressionList : ReadOnlyCollection<DbExpression>
{
internal DbExpressionList(IList<DbExpression> elements)
: base(elements)
{
}
}
}
| 31.0625 | 144 | 0.714286 | [
"MIT"
] | dotnet/ef6tools | src/EntityFramework/Core/Common/CommandTrees/Internal/ExpressionList.cs | 497 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NFX.DataAccess.Distributed;
namespace UserGraph
{
public class User
{
public User() { }
public long ID { get; set; }
public string Name { get; set; }
public DateTime RegistrationDate { get; set; }
public DateTime LastLoginDate { get; set; }
public string EMail { get; set; }
public bool CanVote { get; set; }
public string Location { get; set; }
}
public class Post
{
public long PostID { get; set; }
public long UserID { get; set; }
public DateTime CreateDate { get; set; }
public string Title { get; set; }
public string Text { get; set; }
public long Up { get; set; }
public long Down { get; set; }
public long[] MentionUserIDs { get; set; }
}
public interface IUserGraph : IDisposable
{
long UserCount { get; }
long PostCount { get; }
long UserIDRange { get; }
long PostIDRange { get; }
long NewUserID();
long NewPostID();
/// <summary>
/// Add or update user, true if added
/// </summary>
bool PutUser(User user);
/// <summary>
/// Remove user by ID, true if found and removed
/// </summary>
bool RemoveUser(long userID);
/// <summary>
/// Add or replace post, true if added
/// </summary>
bool PutPost(Post post);
/// <summary>
/// Remove post by id
/// </summary>
bool RemovePost(long postID);
/// <summary>
/// Vote for post +/-
/// </summary>
bool VotePost(long postID, int count);
/// <summary>
/// Gets postes authored by user
/// </summary>
IEnumerable<Post> GetUserPosts(long userID, out User user);
}
}
| 22.084337 | 63 | 0.581015 | [
"Apache-2.0"
] | aumcode/piledemo | UserGraph/IUserGraph.cs | 1,835 | C# |
namespace EveOnlineApi;
/// <summary>
/// level object
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.5.0 (NJsonSchema v10.6.6.0 (Newtonsoft.Json v9.0.0.0))")]
public record Levels
{
[System.Text.Json.Serialization.JsonConstructor]
public Levels(float @cost, string @name, float @payout)
{
this.Cost = @cost;
this.Name = @name;
this.Payout = @payout;
} /// <summary>
/// cost number
/// </summary>
[System.Text.Json.Serialization.JsonPropertyName("cost")]
public float Cost { get; init; }
/// <summary>
/// Localized insurance level
/// </summary>
[System.Text.Json.Serialization.JsonPropertyName("name")]
public string Name { get; init; }
/// <summary>
/// payout number
/// </summary>
[System.Text.Json.Serialization.JsonPropertyName("payout")]
public float Payout { get; init; }
}
| 24.116279 | 122 | 0.55352 | [
"MIT"
] | frankhaugen/Frank.Extensions | src/Frank.Libraries.Gaming/Engine/EveOnlineApi/Levels.cs | 1,037 | 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 ce-2017-10-25.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.CostExplorer.Model
{
/// <summary>
/// Container for the parameters to the CreateAnomalyMonitor operation.
/// Creates a new cost anomaly detection monitor with the requested type and monitor specification.
/// </summary>
public partial class CreateAnomalyMonitorRequest : AmazonCostExplorerRequest
{
private AnomalyMonitor _anomalyMonitor;
/// <summary>
/// Gets and sets the property AnomalyMonitor.
/// <para>
/// The cost anomaly detection monitor object that you want to create.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public AnomalyMonitor AnomalyMonitor
{
get { return this._anomalyMonitor; }
set { this._anomalyMonitor = value; }
}
// Check to see if AnomalyMonitor property is set
internal bool IsSetAnomalyMonitor()
{
return this._anomalyMonitor != null;
}
}
} | 32.644068 | 104 | 0.65784 | [
"Apache-2.0"
] | philasmar/aws-sdk-net | sdk/src/Services/CostExplorer/Generated/Model/CreateAnomalyMonitorRequest.cs | 1,926 | C# |
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace DotNetty.Transport.Libuv
{
using System.Threading.Tasks;
using DotNetty.Transport.Channels;
public sealed class EventLoop : LoopExecutor, IEventLoop
{
public EventLoop(IEventLoopGroup parent = null, string threadName = null)
: base(parent, threadName)
{
this.Start();
}
public Task RegisterAsync(IChannel channel) => channel.Unsafe.RegisterAsync(this);
public new IEventLoopGroup Parent => (IEventLoopGroup)base.Parent;
}
}
| 30.636364 | 101 | 0.686944 | [
"MIT"
] | cnxy/DotNetty | src/DotNetty.Transport.Libuv/EventLoop.cs | 676 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using LLVMSharp;
using NationalInstruments.Compiler;
using NationalInstruments.Core;
using NationalInstruments.Dfir;
using NationalInstruments.ExecutionFramework;
using NationalInstruments.Linking;
using Rebar.Compiler;
using Rebar.Common;
using Rebar.RebarTarget.BytecodeInterpreter;
namespace Rebar.RebarTarget
{
/// <summary>
/// A compiler for building Rebar functions on the Rebar target. Not a standalone compiler, but rather a sub-compiler for
/// the <see cref="TargetCompiler"/> to delegate function compilation work to.
/// </summary>
public class FunctionCompileHandler : TargetCompileHandler
{
/// <summary>
/// Creates a new compiler instance
/// </summary>
/// <param name="parent">The target compiler for which this is a sub-compiler.</param>
/// <param name="scheduledActivityManager">The scheduler for any asynchronous tasks that must be executed by the compiler.</param>
public FunctionCompileHandler(TargetCompiler parent, IScheduledActivityManager scheduledActivityManager)
: base(parent, scheduledActivityManager)
{
}
#region Overrides
/// <inheritdoc />
public override bool CanHandleThis(DfirRootRuntimeType runtimeType)
{
return runtimeType == FunctionMocPlugin.FunctionRuntimeType ||
runtimeType == DfirRootRuntimeType.TypeType;
// runtimeType == SharedLibraryMocPlugin.SharedLibraryType;
}
/// <inheritdoc />
public override bool IsDefaultBuildSpecEager()
{
return true;
}
/// <inheritdoc />
public override async Task<Tuple<CompileCacheEntry, CompileSignature>> BackEndCompileAsyncCore(
SpecAndQName specAndQName,
DfirRoot targetDfir,
CompileCancellationToken cancellationToken,
ProgressToken progressToken,
CompileThreadState compileThreadState)
{
CompileSignature topSignature = new CompileSignature(
targetDfir.Name,
Enumerable.Empty<CompileSignatureParameter>(), // GenerateParameters(targetDfir),
targetDfir.GetDeclaringType(),
targetDfir.Reentrancy,
true,
true,
ThreadAffinity.Standard,
false,
true,
ExecutionPriority.Normal,
CallingConvention.StdCall);
BuildSpec htmlVIBuildSpec = specAndQName.BuildSpec;
foreach (var dependency in targetDfir.Dependencies.OfType<CompileInvalidationDfirDependency>().ToList())
{
var compileSignature = await Compiler.GetCompileSignatureAsync(dependency.SpecAndQName, cancellationToken, progressToken, compileThreadState);
if (compileSignature != null)
{
targetDfir.AddDependency(
targetDfir,
new CompileSignatureDependency(dependency.SpecAndQName, compileSignature));
}
}
IBuiltPackage builtPackage = null;
if (!RebarFeatureToggles.IsLLVMCompilerEnabled)
{
Function compiledFunction = CompileFunctionForBytecodeInterpreter(targetDfir, cancellationToken);
builtPackage = new FunctionBuiltPackage(specAndQName, Compiler.TargetName, compiledFunction);
}
else
{
Module compiledFunctionModule = CompileFunctionForLLVM(targetDfir, cancellationToken);
builtPackage = new LLVM.FunctionBuiltPackage(specAndQName, Compiler.TargetName, compiledFunctionModule);
}
BuiltPackageToken token = Compiler.AddToBuiltPackagesCache(builtPackage);
CompileCacheEntry entry = await Compiler.CreateStandardCompileCacheEntryFromDfirRootAsync(
CompileState.Complete,
targetDfir,
new Dictionary<ExtendedQualifiedName, CompileSignature>(),
token,
cancellationToken,
progressToken,
compileThreadState,
false);
return new Tuple<CompileCacheEntry, CompileSignature>(entry, topSignature);
}
internal static Function CompileFunctionForBytecodeInterpreter(DfirRoot dfirRoot, CompileCancellationToken cancellationToken)
{
ExecutionOrderSortingVisitor.SortDiagrams(dfirRoot);
var variableAllocations = VariableReference.CreateDictionaryWithUniqueVariableKeys<ValueSource>();
var allocator = new BytecodeInterpreterAllocator(variableAllocations);
allocator.Execute(dfirRoot, cancellationToken);
IEnumerable<LocalAllocationValueSource> localAllocations = variableAllocations.Values.OfType<LocalAllocationValueSource>();
int[] localSizes = new int[localAllocations.Count()];
foreach (var allocation in localAllocations)
{
localSizes[allocation.Index] = allocation.Size;
}
var functionBuilder = new FunctionBuilder()
{
Name = dfirRoot.SpecAndQName.EditorName,
LocalSizes = localSizes
};
new FunctionCompiler(functionBuilder, variableAllocations).Execute(dfirRoot, cancellationToken);
return functionBuilder.CreateFunction();
}
internal static Module CompileFunctionForLLVM(DfirRoot dfirRoot, CompileCancellationToken cancellationToken, string compiledFunctionName = "")
{
ExecutionOrderSortingVisitor.SortDiagrams(dfirRoot);
Dictionary<VariableReference, LLVM.ValueSource> valueSources = VariableReference.CreateDictionaryWithUniqueVariableKeys<LLVM.ValueSource>();
LLVM.Allocator allocator = new LLVM.Allocator(valueSources);
allocator.Execute(dfirRoot, cancellationToken);
Module module = new Module("module");
compiledFunctionName = string.IsNullOrEmpty(compiledFunctionName) ? dfirRoot.SpecAndQName.RuntimeName : compiledFunctionName;
LLVM.FunctionCompiler functionCompiler = new LLVM.FunctionCompiler(module, compiledFunctionName, valueSources);
functionCompiler.Execute(dfirRoot, cancellationToken);
return module;
}
#endregion
/// <inheritdoc/>
public override CompileSignature PredictCompileSignatureCore(DfirRoot targetDfir, CompileSignature previousSignature)
{
return null;
}
}
}
| 43.006329 | 158 | 0.660927 | [
"MIT"
] | FeatureToggleStudy/rebar | src/Rebar/RebarTarget/FunctionCompileHandler.cs | 6,797 | C# |
namespace Fooidity.ContainerTests
{
using System;
using System.Collections.Generic;
using Autofac;
using Autofac.Core;
using Contexts;
using Contracts;
using Features;
using Modules;
using NUnit.Framework;
[TestFixture]
public class Configuring_the_container_for_user_contexts
{
[Test]
public void No_context_should_throw_the_proper_exception()
{
var exception = Assert.Throws<DependencyResolutionException>(() =>
{
using (ILifetimeScope scope = _container.BeginLifetimeScope())
{
var codeSwitch = scope.Resolve<ICodeSwitch<UseNewCodePath>>();
}
});
Assert.IsInstanceOf<ContextSwitchException>(exception.InnerException);
}
[Test]
public void Should_be_enabled_for_specified_user()
{
using (
ILifetimeScope scope =
_container.BeginLifetimeScope(x => x.RegisterInstance(new UserContext {Name = "Chris"})))
{
var codeSwitch = scope.Resolve<ICodeSwitch<UseNewCodePath>>();
Assert.IsTrue(codeSwitch.Enabled);
var repository = scope.Resolve<Repository>();
Assert.AreEqual("No", repository.IsDbEnabled);
IEnumerable<ICodeSwitchEvaluated> codeSwitchesEvaluated = scope.GetEvaluatedCodeSwitches();
foreach (ICodeSwitchEvaluated evaluated in codeSwitchesEvaluated)
Console.WriteLine("{0}: {1}", evaluated.CodeFeatureId, evaluated.Enabled);
}
}
[Test]
public void Should_use_the_default_off_value()
{
using (
ILifetimeScope scope =
_container.BeginLifetimeScope(x => x.RegisterInstance(new UserContext {Name = "David"})))
{
var codeSwitch = scope.Resolve<ICodeSwitch<UseNewCodePath>>();
Assert.IsFalse(codeSwitch.Enabled);
IEnumerable<ICodeSwitchEvaluated> codeSwitchesEvaluated = scope.GetEvaluatedCodeSwitches();
foreach (ICodeSwitchEvaluated evaluated in codeSwitchesEvaluated)
Console.WriteLine("{0}: {1}", evaluated.CodeFeatureId, evaluated.Enabled);
}
}
IContainer _container;
[TestFixtureTearDown]
public void Teardown()
{
_container.Dispose();
}
[TestFixtureSetUp]
public void Setup()
{
var builder = new ContainerBuilder();
builder.RegisterModule<ConfigurationCodeFeatureCacheModule>();
builder.RegisterModule<ConfigurationContextFeatureCacheModule<UserContext, UserContextKeyProvider>>();
builder.RegisterCodeSwitch<DbEnabled>();
builder.RegisterContextCodeSwitch<UseNewCodePath, UserContext>(true);
builder.EnableCodeSwitchTracking();
builder.RegisterType<Repository>();
_container = builder.Build();
}
class Repository
{
readonly ICodeSwitch<DbEnabled> _dbEnabled;
public Repository(ICodeSwitch<DbEnabled> dbEnabled)
{
_dbEnabled = dbEnabled;
}
public string IsDbEnabled
{
get { return _dbEnabled.Enabled ? "Yes" : "No"; }
}
}
}
} | 31.831858 | 115 | 0.568807 | [
"Apache-2.0"
] | phatboyg/Fooidity | src/Fooidity.ContainerTests/ContextContainer_Specs.cs | 3,599 | C# |
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
// <auto-generated/>
// Template Source: Templates\CSharp\Requests\EntityCollectionRequestBuilder.cs.tt
namespace Microsoft.Graph
{
using System;
using System.Collections.Generic;
/// <summary>
/// The type PermissionGrantPolicyIncludesCollectionRequestBuilder.
/// </summary>
public partial class PermissionGrantPolicyIncludesCollectionRequestBuilder : BaseRequestBuilder, IPermissionGrantPolicyIncludesCollectionRequestBuilder
{
/// <summary>
/// Constructs a new PermissionGrantPolicyIncludesCollectionRequestBuilder.
/// </summary>
/// <param name="requestUrl">The URL for the built request.</param>
/// <param name="client">The <see cref="IBaseClient"/> for handling requests.</param>
public PermissionGrantPolicyIncludesCollectionRequestBuilder(
string requestUrl,
IBaseClient client)
: base(requestUrl, client)
{
}
/// <summary>
/// Builds the request.
/// </summary>
/// <returns>The built request.</returns>
public IPermissionGrantPolicyIncludesCollectionRequest Request()
{
return this.Request(null);
}
/// <summary>
/// Builds the request.
/// </summary>
/// <param name="options">The query and header options for the request.</param>
/// <returns>The built request.</returns>
public IPermissionGrantPolicyIncludesCollectionRequest Request(IEnumerable<Option> options)
{
return new PermissionGrantPolicyIncludesCollectionRequest(this.RequestUrl, this.Client, options);
}
/// <summary>
/// Gets an <see cref="IPermissionGrantConditionSetRequestBuilder"/> for the specified PermissionGrantPolicyPermissionGrantConditionSet.
/// </summary>
/// <param name="id">The ID for the PermissionGrantPolicyPermissionGrantConditionSet.</param>
/// <returns>The <see cref="IPermissionGrantConditionSetRequestBuilder"/>.</returns>
public IPermissionGrantConditionSetRequestBuilder this[string id]
{
get
{
return new PermissionGrantConditionSetRequestBuilder(this.AppendSegmentToRequestUrl(id), this.Client);
}
}
}
}
| 41.227273 | 155 | 0.62477 | [
"MIT"
] | andrueastman/msgraph-sdk-dotnet | src/Microsoft.Graph/Generated/requests/PermissionGrantPolicyIncludesCollectionRequestBuilder.cs | 2,721 | 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.DocAsCode.MarkdownLite.Tests
{
using System.Linq;
using Microsoft.DocAsCode.MarkdownLite;
using Xunit;
public class PerfTest
{
[Fact]
[Trait("Related", "Markdown")]
[Trait("Related", "Perf")]
public void TestPerf()
{
const string source = @"
Heading
=======
Sub-heading
-----------
### Another deeper heading
Paragraphs are separated
by a blank line.
Leave 2 spaces at the end of a line to do a
line break
Text attributes *italic*, **bold**,
`monospace`, ~~strikethrough~~ .
A [link](http://example.com).
Shopping list:
* apples
* oranges
* pears
Numbered list:
1. apples
2. oranges
3. pears
";
const string expected = @"<h1 id=""heading"">Heading</h1>
<h2 id=""sub-heading"">Sub-heading</h2>
<h3 id=""another-deeper-heading"">Another deeper heading</h3>
<p>Paragraphs are separated
by a blank line.</p>
<p>Leave 2 spaces at the end of a line to do a<br>line break</p>
<p>Text attributes <em>italic</em>, <strong>bold</strong>,
<code>monospace</code>, <del>strikethrough</del> .</p>
<p>A <a href=""http://example.com"">link</a>.</p>
<p>Shopping list:</p>
<ul>
<li>apples</li>
<li>oranges</li>
<li>pears</li>
</ul>
<p>Numbered list:</p>
<ol>
<li>apples</li>
<li>oranges</li>
<li>pears</li>
</ol>
";
var builder = new GfmEngineBuilder(new Options());
var source1000 = string.Concat(Enumerable.Repeat(source, 1000));
var expected1000 = string.Concat(Enumerable.Repeat(expected.Replace("\r\n", "\n"), 1000));
var engine = builder.CreateEngine(new HtmlRenderer());
for (int i = 0; i < 2; i++)
{
var result = engine.Markup(source1000);
Assert.Equal(expected1000, result);
}
}
}
}
| 23.116279 | 102 | 0.612173 | [
"MIT"
] | ghuntley/docfx | test/Microsoft.DocAsCode.MarkdownLite.Tests/PerfTest.cs | 1,990 | C# |
/********************************************************************************
The MIT License(MIT)
Copyright(c) 2016 Copyleaks LTD (https://copyleaks.com)
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.
********************************************************************************/
using Newtonsoft.Json;
namespace Copyleaks.SDK.V3.API.Models.Responses.Download
{
public class FullSuspectedComparisonLayerValues
{
[JsonProperty("starts")]
public int[] Starts { get; set; }
[JsonProperty("lengths")]
public int[] Lengths { get; set; }
}
} | 42.972973 | 82 | 0.677987 | [
"MIT"
] | Copyleaks/.net-core-plagiarism-checker | CopyleaksAPI/Models/Responses/Download/FullSuspectedComparisonLayerValues.cs | 1,592 | C# |
#pragma checksum "C:\Users\lord\source\repos\ClearPost\ClearPost\Views\Student\Create.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "5fdd0598aa2d97c335c5059ed20d0186524ba994"
// <auto-generated/>
#pragma warning disable 1591
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.Views_Student_Create), @"mvc.1.0.view", @"/Views/Student/Create.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\lord\source\repos\ClearPost\ClearPost\Views\_ViewImports.cshtml"
using ClearPost;
#line default
#line hidden
#nullable disable
#nullable restore
#line 2 "C:\Users\lord\source\repos\ClearPost\ClearPost\Views\_ViewImports.cshtml"
using ClearPost.Models;
#line default
#line hidden
#nullable disable
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"5fdd0598aa2d97c335c5059ed20d0186524ba994", @"/Views/Student/Create.cshtml")]
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"d1ea81af078f1e8fa1a0018a2974e79c1fc706b2", @"/Views/_ViewImports.cshtml")]
public class Views_Student_Create : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<ClearPost.Models.ViewModel.StudentViewModel>
{
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("text-danger"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("control-label"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("form-control"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_3 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("asp-action", "Create", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_4 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("enctype", new global::Microsoft.AspNetCore.Html.HtmlString("multipart/form-data"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_5 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("asp-action", "Index", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line hidden
#pragma warning disable 0649
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext;
#pragma warning restore 0649
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner();
#pragma warning disable 0169
private string __tagHelperStringValueBuffer;
#pragma warning restore 0169
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __backed__tagHelperScopeManager = null;
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __tagHelperScopeManager
{
get
{
if (__backed__tagHelperScopeManager == null)
{
__backed__tagHelperScopeManager = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager(StartTagHelperWritingScope, EndTagHelperWritingScope);
}
return __backed__tagHelperScopeManager;
}
}
private global::Microsoft.AspNetCore.Mvc.TagHelpers.FormTagHelper __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper;
private global::Microsoft.AspNetCore.Mvc.TagHelpers.RenderAtEndOfFormTagHelper __Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper;
private global::Microsoft.AspNetCore.Mvc.TagHelpers.ValidationSummaryTagHelper __Microsoft_AspNetCore_Mvc_TagHelpers_ValidationSummaryTagHelper;
private global::Microsoft.AspNetCore.Mvc.TagHelpers.LabelTagHelper __Microsoft_AspNetCore_Mvc_TagHelpers_LabelTagHelper;
private global::Microsoft.AspNetCore.Mvc.TagHelpers.InputTagHelper __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper;
private global::Microsoft.AspNetCore.Mvc.TagHelpers.ValidationMessageTagHelper __Microsoft_AspNetCore_Mvc_TagHelpers_ValidationMessageTagHelper;
private global::Microsoft.AspNetCore.Mvc.TagHelpers.SelectTagHelper __Microsoft_AspNetCore_Mvc_TagHelpers_SelectTagHelper;
private global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper;
#pragma warning disable 1998
public async override global::System.Threading.Tasks.Task ExecuteAsync()
{
WriteLiteral("\r\n");
#nullable restore
#line 3 "C:\Users\lord\source\repos\ClearPost\ClearPost\Views\Student\Create.cshtml"
ViewData["Title"] = "Create";
#line default
#line hidden
#nullable disable
WriteLiteral("<h1>Add Student</h1>\r\n\r\n<hr />\r\n\r\n<div class=\"row\">\r\n <div class=\"col-md-4\">\r\n ");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("form", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "5fdd0598aa2d97c335c5059ed20d0186524ba9946424", async() => {
WriteLiteral("\r\n ");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("div", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "5fdd0598aa2d97c335c5059ed20d0186524ba9946694", async() => {
}
);
__Microsoft_AspNetCore_Mvc_TagHelpers_ValidationSummaryTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.ValidationSummaryTagHelper>();
__tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_ValidationSummaryTagHelper);
#nullable restore
#line 13 "C:\Users\lord\source\repos\ClearPost\ClearPost\Views\Student\Create.cshtml"
__Microsoft_AspNetCore_Mvc_TagHelpers_ValidationSummaryTagHelper.ValidationSummary = global::Microsoft.AspNetCore.Mvc.Rendering.ValidationSummary.ModelOnly;
#line default
#line hidden
#nullable disable
__tagHelperExecutionContext.AddTagHelperAttribute("asp-validation-summary", __Microsoft_AspNetCore_Mvc_TagHelpers_ValidationSummaryTagHelper.ValidationSummary, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified)
{
await __tagHelperExecutionContext.SetOutputContentAsync();
}
Write(__tagHelperExecutionContext.Output);
__tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n <div class=\"form-group\">\r\n ");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("label", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "5fdd0598aa2d97c335c5059ed20d0186524ba9948414", async() => {
}
);
__Microsoft_AspNetCore_Mvc_TagHelpers_LabelTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.LabelTagHelper>();
__tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_LabelTagHelper);
#nullable restore
#line 15 "C:\Users\lord\source\repos\ClearPost\ClearPost\Views\Student\Create.cshtml"
__Microsoft_AspNetCore_Mvc_TagHelpers_LabelTagHelper.For = ModelExpressionProvider.CreateModelExpression(ViewData, __model => __model.FullName);
#line default
#line hidden
#nullable disable
__tagHelperExecutionContext.AddTagHelperAttribute("asp-for", __Microsoft_AspNetCore_Mvc_TagHelpers_LabelTagHelper.For, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified)
{
await __tagHelperExecutionContext.SetOutputContentAsync();
}
Write(__tagHelperExecutionContext.Output);
__tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n ");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "5fdd0598aa2d97c335c5059ed20d0186524ba99410005", async() => {
}
);
__Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.InputTagHelper>();
__tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper);
#nullable restore
#line 16 "C:\Users\lord\source\repos\ClearPost\ClearPost\Views\Student\Create.cshtml"
__Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper.For = ModelExpressionProvider.CreateModelExpression(ViewData, __model => __model.FullName);
#line default
#line hidden
#nullable disable
__tagHelperExecutionContext.AddTagHelperAttribute("asp-for", __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper.For, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified)
{
await __tagHelperExecutionContext.SetOutputContentAsync();
}
Write(__tagHelperExecutionContext.Output);
__tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n ");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("span", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "5fdd0598aa2d97c335c5059ed20d0186524ba99411591", async() => {
}
);
__Microsoft_AspNetCore_Mvc_TagHelpers_ValidationMessageTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.ValidationMessageTagHelper>();
__tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_ValidationMessageTagHelper);
#nullable restore
#line 17 "C:\Users\lord\source\repos\ClearPost\ClearPost\Views\Student\Create.cshtml"
__Microsoft_AspNetCore_Mvc_TagHelpers_ValidationMessageTagHelper.For = ModelExpressionProvider.CreateModelExpression(ViewData, __model => __model.FullName);
#line default
#line hidden
#nullable disable
__tagHelperExecutionContext.AddTagHelperAttribute("asp-validation-for", __Microsoft_AspNetCore_Mvc_TagHelpers_ValidationMessageTagHelper.For, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified)
{
await __tagHelperExecutionContext.SetOutputContentAsync();
}
Write(__tagHelperExecutionContext.Output);
__tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n </div>\r\n <div class=\"form-group\">\r\n ");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("label", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "5fdd0598aa2d97c335c5059ed20d0186524ba99413317", async() => {
}
);
__Microsoft_AspNetCore_Mvc_TagHelpers_LabelTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.LabelTagHelper>();
__tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_LabelTagHelper);
#nullable restore
#line 20 "C:\Users\lord\source\repos\ClearPost\ClearPost\Views\Student\Create.cshtml"
__Microsoft_AspNetCore_Mvc_TagHelpers_LabelTagHelper.For = ModelExpressionProvider.CreateModelExpression(ViewData, __model => __model.Email);
#line default
#line hidden
#nullable disable
__tagHelperExecutionContext.AddTagHelperAttribute("asp-for", __Microsoft_AspNetCore_Mvc_TagHelpers_LabelTagHelper.For, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified)
{
await __tagHelperExecutionContext.SetOutputContentAsync();
}
Write(__tagHelperExecutionContext.Output);
__tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n ");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "5fdd0598aa2d97c335c5059ed20d0186524ba99414906", async() => {
}
);
__Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.InputTagHelper>();
__tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper);
#nullable restore
#line 21 "C:\Users\lord\source\repos\ClearPost\ClearPost\Views\Student\Create.cshtml"
__Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper.For = ModelExpressionProvider.CreateModelExpression(ViewData, __model => __model.Email);
#line default
#line hidden
#nullable disable
__tagHelperExecutionContext.AddTagHelperAttribute("asp-for", __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper.For, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified)
{
await __tagHelperExecutionContext.SetOutputContentAsync();
}
Write(__tagHelperExecutionContext.Output);
__tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n ");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("span", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "5fdd0598aa2d97c335c5059ed20d0186524ba99416489", async() => {
}
);
__Microsoft_AspNetCore_Mvc_TagHelpers_ValidationMessageTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.ValidationMessageTagHelper>();
__tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_ValidationMessageTagHelper);
#nullable restore
#line 22 "C:\Users\lord\source\repos\ClearPost\ClearPost\Views\Student\Create.cshtml"
__Microsoft_AspNetCore_Mvc_TagHelpers_ValidationMessageTagHelper.For = ModelExpressionProvider.CreateModelExpression(ViewData, __model => __model.Email);
#line default
#line hidden
#nullable disable
__tagHelperExecutionContext.AddTagHelperAttribute("asp-validation-for", __Microsoft_AspNetCore_Mvc_TagHelpers_ValidationMessageTagHelper.For, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified)
{
await __tagHelperExecutionContext.SetOutputContentAsync();
}
Write(__tagHelperExecutionContext.Output);
__tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n </div>\r\n <div class=\"form-group\">\r\n ");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("label", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "5fdd0598aa2d97c335c5059ed20d0186524ba99418212", async() => {
}
);
__Microsoft_AspNetCore_Mvc_TagHelpers_LabelTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.LabelTagHelper>();
__tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_LabelTagHelper);
#nullable restore
#line 25 "C:\Users\lord\source\repos\ClearPost\ClearPost\Views\Student\Create.cshtml"
__Microsoft_AspNetCore_Mvc_TagHelpers_LabelTagHelper.For = ModelExpressionProvider.CreateModelExpression(ViewData, __model => __model.DepartmentID);
#line default
#line hidden
#nullable disable
__tagHelperExecutionContext.AddTagHelperAttribute("asp-for", __Microsoft_AspNetCore_Mvc_TagHelpers_LabelTagHelper.For, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified)
{
await __tagHelperExecutionContext.SetOutputContentAsync();
}
Write(__tagHelperExecutionContext.Output);
__tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n ");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("select", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "5fdd0598aa2d97c335c5059ed20d0186524ba99419808", async() => {
}
);
__Microsoft_AspNetCore_Mvc_TagHelpers_SelectTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.SelectTagHelper>();
__tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_SelectTagHelper);
#nullable restore
#line 26 "C:\Users\lord\source\repos\ClearPost\ClearPost\Views\Student\Create.cshtml"
__Microsoft_AspNetCore_Mvc_TagHelpers_SelectTagHelper.For = ModelExpressionProvider.CreateModelExpression(ViewData, __model => __model.DepartmentID);
#line default
#line hidden
#nullable disable
__tagHelperExecutionContext.AddTagHelperAttribute("asp-for", __Microsoft_AspNetCore_Mvc_TagHelpers_SelectTagHelper.For, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#nullable restore
#line 26 "C:\Users\lord\source\repos\ClearPost\ClearPost\Views\Student\Create.cshtml"
__Microsoft_AspNetCore_Mvc_TagHelpers_SelectTagHelper.Items = Model?.DepartList;
#line default
#line hidden
#nullable disable
__tagHelperExecutionContext.AddTagHelperAttribute("asp-items", __Microsoft_AspNetCore_Mvc_TagHelpers_SelectTagHelper.Items, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified)
{
await __tagHelperExecutionContext.SetOutputContentAsync();
}
Write(__tagHelperExecutionContext.Output);
__tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n ");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("span", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "5fdd0598aa2d97c335c5059ed20d0186524ba99421874", async() => {
}
);
__Microsoft_AspNetCore_Mvc_TagHelpers_ValidationMessageTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.ValidationMessageTagHelper>();
__tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_ValidationMessageTagHelper);
#nullable restore
#line 27 "C:\Users\lord\source\repos\ClearPost\ClearPost\Views\Student\Create.cshtml"
__Microsoft_AspNetCore_Mvc_TagHelpers_ValidationMessageTagHelper.For = ModelExpressionProvider.CreateModelExpression(ViewData, __model => __model.DepartmentID);
#line default
#line hidden
#nullable disable
__tagHelperExecutionContext.AddTagHelperAttribute("asp-validation-for", __Microsoft_AspNetCore_Mvc_TagHelpers_ValidationMessageTagHelper.For, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified)
{
await __tagHelperExecutionContext.SetOutputContentAsync();
}
Write(__tagHelperExecutionContext.Output);
__tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n </div>\r\n <div class=\"form-group\">\r\n <input type=\"submit\" value=\"Create\" class=\"btn btn-primary\" />\r\n </div>\r\n ");
}
);
__Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.FormTagHelper>();
__tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper);
__Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.RenderAtEndOfFormTagHelper>();
__tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper);
__Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper.Action = (string)__tagHelperAttribute_3.Value;
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_3);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_4);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified)
{
await __tagHelperExecutionContext.SetOutputContentAsync();
}
Write(__tagHelperExecutionContext.Output);
__tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n </div>\r\n</div>\r\n\r\n<div>\r\n ");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "5fdd0598aa2d97c335c5059ed20d0186524ba99425003", async() => {
WriteLiteral("Back to List");
}
);
__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>();
__tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper);
__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_5.Value;
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_5);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified)
{
await __tagHelperExecutionContext.SetOutputContentAsync();
}
Write(__tagHelperExecutionContext.Output);
__tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n</div>\r\n\r\n");
DefineSection("Scripts", async() => {
WriteLiteral("\r\n");
#nullable restore
#line 41 "C:\Users\lord\source\repos\ClearPost\ClearPost\Views\Student\Create.cshtml"
await Html.RenderPartialAsync("_ValidationScriptsPartial");
#line default
#line hidden
#nullable disable
}
);
WriteLiteral("\r\n");
}
#pragma warning restore 1998
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider ModelExpressionProvider { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IUrlHelper Url { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IViewComponentHelper Component { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper Json { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<ClearPost.Models.ViewModel.StudentViewModel> Html { get; private set; }
}
}
#pragma warning restore 1591
| 73.427027 | 359 | 0.742049 | [
"MIT"
] | koninlord/ClearPost | ClearPost/obj/Debug/netcoreapp3.1/Razor/Views/Student/Create.cshtml.g.cs | 27,168 | C# |
namespace UnleashedOrleans.Grains
{
public class EventHandlerGrainBase
{
}
}
| 13.714286 | 39 | 0.65625 | [
"MIT"
] | zdeneksejcek/DDDwithOrleans | src/UnleashedOrleans.Grains/EventHandlerGrainBase.cs | 98 | C# |
/**
* Copyright 2013 Canada Health Infoway, Inc.
*
* 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.
*
* Author: $LastChangedBy: gng $
* Last modified: $LastChangedDate: 2015-11-19 18:20:12 -0500 (Fri, 30 Jan 2015) $
* Revision: $LastChangedRevision: 9755 $
*/
/* This class was auto-generated by the message builder generator tools. */
namespace Ca.Infoway.Messagebuilder.Model.Ccda_r1_1.Basemodel {
using Ca.Infoway.Messagebuilder;
using Ca.Infoway.Messagebuilder.Annotation;
using Ca.Infoway.Messagebuilder.Datatype;
using Ca.Infoway.Messagebuilder.Datatype.Impl;
using Ca.Infoway.Messagebuilder.Datatype.Lang;
using Ca.Infoway.Messagebuilder.Domainvalue;
using Ca.Infoway.Messagebuilder.Model;
using Ca.Infoway.Messagebuilder.Model.Ccda_r1_1.Merged;
using System.Collections.Generic;
[Hl7PartTypeMappingAttribute(new string[] {"BaseModel.ServiceEvent"})]
public class ServiceEvent : MessagePartBean {
private CS_R2<ActClassRoot> classCode;
private II typeId;
private LIST<II, Identifier> templateId;
private LIST<II, Identifier> id;
private CE_R2<Code> code;
private IVL_TS effectiveTime;
private IList<Ca.Infoway.Messagebuilder.Model.Ccda_r1_1.Merged.Performer2_1> performer;
public ServiceEvent() {
this.classCode = new CS_R2Impl<ActClassRoot>();
this.typeId = new IIImpl();
this.templateId = new LISTImpl<II, Identifier>(typeof(IIImpl));
this.id = new LISTImpl<II, Identifier>(typeof(IIImpl));
this.code = new CE_R2Impl<Code>();
this.effectiveTime = new IVL_TSImpl();
this.performer = new List<Ca.Infoway.Messagebuilder.Model.Ccda_r1_1.Merged.Performer2_1>();
}
/**
* <summary>Relationship: BaseModel.ServiceEvent.classCode</summary>
*
* <remarks>Conformance/Cardinality: OPTIONAL (0-1)</remarks>
*/
[Hl7XmlMappingAttribute(new string[] {"classCode"})]
public CodedTypeR2<ActClassRoot> ClassCode {
get { return (CodedTypeR2<ActClassRoot>) this.classCode.Value; }
set { this.classCode.Value = value; }
}
/**
* <summary>Relationship: BaseModel.ServiceEvent.typeId</summary>
*
* <remarks>Conformance/Cardinality: OPTIONAL (0-1)</remarks>
*/
[Hl7XmlMappingAttribute(new string[] {"typeId"})]
public Identifier TypeId {
get { return this.typeId.Value; }
set { this.typeId.Value = value; }
}
/**
* <summary>Relationship: BaseModel.ServiceEvent.templateId</summary>
*
* <remarks>Conformance/Cardinality: OPTIONAL (0-*)</remarks>
*/
[Hl7XmlMappingAttribute(new string[] {"templateId"})]
public IList<Identifier> TemplateId {
get { return this.templateId.RawList(); }
}
/**
* <summary>Relationship: BaseModel.ServiceEvent.id</summary>
*
* <remarks>Conformance/Cardinality: OPTIONAL (0-*)</remarks>
*/
[Hl7XmlMappingAttribute(new string[] {"id"})]
public IList<Identifier> Id {
get { return this.id.RawList(); }
}
/**
* <summary>Relationship: BaseModel.ServiceEvent.code</summary>
*
* <remarks>Conformance/Cardinality: OPTIONAL (0-1)</remarks>
*/
[Hl7XmlMappingAttribute(new string[] {"code"})]
public CodedTypeR2<Code> Code {
get { return (CodedTypeR2<Code>) this.code.Value; }
set { this.code.Value = value; }
}
/**
* <summary>Relationship: BaseModel.ServiceEvent.effectiveTime</summary>
*
* <remarks>Conformance/Cardinality: OPTIONAL (0-1)</remarks>
*/
[Hl7XmlMappingAttribute(new string[] {"effectiveTime"})]
public DateInterval EffectiveTime {
get { return this.effectiveTime.Value; }
set { this.effectiveTime.Value = value; }
}
/**
* <summary>Relationship: BaseModel.ServiceEvent.performer</summary>
*
* <remarks>Conformance/Cardinality: OPTIONAL (0-*)</remarks>
*/
[Hl7XmlMappingAttribute(new string[] {"performer"})]
public IList<Ca.Infoway.Messagebuilder.Model.Ccda_r1_1.Merged.Performer2_1> Performer {
get { return this.performer; }
}
}
} | 39.206107 | 104 | 0.613902 | [
"ECL-2.0",
"Apache-2.0"
] | CanadaHealthInfoway/message-builder-dotnet | message-builder-ccda-r1_1/Main/Ca/Infoway/Messagebuilder/Model/Ccda_r1_1/Basemodel/ServiceEvent.cs | 5,136 | 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.Rds.Model.V20140815;
namespace Aliyun.Acs.Rds.Transform.V20140815
{
public class CheckDBNameAvailableResponseUnmarshaller
{
public static CheckDBNameAvailableResponse Unmarshall(UnmarshallerContext context)
{
CheckDBNameAvailableResponse checkDBNameAvailableResponse = new CheckDBNameAvailableResponse();
checkDBNameAvailableResponse.HttpResponse = context.HttpResponse;
checkDBNameAvailableResponse.RequestId = context.StringValue("CheckDBNameAvailable.RequestId");
return checkDBNameAvailableResponse;
}
}
}
| 37.05 | 99 | 0.765857 | [
"Apache-2.0"
] | bbs168/aliyun-openapi-net-sdk | aliyun-net-sdk-rds/Rds/Transform/V20140815/CheckDBNameAvailableResponseUnmarshaller.cs | 1,482 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Threading;
namespace Charlotte.Tools
{
public static class FileTools
{
public static void Delete(string path)
{
if (File.Exists(path))
{
for (int c = 1; ; c++)
{
try
{
File.Delete(path);
}
catch (Exception e)
{
Console.WriteLine("ファイル " + path + " の削除に失敗しました。リトライします。" + e.Message);
}
if (File.Exists(path) == false)
break;
if (10 < c)
throw new Exception("ファイル " + path + " の削除に失敗しました。");
Thread.Sleep(c * 100);
Console.WriteLine("ファイル " + path + " の削除をリトライします。");
}
}
else if (Directory.Exists(path))
{
for (int c = 1; ; c++)
{
try
{
Directory.Delete(path, true);
}
catch (Exception e)
{
Console.WriteLine("ディレクトリ " + path + " の削除に失敗しました。リトライします。" + e.Message);
}
if (Directory.Exists(path) == false)
break;
if (10 < c)
throw new Exception("ディレクトリ " + path + " の削除に失敗しました。");
Thread.Sleep(c * 100);
Console.WriteLine("ディレクトリ " + path + " の削除をリトライします。");
}
}
}
public static void CreateDir(string dir)
{
for (int c = 1; ; c++)
{
try
{
Directory.CreateDirectory(dir); // dirが存在するときは何もしない。
}
catch (Exception e)
{
Console.WriteLine("ディレクトリ " + dir + " の作成に失敗しました。リトライします。" + e.Message);
}
if (Directory.Exists(dir))
break;
if (10 < c)
throw new Exception("ディレクトリ " + dir + " を作成出来ません。");
Thread.Sleep(c * 100);
Console.WriteLine("ディレクトリ " + dir + " の作成をリトライします。");
}
}
public static void CleanupDir(string dir)
{
foreach (Func<IEnumerable<string>> getPaths in new Func<IEnumerable<string>>[]
{
() => Directory.EnumerateFiles(dir),
() => Directory.EnumerateDirectories(dir),
})
{
foreach (string path in getPaths())
{
Delete(path);
}
}
}
}
}
| 20.060606 | 81 | 0.562941 | [
"MIT"
] | stackprobe/Annex | Junk/ProjectTemplate/CSLauncher/Programs/00_Common/Common/Tools/FileTools.cs | 2,360 | C# |
using DragonSpark.Compose;
using DragonSpark.Model.Results;
using Microsoft.AspNetCore.SignalR.Client;
using System;
namespace DragonSpark.Application.Connections;
public class ClientConnection : Result<HubConnection>
{
protected ClientConnection(IHubConnections connections, Uri location)
: base(connections.Then().Bind(location)) {}
} | 28.5 | 70 | 0.818713 | [
"MIT"
] | DragonSpark/Framework | DragonSpark.Application/Connections/ClientConnection.cs | 344 | C# |
using System.Collections;
using System.Collections.Generic;
public class pt_cart_escort_succ_d616 : st.net.NetBase.Pt {
public pt_cart_escort_succ_d616()
{
Id = 0xD616;
}
public override st.net.NetBase.Pt createNew()
{
return new pt_cart_escort_succ_d616();
}
public override void fromBinary(byte[] binary)
{
reader = new st.net.NetBase.ByteReader(binary);
}
public override byte[] toBinary()
{
writer = new st.net.NetBase.ByteWriter();
return writer.data;
}
}
| 19.44 | 59 | 0.73251 | [
"BSD-3-Clause"
] | cheng219/tianyu | Assets/Protocol/pt_cart_escort_succ_d616.cs | 486 | C# |
using System;
namespace GetServerStorageInfo
{
class Program
{
//static string MyIPAddress = "192.168.1.111";
static void Main(string[] args)
{
try
{
Console.Write("Please enter valid server IP address: ");
var readServerIPAddress = Console.ReadLine();
if (Helper.IsIPv4(readServerIPAddress))
{
if (Helper.GetServerPingStatus(readServerIPAddress) == "Success")
{
Helper.GetDriveInfo(readServerIPAddress);
}
else Console.Write("Server is down or not accessable!");
}
else Console.Write("Invalid IP address");
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
Console.ReadLine();
}
}
}
| 27.647059 | 85 | 0.474468 | [
"MIT"
] | shahedbd/ServerStorageDetails | Sln.GetServerStorageInfo/GetServerStorageInfo/Program.cs | 942 | C# |
using System;
namespace Talkinator.UWP.Services
{
public class OnBackgroundEnteringEventArgs : EventArgs
{
public SuspensionState SuspensionState { get; set; }
public Type Target { get; private set; }
public OnBackgroundEnteringEventArgs(SuspensionState suspensionState, Type target)
{
SuspensionState = suspensionState;
Target = target;
}
}
}
| 23.555556 | 90 | 0.65566 | [
"MIT"
] | ikarago/Talkinator | Talkinator/Talkinator.UWP/Services/OnBackgroundEnteringEventArgs.cs | 426 | C# |
/*
* Copyright 2010-2014 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 gamelift-2015-10-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.GameLift.Model
{
/// <summary>
/// Represents the returned data in response to a request action.
/// </summary>
public partial class DescribeGameSessionQueuesResponse : AmazonWebServiceResponse
{
private List<GameSessionQueue> _gameSessionQueues = new List<GameSessionQueue>();
private string _nextToken;
/// <summary>
/// Gets and sets the property GameSessionQueues.
/// <para>
/// Collection of objects that describes the requested game session queues.
/// </para>
/// </summary>
public List<GameSessionQueue> GameSessionQueues
{
get { return this._gameSessionQueues; }
set { this._gameSessionQueues = value; }
}
// Check to see if GameSessionQueues property is set
internal bool IsSetGameSessionQueues()
{
return this._gameSessionQueues != null && this._gameSessionQueues.Count > 0;
}
/// <summary>
/// Gets and sets the property NextToken.
/// <para>
/// Token that indicates where to resume retrieving results on the next call to this action.
/// If no token is returned, these results represent the end of the list.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=1024)]
public string NextToken
{
get { return this._nextToken; }
set { this._nextToken = value; }
}
// Check to see if NextToken property is set
internal bool IsSetNextToken()
{
return this._nextToken != null;
}
}
} | 32.779221 | 106 | 0.643819 | [
"Apache-2.0"
] | FoxBearBear/aws-sdk-net | sdk/src/Services/GameLift/Generated/Model/DescribeGameSessionQueuesResponse.cs | 2,524 | C# |
//-----------------------------------------------------------------------------
// Filename: SIPConstants.cs
//
// Description: SIP constants.
//
// Author(s):
// Aaron Clauson (aaron@sipsorcery.com)
//
// History:
// 17 Sep 2005 Aaron Clauson Created, Hobart, Australia.
//
// License:
// BSD 3-Clause "New" or "Revised" License, see included LICENSE.md file.
//-----------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Reflection;
using SIPSorcery.Sys;
namespace SIPSorcery.SIP
{
public static class SIPConstants
{
public const string CRLF = "\r\n";
public const string SIP_VERSION_STRING = "SIP";
public const int SIP_MAJOR_VERSION = 2;
public const int SIP_MINOR_VERSION = 0;
public const string SIP_FULLVERSION_STRING = "SIP/2.0";
public const int NONCE_TIMEOUT_MINUTES = 5; // Length of time an issued nonce is valid for.
/// <summary>
/// The maximum size supported for an incoming SIP message.
/// </summary>
/// <remarks>
/// From https://tools.ietf.org/html/rfc3261#section-18.1.1:
/// However, implementations MUST be able to handle messages up to the maximum
/// datagram packet size.For UDP, this size is 65,535 bytes, including
/// IP and UDP headers.
/// </remarks>
public const int SIP_MAXIMUM_RECEIVE_LENGTH = 65535;
public const string SIP_REQUEST_REGEX = @"^\w+ .* SIP/.*"; // bnf: Request-Line = Method SP Request-URI SP SIP-Version CRLF
public const string SIP_RESPONSE_REGEX = @"^SIP/.* \d{3}"; // bnf: Status-Line = SIP-Version SP Status-Code SP Reason-Phrase CRLF
public const string SIP_BRANCH_MAGICCOOKIE = "z9hG4bK";
public const string SIP_DEFAULT_USERNAME = "Anonymous";
public const string SIP_DEFAULT_FROMURI = "sip:thisis@anonymous.invalid";
public const string SIP_REGISTER_REMOVEALL = "*"; // The value in a REGISTER request id a UA wishes to remove all REGISTER bindings.
public const string SIP_LOOSEROUTER_PARAMETER = "lr";
public const string SIP_REMOTEHANGUP_CAUSE = "remote end hungup";
public const char HEADER_DELIMITER_CHAR = ':';
public const int DEFAULT_MAX_FORWARDS = 70;
public const int DEFAULT_REGISTEREXPIRY_SECONDS = 600;
public const ushort DEFAULT_SIP_PORT = 5060;
public const ushort DEFAULT_SIP_TLS_PORT = 5061;
public const ushort DEFAULT_SIP_WEBSOCKET_PORT = 80;
public const ushort DEFAULT_SIPS_WEBSOCKET_PORT = 443;
public const string ALLOWED_SIP_METHODS = "ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, PRACK, REFER, REGISTER, SUBSCRIBE";
private static string _userAgentVersion;
public static string SIP_USERAGENT_STRING
{
get
{
if (_userAgentVersion == null)
{
_userAgentVersion = $"sipsorcery_v{Assembly.GetExecutingAssembly().GetName().Version}";
}
return _userAgentVersion;
}
}
/// <summary>
/// Gets the default SIP port for the protocol.
/// </summary>
/// <param name="protocol">The transport layer protocol to get the port for.</param>
/// <returns>The default port to use.</returns>
public static int GetDefaultPort(SIPProtocolsEnum protocol)
{
switch (protocol)
{
case SIPProtocolsEnum.udp:
return SIPConstants.DEFAULT_SIP_PORT;
case SIPProtocolsEnum.tcp:
return SIPConstants.DEFAULT_SIP_PORT;
case SIPProtocolsEnum.tls:
return SIPConstants.DEFAULT_SIP_TLS_PORT;
case SIPProtocolsEnum.ws:
return SIPConstants.DEFAULT_SIP_WEBSOCKET_PORT;
case SIPProtocolsEnum.wss:
return SIPConstants.DEFAULT_SIPS_WEBSOCKET_PORT;
default:
throw new ApplicationException($"Protocol {protocol} was not recognised in GetDefaultPort.");
}
}
}
public enum SIPMessageTypesEnum
{
Unknown = 0,
Request = 1,
Response = 2,
}
public static class SIPTimings
{
/// <summary>
/// Value of the SIP defined timer T1 in milliseconds and is the time for the first retransmit.
/// Should not need to be adjusted in normal circumstances.
/// </summary>
public static int T1 = 500;
/// <summary>
/// Value of the SIP defined timer T2 in milliseconds and is the maximum time between retransmits.
/// Should not need to be adjusted in normal circumstances.
/// </summary>
public static int T2 = 4000;
/// <summary>
/// Value of the SIP defined timer T6 in milliseconds and is the period after which a transaction
/// has timed out. Should not need to be adjusted in normal circumstances.
/// </summary>
public static int T6 = 64 * T1;
/// <summary>
/// The number of milliseconds a transaction can stay in the proceeding state
/// (i.e. an INVITE will ring for) before the call is given up and timed out.
/// </summary>
public static int MAX_RING_TIME = 180000;
}
public enum SIPSchemesEnum
{
sip = 1,
sips = 2,
tel = 3,
}
public static class SIPSchemesType
{
public static SIPSchemesEnum GetSchemeType(string schemeType)
{
return (SIPSchemesEnum)Enum.Parse(typeof(SIPSchemesEnum), schemeType, true);
}
public static bool IsAllowedScheme(string schemeType)
{
try
{
Enum.Parse(typeof(SIPSchemesEnum), schemeType, true);
return true;
}
catch
{
return false;
}
}
}
/// <summary>
/// A list of the transport layer protocols that are supported (the network layers
/// supported are IPv4 and IPv6).
/// </summary>
public enum SIPProtocolsEnum
{
/// <summary>
/// User Datagram Protocol.
/// </summary>
udp = 1,
/// <summary>.
/// Transmission Control Protocol
/// </summary>
tcp = 2,
/// <summary>
/// Transport Layer Security.
/// </summary>
tls = 3,
/// <summary>
/// Web Socket.
/// </summary>
ws = 4,
/// <summary>
/// Web Socket over TLS.
/// </summary>
wss = 5,
}
public static class SIPProtocolsType
{
public static SIPProtocolsEnum GetProtocolType(string protocolType)
{
return (SIPProtocolsEnum)Enum.Parse(typeof(SIPProtocolsEnum), protocolType, true);
}
public static SIPProtocolsEnum GetProtocolTypeFromId(int protocolTypeId)
{
return (SIPProtocolsEnum)Enum.Parse(typeof(SIPProtocolsEnum), protocolTypeId.ToString(), true);
}
public static bool IsAllowedProtocol(string protocol)
{
try
{
Enum.Parse(typeof(SIPProtocolsEnum), protocol, true);
return true;
}
catch
{
return false;
}
}
/// <summary>
/// Returns true for connectionless transport protocols, such as UDP, and false for
/// connection oriented protocols.
/// </summary>
/// <param name="protocol">The protocol to check.</param>
/// <returns>True if the protocol is connectionless.</returns>
public static bool IsConnectionless(SIPProtocolsEnum protocol)
{
if(protocol == SIPProtocolsEnum.udp)
{
return true;
}
else
{
return false;
}
}
}
public static class SIPHeaders
{
// SIP Header Keys.
public const string SIP_HEADER_ACCEPT = "Accept";
public const string SIP_HEADER_ACCEPTENCODING = "Accept-Encoding";
public const string SIP_HEADER_ACCEPTLANGUAGE = "Accept-Language";
public const string SIP_HEADER_ALERTINFO = "Alert-Info";
public const string SIP_HEADER_ALLOW = "Allow";
public const string SIP_HEADER_ALLOW_EVENTS = "Allow-Events"; // RC3265 (SIP Events).
public const string SIP_HEADER_AUTHENTICATIONINFO = "Authentication-Info";
public const string SIP_HEADER_AUTHORIZATION = "Authorization";
public const string SIP_HEADER_CALLID = "Call-ID";
public const string SIP_HEADER_CALLINFO = "Call-Info";
public const string SIP_HEADER_CONTACT = "Contact";
public const string SIP_HEADER_CONTENT_DISPOSITION = "Content-Disposition";
public const string SIP_HEADER_CONTENT_ENCODING = "Content-Encoding";
public const string SIP_HEADER_CONTENT_LANGUAGE = "Content-Language";
public const string SIP_HEADER_CONTENTLENGTH = "Content-Length";
public const string SIP_HEADER_CONTENTTYPE = "Content-Type";
public const string SIP_HEADER_CSEQ = "CSeq";
public const string SIP_HEADER_DATE = "Date";
public const string SIP_HEADER_ERROR_INFO = "Error-Info";
public const string SIP_HEADER_EVENT = "Event"; // RC3265 (SIP Events).
public const string SIP_HEADER_ETAG = "SIP-ETag"; // RFC3903
public const string SIP_HEADER_EXPIRES = "Expires";
public const string SIP_HEADER_FROM = "From";
public const string SIP_HEADER_IN_REPLY_TO = "In-Reply-To";
public const string SIP_HEADER_MAXFORWARDS = "Max-Forwards";
public const string SIP_HEADER_MINEXPIRES = "Min-Expires";
public const string SIP_HEADER_MIME_VERSION = "MIME-Version";
public const string SIP_HEADER_ORGANIZATION = "Organization";
public const string SIP_HEADER_PRIORITY = "Priority";
public const string SIP_HEADER_PROXYAUTHENTICATION = "Proxy-Authenticate";
public const string SIP_HEADER_PROXYAUTHORIZATION = "Proxy-Authorization";
public const string SIP_HEADER_PROXY_REQUIRE = "Proxy-Require";
public const string SIP_HEADER_RELIABLE_ACK = "RAck"; // RFC 3262 "The RAck header is sent in a PRACK request to support reliability of provisional responses."
public const string SIP_HEADER_REASON = "Reason";
public const string SIP_HEADER_RECORDROUTE = "Record-Route";
public const string SIP_HEADER_REFERREDBY = "Referred-By"; // RFC 3515 "The Session Initiation Protocol (SIP) Refer Method".
public const string SIP_HEADER_REFERSUB = "Refer-Sub"; // RFC 4488 Used to stop the implicit SIP event subscription on a REFER request.
public const string SIP_HEADER_REFERTO = "Refer-To"; // RFC 3515 "The Session Initiation Protocol (SIP) Refer Method".
public const string SIP_HEADER_REPLY_TO = "Reply-To";
public const string SIP_HEADER_REPLACES = "Replaces";
public const string SIP_HEADER_REQUIRE = "Require";
public const string SIP_HEADER_RETRY_AFTER = "Retry-After";
public const string SIP_HEADER_RELIABLE_SEQ = "RSeq"; // RFC 3262 "The RSeq header is used in provisional responses in order to transmit them reliably."
public const string SIP_HEADER_ROUTE = "Route";
public const string SIP_HEADER_SERVER = "Server";
public const string SIP_HEADER_SUBJECT = "Subject";
public const string SIP_HEADER_SUBSCRIPTION_STATE = "Subscription-State"; // RC3265 (SIP Events).
public const string SIP_HEADER_SUPPORTED = "Supported";
public const string SIP_HEADER_TIMESTAMP = "Timestamp";
public const string SIP_HEADER_TO = "To";
public const string SIP_HEADER_UNSUPPORTED = "Unsupported";
public const string SIP_HEADER_USERAGENT = "User-Agent";
public const string SIP_HEADER_VIA = "Via";
public const string SIP_HEADER_WARNING = "Warning";
public const string SIP_HEADER_WWWAUTHENTICATE = "WWW-Authenticate";
// SIP Compact Header Keys.
public const string SIP_COMPACTHEADER_ALLOWEVENTS = "u"; // RC3265 (SIP Events).
public const string SIP_COMPACTHEADER_CALLID = "i";
public const string SIP_COMPACTHEADER_CONTACT = "m";
public const string SIP_COMPACTHEADER_CONTENTLENGTH = "l";
public const string SIP_COMPACTHEADER_CONTENTTYPE = "c";
public const string SIP_COMPACTHEADER_EVENT = "o"; // RC3265 (SIP Events).
public const string SIP_COMPACTHEADER_FROM = "f";
public const string SIP_COMPACTHEADER_REFERTO = "r"; // RFC 3515 "The Session Initiation Protocol (SIP) Refer Method".
public const string SIP_COMPACTHEADER_SUBJECT = "s";
public const string SIP_COMPACTHEADER_SUPPORTED = "k";
public const string SIP_COMPACTHEADER_TO = "t";
public const string SIP_COMPACTHEADER_VIA = "v";
// Custom SIP headers to allow proxy to communicate network info to internal servers.
public const string SIP_HEADER_PROXY_RECEIVEDON = "Proxy-ReceivedOn";
public const string SIP_HEADER_PROXY_RECEIVEDFROM = "Proxy-ReceivedFrom";
public const string SIP_HEADER_PROXY_SENDFROM = "Proxy-SendFrom";
}
public static class SIPHeaderAncillary
{
// Header parameters used in the core SIP protocol.
public const string SIP_HEADERANC_TAG = "tag";
public const string SIP_HEADERANC_BRANCH = "branch";
public const string SIP_HEADERANC_RECEIVED = "received";
public const string SIP_HEADERANC_TRANSPORT = "transport";
public const string SIP_HEADERANC_MADDR = "maddr";
// Via header parameter, documented in RFC 3581 "An Extension to the Session Initiation Protocol (SIP)
// for Symmetric Response Routing".
public const string SIP_HEADERANC_RPORT = "rport";
// SIP header parameter from RFC 3515 "The Session Initiation Protocol (SIP) Refer Method".
public const string SIP_REFER_REPLACES = "Replaces";
}
/// <summary>
/// Authorization Headers
/// </summary>
public static class AuthHeaders
{
public const string AUTH_DIGEST_KEY = "Digest";
public const string AUTH_REALM_KEY = "realm";
public const string AUTH_NONCE_KEY = "nonce";
public const string AUTH_USERNAME_KEY = "username";
public const string AUTH_RESPONSE_KEY = "response";
public const string AUTH_URI_KEY = "uri";
public const string AUTH_ALGORITHM_KEY = "algorithm";
public const string AUTH_CNONCE_KEY = "cnonce";
public const string AUTH_NONCECOUNT_KEY = "nc";
public const string AUTH_QOP_KEY = "qop";
public const string AUTH_OPAQUE_KEY = "opaque";
}
/// <summary>
/// A list of the different SIP request methods that are supported.
/// </summary>
public enum SIPMethodsEnum
{
NONE = 0,
UNKNOWN = 1,
// Core.
REGISTER = 2,
INVITE = 3,
BYE = 4,
ACK = 5,
CANCEL = 6,
OPTIONS = 7,
INFO = 8, // RFC2976.
NOTIFY = 9, // RFC3265.
SUBSCRIBE = 10, // RFC3265.
PUBLISH = 11, // RFC3903.
PING = 13,
REFER = 14, // RFC3515 "The Session Initiation Protocol (SIP) Refer Method"
MESSAGE = 15, // RFC3428.
PRACK = 16, // RFC3262.
UPDATE = 17, // RFC3311.
}
public static class SIPMethods
{
public static SIPMethodsEnum GetMethod(string method)
{
SIPMethodsEnum sipMethod = SIPMethodsEnum.UNKNOWN;
try
{
sipMethod = (SIPMethodsEnum)Enum.Parse(typeof(SIPMethodsEnum), method, true);
}
catch { }
return sipMethod;
}
}
public enum SIPResponseStatusCodesEnum
{
None = 0,
// Informational
Trying = 100,
Ringing = 180,
CallIsBeingForwarded = 181,
Queued = 182,
SessionProgress = 183,
// Success
Ok = 200,
Accepted = 202, // RC3265 (SIP Events).
NoNotification = 204,
// Redirection
MultipleChoices = 300,
MovedPermanently = 301,
MovedTemporarily = 302,
AlternativeService = 304,
UseProxy = 305,
// Client-Error
BadRequest = 400,
Unauthorised = 401,
PaymentRequired = 402,
Forbidden = 403,
NotFound = 404,
MethodNotAllowed = 405,
NotAcceptable = 406,
ProxyAuthenticationRequired = 407,
RequestTimeout = 408,
Gone = 410,
ConditionalRequestFailed = 412,
RequestEntityTooLarge = 413,
RequestURITooLong = 414,
UnsupportedMediaType = 415,
UnsupportedURIScheme = 416,
UnknownResourcePriority = 417,
BadExtension = 420,
ExtensionRequired = 421,
SessionIntervalTooSmall = 422,
IntervalTooBrief = 423,
UseIdentityHeader = 428,
ProvideReferrerIdentity = 429,
FlowFailed = 430,
AnonymityDisallowed = 433,
BadIdentityInfo = 436,
UnsupportedCertificate = 437,
InvalidIdentityHeader = 438,
FirstHopLacksOutboundSupport = 439,
MaxBreadthExceeded = 440,
ConsentNeeded = 470,
TemporarilyUnavailable = 480,
CallLegTransactionDoesNotExist = 481,
LoopDetected = 482,
TooManyHops = 483,
AddressIncomplete = 484,
Ambiguous = 485,
BusyHere = 486,
RequestTerminated = 487,
NotAcceptableHere = 488,
BadEvent = 489, // RC3265 (SIP Events).
RequestPending = 491,
Undecipherable = 493,
// Server Failure.
InternalServerError = 500,
NotImplemented = 501,
BadGateway = 502,
ServiceUnavailable = 503,
ServerTimeout = 504,
SIPVersionNotSupported = 505,
MessageTooLarge = 513,
PreconditionFailure = 580,
// Global Failures.
BusyEverywhere = 600,
Decline = 603,
DoesNotExistAnywhere = 604,
NotAcceptableAnywhere = 606,
}
public static class SIPResponseStatusCodes
{
public static SIPResponseStatusCodesEnum GetStatusTypeForCode(int statusCode)
{
return (SIPResponseStatusCodesEnum)Enum.Parse(typeof(SIPResponseStatusCodesEnum), statusCode.ToString(), true);
}
}
public enum SIPUserAgentRoles
{
Unknown = 0,
Client = 1, // UAC.
Server = 2, // UAS.
}
public static class SIPMIMETypes
{
public const string DIALOG_INFO_CONTENT_TYPE = "application/dialog-info+xml"; // RFC4235 INVITE dialog event package.
public const string MWI_CONTENT_TYPE = "application/simple-message-summary"; // RFC3842 MWI event package.
public const string REFER_CONTENT_TYPE = "message/sipfrag"; // RFC3515 REFER event package.
public const string MWI_TEXT_TYPE = "text/text";
public const string PRESENCE_NOTIFY_CONTENT_TYPE = "application/pidf+xml"; // RFC3856 presence event package.
}
/// <summary>
/// For SIP URI user portion the reserved characters below need to be escaped.
///
/// <code>
/// <![CDATA[
/// reserved = ";" / "/" / "?" / ":" / "@" / "&" / "=" / "+" / "$" / ","
/// user-unreserved = "&" / "=" / "+" / "$" / "," / ";" / "?" / "/"
/// Leaving to be escaped = ":" / "@"
/// ]]>
/// </code>
///
/// For SIP URI parameters different characters are unreserved (just to make life difficult).
/// <code>
/// <![CDATA[
/// reserved = ";" / "/" / "?" / ":" / "@" / "&" / "=" / "+" / "$" / ","
/// param-unreserved = "[" / "]" / "/" / ":" / "&" / "+" / "$"
/// Leaving to be escaped = ";" / "?" / "@" / "=" / ","
/// ]]>
/// </code>
/// </summary>
public static class SIPEscape
{
public static string SIPURIUserEscape(string unescapedString)
{
string result = unescapedString;
if (!result.IsNullOrBlank())
{
result = result.Replace(":", "%3A");
result = result.Replace("@", "%40");
result = result.Replace(" ", "%20");
}
return result;
}
public static string SIPURIUserUnescape(string escapedString)
{
string result = escapedString;
if (!result.IsNullOrBlank())
{
result = result.Replace("%3A", ":");
result = result.Replace("%3a", ":");
result = result.Replace("%20", " ");
}
return result;
}
public static string SIPURIParameterEscape(string unescapedString)
{
string result = unescapedString;
if (!result.IsNullOrBlank())
{
result = result.Replace(";", "%3B");
result = result.Replace("?", "%3F");
result = result.Replace("@", "%40");
result = result.Replace("=", "%3D");
result = result.Replace(",", "%2C");
result = result.Replace(" ", "%20");
}
return result;
}
public static string SIPURIParameterUnescape(string escapedString)
{
string result = escapedString;
if (!result.IsNullOrBlank())
{
result = result.Replace("%3B", ";");
result = result.Replace("%3b", ";");
//result = result.Replace("%2F", "/");
//result = result.Replace("%2f", "/");
result = result.Replace("%3F", "?");
result = result.Replace("%3f", "?");
//result = result.Replace("%3A", ":");
//result = result.Replace("%3a", ":");
result = result.Replace("%40", "@");
//result = result.Replace("%26", "&");
result = result.Replace("%3D", "=");
result = result.Replace("%3d", "=");
//result = result.Replace("%2B", "+");
//result = result.Replace("%2b", "+");
//result = result.Replace("%24", "$");
result = result.Replace("%2C", ",");
result = result.Replace("%2c", ",");
result = result.Replace("%20", " ");
}
return result;
}
}
///<summary>
/// List of SIP extensions to RFC3262.
/// </summary>
public enum SIPExtensions
{
None = 0,
Prack = 1, // Reliable provisional responses as per RFC3262.
NoReferSub = 2, // No subscription for REFERs as per RFC4488.
Replaces = 3,
SipRec = 4,
}
/// <summary>
/// Constants that can be placed in the SIP Supported or Required headers to indicate support or mandate for
/// a particular SIP extension.
/// </summary>
public static class SIPExtensionHeaders
{
public const string PRACK = "100rel";
public const string NO_REFER_SUB = "norefersub";
public const string REPLACES = "replaces";
public const string SIPREC = "siprec";
/// <summary>
/// Parses a string containing a list of SIP extensions into a list of extensions that this library
/// understands.
/// </summary>
/// <param name="extensionList">The string containing the list of extensions to parse.</param>
/// <param name="unknownExtensions">A comma separated list of the unsupported extensions.</param>
/// <returns>A list of extensions that were understood and a boolean indicating whether any unknown extensions were present.</returns>
public static List<SIPExtensions> ParseSIPExtensions(string extensionList, out string unknownExtensions)
{
List<SIPExtensions> knownExtensions = new List<SIPExtensions>();
unknownExtensions = null;
if (String.IsNullOrEmpty(extensionList) == false)
{
string[] extensions = extensionList.Trim().Split(',');
foreach (string extension in extensions)
{
if (String.IsNullOrEmpty(extension) == false)
{
if (extension.Trim().ToLower() == PRACK)
{
knownExtensions.Add(SIPExtensions.Prack);
}
else if (extension.Trim().ToLower() == NO_REFER_SUB)
{
knownExtensions.Add(SIPExtensions.NoReferSub);
}
else if (extension.Trim().ToLower() == REPLACES)
{
knownExtensions.Add(SIPExtensions.Replaces);
}
else if (extension.Trim().ToLower() == SIPREC)
{
knownExtensions.Add(SIPExtensions.SipRec);
}
else
{
unknownExtensions += (unknownExtensions != null) ? $",{extension.Trim()}" : extension.Trim();
}
}
}
}
return knownExtensions;
}
}
} | 40.582451 | 190 | 0.558919 | [
"Apache-2.0"
] | grishinrv/sipsorcery | src/core/SIP/SIPConstants.cs | 26,825 | C# |
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Buildalyzer;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.Emit;
using Microsoft.Extensions.Logging;
using Stryker.Core.Exceptions;
using Stryker.Core.Initialisation.Buildalyzer;
using Stryker.Core.Logging;
using Stryker.Core.MutationTest;
namespace Stryker.Core.Compiling
{
public interface ICompilingProcess
{
CompilingProcessResult Compile(IEnumerable<SyntaxTree> syntaxTrees, Stream ilStream, Stream symbolStream, bool devMode);
}
/// <summary>
/// This process is in control of compiling the assembly and rolling back mutations that cannot compile
/// Compiles the given input onto the memory stream
public class CsharpCompilingProcess : ICompilingProcess
{
private readonly MutationTestInput _input;
private readonly IRollbackProcess _rollbackProcess;
private readonly ILogger _logger;
public CsharpCompilingProcess(MutationTestInput input,
IRollbackProcess rollbackProcess)
{
_input = input;
_rollbackProcess = rollbackProcess;
_logger = ApplicationLogging.LoggerFactory.CreateLogger<CsharpCompilingProcess>();
}
private string AssemblyName =>
_input.ProjectInfo.ProjectUnderTestAnalyzerResult.GetAssemblyName();
/// <summary>
/// Compiles the given input onto the memory stream
/// The compiling process is closely related to the rollback process. When the initial compilation fails, the rollback process will be executed.
/// <param name="syntaxTrees">The syntax trees to compile</param>
/// <param name="ilStream">The memory stream to store the compilation result onto</param>
/// <param name="symbolStream">The memory stream to store the debug symbol</param>
/// <param name="devMode">set to true to activate devmode (provides more information in case of internal failure)</param>
/// </summary>
public CompilingProcessResult Compile(IEnumerable<SyntaxTree> syntaxTrees, Stream ilStream, Stream symbolStream, bool devMode)
{
var analyzerResult = _input.ProjectInfo.ProjectUnderTestAnalyzerResult;
var trees = syntaxTrees.ToList();
var compilationOptions = analyzerResult.GetCompilationOptions();
var compilation = CSharpCompilation.Create(AssemblyName,
syntaxTrees: trees,
options: compilationOptions,
references: _input.AssemblyReferences);
RollbackProcessResult rollbackProcessResult;
// C# source generators must be executed before compilation
compilation = RunSourceGenerators(analyzerResult, compilation);
// first try compiling
EmitResult emitResult;
var retryCount = 1;
(rollbackProcessResult, emitResult, retryCount) = TryCompilation(ilStream, symbolStream, compilation, null, false, devMode, retryCount);
// If compiling failed and the error has no location, log and throw exception.
if (!emitResult.Success && emitResult.Diagnostics.Any(diagnostic => diagnostic.Location == Location.None && diagnostic.Severity == DiagnosticSeverity.Error))
{
_logger.LogError("Failed to build the mutated assembly due to unrecoverable error: {0}",
emitResult.Diagnostics.First(diagnostic => diagnostic.Location == Location.None && diagnostic.Severity == DiagnosticSeverity.Error));
throw new CompilationException("General Build Failure detected.");
}
const int maxAttempt = 50;
for (var count = 1; !emitResult.Success && count < maxAttempt; count++)
{
// compilation did not succeed. let's compile a couple times more for good measure
(rollbackProcessResult, emitResult, retryCount) = TryCompilation(ilStream, symbolStream, rollbackProcessResult?.Compilation ?? compilation, emitResult, retryCount == maxAttempt - 1, devMode, retryCount);
}
if (emitResult.Success)
{
return new CompilingProcessResult()
{
Success = emitResult.Success,
RollbackResult = rollbackProcessResult
};
}
// compiling failed
_logger.LogError("Failed to restore the project to a buildable state. Please report the issue. Stryker can not proceed further");
foreach (var emitResultDiagnostic in emitResult.Diagnostics)
{
_logger.LogWarning($"{emitResultDiagnostic}");
}
throw new CompilationException("Failed to restore build able state.");
}
private CSharpCompilation RunSourceGenerators(IAnalyzerResult analyzerResult, CSharpCompilation compilation)
{
var generators = analyzerResult.GetSourceGenerators(_logger);
_ = CSharpGeneratorDriver
.Create(generators)
.RunGeneratorsAndUpdateCompilation(compilation, out var outputCompilation, out var diagnostics);
var errors = diagnostics.Where(diagnostic => diagnostic.Severity == DiagnosticSeverity.Error && diagnostic.Location == Location.None);
if (errors.Any())
{
foreach (var diagnostic in errors)
{
_logger.LogError("Failed to generate source code for mutated assembly: {0}", diagnostic);
}
throw new CompilationException("Source Generator Failure");
}
return outputCompilation as CSharpCompilation;
}
private (RollbackProcessResult, EmitResult, int) TryCompilation(
Stream ms,
Stream symbolStream,
CSharpCompilation compilation,
EmitResult previousEmitResult,
bool lastAttempt,
bool devMode,
int retryCount)
{
RollbackProcessResult rollbackProcessResult = null;
if (previousEmitResult != null)
{
// remove broken mutations
rollbackProcessResult = _rollbackProcess.Start(compilation, previousEmitResult.Diagnostics, lastAttempt, devMode);
compilation = rollbackProcessResult.Compilation;
}
// reset the memoryStream
ms.SetLength(0);
symbolStream?.SetLength(0);
_logger.LogDebug($"Trying compilation for the {ReadableNumber(retryCount)} time.");
var emitOptions = symbolStream == null ? null : new EmitOptions(false, DebugInformationFormat.PortablePdb,
_input.ProjectInfo.ProjectUnderTestAnalyzerResult.GetSymbolFileName());
var emitResult = compilation.Emit(
ms,
symbolStream,
manifestResources: _input.ProjectInfo.ProjectUnderTestAnalyzerResult.GetResources(_logger),
win32Resources: compilation.CreateDefaultWin32Resources(
true, // Important!
false,
null,
null),
options: emitOptions);
LogEmitResult(emitResult);
return (rollbackProcessResult, emitResult, ++retryCount);
}
private void LogEmitResult(EmitResult result)
{
if (!result.Success)
{
_logger.LogDebug("Compilation failed");
foreach (var err in result.Diagnostics.Where(x => x.Severity is DiagnosticSeverity.Error))
{
_logger.LogDebug("{0}, {1}", err?.GetMessage() ?? "No message", err?.Location.SourceTree?.FilePath ?? "Unknown filepath");
}
}
else
{
_logger.LogDebug("Compilation successful");
}
}
private static string ReadableNumber(int number)
{
return number switch
{
1 => "first",
2 => "second",
3 => "third",
_ => (number + "th")
};
}
}
}
| 43.591623 | 219 | 0.624069 | [
"Apache-2.0"
] | AlexNDRmac/stryker-net | src/Stryker.Core/Stryker.Core/Compiling/CsharpCompilingProcess.cs | 8,326 | C# |
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using StudentsFirst.Api.Monolithic.Infrastructure;
#nullable disable
namespace StudentsFirst.Api.Monolithic.Data.Migrations
{
[DbContext(typeof(StudentsFirstContext))]
partial class StudentsFirstContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.1")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("StudentsFirst.Common.Models.Assignment", b =>
{
b.Property<string>("Id")
.HasColumnType("text");
b.Property<bool>("AllowsOverdueCompletions")
.HasColumnType("boolean");
b.Property<DateTime>("DueAt")
.HasColumnType("timestamp with time zone");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Assignment");
});
modelBuilder.Entity("StudentsFirst.Common.Models.AssignmentAttachment", b =>
{
b.Property<string>("Id")
.HasColumnType("text");
b.Property<string>("DownloadUrl")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.Property<string>("SubmissionId")
.IsRequired()
.HasColumnType("text");
b.Property<DateTime>("UploadedAt")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.HasIndex("SubmissionId");
b.ToTable("AssignmentAttachment");
});
modelBuilder.Entity("StudentsFirst.Common.Models.AssignmentResource", b =>
{
b.Property<string>("Id")
.HasColumnType("text");
b.Property<string>("AssignmentId")
.IsRequired()
.HasColumnType("text");
b.Property<string>("DownloadUrl")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("AssignmentId");
b.ToTable("AssignmentResource");
});
modelBuilder.Entity("StudentsFirst.Common.Models.AssignmentSubmission", b =>
{
b.Property<string>("Id")
.HasColumnType("text");
b.Property<string>("AssigneeId")
.IsRequired()
.HasColumnType("text");
b.Property<string>("AssignmentId")
.IsRequired()
.HasColumnType("text");
b.Property<bool>("Completed")
.HasColumnType("boolean");
b.Property<DateTime?>("CompletedAt")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.HasIndex("AssigneeId");
b.HasIndex("AssignmentId");
b.ToTable("AssignmentSubmission");
});
modelBuilder.Entity("StudentsFirst.Common.Models.Group", b =>
{
b.Property<string>("Id")
.HasColumnType("text");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Groups");
});
modelBuilder.Entity("StudentsFirst.Common.Models.User", b =>
{
b.Property<string>("Id")
.HasColumnType("text");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Role")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Users");
});
modelBuilder.Entity("StudentsFirst.Common.Models.UserGroupMembership", b =>
{
b.Property<string>("UserId")
.HasColumnType("text");
b.Property<string>("GroupId")
.HasColumnType("text");
b.HasKey("UserId", "GroupId");
b.HasIndex("GroupId");
b.ToTable("UserGroupMemberships");
});
modelBuilder.Entity("StudentsFirst.Common.Models.AssignmentAttachment", b =>
{
b.HasOne("StudentsFirst.Common.Models.AssignmentSubmission", null)
.WithMany("Attachments")
.HasForeignKey("SubmissionId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("StudentsFirst.Common.Models.AssignmentResource", b =>
{
b.HasOne("StudentsFirst.Common.Models.Assignment", null)
.WithMany("Resources")
.HasForeignKey("AssignmentId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("StudentsFirst.Common.Models.AssignmentSubmission", b =>
{
b.HasOne("StudentsFirst.Common.Models.User", null)
.WithMany()
.HasForeignKey("AssigneeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("StudentsFirst.Common.Models.Assignment", null)
.WithMany("Submissions")
.HasForeignKey("AssignmentId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("StudentsFirst.Common.Models.UserGroupMembership", b =>
{
b.HasOne("StudentsFirst.Common.Models.Group", null)
.WithMany()
.HasForeignKey("GroupId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("StudentsFirst.Common.Models.User", null)
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("StudentsFirst.Common.Models.Assignment", b =>
{
b.Navigation("Resources");
b.Navigation("Submissions");
});
modelBuilder.Entity("StudentsFirst.Common.Models.AssignmentSubmission", b =>
{
b.Navigation("Attachments");
});
#pragma warning restore 612, 618
}
}
}
| 35.653846 | 89 | 0.444564 | [
"MIT"
] | saraetx/studentsfirst | StudentsFirst.Api.Monolithic/Data/Migrations/StudentsFirstContextModelSnapshot.cs | 8,345 | C# |
using System;
namespace J2N.IO
{
/// <summary>
/// A <see cref="BufferOverflowException"/> is thrown when elements are written
/// to a buffer but there is not enough remaining space in the buffer.
/// </summary>
// It is no longer good practice to use binary serialization.
// See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
#if FEATURE_SERIALIZABLE_EXCEPTIONS
[Serializable]
#endif
public sealed class BufferOverflowException : Exception
{
/// <summary>
/// Initializes a new instance of <see cref="BufferOverflowException"/>.
/// </summary>
public BufferOverflowException()
{ }
/// <summary>
/// Initializes a new instance of <see cref="BufferOverflowException"/>
/// with the specified <paramref name="message"/>.
/// </summary>
/// <param name="message">The message that describes the error.</param>
public BufferOverflowException(string message) : base(message)
{ }
/// <summary>
/// Initializes a new instance of <see cref="BufferOverflowException"/>
/// with a specified error message and a reference to the inner exception
/// that is the cause of this exception.
/// </summary>
/// <param name="message">The message that describes the error.</param>
/// <param name="innerException">The exception that is the cause of the current exception, or a null reference
/// (<c>Nothing</c> in Visual Basic) if no inner exception is specified.</param>
public BufferOverflowException(string message, Exception innerException) : base(message, innerException)
{ }
#if FEATURE_SERIALIZABLE_EXCEPTIONS
/// <summary>
/// Initializes a new instance of this class with serialized data.
/// </summary>
/// <param name="info">The <see cref="System.Runtime.Serialization.SerializationInfo"/> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="System.Runtime.Serialization.StreamingContext"/> that contains contextual information about the source or destination.</param>
private BufferOverflowException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{ }
#endif
}
}
| 45.698113 | 175 | 0.66763 | [
"Apache-2.0"
] | introfog/J2N | src/J2N/IO/BufferOverflowException.cs | 2,424 | C# |
using System;
namespace Spdy.AspNetCore.IntegrationTests.TestFramework.Helpers
{
internal class DisposableAction : IDisposable
{
private readonly Action _dispose;
public DisposableAction(Action dispose)
{
_dispose = dispose;
}
public void Dispose()
{
_dispose();
}
}
} | 19.157895 | 64 | 0.587912 | [
"MIT"
] | Fresa/Spdy.AspNetCore | tests/Spdy.AspNetCore.IntegrationTests/TestFramework/Helpers/DisposableAction.cs | 366 | C# |
using System.Text;
using UnityEngine;
using UnityEditor;
namespace Adic.Extenstions.BindingsPrinter {
/// <summary>
/// Prints bindings from containers in the current scene.
/// </summary>
public class BindingsPrinterWindow : EditorWindow {
/// <summary>Window margin value.</summary>
private const float WINDOW_MARGIN = 10.0f;
/// <summary>Current editor.</summary>
private static BindingsPrinterWindow editor;
/// <summary>Current scroll positioning.</summary>
private Vector2 scrollPosition = Vector2.zero;
[MenuItem("Window/Adic/Bindings Printer")]
protected static void Init() {
editor = EditorWindow.GetWindow<BindingsPrinterWindow>("Bindings Printer", typeof(SceneView));
}
protected void OnGUI() {
if (!editor) {
editor = (BindingsPrinterWindow) EditorWindow.GetWindow<BindingsPrinterWindow>();
}
if (!Application.isPlaying) {
GUILayout.FlexibleSpace();
GUILayout.Label("Please execute the bindings printer on Play Mode", EditorStyles.message);
GUILayout.FlexibleSpace();
return;
}
if (ContextRoot.containersData == null || ContextRoot.containersData.Count == 0) {
GUILayout.FlexibleSpace();
GUILayout.Label("There are no containers in the current scene", EditorStyles.message);
GUILayout.FlexibleSpace();
return;
}
// Add window margin.
GUILayout.BeginHorizontal();
GUILayout.Space(WINDOW_MARGIN);
GUILayout.BeginVertical();
this.scrollPosition = GUILayout.BeginScrollView(this.scrollPosition);
GUILayout.Space(WINDOW_MARGIN);
GUILayout.Label("Adic Bindings Printer", EditorStyles.title);
GUILayout.Label("Displays all bindings of all available containers", EditorStyles.containerInfo);
if (GUILayout.Button("Copy to clipboard")) {
this.CopyToClipboard();
}
// Display the containers and their bindings.
for (int dataIndex = 0; dataIndex < ContextRoot.containersData.Count; dataIndex++) {
var data = ContextRoot.containersData[dataIndex];
var bindings = data.container.GetBindings();
GUILayout.Space(20f);
GUILayout.Label("CONTAINER", EditorStyles.containerInfo);
GUILayout.Label(
string.Format("[{1}] {0} ({2} | {3})", data.container.GetType().FullName, dataIndex,
data.container.identifier, (data.destroyOnLoad ? "destroy on load" : "singleton")
),
EditorStyles.title
);
GUILayout.Space(10f);
// Add indentation.
GUILayout.BeginHorizontal();
GUILayout.Space(10);
GUILayout.BeginVertical();
for (int bindingIndex = 0; bindingIndex < bindings.Count; bindingIndex++) {
var binding = bindings[bindingIndex];
GUILayout.Label(binding.ToString(), EditorStyles.bindinds);
}
GUILayout.EndVertical();
GUILayout.EndHorizontal();
}
GUILayout.Space(WINDOW_MARGIN);
GUILayout.EndScrollView();
GUILayout.EndVertical();
GUILayout.EndHorizontal();
}
private void CopyToClipboard()
{
var sb = new StringBuilder();
for (int dataIndex = 0; dataIndex < ContextRoot.containersData.Count; dataIndex++) {
var data = ContextRoot.containersData[dataIndex];
var bindings = data.container.GetBindings();
sb.AppendFormat("[{1}] {0} ({2} | {3})\n", data.container.GetType().FullName, dataIndex,
data.container.identifier, data.destroyOnLoad ? "destroy on load" : "singleton");
for (int bindingIndex = 0; bindingIndex < bindings.Count; bindingIndex++) {
var binding = bindings[bindingIndex];
sb.AppendLine(binding.ToString());
}
}
var te = new TextEditor();
te.text = sb.ToString();
te.SelectAll();
te.Copy();
}
}
} | 38.512821 | 121 | 0.561474 | [
"MIT"
] | intentor/adic | src/Assets/Adic/Scripts/Extensions/BindingsPrinter/Editor/BindingsPrinterWindow.cs | 4,508 | C# |
// <copyright file="SaveCommandParameter.cs" company="WillowTree, LLC">
// Copyright (c) WillowTree, LLC. All rights reserved.
// </copyright>
using System.Collections.Generic;
using WillowTree.Sweetgum.Client.Environments.Models;
namespace WillowTree.Sweetgum.Client.Workbooks.Models
{
/// <summary>
/// The save command parameter.
/// </summary>
public sealed class SaveCommandParameter
{
/// <summary>
/// Gets the request model changes.
/// </summary>
public RequestModelChangeSet? RequestModelChanges { get; init; }
/// <summary>
/// Gets the read only list of environment models changes.
/// </summary>
public IReadOnlyList<EnvironmentModel>? EnvironmentModelsChanges { get; init; }
}
}
| 30.153846 | 87 | 0.663265 | [
"MIT"
] | RealGoodAnthony/Sweetgum | src/Client/Workbooks/Models/SaveCommandParameter.cs | 784 | C# |
namespace Faraboom.Framework.DataAccess
{
/// <summary>
/// The sole purpose of this class is to be used as type for the generic ILogger<typeparamref name="T"/>
/// </summary>
public class DataAccess
{
}
}
| 23.1 | 108 | 0.645022 | [
"Apache-2.0"
] | faraboom/framework | Faraboom.Framework/DataAccess/DataAccess.cs | 233 | C# |
using Dapper;
namespace DataDude.Instructions.Execute
{
public class ExecuteInstruction : IInstruction
{
public ExecuteInstruction(string sql, object? parameters = null)
{
Sql = sql;
Parameters = new DynamicParameters(parameters);
}
public string Sql { get; }
public DynamicParameters Parameters { get; }
}
}
| 22.823529 | 72 | 0.621134 | [
"MIT"
] | carl-berg/data-dude | DataDude/Instructions/Execute/ExecuteInstruction.cs | 390 | C# |
using GalaSoft.MvvmLight.Command;
using Microsoft.Win32;
using Microsoft.WindowsAPICodePack.Dialogs;
using SHM.UI.Pages;
using SHM.Utilities;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SHM.UI.ViewModel
{
public class SettingsViewModel : ViewModel
{
public const string SelectDialogTitleFormat = "Select a {0} for {1}";
public SHMRegistryHelper Registry { get; set; }
public SettingsViewModel(ViewModelLocator locator) : base(locator)
{
Registry = SHMRegistryHelper.Instance;
Populate();
SaveCommand = new RelayCommand(async () => await SaveAsync(), true);
CancelCommand = new RelayCommand(async () => await CancelAsync(), true);
SelectCommand = new RelayCommand<string>(async p => await SelectAsync(p), true);
}
bool useVitaDB;
string psv, ps3, ps4, downloadPath, theme;
public bool UseVitaDB { get { return useVitaDB; } set { Set(ref useVitaDB, value); } }
public string PSV { get { return psv; } set { Set(ref psv, value); } }
public string PS3 { get { return ps3; } set { Set(ref ps3, value); } }
public string PS4 { get { return ps4; } set { Set(ref ps4, value); } }
public string DownloadPath { get { return downloadPath; } set { Set(ref downloadPath, value); } }
public string Theme { get { return theme; } set { Set(ref theme, value); App.ChangeTheme(theme); } }
public ObservableCollection<string> Themes { get; set; } = new ObservableCollection<string>();
void Populate()
{
UseVitaDB = Registry.UseVitaDB;
PSV = Registry.PSV;
PS3 = Registry.PS3;
PS4 = Registry.PS4;
DownloadPath = Registry.DownloadPath;
Theme = Registry.Theme;
if (!Themes.Any())
foreach (var theme in App.SupportedThemes()) Themes.Add(theme);
}
public RelayCommand<string> SelectCommand { get; protected set; }
async Task SelectAsync(string parameter)
{
await Task.Yield();
var select = new CommonOpenFileDialog();
switch (parameter)
{
case nameof(PSV):
case nameof(PS3):
case nameof(PS4):
select.Filters.Add(new CommonFileDialogFilter("TSV Files", "*.tsv"));
select.IsFolderPicker = false;
select.Title = string.Format(SelectDialogTitleFormat, "file", parameter);
break;
case nameof(DownloadPath):
select.IsFolderPicker = true;
select.Title = string.Format(SelectDialogTitleFormat, "folder", "download path");
break;
default: return;
}
if (select.ShowDialog() == CommonFileDialogResult.Ok)
{
switch (parameter)
{
case nameof(PSV): PSV = select.FileName; break;
case nameof(PS3): PS3 = select.FileName; break;
case nameof(PS4): PS4 = select.FileName; break;
case nameof(DownloadPath): DownloadPath = select.FileName; break;
}
}
}
public RelayCommand SaveCommand { get; protected set; }
async Task SaveAsync()
{
if (await Locator.Main.Dialog.ShowMessageAsync(Locator.Main, "Confirmation", "Do you want to save your changes?", MahApps.Metro.Controls.Dialogs.MessageDialogStyle.AffirmativeAndNegative)
== MahApps.Metro.Controls.Dialogs.MessageDialogResult.Affirmative)
{
Registry.UseVitaDB = UseVitaDB;
Registry.PSV = UseVitaDB ? string.Empty : PSV;
Registry.PS3 = PS3;
Registry.PS4 = PS4;
Registry.DownloadPath = DownloadPath;
Registry.Theme = Theme;
Locator.Main.GoTo<Home>();
await Locator.Main.Dialog.ShowMessageAsync(Locator.Main, "Information", "Saved changes successfully.");
}
}
public RelayCommand CancelCommand { get; set; }
async Task CancelAsync()
{
if (await Locator.Main.Dialog.ShowMessageAsync(Locator.Main, "Confirmation", "Do you want to discard your changes?", MahApps.Metro.Controls.Dialogs.MessageDialogStyle.AffirmativeAndNegative)
== MahApps.Metro.Controls.Dialogs.MessageDialogResult.Affirmative)
{
Populate();
App.ChangeTheme();
Locator.Main.GoTo<Home>();
}
}
}
}
| 41.706897 | 202 | 0.581025 | [
"MIT"
] | MRGhidini/SHM | SHM.UI/ViewModel/SettingsViewModel.cs | 4,840 | C# |
using System;
using System.IO;
using System.Threading.Tasks;
using Esquire.Data;
using Esquire.Services;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
namespace esquire_backend.Controllers
{
[Produces("application/json")]
[Route("api/exports")]
[Authorize]
public class ExportController: Controller
{
private readonly IUnitOfWork _unitOfWork;
private readonly IWebHostEnvironment _environment;
private readonly IProjectExportService _exportService;
private ILogger<ExportController> _logger;
public ExportController(IUnitOfWork unitOfWork, IWebHostEnvironment environment, IProjectExportService exportService, ILogger<ExportController> logger)
{
_unitOfWork = unitOfWork;
_environment = environment;
_exportService = exportService;
_logger = logger;
}
/// <summary>
/// Export validated answer data for project into CSV file and download it.
/// </summary>
/// <remarks>Download validated answer data for project </remarks>
/// <param name="id">The id of the project to use to create exported data.</param>
/// <param name="type">The type of export. Options are "text", "numeric" or "codebook".</param>
/// <param name="userId">The user id to select coded answers. this parm is optional</param>
[HttpGet("project/{id}/data")]
public async Task<IActionResult> ExportProjectData(long id, string type, long userId = -1 )
{
FileStreamResult fsr = null;
var filePath = "";
// check for valid project
var project = await _unitOfWork.Projects.SingleOrDefaultAsync(p => p.Id == id);
if (project == null)
{
return NotFound();
}
// check for valid export type parameter
switch (type)
{
case "text":
case "numeric":
case "codebook":
break;
default:
_logger.LogError("Invalid export type parameter = {Type}", type);
return BadRequest();
}
// check if userid passed, if yes then export data for the requested user
ExportResult exportResult;
exportResult = await _exportService.ExportProjectData(id, type, userId);
if (exportResult.IsSuccessful())
filePath = exportResult.FilePath;
else
{
Console.WriteLine("Error in export");
Response.Headers.Add("Content-Type", "application/json");
return Json(exportResult);
}
// response...
var cd = new System.Net.Mime.ContentDisposition
{
FileName = Uri.EscapeUriString(Path.GetFileName(filePath)),
Inline = false // false = prompt the user for downloading, true = browser to show the file inline
};
Response.Headers.Add("Content-Disposition", cd.ToString());
Response.Headers.Add("X-Content-Type-Options", "nosniff");
try
{
Stream tempFileStream = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
fsr = new FileStreamResult(tempFileStream, "text/csv");
}
catch (Exception e)
{
Console.WriteLine("Failed to read: {0}, exception {1} ", filePath, e);
return fsr;
}
return fsr;
}
/// <summary>
/// Export help file.
/// </summary>
/// <remarks>Export help file </remarks>
[HttpGet("helpfile")]
public async Task<IActionResult> HelpFile()
{
var dirInfo = Path.Combine(_environment.WebRootPath);
var filePath = Path.Combine(dirInfo, "PHLIP-Help-Guide.pdf");
var memory = new MemoryStream();
using (var stream = new FileStream(filePath, FileMode.Open))
{
await stream.CopyToAsync(memory);
}
memory.Position = 0;
return File(memory, "application/pdf", Path.GetFileName(filePath));
}
}
} | 36.336 | 159 | 0.560326 | [
"Apache-2.0"
] | CDCgov/phlip-backend | Controllers/ExportController.cs | 4,544 | C# |
using System;
using System.Xml.Serialization;
using System.Collections;
using System.Collections.Generic;
using Newtonsoft.Json;
using JdSdk.Request;
using JdSdk.Response.Im;
namespace JdSdk.Request.Im
{
public class ImPopGroupinfoGetRequest : JdRequestBase<ImPopGroupinfoGetResponse>
{
public override String ApiName
{
get{ return "jingdong.im.pop.groupinfo.get"; }
}
protected override void PrepareParam(IDictionary<String, Object> paramters)
{
}
}
}
| 21.28 | 85 | 0.68985 | [
"Apache-2.0"
] | starpeng/JdSdk2 | Source/JdSdk/request/im/ImPopGroupinfoGetRequest.cs | 538 | C# |
using System;
using System.Collections.Concurrent;
namespace Resiliency
{
public class CircuitBreaker
{
private readonly ICircuitBreakerStrategy Strategy;
private readonly CircuitBreakerOptions Options;
internal readonly object SyncRoot = new object();
public CircuitBreaker(ICircuitBreakerStrategy strategy, CircuitBreakerOptions options = null)
{
Options = options ?? new CircuitBreakerOptions();
State = Options.InitialState;
StateLastChangedAt = DateTimeOffset.UtcNow;
Strategy = strategy;
}
public CircuitState State { get; private set; }
public Exception LastException { get; private set; }
public DateTimeOffset StateLastChangedAt { get; private set; }
public DateTimeOffset CooldownCompleteAt { get; private set; }
public int HalfOpenSuccessCount { get; private set; }
public void Trip(Exception ex, TimeSpan? cooldownPeriod = null)
{
LastException = ex;
if (State == CircuitState.Open)
throw new CircuitBrokenException(ex);
lock (SyncRoot)
{
if (State == CircuitState.Open)
throw new CircuitBrokenException(ex);
State = CircuitState.Open;
StateLastChangedAt = DateTimeOffset.UtcNow;
CooldownCompleteAt = StateLastChangedAt + (cooldownPeriod ?? Options.DefaultCooldownPeriod);
throw new CircuitBrokenException(ex, (CooldownCompleteAt - DateTimeOffset.Now).Duration());
}
}
internal void OnFailure(Exception ex)
{
LastException = ex;
if (Strategy.ShouldTrip(ex))
Trip(ex, Options.DefaultCooldownPeriod);
}
public void Reset()
{
lock (SyncRoot)
{
ResetState();
}
}
internal void OnHalfOpenSuccess()
{
if (++HalfOpenSuccessCount > Options.HalfOpenSuccessCountBeforeClose)
{
// don't call Reset, because that would be double locking, so deadlock.
ResetState();
}
}
private void ResetState()
{
StateLastChangedAt = DateTimeOffset.UtcNow;
State = CircuitState.Closed;
HalfOpenSuccessCount = 0;
LastException = null;
}
public void TestCircuit()
{
StateLastChangedAt = DateTimeOffset.UtcNow;
State = CircuitState.Closed;
HalfOpenSuccessCount = 0;
LastException = null;
}
public static CircuitBreaker GetCircuitBreaker(string key)
{
if(CircuitBreakers.TryGetValue(key, out var circuitBreaker))
return circuitBreaker;
throw new ArgumentException($"No circuit breaker registered with key: {key}.", nameof(key));
}
public static CircuitBreaker GetOrAddCircuitBreaker(string key, Func<CircuitBreaker> factory)
{
return CircuitBreakers.GetOrAdd(key, (opKey) => factory());
}
public static void RegisterCircuitBreaker(string key, CircuitBreaker circuitBreaker)
{
if (CircuitBreakers.TryAdd(key, circuitBreaker))
return;
throw new InvalidOperationException($"A circuit breaker with key: {key} already registered.");
}
private static ConcurrentDictionary<string, CircuitBreaker> CircuitBreakers = new ConcurrentDictionary<string, CircuitBreaker>();
}
}
| 31.444444 | 137 | 0.596358 | [
"MPL-2.0",
"MPL-2.0-no-copyleft-exception"
] | psibr/REtry | src/Resiliency/CircuitBreaker.cs | 3,681 | C# |
/*
* Copyright (c) 2006-2016, openmetaverse.co
* 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.
* - Neither the name of the openmetaverse.co nor the names
* of its contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* 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 OWNER 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;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
namespace OpenMetaverse
{
/// <inheritdoc />
/// <summary>
/// Exception class to identify inventory exceptions
/// </summary>
[Serializable]
public class InventoryException : Exception
{
public InventoryException() { }
public InventoryException(string message) : base(message) { }
protected InventoryException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { }
public InventoryException(string message, Exception innerException) : base(message, innerException) { }
}
/// <summary>
/// Responsible for maintaining inventory structure. Inventory constructs nodes
/// and manages node children as is necessary to maintain a coherant hirarchy.
/// Other classes should not manipulate or create InventoryNodes explicitly. When
/// A node's parent changes (when a folder is moved, for example) simply pass
/// Inventory the updated InventoryFolder and it will make the appropriate changes
/// to its internal representation.
/// </summary>
public class Inventory
{
/// <summary>The event subscribers, null of no subscribers</summary>
private EventHandler<InventoryObjectUpdatedEventArgs> m_InventoryObjectUpdated;
///<summary>Raises the InventoryObjectUpdated Event</summary>
/// <param name="e">A InventoryObjectUpdatedEventArgs object containing
/// the data sent from the simulator</param>
protected virtual void OnInventoryObjectUpdated(InventoryObjectUpdatedEventArgs e)
{
EventHandler<InventoryObjectUpdatedEventArgs> handler = m_InventoryObjectUpdated;
handler?.Invoke(this, e);
}
/// <summary>Thread sync lock object</summary>
private readonly object m_InventoryObjectUpdatedLock = new object();
/// <summary>Raised when the simulator sends us data containing
/// ...</summary>
public event EventHandler<InventoryObjectUpdatedEventArgs> InventoryObjectUpdated
{
add { lock (m_InventoryObjectUpdatedLock) { m_InventoryObjectUpdated += value; } }
remove { lock (m_InventoryObjectUpdatedLock) { m_InventoryObjectUpdated -= value; } }
}
/// <summary>The event subscribers, null of no subscribers</summary>
private EventHandler<InventoryObjectRemovedEventArgs> m_InventoryObjectRemoved;
///<summary>Raises the InventoryObjectRemoved Event</summary>
/// <param name="e">A InventoryObjectRemovedEventArgs object containing
/// the data sent from the simulator</param>
protected virtual void OnInventoryObjectRemoved(InventoryObjectRemovedEventArgs e)
{
EventHandler<InventoryObjectRemovedEventArgs> handler = m_InventoryObjectRemoved;
handler?.Invoke(this, e);
}
/// <summary>Thread sync lock object</summary>
private readonly object m_InventoryObjectRemovedLock = new object();
/// <summary>Raised when the simulator sends us data containing
/// ...</summary>
public event EventHandler<InventoryObjectRemovedEventArgs> InventoryObjectRemoved
{
add { lock (m_InventoryObjectRemovedLock) { m_InventoryObjectRemoved += value; } }
remove { lock (m_InventoryObjectRemovedLock) { m_InventoryObjectRemoved -= value; } }
}
/// <summary>The event subscribers, null of no subscribers</summary>
private EventHandler<InventoryObjectAddedEventArgs> m_InventoryObjectAdded;
///<summary>Raises the InventoryObjectAdded Event</summary>
/// <param name="e">A InventoryObjectAddedEventArgs object containing
/// the data sent from the simulator</param>
protected virtual void OnInventoryObjectAdded(InventoryObjectAddedEventArgs e)
{
EventHandler<InventoryObjectAddedEventArgs> handler = m_InventoryObjectAdded;
handler?.Invoke(this, e);
}
/// <summary>Thread sync lock object</summary>
private readonly object m_InventoryObjectAddedLock = new object();
/// <summary>Raised when the simulator sends us data containing
/// ...</summary>
public event EventHandler<InventoryObjectAddedEventArgs> InventoryObjectAdded
{
add { lock (m_InventoryObjectAddedLock) { m_InventoryObjectAdded += value; } }
remove { lock (m_InventoryObjectAddedLock) { m_InventoryObjectAdded -= value; } }
}
/// <summary>
/// The root folder of this avatars inventory
/// </summary>
public InventoryFolder RootFolder
{
get => RootNode.Data as InventoryFolder;
set
{
UpdateNodeFor(value);
_RootNode = Items[value.UUID];
}
}
/// <summary>
/// The default shared library folder
/// </summary>
public InventoryFolder LibraryFolder
{
get => LibraryRootNode.Data as InventoryFolder;
set
{
UpdateNodeFor(value);
_LibraryRootNode = Items[value.UUID];
}
}
private InventoryNode _LibraryRootNode;
private InventoryNode _RootNode;
/// <summary>
/// The root node of the avatars inventory
/// </summary>
public InventoryNode RootNode => _RootNode;
/// <summary>
/// The root node of the default shared library
/// </summary>
public InventoryNode LibraryRootNode => _LibraryRootNode;
public UUID Owner { get; }
private GridClient Client;
//private InventoryManager Manager;
public Dictionary<UUID, InventoryNode> Items = new Dictionary<UUID, InventoryNode>();
public Inventory(GridClient client, InventoryManager manager)
: this(client, manager, client.Self.AgentID) { }
public Inventory(GridClient client, InventoryManager manager, UUID owner)
{
Client = client;
//Manager = manager;
Owner = owner;
if (owner == UUID.Zero)
Logger.Log("Inventory owned by nobody!", Helpers.LogLevel.Warning, Client);
Items = new Dictionary<UUID, InventoryNode>();
}
public List<InventoryBase> GetContents(InventoryFolder folder)
{
return GetContents(folder.UUID);
}
/// <summary>
/// Returns the contents of the specified folder
/// </summary>
/// <param name="folder">A folder's UUID</param>
/// <returns>The contents of the folder corresponding to <code>folder</code></returns>
/// <exception cref="InventoryException">When <code>folder</code> does not exist in the inventory</exception>
public List<InventoryBase> GetContents(UUID folder)
{
InventoryNode folderNode;
if (!Items.TryGetValue(folder, out folderNode))
throw new InventoryException("Unknown folder: " + folder);
lock (folderNode.Nodes.SyncRoot)
{
List<InventoryBase> contents = new List<InventoryBase>(folderNode.Nodes.Count);
foreach (InventoryNode node in folderNode.Nodes.Values)
{
contents.Add(node.Data);
}
return contents;
}
}
/// <summary>
/// Updates the state of the InventoryNode and inventory data structure that
/// is responsible for the InventoryObject. If the item was previously not added to inventory,
/// it adds the item, and updates structure accordingly. If it was, it updates the
/// InventoryNode, changing the parent node if <code>item.parentUUID</code> does
/// not match <code>node.Parent.Data.UUID</code>.
///
/// You can not set the inventory root folder using this method
/// </summary>
/// <param name="item">The InventoryObject to store</param>
public void UpdateNodeFor(InventoryBase item)
{
lock (Items)
{
InventoryNode itemParent = null;
if (item.ParentUUID != UUID.Zero && !Items.TryGetValue(item.ParentUUID, out itemParent))
{
// OK, we have no data on the parent, let's create a fake one.
InventoryFolder fakeParent = new InventoryFolder(item.ParentUUID);
fakeParent.DescendentCount = 1; // Dear god, please forgive me.
itemParent = new InventoryNode(fakeParent);
Items[item.ParentUUID] = itemParent;
// Unfortunately, this breaks the nice unified tree
// while we're waiting for the parent's data to come in.
// As soon as we get the parent, the tree repairs itself.
//Logger.DebugLog("Attempting to update inventory child of " +
// item.ParentUUID.ToString() + " when we have no local reference to that folder", Client);
if (Client.Settings.FETCH_MISSING_INVENTORY)
{
// Fetch the parent
List<UUID> fetchreq = new List<UUID>(1) {item.ParentUUID};
}
}
InventoryNode itemNode;
if (Items.TryGetValue(item.UUID, out itemNode)) // We're updating.
{
InventoryNode oldParent = itemNode.Parent;
// Handle parent change
if (oldParent == null || itemParent == null || itemParent.Data.UUID != oldParent.Data.UUID)
{
if (oldParent != null)
{
lock (oldParent.Nodes.SyncRoot)
oldParent.Nodes.Remove(item.UUID);
}
if (itemParent != null)
{
lock (itemParent.Nodes.SyncRoot)
itemParent.Nodes[item.UUID] = itemNode;
}
}
itemNode.Parent = itemParent;
if (m_InventoryObjectUpdated != null)
{
OnInventoryObjectUpdated(new InventoryObjectUpdatedEventArgs(itemNode.Data, item));
}
itemNode.Data = item;
}
else // We're adding.
{
itemNode = new InventoryNode(item, itemParent);
Items.Add(item.UUID, itemNode);
if (m_InventoryObjectAdded != null)
{
OnInventoryObjectAdded(new InventoryObjectAddedEventArgs(item));
}
}
}
}
public InventoryNode GetNodeFor(UUID uuid)
{
return Items[uuid];
}
/// <summary>
/// Removes the InventoryObject and all related node data from Inventory.
/// </summary>
/// <param name="item">The InventoryObject to remove.</param>
public void RemoveNodeFor(InventoryBase item)
{
lock (Items)
{
InventoryNode node;
if (Items.TryGetValue(item.UUID, out node))
{
if (node.Parent != null)
lock (node.Parent.Nodes.SyncRoot)
node.Parent.Nodes.Remove(item.UUID);
Items.Remove(item.UUID);
if (m_InventoryObjectRemoved != null)
{
OnInventoryObjectRemoved(new InventoryObjectRemovedEventArgs(item));
}
}
// In case there's a new parent:
InventoryNode newParent;
if (Items.TryGetValue(item.ParentUUID, out newParent))
{
lock (newParent.Nodes.SyncRoot)
newParent.Nodes.Remove(item.UUID);
}
}
}
/// <summary>
/// Used to find out if Inventory contains the InventoryObject
/// specified by <code>uuid</code>.
/// </summary>
/// <param name="uuid">The UUID to check.</param>
/// <returns>true if inventory contains uuid, false otherwise</returns>
public bool Contains(UUID uuid)
{
return Items.ContainsKey(uuid);
}
public bool Contains(InventoryBase obj)
{
return Contains(obj.UUID);
}
/// <summary>
/// Saves the current inventory structure to a cache file
/// </summary>
/// <param name="filename">Name of the cache file to save to</param>
public void SaveToDisk(string filename)
{
try
{
using (Stream stream = File.Open(filename, FileMode.Create))
{
lock (Items)
{
Logger.Log("Caching " + Items.Count.ToString() + " inventory items to " + filename, Helpers.LogLevel.Info);
foreach (KeyValuePair<UUID, InventoryNode> kvp in Items)
{
ZeroFormatter.ZeroFormatterSerializer.Serialize(stream, kvp.Value);
}
}
}
}
catch (Exception e)
{
Logger.Log("Error saving inventory cache to disk :"+e.Message,Helpers.LogLevel.Error);
}
}
/// <summary>
/// Loads in inventory cache file into the inventory structure. Note only valid to call after login has been successful.
/// </summary>
/// <param name="filename">Name of the cache file to load</param>
/// <returns>The number of inventory items sucessfully reconstructed into the inventory node tree</returns>
public int RestoreFromDisk(string filename)
{
List<InventoryNode> nodes = new List<InventoryNode>();
int item_count = 0;
try
{
if (!File.Exists(filename))
return -1;
using (Stream stream = File.Open(filename, FileMode.Open))
{
BinaryFormatter bformatter = new BinaryFormatter();
while (stream.Position < stream.Length)
{
var node = ZeroFormatter.ZeroFormatterSerializer.Deserialize<InventoryNode>(stream);
nodes.Add(node);
item_count++;
}
}
}
catch (Exception e)
{
Logger.Log("Error accessing inventory cache file :" + e.Message, Helpers.LogLevel.Error);
return -1;
}
Logger.Log("Read " + item_count.ToString() + " items from inventory cache file", Helpers.LogLevel.Info);
item_count = 0;
List<InventoryNode> del_nodes = new List<InventoryNode>(); //nodes that we have processed and will delete
List<UUID> dirty_folders = new List<UUID>(); // Tainted folders that we will not restore items into
// Because we could get child nodes before parents we must itterate around and only add nodes who have
// a parent already in the list because we must update both child and parent to link together
// But sometimes we have seen orphin nodes due to bad/incomplete data when caching so we have an emergency abort route
int stuck = 0;
while (nodes.Count != 0 && stuck<5)
{
foreach (InventoryNode node in nodes)
{
InventoryNode pnode;
if (node.ParentID == UUID.Zero)
{
//We don't need the root nodes "My Inventory" etc as they will already exist for the correct
// user of this cache.
del_nodes.Add(node);
item_count--;
}
else if(Items.TryGetValue(node.Data.UUID,out pnode))
{
//We already have this it must be a folder
if (node.Data is InventoryFolder cacheFolder)
{
InventoryFolder server_folder = (InventoryFolder)pnode.Data;
if (cacheFolder.Version != server_folder.Version)
{
Logger.DebugLog("Inventory Cache/Server version mismatch on " + node.Data.Name + " " + cacheFolder.Version.ToString() + " vs " + server_folder.Version.ToString());
pnode.NeedsUpdate = true;
dirty_folders.Add(node.Data.UUID);
}
else
{
pnode.NeedsUpdate = false;
}
del_nodes.Add(node);
}
}
else if (Items.TryGetValue(node.ParentID, out pnode))
{
if (node.Data != null)
{
// If node is folder, and it does not exist in skeleton, mark it as
// dirty and don't process nodes that belong to it
if (node.Data is InventoryFolder && !(Items.ContainsKey(node.Data.UUID)))
{
dirty_folders.Add(node.Data.UUID);
}
//Only add new items, this is most likely to be run at login time before any inventory
//nodes other than the root are populated. Don't add non existing folders.
if (!Items.ContainsKey(node.Data.UUID) && !dirty_folders.Contains(pnode.Data.UUID) && !(node.Data is InventoryFolder))
{
Items.Add(node.Data.UUID, node);
node.Parent = pnode; //Update this node with its parent
pnode.Nodes.Add(node.Data.UUID, node); // Add to the parents child list
item_count++;
}
}
del_nodes.Add(node);
}
}
if (del_nodes.Count == 0)
++stuck;
else
stuck = 0;
//Clean up processed nodes this loop around.
foreach (InventoryNode node in del_nodes)
nodes.Remove(node);
del_nodes.Clear();
}
Logger.Log("Reassembled " + item_count.ToString() + " items from inventory cache file", Helpers.LogLevel.Info);
return item_count;
}
#region Operators
/// <summary>
/// By using the bracket operator on this class, the program can get the
/// InventoryObject designated by the specified uuid. If the value for the corresponding
/// UUID is null, the call is equivelant to a call to <code>RemoveNodeFor(this[uuid])</code>.
/// If the value is non-null, it is equivelant to a call to <code>UpdateNodeFor(value)</code>,
/// the uuid parameter is ignored.
/// </summary>
/// <param name="uuid">The UUID of the InventoryObject to get or set, ignored if set to non-null value.</param>
/// <returns>The InventoryObject corresponding to <code>uuid</code>.</returns>
public InventoryBase this[UUID uuid]
{
get
{
InventoryNode node = Items[uuid];
return node.Data;
}
set
{
if (value != null)
{
// Log a warning if there is a UUID mismatch, this will cause problems
if (value.UUID != uuid)
Logger.Log("Inventory[uuid]: uuid " + uuid.ToString() + " is not equal to value.UUID " +
value.UUID.ToString(), Helpers.LogLevel.Warning, Client);
UpdateNodeFor(value);
}
else
{
InventoryNode node;
if (Items.TryGetValue(uuid, out node))
{
RemoveNodeFor(node.Data);
}
}
}
}
#endregion Operators
}
#region EventArgs classes
public class InventoryObjectUpdatedEventArgs : EventArgs
{
public InventoryBase OldObject { get; }
public InventoryBase NewObject { get; }
public InventoryObjectUpdatedEventArgs(InventoryBase oldObject, InventoryBase newObject)
{
this.OldObject = oldObject;
this.NewObject = newObject;
}
}
public class InventoryObjectRemovedEventArgs : EventArgs
{
public InventoryBase Obj { get; }
public InventoryObjectRemovedEventArgs(InventoryBase obj)
{
this.Obj = obj;
}
}
public class InventoryObjectAddedEventArgs : EventArgs
{
public InventoryBase Obj { get; }
public InventoryObjectAddedEventArgs(InventoryBase obj)
{
this.Obj = obj;
}
}
#endregion EventArgs
}
| 42.900356 | 196 | 0.538946 | [
"BSD-3-Clause"
] | Spookerton/secondlife_libremetaverse | LibreMetaverse/Inventory.cs | 24,110 | C# |
using Cafebabe.Class;
namespace Cafebabe.Attribute;
public record JavaAnnotationDefaultAttributeInfo(string Name, JavaAnnotationElementValue Value) : JavaAttributeInfo(Name)
{
public static JavaAttributeInfo Read(JavaConstantPool constantPool, string name, byte[] data)
{
using var br = Utils.CreateReader(data);
var value = JavaAnnotationElementValue.Read(constantPool, br);
return new JavaAnnotationDefaultAttributeInfo(name, value);
}
} | 32.214286 | 121 | 0.81153 | [
"MIT"
] | Parzivail-Modding-Team/ModelPainter | Cafebabe/Attribute/JavaAnnotationDefaultAttributeInfo.cs | 451 | C# |
#region Using directives
using System;
using System.Drawing;
using System.Windows.Forms;
using log4net;
using treeDiM.Basics;
using treeDiM.StackBuilder.Basics;
using treeDiM.StackBuilder.Desktop.Properties;
using treeDiM.PLMPack.DBClient;
using treeDiM.PLMPack.DBClient.PLMPackSR;
#endregion
namespace treeDiM.StackBuilder.Desktop
{
public partial class FormNewPalletFilm : FormNewBase
{
#region Constructor
public FormNewPalletFilm(Document doc, PalletFilmProperties item)
: base(doc, item)
{
InitializeComponent();
if (null != item)
{
chkbTransparency.Checked = item.UseTransparency;
chkbHatching.Checked = item.UseHatching;
HatchSpacing = UnitsManager.ConvertLengthFrom(item.HatchSpacing, UnitsManager.UnitSystem.UNIT_METRIC1);
HatchAngle = item.HatchAngle;
FilmColor = item.Color;
Weight = item.Weight;
}
else
{
chkbTransparency.Checked = true;
chkbHatching.Checked = true;
HatchSpacing = UnitsManager.ConvertLengthFrom(150.0, UnitsManager.UnitSystem.UNIT_METRIC1);
HatchAngle = 45.0;
FilmColor = Color.LightSkyBlue;
}
OnChkbHatchingCheckedChanged(this, null);
UpdateStatus(string.Empty);
// units
UnitsManager.AdaptUnitLabels(this);
}
#endregion
#region FormNewBase overrides
public override string ItemDefaultName => Resources.ID_PALLETFILM;
public override void UpdateStatus(string message)
{
if (!UseTransparency && !UseHatching)
message = Resources.ID_USETRANSPARENCYORHATCHING;
base.UpdateStatus(message);
}
#endregion
#region Form overrides
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
// enable / disable database button
bnSendToDB.Enabled = WCFClient.IsConnected;
}
#endregion
#region Public properties
public Color FilmColor
{
get { return cbColor.Color; }
set { cbColor.Color = value; }
}
public bool UseTransparency
{
get { return chkbTransparency.Checked; }
set { chkbTransparency.Checked = value; }
}
public bool UseHatching
{
get { return chkbHatching.Checked; }
set { chkbHatching.Checked = value; }
}
public double HatchSpacing
{
get { return (double)uCtrlSpacing.Value; }
set { uCtrlSpacing.Value = value; }
}
public double HatchAngle
{
get { return (double)uCtrlAngle.Value; }
set { uCtrlAngle.Value = value; }
}
public double Weight
{
get { return (double)uCtrlMass.Value; }
set { uCtrlMass.Value = value; }
}
#endregion
#region Event handlers
private void OnChkbHatchingCheckedChanged(object sender, EventArgs e)
{
uCtrlSpacing.Enabled = UseHatching;
uCtrlAngle.Enabled = UseHatching;
UpdateStatus(string.Empty);
}
#endregion
#region Send to database
private void OnSendToDatabase(object sender, EventArgs e)
{
try
{
FormSetItemName form = new FormSetItemName() { ItemName = ItemName };
if (DialogResult.OK == form.ShowDialog())
{
using (WCFClient wcfClient = new WCFClient())
{
wcfClient.Client?.CreateNewPalletFilm(new DCSBPalletFilm()
{
Name = form.ItemName,
Description = ItemDescription,
UnitSystem = (int)UnitsManager.CurrentUnitSystem,
UseTransparency = this.UseTransparency,
UseHatching = this.UseHatching,
HatchingSpace = HatchSpacing,
HatchingAngle = HatchAngle,
Color = FilmColor.ToArgb(),
AutoInsert = false
}
);
}
Close();
}
}
catch (Exception ex)
{
_log.Error(ex.Message);
}
}
#endregion
#region Data members
protected static ILog _log = LogManager.GetLogger(typeof(FormNewPalletFilm));
#endregion
}
}
| 32.033113 | 119 | 0.531528 | [
"MIT"
] | metc/StackBuilder | Sources/TreeDim.StackBuilder.Desktop/FormNewPalletFilm.cs | 4,839 | C# |
//////////////////////////////////////////////////////
// MicroSplat
// Copyright (c) Jason Booth
//////////////////////////////////////////////////////
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
// thanks to Lennart @ awesome technologies
namespace JBooth.MicroSplat.Utility
{
[CustomEditor(typeof(Texture2DArray))]
public class TextureArrayEditor : Editor
{
private readonly List<Texture2D> _previewTextureList = new List<Texture2D>();
public void OnEnable()
{
Texture2DArray texture2DArray = (Texture2DArray)target;
for (int i = 0; i <= texture2DArray.depth - 1; i++)
{
// annoying to work around all the odd unity issues
// copy to temp texture..
Texture2D tempTexture = new Texture2D(texture2DArray.width, texture2DArray.height, texture2DArray.format, false, true);
Graphics.CopyTexture(texture2DArray, i, 0, tempTexture, 0, 0);
tempTexture.Apply();
// blit to render target
RenderTexture rt = RenderTexture.GetTemporary(256, 256, 0, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Linear);
Graphics.Blit(tempTexture, rt);
// read back from render target
DestroyImmediate(tempTexture);
tempTexture = new Texture2D(256, 256, TextureFormat.ARGB32, false, true);
var old = RenderTexture.active;
RenderTexture.active = rt;
tempTexture.ReadPixels(new Rect(0, 0, 256, 256), 0, 0);
tempTexture.Apply();
RenderTexture.active = old;
// work around linear/gamma issue with GUI.
tempTexture.LoadImage(tempTexture.EncodeToJPG());
tempTexture.Apply();
_previewTextureList.Add(tempTexture);
}
}
public void OnDisable()
{
for (int i = 0; i <= _previewTextureList.Count - 1; i++)
{
DestroyImmediate(_previewTextureList[i]);
}
_previewTextureList.Clear();
}
public override void OnInspectorGUI()
{
EditorGUILayout.LabelField("Texture array content");
Texture2DArray texture2DArray = (Texture2DArray)target;
GUIContent[] imageButtons = new GUIContent[texture2DArray.depth];
for (int i = 0; i <= texture2DArray.depth - 1; i++)
{
if (_previewTextureList.Count > i)
{
imageButtons[i] = new GUIContent { image = _previewTextureList[i] };
}
else
{
imageButtons[i] = new GUIContent { image = null };
}
}
int imageWidth = 120;
int columns = Mathf.FloorToInt(EditorGUIUtility.currentViewWidth / imageWidth);
int rows = Mathf.CeilToInt((float)imageButtons.Length / columns);
int gridHeight = (rows) * imageWidth;
GUILayout.SelectionGrid(0, imageButtons, columns, GUI.skin.label, GUILayout.MaxWidth(columns * imageWidth), GUILayout.MaxHeight(gridHeight));
texture2DArray.anisoLevel = EditorGUILayout.IntField("Anisotropic", texture2DArray.anisoLevel);
texture2DArray.filterMode = (FilterMode)EditorGUILayout.EnumPopup("Filter Mode", texture2DArray.filterMode);
texture2DArray.wrapMode = (TextureWrapMode)EditorGUILayout.EnumPopup("Wrap Mode", texture2DArray.wrapMode);
texture2DArray.mipMapBias = EditorGUILayout.FloatField("Mip Map Bias", texture2DArray.mipMapBias);
EditorGUILayout.LabelField("Texture count: " + texture2DArray.depth);
EditorGUILayout.LabelField("Width: " + texture2DArray.width);
EditorGUILayout.LabelField("Height: " + texture2DArray.height);
EditorGUILayout.LabelField("Texture format: " + texture2DArray.format);
}
}
}
| 39.917526 | 150 | 0.620093 | [
"MIT"
] | ITSGameDevTeamY3/Project-Dissonance | Assets/MicroSplat/Core/Scripts/Editor/TextureArrayEditor.cs | 3,874 | C# |
namespace SharePointPnP.LobScenario.Web.Areas.HelpPage
{
/// <summary>
/// Indicates whether the sample is used for request or response
/// </summary>
public enum SampleDirection
{
Request = 0,
Response
}
} | 22.363636 | 68 | 0.630081 | [
"MIT"
] | 3v1lW1th1n/sp-starter-kit | sample-lob-service/SharePointPnP.LobScenario/SharePointPnP.LobScenario.Web/Areas/HelpPage/SampleGeneration/SampleDirection.cs | 246 | 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 frauddetector-2019-11-15.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.FraudDetector.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.FraudDetector.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for Tag Object
/// </summary>
public class TagUnmarshaller : IUnmarshaller<Tag, XmlUnmarshallerContext>, IUnmarshaller<Tag, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
Tag IUnmarshaller<Tag, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public Tag Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
Tag unmarshalledObject = new Tag();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("key", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Key = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("value", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Value = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static TagUnmarshaller _instance = new TagUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TagUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 33.908163 | 123 | 0.595245 | [
"Apache-2.0"
] | philasmar/aws-sdk-net | sdk/src/Services/FraudDetector/Generated/Model/Internal/MarshallTransformations/TagUnmarshaller.cs | 3,323 | C# |
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Microsoft.IdentityModel.Tokens;
using System;
using System.Collections.Generic;
using System.IdentityModel.Tokens.Jwt;
using System.Linq;
using System.Security.Claims;
using System.Text;
using System.Threading.Tasks;
namespace AuthSamples
{
public interface IJwtAuthenticateService
{
bool IsAuthenticated(JwtTokenRequest request, out string token);
}
/// <summary>
/// The IsAuthenticated method return a JWT token if the user cred were ok. The JwtSecurityToken (token) needs a
/// variety of info like the Issuer, Audience, claim, etc that is largely retrieved from the appsettings.json
/// </summary>
public class JWTAuthenticationService : IJwtAuthenticateService
{
private readonly IUserService _userManagementService;
private readonly TokenManagement _tokenManagement;
private readonly ILogger<JWTAuthenticationService> _logger;
public JWTAuthenticationService(IUserService service, IOptions<TokenManagement> tokenManagement, ILogger<JWTAuthenticationService> logger)
{
_logger = logger;
_userManagementService = service;
_tokenManagement = tokenManagement.Value;
}
public bool IsAuthenticated(JwtTokenRequest request, out string token)
{
token = string.Empty;
try
{
// this can't happen but because these stupid VS 'code enhancers' are flagging it lets add some unnecessary clutter code in
if (request == null) return false;
// now check agains our injected user checker
if (!_userManagementService.IsValidUser(request.Username, request.Password)) return false;
var claim = new[]
{
new Claim(ClaimTypes.Name, request.Username)
};
var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(_tokenManagement.Secret));
var credentials = new SigningCredentials(key, SecurityAlgorithms.HmacSha256);
var jwtToken = new JwtSecurityToken(
_tokenManagement.Issuer,
_tokenManagement.Audience,
claim,
expires: DateTime.Now.AddMinutes(_tokenManagement.AccessExpiration),
signingCredentials: credentials
);
// had to do this (can't remember why so quickly..)
Microsoft.IdentityModel.Logging.IdentityModelEventSource.ShowPII = true;
// https://stackoverflow.com/questions/50590432/jwt-securitytokeninvalidsignatureexception-using-rs256-pii-is-hidden
token = new JwtSecurityTokenHandler().WriteToken(jwtToken);
return true;
}
catch(Exception ex)
{
_logger.LogError("Error occurred in JWT IsAuthenticated - " + ex.Message);
}
return false;
}
}
}
| 37.337349 | 146 | 0.635044 | [
"MIT"
] | mheere/AuthenticationSamplesNetCore31 | JwtToken/JWTAuthenticationService.cs | 3,101 | C# |
using ClumsyBat.Controllers;
using ClumsyBat.Players;
using UnityEngine;
namespace ClumsyBat
{
public class PlayerManager : Singleton<PlayerManager>, IManager
{
public Player Clumsy;
public PlayerController Controller;
public PlayerAIController AIController;
[HideInInspector]
public LevelAnimationSequencer Sequencer;
private Controller currentController;
public void InitAwake()
{
Clumsy.InitAwake();
Controller.InitAwake(Clumsy);
AIController.InitAwake(Clumsy);
Sequencer = new LevelAnimationSequencer(Clumsy);
}
private void FixedUpdate()
{
Sequencer.Update(Time.fixedDeltaTime);
}
public void PossessByPlayer()
{
currentController = Controller;
Controller.Possess(Clumsy);
}
public void PossessByAI()
{
currentController = AIController;
AIController.Possess(Clumsy);
}
public void SetPlayerPosition(Vector2 position)
{
Clumsy.model.transform.position = position;
Clumsy.lantern.transform.position = position - new Vector2(0.3f, 1f);
Clumsy.lantern.transform.localEulerAngles = new Vector3(0f, 0f, -40f);
}
public bool PossessedByAI { get { return currentController.Equals(AIController); } }
public bool PossessedByPlayer { get { return currentController.Equals(Controller); } }
}
}
| 28.462963 | 94 | 0.625244 | [
"Apache-2.0"
] | Aspekt1024/ClumsyBat | Assets/Scripts/Core/Modules/PlayerManager.cs | 1,539 | C# |
namespace TwoWeeksReady.Authorization
{
public static class Roles
{
public static string Admin = "admin";
}
}
| 16.375 | 45 | 0.648855 | [
"MIT"
] | HTBox/TwoWeeksReady | api/TwoWeeksReady/Authorization/Roles.cs | 133 | C# |
using Meadow.CoverageReport.AstTypes;
using Meadow.CoverageReport.Debugging.Variables;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Text;
namespace Meadow.CoverageReport.Debugging
{
/// <summary>
/// Represents a scope in an exection trace (the set of instructions that signify executing in one function context or another).
/// </summary>
public class ExecutionTraceScope
{
#region Properties
/// <summary>
/// The contract definition for the contract this scope's execution context takes place in.
/// </summary>
public AstContractDefinition ContractDefinition { get; private set; }
/// <summary>
/// The function definition for the function this scope's execution context takes place in.
/// </summary>
public AstFunctionDefinition FunctionDefinition { get; set; }
/// <summary>
/// The trace index where the function definition is first resolved for this scope.
/// </summary>
public int? FunctionDefinitionIndex { get; private set; }
/// <summary>
/// The trace index where the function definition is actually entered and encapsulated code is beginning execution.
/// If this is not set, but <see cref="FunctionDefinition"/> is set, then execution is likely occuring in an access modifier,
/// and we have not entered the actual function definition's code.
/// </summary>
public int? FunctionEnteredIndex { get; set; }
/// <summary>
/// The trace index into the execution trace where the first instruction for this scope occurred.
/// </summary>
public int StartIndex { get; set; }
/// <summary>
/// The trace index into the execution trace where the last instruction for this scope occurred.
/// </summary>
public int EndIndex { get; set; }
/// <summary>
/// The depth starting from zero which signifies how many external function calls/EVM executes deep the current scope takes place in.
/// </summary>
public int CallDepth { get; set; }
/// <summary>
/// Signifies how many scopes are ancestors to this scope.
/// </summary>
public int ScopeDepth { get; set; }
/// <summary>
/// The parent scope which contains this scope, if any.
/// </summary>
public ExecutionTraceScope Parent { get; set; }
/// <summary>
/// Represents the ast node for the function call which had created/invoked this scope.
/// </summary>
public AstNode ParentFunctionCall { get; set; }
/// <summary>
/// The trace index where the parent function call is first resolved for this scope.
/// </summary>
public int? ParentFunctionCallIndex { get; set; }
/// <summary>
/// Represents a lookup of local variables by ID.
/// </summary>
public Dictionary<long, LocalVariable> Locals { get; }
#endregion
#region Constructors
public ExecutionTraceScope(int startIndex, int scopeDepth, int callDepth, ExecutionTraceScope parentScope = null)
{
// Set our properties
StartIndex = startIndex;
ScopeDepth = scopeDepth;
CallDepth = callDepth;
Parent = parentScope;
// Set our definition properties
ContractDefinition = null;
FunctionDefinitionIndex = null;
FunctionDefinition = null;
ParentFunctionCall = null;
ParentFunctionCallIndex = null;
// Initialize our locals list
Locals = new Dictionary<long, LocalVariable>();
}
#endregion
#region Functions
/// <summary>
/// Adds a local variable to this execution scopes lookup, if one with this ID was not already resolved.
/// </summary>
/// <param name="localVariable">The local variable to add if it has not been added already.</param>
public void AddLocalVariable(LocalVariable localVariable)
{
// Set our local variable in our dictionary.
Locals[localVariable.Declaration.Id] = localVariable;
}
/// <summary>
/// Indicates whether the local variable with the given ID was already added to this scope.
/// </summary>
/// <param name="id">The local variable ID to check inclusion for.</param>
/// <returns>Returns true if the given variable declaration ID already has been added in this scope.</returns>
public bool CheckLocalVariableExists(long id)
{
return Locals.ContainsKey(id);
}
/// <summary>
/// Sets the function definition for this scope, and the trace index at which it was resolved.
/// </summary>
/// <param name="traceIndex">The trace index at which this function definition was resolved.</param>
/// <param name="functionDefinition">The function definition which this scope executed inside of.</param>
public void SetFunctionDefinitionAndIndex(int traceIndex, AstFunctionDefinition functionDefinition)
{
// Try to set our scope definition properties.
FunctionDefinitionIndex = traceIndex;
FunctionDefinition = new AstFunctionDefinition(functionDefinition);
ContractDefinition = functionDefinition?.GetImmediateOrAncestor<AstContractDefinition>();
}
#endregion
}
}
| 43.84252 | 141 | 0.632902 | [
"MIT"
] | MeadowSuite/Meadow | src/Meadow.CoverageReport/Debugging/ExecutionTraceScope.cs | 5,570 | C# |
// Copyright 2021 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
//
// https://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.
// Generated code. DO NOT EDIT!
using gagvc = Google.Ads.GoogleAds.V5.Common;
using gagve = Google.Ads.GoogleAds.V5.Enums;
using gagvr = Google.Ads.GoogleAds.V5.Resources;
using gaxgrpc = Google.Api.Gax.Grpc;
using gr = Google.Rpc;
using grpccore = Grpc.Core;
using moq = Moq;
using st = System.Threading;
using stt = System.Threading.Tasks;
using NUnit.Framework;
using Google.Ads.GoogleAds.V5.Services;
namespace Google.Ads.GoogleAds.Tests.V5.Services
{
/// <summary>Generated unit tests.</summary>
public sealed class GeneratedCampaignCriterionServiceClientTest
{
[Category("Smoke")][Test]
public void GetCampaignCriterionRequestObject()
{
moq::Mock<CampaignCriterionService.CampaignCriterionServiceClient> mockGrpcClient = new moq::Mock<CampaignCriterionService.CampaignCriterionServiceClient>(moq::MockBehavior.Strict);
GetCampaignCriterionRequest request = new GetCampaignCriterionRequest
{
ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER]", "[CAMPAIGN_CRITERION]"),
};
gagvr::CampaignCriterion expectedResponse = new gagvr::CampaignCriterion
{
ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER]", "[CAMPAIGN_CRITERION]"),
Type = gagve::CriterionTypeEnum.Types.CriterionType.Location,
Keyword = new gagvc::KeywordInfo(),
Placement = new gagvc::PlacementInfo(),
MobileAppCategory = new gagvc::MobileAppCategoryInfo(),
MobileApplication = new gagvc::MobileApplicationInfo(),
Location = new gagvc::LocationInfo(),
Device = new gagvc::DeviceInfo(),
AdSchedule = new gagvc::AdScheduleInfo(),
AgeRange = new gagvc::AgeRangeInfo(),
Gender = new gagvc::GenderInfo(),
IncomeRange = new gagvc::IncomeRangeInfo(),
ParentalStatus = new gagvc::ParentalStatusInfo(),
YoutubeVideo = new gagvc::YouTubeVideoInfo(),
YoutubeChannel = new gagvc::YouTubeChannelInfo(),
UserList = new gagvc::UserListInfo(),
Proximity = new gagvc::ProximityInfo(),
Topic = new gagvc::TopicInfo(),
ListingScope = new gagvc::ListingScopeInfo(),
Language = new gagvc::LanguageInfo(),
IpBlock = new gagvc::IpBlockInfo(),
ContentLabel = new gagvc::ContentLabelInfo(),
Carrier = new gagvc::CarrierInfo(),
UserInterest = new gagvc::UserInterestInfo(),
Webpage = new gagvc::WebpageInfo(),
OperatingSystemVersion = new gagvc::OperatingSystemVersionInfo(),
MobileDevice = new gagvc::MobileDeviceInfo(),
LocationGroup = new gagvc::LocationGroupInfo(),
Status = gagve::CampaignCriterionStatusEnum.Types.CampaignCriterionStatus.Removed,
CustomAffinity = new gagvc::CustomAffinityInfo(),
CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"),
CriterionId = 8584655242409302840L,
BidModifier = 1.6595195E+17F,
Negative = false,
};
mockGrpcClient.Setup(x => x.GetCampaignCriterion(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
CampaignCriterionServiceClient client = new CampaignCriterionServiceClientImpl(mockGrpcClient.Object, null);
gagvr::CampaignCriterion response = client.GetCampaignCriterion(request);
Assert.AreEqual(expectedResponse, response);
mockGrpcClient.VerifyAll();
}
[Category("Smoke")][Test]
public async stt::Task GetCampaignCriterionRequestObjectAsync()
{
moq::Mock<CampaignCriterionService.CampaignCriterionServiceClient> mockGrpcClient = new moq::Mock<CampaignCriterionService.CampaignCriterionServiceClient>(moq::MockBehavior.Strict);
GetCampaignCriterionRequest request = new GetCampaignCriterionRequest
{
ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER]", "[CAMPAIGN_CRITERION]"),
};
gagvr::CampaignCriterion expectedResponse = new gagvr::CampaignCriterion
{
ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER]", "[CAMPAIGN_CRITERION]"),
Type = gagve::CriterionTypeEnum.Types.CriterionType.Location,
Keyword = new gagvc::KeywordInfo(),
Placement = new gagvc::PlacementInfo(),
MobileAppCategory = new gagvc::MobileAppCategoryInfo(),
MobileApplication = new gagvc::MobileApplicationInfo(),
Location = new gagvc::LocationInfo(),
Device = new gagvc::DeviceInfo(),
AdSchedule = new gagvc::AdScheduleInfo(),
AgeRange = new gagvc::AgeRangeInfo(),
Gender = new gagvc::GenderInfo(),
IncomeRange = new gagvc::IncomeRangeInfo(),
ParentalStatus = new gagvc::ParentalStatusInfo(),
YoutubeVideo = new gagvc::YouTubeVideoInfo(),
YoutubeChannel = new gagvc::YouTubeChannelInfo(),
UserList = new gagvc::UserListInfo(),
Proximity = new gagvc::ProximityInfo(),
Topic = new gagvc::TopicInfo(),
ListingScope = new gagvc::ListingScopeInfo(),
Language = new gagvc::LanguageInfo(),
IpBlock = new gagvc::IpBlockInfo(),
ContentLabel = new gagvc::ContentLabelInfo(),
Carrier = new gagvc::CarrierInfo(),
UserInterest = new gagvc::UserInterestInfo(),
Webpage = new gagvc::WebpageInfo(),
OperatingSystemVersion = new gagvc::OperatingSystemVersionInfo(),
MobileDevice = new gagvc::MobileDeviceInfo(),
LocationGroup = new gagvc::LocationGroupInfo(),
Status = gagve::CampaignCriterionStatusEnum.Types.CampaignCriterionStatus.Removed,
CustomAffinity = new gagvc::CustomAffinityInfo(),
CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"),
CriterionId = 8584655242409302840L,
BidModifier = 1.6595195E+17F,
Negative = false,
};
mockGrpcClient.Setup(x => x.GetCampaignCriterionAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<gagvr::CampaignCriterion>(stt::Task.FromResult(expectedResponse), null, null, null, null));
CampaignCriterionServiceClient client = new CampaignCriterionServiceClientImpl(mockGrpcClient.Object, null);
gagvr::CampaignCriterion responseCallSettings = await client.GetCampaignCriterionAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));
Assert.AreEqual(expectedResponse, responseCallSettings);
gagvr::CampaignCriterion responseCancellationToken = await client.GetCampaignCriterionAsync(request, st::CancellationToken.None);
Assert.AreEqual(expectedResponse, responseCancellationToken);
mockGrpcClient.VerifyAll();
}
[Category("Smoke")][Test]
public void GetCampaignCriterion()
{
moq::Mock<CampaignCriterionService.CampaignCriterionServiceClient> mockGrpcClient = new moq::Mock<CampaignCriterionService.CampaignCriterionServiceClient>(moq::MockBehavior.Strict);
GetCampaignCriterionRequest request = new GetCampaignCriterionRequest
{
ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER]", "[CAMPAIGN_CRITERION]"),
};
gagvr::CampaignCriterion expectedResponse = new gagvr::CampaignCriterion
{
ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER]", "[CAMPAIGN_CRITERION]"),
Type = gagve::CriterionTypeEnum.Types.CriterionType.Location,
Keyword = new gagvc::KeywordInfo(),
Placement = new gagvc::PlacementInfo(),
MobileAppCategory = new gagvc::MobileAppCategoryInfo(),
MobileApplication = new gagvc::MobileApplicationInfo(),
Location = new gagvc::LocationInfo(),
Device = new gagvc::DeviceInfo(),
AdSchedule = new gagvc::AdScheduleInfo(),
AgeRange = new gagvc::AgeRangeInfo(),
Gender = new gagvc::GenderInfo(),
IncomeRange = new gagvc::IncomeRangeInfo(),
ParentalStatus = new gagvc::ParentalStatusInfo(),
YoutubeVideo = new gagvc::YouTubeVideoInfo(),
YoutubeChannel = new gagvc::YouTubeChannelInfo(),
UserList = new gagvc::UserListInfo(),
Proximity = new gagvc::ProximityInfo(),
Topic = new gagvc::TopicInfo(),
ListingScope = new gagvc::ListingScopeInfo(),
Language = new gagvc::LanguageInfo(),
IpBlock = new gagvc::IpBlockInfo(),
ContentLabel = new gagvc::ContentLabelInfo(),
Carrier = new gagvc::CarrierInfo(),
UserInterest = new gagvc::UserInterestInfo(),
Webpage = new gagvc::WebpageInfo(),
OperatingSystemVersion = new gagvc::OperatingSystemVersionInfo(),
MobileDevice = new gagvc::MobileDeviceInfo(),
LocationGroup = new gagvc::LocationGroupInfo(),
Status = gagve::CampaignCriterionStatusEnum.Types.CampaignCriterionStatus.Removed,
CustomAffinity = new gagvc::CustomAffinityInfo(),
CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"),
CriterionId = 8584655242409302840L,
BidModifier = 1.6595195E+17F,
Negative = false,
};
mockGrpcClient.Setup(x => x.GetCampaignCriterion(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
CampaignCriterionServiceClient client = new CampaignCriterionServiceClientImpl(mockGrpcClient.Object, null);
gagvr::CampaignCriterion response = client.GetCampaignCriterion(request.ResourceName);
Assert.AreEqual(expectedResponse, response);
mockGrpcClient.VerifyAll();
}
[Category("Smoke")][Test]
public async stt::Task GetCampaignCriterionAsync()
{
moq::Mock<CampaignCriterionService.CampaignCriterionServiceClient> mockGrpcClient = new moq::Mock<CampaignCriterionService.CampaignCriterionServiceClient>(moq::MockBehavior.Strict);
GetCampaignCriterionRequest request = new GetCampaignCriterionRequest
{
ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER]", "[CAMPAIGN_CRITERION]"),
};
gagvr::CampaignCriterion expectedResponse = new gagvr::CampaignCriterion
{
ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER]", "[CAMPAIGN_CRITERION]"),
Type = gagve::CriterionTypeEnum.Types.CriterionType.Location,
Keyword = new gagvc::KeywordInfo(),
Placement = new gagvc::PlacementInfo(),
MobileAppCategory = new gagvc::MobileAppCategoryInfo(),
MobileApplication = new gagvc::MobileApplicationInfo(),
Location = new gagvc::LocationInfo(),
Device = new gagvc::DeviceInfo(),
AdSchedule = new gagvc::AdScheduleInfo(),
AgeRange = new gagvc::AgeRangeInfo(),
Gender = new gagvc::GenderInfo(),
IncomeRange = new gagvc::IncomeRangeInfo(),
ParentalStatus = new gagvc::ParentalStatusInfo(),
YoutubeVideo = new gagvc::YouTubeVideoInfo(),
YoutubeChannel = new gagvc::YouTubeChannelInfo(),
UserList = new gagvc::UserListInfo(),
Proximity = new gagvc::ProximityInfo(),
Topic = new gagvc::TopicInfo(),
ListingScope = new gagvc::ListingScopeInfo(),
Language = new gagvc::LanguageInfo(),
IpBlock = new gagvc::IpBlockInfo(),
ContentLabel = new gagvc::ContentLabelInfo(),
Carrier = new gagvc::CarrierInfo(),
UserInterest = new gagvc::UserInterestInfo(),
Webpage = new gagvc::WebpageInfo(),
OperatingSystemVersion = new gagvc::OperatingSystemVersionInfo(),
MobileDevice = new gagvc::MobileDeviceInfo(),
LocationGroup = new gagvc::LocationGroupInfo(),
Status = gagve::CampaignCriterionStatusEnum.Types.CampaignCriterionStatus.Removed,
CustomAffinity = new gagvc::CustomAffinityInfo(),
CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"),
CriterionId = 8584655242409302840L,
BidModifier = 1.6595195E+17F,
Negative = false,
};
mockGrpcClient.Setup(x => x.GetCampaignCriterionAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<gagvr::CampaignCriterion>(stt::Task.FromResult(expectedResponse), null, null, null, null));
CampaignCriterionServiceClient client = new CampaignCriterionServiceClientImpl(mockGrpcClient.Object, null);
gagvr::CampaignCriterion responseCallSettings = await client.GetCampaignCriterionAsync(request.ResourceName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));
Assert.AreEqual(expectedResponse, responseCallSettings);
gagvr::CampaignCriterion responseCancellationToken = await client.GetCampaignCriterionAsync(request.ResourceName, st::CancellationToken.None);
Assert.AreEqual(expectedResponse, responseCancellationToken);
mockGrpcClient.VerifyAll();
}
[Category("Smoke")][Test]
public void GetCampaignCriterionResourceNames()
{
moq::Mock<CampaignCriterionService.CampaignCriterionServiceClient> mockGrpcClient = new moq::Mock<CampaignCriterionService.CampaignCriterionServiceClient>(moq::MockBehavior.Strict);
GetCampaignCriterionRequest request = new GetCampaignCriterionRequest
{
ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER]", "[CAMPAIGN_CRITERION]"),
};
gagvr::CampaignCriterion expectedResponse = new gagvr::CampaignCriterion
{
ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER]", "[CAMPAIGN_CRITERION]"),
Type = gagve::CriterionTypeEnum.Types.CriterionType.Location,
Keyword = new gagvc::KeywordInfo(),
Placement = new gagvc::PlacementInfo(),
MobileAppCategory = new gagvc::MobileAppCategoryInfo(),
MobileApplication = new gagvc::MobileApplicationInfo(),
Location = new gagvc::LocationInfo(),
Device = new gagvc::DeviceInfo(),
AdSchedule = new gagvc::AdScheduleInfo(),
AgeRange = new gagvc::AgeRangeInfo(),
Gender = new gagvc::GenderInfo(),
IncomeRange = new gagvc::IncomeRangeInfo(),
ParentalStatus = new gagvc::ParentalStatusInfo(),
YoutubeVideo = new gagvc::YouTubeVideoInfo(),
YoutubeChannel = new gagvc::YouTubeChannelInfo(),
UserList = new gagvc::UserListInfo(),
Proximity = new gagvc::ProximityInfo(),
Topic = new gagvc::TopicInfo(),
ListingScope = new gagvc::ListingScopeInfo(),
Language = new gagvc::LanguageInfo(),
IpBlock = new gagvc::IpBlockInfo(),
ContentLabel = new gagvc::ContentLabelInfo(),
Carrier = new gagvc::CarrierInfo(),
UserInterest = new gagvc::UserInterestInfo(),
Webpage = new gagvc::WebpageInfo(),
OperatingSystemVersion = new gagvc::OperatingSystemVersionInfo(),
MobileDevice = new gagvc::MobileDeviceInfo(),
LocationGroup = new gagvc::LocationGroupInfo(),
Status = gagve::CampaignCriterionStatusEnum.Types.CampaignCriterionStatus.Removed,
CustomAffinity = new gagvc::CustomAffinityInfo(),
CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"),
CriterionId = 8584655242409302840L,
BidModifier = 1.6595195E+17F,
Negative = false,
};
mockGrpcClient.Setup(x => x.GetCampaignCriterion(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
CampaignCriterionServiceClient client = new CampaignCriterionServiceClientImpl(mockGrpcClient.Object, null);
gagvr::CampaignCriterion response = client.GetCampaignCriterion(request.ResourceNameAsCampaignCriterionName);
Assert.AreEqual(expectedResponse, response);
mockGrpcClient.VerifyAll();
}
[Category("Smoke")][Test]
public async stt::Task GetCampaignCriterionResourceNamesAsync()
{
moq::Mock<CampaignCriterionService.CampaignCriterionServiceClient> mockGrpcClient = new moq::Mock<CampaignCriterionService.CampaignCriterionServiceClient>(moq::MockBehavior.Strict);
GetCampaignCriterionRequest request = new GetCampaignCriterionRequest
{
ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER]", "[CAMPAIGN_CRITERION]"),
};
gagvr::CampaignCriterion expectedResponse = new gagvr::CampaignCriterion
{
ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER]", "[CAMPAIGN_CRITERION]"),
Type = gagve::CriterionTypeEnum.Types.CriterionType.Location,
Keyword = new gagvc::KeywordInfo(),
Placement = new gagvc::PlacementInfo(),
MobileAppCategory = new gagvc::MobileAppCategoryInfo(),
MobileApplication = new gagvc::MobileApplicationInfo(),
Location = new gagvc::LocationInfo(),
Device = new gagvc::DeviceInfo(),
AdSchedule = new gagvc::AdScheduleInfo(),
AgeRange = new gagvc::AgeRangeInfo(),
Gender = new gagvc::GenderInfo(),
IncomeRange = new gagvc::IncomeRangeInfo(),
ParentalStatus = new gagvc::ParentalStatusInfo(),
YoutubeVideo = new gagvc::YouTubeVideoInfo(),
YoutubeChannel = new gagvc::YouTubeChannelInfo(),
UserList = new gagvc::UserListInfo(),
Proximity = new gagvc::ProximityInfo(),
Topic = new gagvc::TopicInfo(),
ListingScope = new gagvc::ListingScopeInfo(),
Language = new gagvc::LanguageInfo(),
IpBlock = new gagvc::IpBlockInfo(),
ContentLabel = new gagvc::ContentLabelInfo(),
Carrier = new gagvc::CarrierInfo(),
UserInterest = new gagvc::UserInterestInfo(),
Webpage = new gagvc::WebpageInfo(),
OperatingSystemVersion = new gagvc::OperatingSystemVersionInfo(),
MobileDevice = new gagvc::MobileDeviceInfo(),
LocationGroup = new gagvc::LocationGroupInfo(),
Status = gagve::CampaignCriterionStatusEnum.Types.CampaignCriterionStatus.Removed,
CustomAffinity = new gagvc::CustomAffinityInfo(),
CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"),
CriterionId = 8584655242409302840L,
BidModifier = 1.6595195E+17F,
Negative = false,
};
mockGrpcClient.Setup(x => x.GetCampaignCriterionAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<gagvr::CampaignCriterion>(stt::Task.FromResult(expectedResponse), null, null, null, null));
CampaignCriterionServiceClient client = new CampaignCriterionServiceClientImpl(mockGrpcClient.Object, null);
gagvr::CampaignCriterion responseCallSettings = await client.GetCampaignCriterionAsync(request.ResourceNameAsCampaignCriterionName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));
Assert.AreEqual(expectedResponse, responseCallSettings);
gagvr::CampaignCriterion responseCancellationToken = await client.GetCampaignCriterionAsync(request.ResourceNameAsCampaignCriterionName, st::CancellationToken.None);
Assert.AreEqual(expectedResponse, responseCancellationToken);
mockGrpcClient.VerifyAll();
}
[Category("Smoke")][Test]
public void MutateCampaignCriteriaRequestObject()
{
moq::Mock<CampaignCriterionService.CampaignCriterionServiceClient> mockGrpcClient = new moq::Mock<CampaignCriterionService.CampaignCriterionServiceClient>(moq::MockBehavior.Strict);
MutateCampaignCriteriaRequest request = new MutateCampaignCriteriaRequest
{
CustomerId = "customer_id3b3724cb",
Operations =
{
new CampaignCriterionOperation(),
},
PartialFailure = false,
ValidateOnly = true,
ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly,
};
MutateCampaignCriteriaResponse expectedResponse = new MutateCampaignCriteriaResponse
{
Results =
{
new MutateCampaignCriterionResult(),
},
PartialFailureError = new gr::Status(),
};
mockGrpcClient.Setup(x => x.MutateCampaignCriteria(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
CampaignCriterionServiceClient client = new CampaignCriterionServiceClientImpl(mockGrpcClient.Object, null);
MutateCampaignCriteriaResponse response = client.MutateCampaignCriteria(request);
Assert.AreEqual(expectedResponse, response);
mockGrpcClient.VerifyAll();
}
[Category("Smoke")][Test]
public async stt::Task MutateCampaignCriteriaRequestObjectAsync()
{
moq::Mock<CampaignCriterionService.CampaignCriterionServiceClient> mockGrpcClient = new moq::Mock<CampaignCriterionService.CampaignCriterionServiceClient>(moq::MockBehavior.Strict);
MutateCampaignCriteriaRequest request = new MutateCampaignCriteriaRequest
{
CustomerId = "customer_id3b3724cb",
Operations =
{
new CampaignCriterionOperation(),
},
PartialFailure = false,
ValidateOnly = true,
ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly,
};
MutateCampaignCriteriaResponse expectedResponse = new MutateCampaignCriteriaResponse
{
Results =
{
new MutateCampaignCriterionResult(),
},
PartialFailureError = new gr::Status(),
};
mockGrpcClient.Setup(x => x.MutateCampaignCriteriaAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<MutateCampaignCriteriaResponse>(stt::Task.FromResult(expectedResponse), null, null, null, null));
CampaignCriterionServiceClient client = new CampaignCriterionServiceClientImpl(mockGrpcClient.Object, null);
MutateCampaignCriteriaResponse responseCallSettings = await client.MutateCampaignCriteriaAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));
Assert.AreEqual(expectedResponse, responseCallSettings);
MutateCampaignCriteriaResponse responseCancellationToken = await client.MutateCampaignCriteriaAsync(request, st::CancellationToken.None);
Assert.AreEqual(expectedResponse, responseCancellationToken);
mockGrpcClient.VerifyAll();
}
[Category("Smoke")][Test]
public void MutateCampaignCriteria()
{
moq::Mock<CampaignCriterionService.CampaignCriterionServiceClient> mockGrpcClient = new moq::Mock<CampaignCriterionService.CampaignCriterionServiceClient>(moq::MockBehavior.Strict);
MutateCampaignCriteriaRequest request = new MutateCampaignCriteriaRequest
{
CustomerId = "customer_id3b3724cb",
Operations =
{
new CampaignCriterionOperation(),
},
};
MutateCampaignCriteriaResponse expectedResponse = new MutateCampaignCriteriaResponse
{
Results =
{
new MutateCampaignCriterionResult(),
},
PartialFailureError = new gr::Status(),
};
mockGrpcClient.Setup(x => x.MutateCampaignCriteria(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
CampaignCriterionServiceClient client = new CampaignCriterionServiceClientImpl(mockGrpcClient.Object, null);
MutateCampaignCriteriaResponse response = client.MutateCampaignCriteria(request.CustomerId, request.Operations);
Assert.AreEqual(expectedResponse, response);
mockGrpcClient.VerifyAll();
}
[Category("Smoke")][Test]
public async stt::Task MutateCampaignCriteriaAsync()
{
moq::Mock<CampaignCriterionService.CampaignCriterionServiceClient> mockGrpcClient = new moq::Mock<CampaignCriterionService.CampaignCriterionServiceClient>(moq::MockBehavior.Strict);
MutateCampaignCriteriaRequest request = new MutateCampaignCriteriaRequest
{
CustomerId = "customer_id3b3724cb",
Operations =
{
new CampaignCriterionOperation(),
},
};
MutateCampaignCriteriaResponse expectedResponse = new MutateCampaignCriteriaResponse
{
Results =
{
new MutateCampaignCriterionResult(),
},
PartialFailureError = new gr::Status(),
};
mockGrpcClient.Setup(x => x.MutateCampaignCriteriaAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<MutateCampaignCriteriaResponse>(stt::Task.FromResult(expectedResponse), null, null, null, null));
CampaignCriterionServiceClient client = new CampaignCriterionServiceClientImpl(mockGrpcClient.Object, null);
MutateCampaignCriteriaResponse responseCallSettings = await client.MutateCampaignCriteriaAsync(request.CustomerId, request.Operations, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));
Assert.AreEqual(expectedResponse, responseCallSettings);
MutateCampaignCriteriaResponse responseCancellationToken = await client.MutateCampaignCriteriaAsync(request.CustomerId, request.Operations, st::CancellationToken.None);
Assert.AreEqual(expectedResponse, responseCancellationToken);
mockGrpcClient.VerifyAll();
}
}
}
| 61.944798 | 252 | 0.647587 | [
"Apache-2.0"
] | GraphikaPS/google-ads-dotnet | tests/V5/Services/CampaignCriterionServiceClientTest.g.cs | 29,176 | 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 eks-2017-11-01.normal.json service model.
*/
using System;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using Amazon.Runtime;
using Amazon.EKS.Model;
namespace Amazon.EKS
{
/// <summary>
/// Interface for accessing EKS
///
/// Amazon Elastic Kubernetes Service (Amazon EKS) is a managed service that makes it
/// easy for you to run Kubernetes on AWS without needing to stand up or maintain your
/// own Kubernetes control plane. Kubernetes is an open-source system for automating the
/// deployment, scaling, and management of containerized applications.
///
///
/// <para>
/// Amazon EKS runs up-to-date versions of the open-source Kubernetes software, so you
/// can use all the existing plugins and tooling from the Kubernetes community. Applications
/// running on Amazon EKS are fully compatible with applications running on any standard
/// Kubernetes environment, whether running in on-premises data centers or public clouds.
/// This means that you can easily migrate any standard Kubernetes application to Amazon
/// EKS without any code modification required.
/// </para>
/// </summary>
#if NETSTANDARD13
[Obsolete("Support for .NET Standard 1.3 is in maintenance mode and will only receive critical bug fixes and security patches. Visit https://docs.aws.amazon.com/sdk-for-net/v3/developer-guide/migration-from-net-standard-1-3.html for further details.")]
#endif
public partial interface IAmazonEKS : IAmazonService, IDisposable
{
#if AWS_ASYNC_ENUMERABLES_API
/// <summary>
/// Paginators for the service
/// </summary>
IEKSPaginatorFactory Paginators { get; }
#endif
#region AssociateIdentityProviderConfig
/// <summary>
/// Associate an identity provider configuration to a cluster.
///
///
/// <para>
/// If you want to authenticate identities using an identity provider, you can create
/// an identity provider configuration and associate it to your cluster. After configuring
/// authentication to your cluster you can create Kubernetes <code>roles</code> and <code>clusterroles</code>
/// to assign permissions to the roles, and then bind the roles to the identities using
/// Kubernetes <code>rolebindings</code> and <code>clusterrolebindings</code>. For more
/// information see <a href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/">Using
/// RBAC Authorization</a> in the Kubernetes documentation.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AssociateIdentityProviderConfig 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 AssociateIdentityProviderConfig service method, as returned by EKS.</returns>
/// <exception cref="Amazon.EKS.Model.ClientException">
/// These errors are usually caused by a client action. Actions can include using an action
/// or resource on behalf of a user that doesn't have permissions to use the action or
/// resource or specifying an identifier that is not valid.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidParameterException">
/// The specified parameter is invalid. Review the available parameters for the API request.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidRequestException">
/// The request is invalid given the state of the cluster. Check the state of the cluster
/// and the associated operations.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceInUseException">
/// The specified resource is in use.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceNotFoundException">
/// The specified resource could not be found. You can view your available clusters with
/// <a>ListClusters</a>. You can view your available managed node groups with <a>ListNodegroups</a>.
/// Amazon EKS clusters and node groups are Region-specific.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServerException">
/// These errors are usually caused by a server-side issue.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/AssociateIdentityProviderConfig">REST API Reference for AssociateIdentityProviderConfig Operation</seealso>
Task<AssociateIdentityProviderConfigResponse> AssociateIdentityProviderConfigAsync(AssociateIdentityProviderConfigRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region CreateAddon
/// <summary>
/// Creates an Amazon EKS add-on.
///
///
/// <para>
/// Amazon EKS add-ons help to automate the provisioning and lifecycle management of common
/// operational software for Amazon EKS clusters. Amazon EKS add-ons can only be used
/// with Amazon EKS clusters running version 1.18 with platform version <code>eks.3</code>
/// or later because add-ons rely on the Server-side Apply Kubernetes feature, which is
/// only available in Kubernetes 1.18 and later.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateAddon 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 CreateAddon service method, as returned by EKS.</returns>
/// <exception cref="Amazon.EKS.Model.ClientException">
/// These errors are usually caused by a client action. Actions can include using an action
/// or resource on behalf of a user that doesn't have permissions to use the action or
/// resource or specifying an identifier that is not valid.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidParameterException">
/// The specified parameter is invalid. Review the available parameters for the API request.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidRequestException">
/// The request is invalid given the state of the cluster. Check the state of the cluster
/// and the associated operations.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceInUseException">
/// The specified resource is in use.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceNotFoundException">
/// The specified resource could not be found. You can view your available clusters with
/// <a>ListClusters</a>. You can view your available managed node groups with <a>ListNodegroups</a>.
/// Amazon EKS clusters and node groups are Region-specific.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServerException">
/// These errors are usually caused by a server-side issue.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/CreateAddon">REST API Reference for CreateAddon Operation</seealso>
Task<CreateAddonResponse> CreateAddonAsync(CreateAddonRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region CreateCluster
/// <summary>
/// Creates an Amazon EKS control plane.
///
///
/// <para>
/// The Amazon EKS control plane consists of control plane instances that run the Kubernetes
/// software, such as <code>etcd</code> and the API server. The control plane runs in
/// an account managed by AWS, and the Kubernetes API is exposed via the Amazon EKS API
/// server endpoint. Each Amazon EKS cluster control plane is single-tenant and unique
/// and runs on its own set of Amazon EC2 instances.
/// </para>
///
/// <para>
/// The cluster control plane is provisioned across multiple Availability Zones and fronted
/// by an Elastic Load Balancing Network Load Balancer. Amazon EKS also provisions elastic
/// network interfaces in your VPC subnets to provide connectivity from the control plane
/// instances to the nodes (for example, to support <code>kubectl exec</code>, <code>logs</code>,
/// and <code>proxy</code> data flows).
/// </para>
///
/// <para>
/// Amazon EKS nodes run in your AWS account and connect to your cluster's control plane
/// via the Kubernetes API server endpoint and a certificate file that is created for
/// your cluster.
/// </para>
///
/// <para>
/// You can use the <code>endpointPublicAccess</code> and <code>endpointPrivateAccess</code>
/// parameters to enable or disable public and private access to your cluster's Kubernetes
/// API server endpoint. By default, public access is enabled, and private access is disabled.
/// For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html">Amazon
/// EKS Cluster Endpoint Access Control</a> in the <i> <i>Amazon EKS User Guide</i> </i>.
///
/// </para>
///
/// <para>
/// You can use the <code>logging</code> parameter to enable or disable exporting the
/// Kubernetes control plane logs for your cluster to CloudWatch Logs. By default, cluster
/// control plane logs aren't exported to CloudWatch Logs. For more information, see <a
/// href="https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html">Amazon
/// EKS Cluster Control Plane Logs</a> in the <i> <i>Amazon EKS User Guide</i> </i>.
/// </para>
/// <note>
/// <para>
/// CloudWatch Logs ingestion, archive storage, and data scanning rates apply to exported
/// control plane logs. For more information, see <a href="http://aws.amazon.com/cloudwatch/pricing/">Amazon
/// CloudWatch Pricing</a>.
/// </para>
/// </note>
/// <para>
/// Cluster creation typically takes between 10 and 15 minutes. After you create an Amazon
/// EKS cluster, you must configure your Kubernetes tooling to communicate with the API
/// server and launch nodes into your cluster. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/managing-auth.html">Managing
/// Cluster Authentication</a> and <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-workers.html">Launching
/// Amazon EKS nodes</a> in the <i>Amazon EKS User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateCluster 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 CreateCluster service method, as returned by EKS.</returns>
/// <exception cref="Amazon.EKS.Model.ClientException">
/// These errors are usually caused by a client action. Actions can include using an action
/// or resource on behalf of a user that doesn't have permissions to use the action or
/// resource or specifying an identifier that is not valid.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidParameterException">
/// The specified parameter is invalid. Review the available parameters for the API request.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceInUseException">
/// The specified resource is in use.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceLimitExceededException">
/// You have encountered a service limit on the specified resource.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServerException">
/// These errors are usually caused by a server-side issue.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServiceUnavailableException">
/// The service is unavailable. Back off and retry the operation.
/// </exception>
/// <exception cref="Amazon.EKS.Model.UnsupportedAvailabilityZoneException">
/// At least one of your specified cluster subnets is in an Availability Zone that does
/// not support Amazon EKS. The exception output specifies the supported Availability
/// Zones for your account, from which you can choose subnets for your cluster.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/CreateCluster">REST API Reference for CreateCluster Operation</seealso>
Task<CreateClusterResponse> CreateClusterAsync(CreateClusterRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region CreateFargateProfile
/// <summary>
/// Creates an AWS Fargate profile for your Amazon EKS cluster. You must have at least
/// one Fargate profile in a cluster to be able to run pods on Fargate.
///
///
/// <para>
/// The Fargate profile allows an administrator to declare which pods run on Fargate and
/// specify which pods run on which Fargate profile. This declaration is done through
/// the profile’s selectors. Each profile can have up to five selectors that contain a
/// namespace and labels. A namespace is required for every selector. The label field
/// consists of multiple optional key-value pairs. Pods that match the selectors are scheduled
/// on Fargate. If a to-be-scheduled pod matches any of the selectors in the Fargate profile,
/// then that pod is run on Fargate.
/// </para>
///
/// <para>
/// When you create a Fargate profile, you must specify a pod execution role to use with
/// the pods that are scheduled with the profile. This role is added to the cluster's
/// Kubernetes <a href="https://kubernetes.io/docs/admin/authorization/rbac/">Role Based
/// Access Control</a> (RBAC) for authorization so that the <code>kubelet</code> that
/// is running on the Fargate infrastructure can register with your Amazon EKS cluster
/// so that it can appear in your cluster as a node. The pod execution role also provides
/// IAM permissions to the Fargate infrastructure to allow read access to Amazon ECR image
/// repositories. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/pod-execution-role.html">Pod
/// Execution Role</a> in the <i>Amazon EKS User Guide</i>.
/// </para>
///
/// <para>
/// Fargate profiles are immutable. However, you can create a new updated profile to replace
/// an existing profile and then delete the original after the updated profile has finished
/// creating.
/// </para>
///
/// <para>
/// If any Fargate profiles in a cluster are in the <code>DELETING</code> status, you
/// must wait for that Fargate profile to finish deleting before you can create any other
/// profiles in that cluster.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/fargate-profile.html">AWS
/// Fargate Profile</a> in the <i>Amazon EKS User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateFargateProfile 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 CreateFargateProfile service method, as returned by EKS.</returns>
/// <exception cref="Amazon.EKS.Model.ClientException">
/// These errors are usually caused by a client action. Actions can include using an action
/// or resource on behalf of a user that doesn't have permissions to use the action or
/// resource or specifying an identifier that is not valid.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidParameterException">
/// The specified parameter is invalid. Review the available parameters for the API request.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidRequestException">
/// The request is invalid given the state of the cluster. Check the state of the cluster
/// and the associated operations.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceLimitExceededException">
/// You have encountered a service limit on the specified resource.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServerException">
/// These errors are usually caused by a server-side issue.
/// </exception>
/// <exception cref="Amazon.EKS.Model.UnsupportedAvailabilityZoneException">
/// At least one of your specified cluster subnets is in an Availability Zone that does
/// not support Amazon EKS. The exception output specifies the supported Availability
/// Zones for your account, from which you can choose subnets for your cluster.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/CreateFargateProfile">REST API Reference for CreateFargateProfile Operation</seealso>
Task<CreateFargateProfileResponse> CreateFargateProfileAsync(CreateFargateProfileRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region CreateNodegroup
/// <summary>
/// Creates a managed node group for an Amazon EKS cluster. You can only create a node
/// group for your cluster that is equal to the current Kubernetes version for the cluster.
/// All node groups are created with the latest AMI release version for the respective
/// minor Kubernetes version of the cluster, unless you deploy a custom AMI using a launch
/// template. For more information about using launch templates, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Launch
/// template support</a>.
///
///
/// <para>
/// An Amazon EKS managed node group is an Amazon EC2 Auto Scaling group and associated
/// Amazon EC2 instances that are managed by AWS for an Amazon EKS cluster. Each node
/// group uses a version of the Amazon EKS optimized Amazon Linux 2 AMI. For more information,
/// see <a href="https://docs.aws.amazon.com/eks/latest/userguide/managed-node-groups.html">Managed
/// Node Groups</a> in the <i>Amazon EKS User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateNodegroup 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 CreateNodegroup service method, as returned by EKS.</returns>
/// <exception cref="Amazon.EKS.Model.ClientException">
/// These errors are usually caused by a client action. Actions can include using an action
/// or resource on behalf of a user that doesn't have permissions to use the action or
/// resource or specifying an identifier that is not valid.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidParameterException">
/// The specified parameter is invalid. Review the available parameters for the API request.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidRequestException">
/// The request is invalid given the state of the cluster. Check the state of the cluster
/// and the associated operations.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceInUseException">
/// The specified resource is in use.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceLimitExceededException">
/// You have encountered a service limit on the specified resource.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServerException">
/// These errors are usually caused by a server-side issue.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServiceUnavailableException">
/// The service is unavailable. Back off and retry the operation.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/CreateNodegroup">REST API Reference for CreateNodegroup Operation</seealso>
Task<CreateNodegroupResponse> CreateNodegroupAsync(CreateNodegroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DeleteAddon
/// <summary>
/// Delete an Amazon EKS add-on.
///
///
/// <para>
/// When you remove the add-on, it will also be deleted from the cluster. You can always
/// manually start an add-on on the cluster using the Kubernetes API.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteAddon 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 DeleteAddon service method, as returned by EKS.</returns>
/// <exception cref="Amazon.EKS.Model.ClientException">
/// These errors are usually caused by a client action. Actions can include using an action
/// or resource on behalf of a user that doesn't have permissions to use the action or
/// resource or specifying an identifier that is not valid.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidParameterException">
/// The specified parameter is invalid. Review the available parameters for the API request.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidRequestException">
/// The request is invalid given the state of the cluster. Check the state of the cluster
/// and the associated operations.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceNotFoundException">
/// The specified resource could not be found. You can view your available clusters with
/// <a>ListClusters</a>. You can view your available managed node groups with <a>ListNodegroups</a>.
/// Amazon EKS clusters and node groups are Region-specific.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServerException">
/// These errors are usually caused by a server-side issue.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/DeleteAddon">REST API Reference for DeleteAddon Operation</seealso>
Task<DeleteAddonResponse> DeleteAddonAsync(DeleteAddonRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DeleteCluster
/// <summary>
/// Deletes the Amazon EKS cluster control plane.
///
///
/// <para>
/// If you have active services in your cluster that are associated with a load balancer,
/// you must delete those services before deleting the cluster so that the load balancers
/// are deleted properly. Otherwise, you can have orphaned resources in your VPC that
/// prevent you from being able to delete the VPC. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/delete-cluster.html">Deleting
/// a Cluster</a> in the <i>Amazon EKS User Guide</i>.
/// </para>
///
/// <para>
/// If you have managed node groups or Fargate profiles attached to the cluster, you must
/// delete them first. For more information, see <a>DeleteNodegroup</a> and <a>DeleteFargateProfile</a>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteCluster 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 DeleteCluster service method, as returned by EKS.</returns>
/// <exception cref="Amazon.EKS.Model.ClientException">
/// These errors are usually caused by a client action. Actions can include using an action
/// or resource on behalf of a user that doesn't have permissions to use the action or
/// resource or specifying an identifier that is not valid.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceInUseException">
/// The specified resource is in use.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceNotFoundException">
/// The specified resource could not be found. You can view your available clusters with
/// <a>ListClusters</a>. You can view your available managed node groups with <a>ListNodegroups</a>.
/// Amazon EKS clusters and node groups are Region-specific.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServerException">
/// These errors are usually caused by a server-side issue.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServiceUnavailableException">
/// The service is unavailable. Back off and retry the operation.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/DeleteCluster">REST API Reference for DeleteCluster Operation</seealso>
Task<DeleteClusterResponse> DeleteClusterAsync(DeleteClusterRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DeleteFargateProfile
/// <summary>
/// Deletes an AWS Fargate profile.
///
///
/// <para>
/// When you delete a Fargate profile, any pods running on Fargate that were created with
/// the profile are deleted. If those pods match another Fargate profile, then they are
/// scheduled on Fargate with that profile. If they no longer match any Fargate profiles,
/// then they are not scheduled on Fargate and they may remain in a pending state.
/// </para>
///
/// <para>
/// Only one Fargate profile in a cluster can be in the <code>DELETING</code> status at
/// a time. You must wait for a Fargate profile to finish deleting before you can delete
/// any other profiles in that cluster.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteFargateProfile 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 DeleteFargateProfile service method, as returned by EKS.</returns>
/// <exception cref="Amazon.EKS.Model.ClientException">
/// These errors are usually caused by a client action. Actions can include using an action
/// or resource on behalf of a user that doesn't have permissions to use the action or
/// resource or specifying an identifier that is not valid.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidParameterException">
/// The specified parameter is invalid. Review the available parameters for the API request.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceNotFoundException">
/// The specified resource could not be found. You can view your available clusters with
/// <a>ListClusters</a>. You can view your available managed node groups with <a>ListNodegroups</a>.
/// Amazon EKS clusters and node groups are Region-specific.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServerException">
/// These errors are usually caused by a server-side issue.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/DeleteFargateProfile">REST API Reference for DeleteFargateProfile Operation</seealso>
Task<DeleteFargateProfileResponse> DeleteFargateProfileAsync(DeleteFargateProfileRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DeleteNodegroup
/// <summary>
/// Deletes an Amazon EKS node group for a cluster.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteNodegroup 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 DeleteNodegroup service method, as returned by EKS.</returns>
/// <exception cref="Amazon.EKS.Model.ClientException">
/// These errors are usually caused by a client action. Actions can include using an action
/// or resource on behalf of a user that doesn't have permissions to use the action or
/// resource or specifying an identifier that is not valid.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidParameterException">
/// The specified parameter is invalid. Review the available parameters for the API request.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceInUseException">
/// The specified resource is in use.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceNotFoundException">
/// The specified resource could not be found. You can view your available clusters with
/// <a>ListClusters</a>. You can view your available managed node groups with <a>ListNodegroups</a>.
/// Amazon EKS clusters and node groups are Region-specific.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServerException">
/// These errors are usually caused by a server-side issue.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServiceUnavailableException">
/// The service is unavailable. Back off and retry the operation.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/DeleteNodegroup">REST API Reference for DeleteNodegroup Operation</seealso>
Task<DeleteNodegroupResponse> DeleteNodegroupAsync(DeleteNodegroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DescribeAddon
/// <summary>
/// Describes an Amazon EKS add-on.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeAddon 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 DescribeAddon service method, as returned by EKS.</returns>
/// <exception cref="Amazon.EKS.Model.ClientException">
/// These errors are usually caused by a client action. Actions can include using an action
/// or resource on behalf of a user that doesn't have permissions to use the action or
/// resource or specifying an identifier that is not valid.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidParameterException">
/// The specified parameter is invalid. Review the available parameters for the API request.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidRequestException">
/// The request is invalid given the state of the cluster. Check the state of the cluster
/// and the associated operations.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceNotFoundException">
/// The specified resource could not be found. You can view your available clusters with
/// <a>ListClusters</a>. You can view your available managed node groups with <a>ListNodegroups</a>.
/// Amazon EKS clusters and node groups are Region-specific.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServerException">
/// These errors are usually caused by a server-side issue.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/DescribeAddon">REST API Reference for DescribeAddon Operation</seealso>
Task<DescribeAddonResponse> DescribeAddonAsync(DescribeAddonRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DescribeAddonVersions
/// <summary>
/// Describes the Kubernetes versions that the add-on can be used with.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeAddonVersions 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 DescribeAddonVersions service method, as returned by EKS.</returns>
/// <exception cref="Amazon.EKS.Model.InvalidParameterException">
/// The specified parameter is invalid. Review the available parameters for the API request.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceNotFoundException">
/// The specified resource could not be found. You can view your available clusters with
/// <a>ListClusters</a>. You can view your available managed node groups with <a>ListNodegroups</a>.
/// Amazon EKS clusters and node groups are Region-specific.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServerException">
/// These errors are usually caused by a server-side issue.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/DescribeAddonVersions">REST API Reference for DescribeAddonVersions Operation</seealso>
Task<DescribeAddonVersionsResponse> DescribeAddonVersionsAsync(DescribeAddonVersionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DescribeCluster
/// <summary>
/// Returns descriptive information about an Amazon EKS cluster.
///
///
/// <para>
/// The API server endpoint and certificate authority data returned by this operation
/// are required for <code>kubelet</code> and <code>kubectl</code> to communicate with
/// your Kubernetes API server. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/create-kubeconfig.html">Create
/// a kubeconfig for Amazon EKS</a>.
/// </para>
/// <note>
/// <para>
/// The API server endpoint and certificate authority data aren't available until the
/// cluster reaches the <code>ACTIVE</code> state.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeCluster 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 DescribeCluster service method, as returned by EKS.</returns>
/// <exception cref="Amazon.EKS.Model.ClientException">
/// These errors are usually caused by a client action. Actions can include using an action
/// or resource on behalf of a user that doesn't have permissions to use the action or
/// resource or specifying an identifier that is not valid.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceNotFoundException">
/// The specified resource could not be found. You can view your available clusters with
/// <a>ListClusters</a>. You can view your available managed node groups with <a>ListNodegroups</a>.
/// Amazon EKS clusters and node groups are Region-specific.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServerException">
/// These errors are usually caused by a server-side issue.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServiceUnavailableException">
/// The service is unavailable. Back off and retry the operation.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/DescribeCluster">REST API Reference for DescribeCluster Operation</seealso>
Task<DescribeClusterResponse> DescribeClusterAsync(DescribeClusterRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DescribeFargateProfile
/// <summary>
/// Returns descriptive information about an AWS Fargate profile.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeFargateProfile 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 DescribeFargateProfile service method, as returned by EKS.</returns>
/// <exception cref="Amazon.EKS.Model.ClientException">
/// These errors are usually caused by a client action. Actions can include using an action
/// or resource on behalf of a user that doesn't have permissions to use the action or
/// resource or specifying an identifier that is not valid.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidParameterException">
/// The specified parameter is invalid. Review the available parameters for the API request.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceNotFoundException">
/// The specified resource could not be found. You can view your available clusters with
/// <a>ListClusters</a>. You can view your available managed node groups with <a>ListNodegroups</a>.
/// Amazon EKS clusters and node groups are Region-specific.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServerException">
/// These errors are usually caused by a server-side issue.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/DescribeFargateProfile">REST API Reference for DescribeFargateProfile Operation</seealso>
Task<DescribeFargateProfileResponse> DescribeFargateProfileAsync(DescribeFargateProfileRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DescribeIdentityProviderConfig
/// <summary>
/// Returns descriptive information about an identity provider configuration.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeIdentityProviderConfig 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 DescribeIdentityProviderConfig service method, as returned by EKS.</returns>
/// <exception cref="Amazon.EKS.Model.ClientException">
/// These errors are usually caused by a client action. Actions can include using an action
/// or resource on behalf of a user that doesn't have permissions to use the action or
/// resource or specifying an identifier that is not valid.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidParameterException">
/// The specified parameter is invalid. Review the available parameters for the API request.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceNotFoundException">
/// The specified resource could not be found. You can view your available clusters with
/// <a>ListClusters</a>. You can view your available managed node groups with <a>ListNodegroups</a>.
/// Amazon EKS clusters and node groups are Region-specific.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServerException">
/// These errors are usually caused by a server-side issue.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServiceUnavailableException">
/// The service is unavailable. Back off and retry the operation.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/DescribeIdentityProviderConfig">REST API Reference for DescribeIdentityProviderConfig Operation</seealso>
Task<DescribeIdentityProviderConfigResponse> DescribeIdentityProviderConfigAsync(DescribeIdentityProviderConfigRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DescribeNodegroup
/// <summary>
/// Returns descriptive information about an Amazon EKS node group.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeNodegroup 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 DescribeNodegroup service method, as returned by EKS.</returns>
/// <exception cref="Amazon.EKS.Model.ClientException">
/// These errors are usually caused by a client action. Actions can include using an action
/// or resource on behalf of a user that doesn't have permissions to use the action or
/// resource or specifying an identifier that is not valid.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidParameterException">
/// The specified parameter is invalid. Review the available parameters for the API request.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceNotFoundException">
/// The specified resource could not be found. You can view your available clusters with
/// <a>ListClusters</a>. You can view your available managed node groups with <a>ListNodegroups</a>.
/// Amazon EKS clusters and node groups are Region-specific.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServerException">
/// These errors are usually caused by a server-side issue.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServiceUnavailableException">
/// The service is unavailable. Back off and retry the operation.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/DescribeNodegroup">REST API Reference for DescribeNodegroup Operation</seealso>
Task<DescribeNodegroupResponse> DescribeNodegroupAsync(DescribeNodegroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DescribeUpdate
/// <summary>
/// Returns descriptive information about an update against your Amazon EKS cluster or
/// associated managed node group.
///
///
/// <para>
/// When the status of the update is <code>Succeeded</code>, the update is complete. If
/// an update fails, the status is <code>Failed</code>, and an error detail explains the
/// reason for the failure.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeUpdate 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 DescribeUpdate service method, as returned by EKS.</returns>
/// <exception cref="Amazon.EKS.Model.ClientException">
/// These errors are usually caused by a client action. Actions can include using an action
/// or resource on behalf of a user that doesn't have permissions to use the action or
/// resource or specifying an identifier that is not valid.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidParameterException">
/// The specified parameter is invalid. Review the available parameters for the API request.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceNotFoundException">
/// The specified resource could not be found. You can view your available clusters with
/// <a>ListClusters</a>. You can view your available managed node groups with <a>ListNodegroups</a>.
/// Amazon EKS clusters and node groups are Region-specific.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServerException">
/// These errors are usually caused by a server-side issue.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/DescribeUpdate">REST API Reference for DescribeUpdate Operation</seealso>
Task<DescribeUpdateResponse> DescribeUpdateAsync(DescribeUpdateRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DisassociateIdentityProviderConfig
/// <summary>
/// Disassociates an identity provider configuration from a cluster. If you disassociate
/// an identity provider from your cluster, users included in the provider can no longer
/// access the cluster. However, you can still access the cluster with AWS IAM users.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DisassociateIdentityProviderConfig 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 DisassociateIdentityProviderConfig service method, as returned by EKS.</returns>
/// <exception cref="Amazon.EKS.Model.ClientException">
/// These errors are usually caused by a client action. Actions can include using an action
/// or resource on behalf of a user that doesn't have permissions to use the action or
/// resource or specifying an identifier that is not valid.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidParameterException">
/// The specified parameter is invalid. Review the available parameters for the API request.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidRequestException">
/// The request is invalid given the state of the cluster. Check the state of the cluster
/// and the associated operations.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceInUseException">
/// The specified resource is in use.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceNotFoundException">
/// The specified resource could not be found. You can view your available clusters with
/// <a>ListClusters</a>. You can view your available managed node groups with <a>ListNodegroups</a>.
/// Amazon EKS clusters and node groups are Region-specific.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServerException">
/// These errors are usually caused by a server-side issue.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/DisassociateIdentityProviderConfig">REST API Reference for DisassociateIdentityProviderConfig Operation</seealso>
Task<DisassociateIdentityProviderConfigResponse> DisassociateIdentityProviderConfigAsync(DisassociateIdentityProviderConfigRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region ListAddons
/// <summary>
/// Lists the available add-ons.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListAddons 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 ListAddons service method, as returned by EKS.</returns>
/// <exception cref="Amazon.EKS.Model.ClientException">
/// These errors are usually caused by a client action. Actions can include using an action
/// or resource on behalf of a user that doesn't have permissions to use the action or
/// resource or specifying an identifier that is not valid.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidParameterException">
/// The specified parameter is invalid. Review the available parameters for the API request.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidRequestException">
/// The request is invalid given the state of the cluster. Check the state of the cluster
/// and the associated operations.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceNotFoundException">
/// The specified resource could not be found. You can view your available clusters with
/// <a>ListClusters</a>. You can view your available managed node groups with <a>ListNodegroups</a>.
/// Amazon EKS clusters and node groups are Region-specific.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServerException">
/// These errors are usually caused by a server-side issue.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/ListAddons">REST API Reference for ListAddons Operation</seealso>
Task<ListAddonsResponse> ListAddonsAsync(ListAddonsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region ListClusters
/// <summary>
/// Lists the Amazon EKS clusters in your AWS account in the specified Region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListClusters 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 ListClusters service method, as returned by EKS.</returns>
/// <exception cref="Amazon.EKS.Model.ClientException">
/// These errors are usually caused by a client action. Actions can include using an action
/// or resource on behalf of a user that doesn't have permissions to use the action or
/// resource or specifying an identifier that is not valid.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidParameterException">
/// The specified parameter is invalid. Review the available parameters for the API request.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServerException">
/// These errors are usually caused by a server-side issue.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServiceUnavailableException">
/// The service is unavailable. Back off and retry the operation.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/ListClusters">REST API Reference for ListClusters Operation</seealso>
Task<ListClustersResponse> ListClustersAsync(ListClustersRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region ListFargateProfiles
/// <summary>
/// Lists the AWS Fargate profiles associated with the specified cluster in your AWS account
/// in the specified Region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListFargateProfiles 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 ListFargateProfiles service method, as returned by EKS.</returns>
/// <exception cref="Amazon.EKS.Model.ClientException">
/// These errors are usually caused by a client action. Actions can include using an action
/// or resource on behalf of a user that doesn't have permissions to use the action or
/// resource or specifying an identifier that is not valid.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidParameterException">
/// The specified parameter is invalid. Review the available parameters for the API request.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceNotFoundException">
/// The specified resource could not be found. You can view your available clusters with
/// <a>ListClusters</a>. You can view your available managed node groups with <a>ListNodegroups</a>.
/// Amazon EKS clusters and node groups are Region-specific.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServerException">
/// These errors are usually caused by a server-side issue.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/ListFargateProfiles">REST API Reference for ListFargateProfiles Operation</seealso>
Task<ListFargateProfilesResponse> ListFargateProfilesAsync(ListFargateProfilesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region ListIdentityProviderConfigs
/// <summary>
/// A list of identity provider configurations.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListIdentityProviderConfigs 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 ListIdentityProviderConfigs service method, as returned by EKS.</returns>
/// <exception cref="Amazon.EKS.Model.ClientException">
/// These errors are usually caused by a client action. Actions can include using an action
/// or resource on behalf of a user that doesn't have permissions to use the action or
/// resource or specifying an identifier that is not valid.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidParameterException">
/// The specified parameter is invalid. Review the available parameters for the API request.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceNotFoundException">
/// The specified resource could not be found. You can view your available clusters with
/// <a>ListClusters</a>. You can view your available managed node groups with <a>ListNodegroups</a>.
/// Amazon EKS clusters and node groups are Region-specific.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServerException">
/// These errors are usually caused by a server-side issue.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServiceUnavailableException">
/// The service is unavailable. Back off and retry the operation.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/ListIdentityProviderConfigs">REST API Reference for ListIdentityProviderConfigs Operation</seealso>
Task<ListIdentityProviderConfigsResponse> ListIdentityProviderConfigsAsync(ListIdentityProviderConfigsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region ListNodegroups
/// <summary>
/// Lists the Amazon EKS managed node groups associated with the specified cluster in
/// your AWS account in the specified Region. Self-managed node groups are not listed.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListNodegroups 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 ListNodegroups service method, as returned by EKS.</returns>
/// <exception cref="Amazon.EKS.Model.ClientException">
/// These errors are usually caused by a client action. Actions can include using an action
/// or resource on behalf of a user that doesn't have permissions to use the action or
/// resource or specifying an identifier that is not valid.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidParameterException">
/// The specified parameter is invalid. Review the available parameters for the API request.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceNotFoundException">
/// The specified resource could not be found. You can view your available clusters with
/// <a>ListClusters</a>. You can view your available managed node groups with <a>ListNodegroups</a>.
/// Amazon EKS clusters and node groups are Region-specific.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServerException">
/// These errors are usually caused by a server-side issue.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServiceUnavailableException">
/// The service is unavailable. Back off and retry the operation.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/ListNodegroups">REST API Reference for ListNodegroups Operation</seealso>
Task<ListNodegroupsResponse> ListNodegroupsAsync(ListNodegroupsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region ListTagsForResource
/// <summary>
/// List the tags for an Amazon EKS resource.
/// </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 EKS.</returns>
/// <exception cref="Amazon.EKS.Model.BadRequestException">
/// This exception is thrown if the request contains a semantic error. The precise meaning
/// will depend on the API, and will be documented in the error message.
/// </exception>
/// <exception cref="Amazon.EKS.Model.NotFoundException">
/// A service resource associated with the request could not be found. Clients should
/// not retry such requests.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/ListTagsForResource">REST API Reference for ListTagsForResource Operation</seealso>
Task<ListTagsForResourceResponse> ListTagsForResourceAsync(ListTagsForResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region ListUpdates
/// <summary>
/// Lists the updates associated with an Amazon EKS cluster or managed node group in your
/// AWS account, in the specified Region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListUpdates 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 ListUpdates service method, as returned by EKS.</returns>
/// <exception cref="Amazon.EKS.Model.ClientException">
/// These errors are usually caused by a client action. Actions can include using an action
/// or resource on behalf of a user that doesn't have permissions to use the action or
/// resource or specifying an identifier that is not valid.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidParameterException">
/// The specified parameter is invalid. Review the available parameters for the API request.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceNotFoundException">
/// The specified resource could not be found. You can view your available clusters with
/// <a>ListClusters</a>. You can view your available managed node groups with <a>ListNodegroups</a>.
/// Amazon EKS clusters and node groups are Region-specific.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServerException">
/// These errors are usually caused by a server-side issue.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/ListUpdates">REST API Reference for ListUpdates Operation</seealso>
Task<ListUpdatesResponse> ListUpdatesAsync(ListUpdatesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region TagResource
/// <summary>
/// Associates the specified tags to a resource with the specified <code>resourceArn</code>.
/// If existing tags on a resource are not specified in the request parameters, they are
/// not changed. When a resource is deleted, the tags associated with that resource are
/// deleted as well. Tags that you create for Amazon EKS resources do not propagate to
/// any other resources associated with the cluster. For example, if you tag a cluster
/// with this operation, that tag does not automatically propagate to the subnets and
/// nodes associated with the cluster.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the TagResource 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 TagResource service method, as returned by EKS.</returns>
/// <exception cref="Amazon.EKS.Model.BadRequestException">
/// This exception is thrown if the request contains a semantic error. The precise meaning
/// will depend on the API, and will be documented in the error message.
/// </exception>
/// <exception cref="Amazon.EKS.Model.NotFoundException">
/// A service resource associated with the request could not be found. Clients should
/// not retry such requests.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/TagResource">REST API Reference for TagResource Operation</seealso>
Task<TagResourceResponse> TagResourceAsync(TagResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region UntagResource
/// <summary>
/// Deletes specified tags from a resource.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UntagResource 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 UntagResource service method, as returned by EKS.</returns>
/// <exception cref="Amazon.EKS.Model.BadRequestException">
/// This exception is thrown if the request contains a semantic error. The precise meaning
/// will depend on the API, and will be documented in the error message.
/// </exception>
/// <exception cref="Amazon.EKS.Model.NotFoundException">
/// A service resource associated with the request could not be found. Clients should
/// not retry such requests.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/UntagResource">REST API Reference for UntagResource Operation</seealso>
Task<UntagResourceResponse> UntagResourceAsync(UntagResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region UpdateAddon
/// <summary>
/// Updates an Amazon EKS add-on.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateAddon 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 UpdateAddon service method, as returned by EKS.</returns>
/// <exception cref="Amazon.EKS.Model.ClientException">
/// These errors are usually caused by a client action. Actions can include using an action
/// or resource on behalf of a user that doesn't have permissions to use the action or
/// resource or specifying an identifier that is not valid.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidParameterException">
/// The specified parameter is invalid. Review the available parameters for the API request.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidRequestException">
/// The request is invalid given the state of the cluster. Check the state of the cluster
/// and the associated operations.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceInUseException">
/// The specified resource is in use.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceNotFoundException">
/// The specified resource could not be found. You can view your available clusters with
/// <a>ListClusters</a>. You can view your available managed node groups with <a>ListNodegroups</a>.
/// Amazon EKS clusters and node groups are Region-specific.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServerException">
/// These errors are usually caused by a server-side issue.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/UpdateAddon">REST API Reference for UpdateAddon Operation</seealso>
Task<UpdateAddonResponse> UpdateAddonAsync(UpdateAddonRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region UpdateClusterConfig
/// <summary>
/// Updates an Amazon EKS cluster configuration. Your cluster continues to function during
/// the update. The response output includes an update ID that you can use to track the
/// status of your cluster update with the <a>DescribeUpdate</a> API operation.
///
///
/// <para>
/// You can use this API operation to enable or disable exporting the Kubernetes control
/// plane logs for your cluster to CloudWatch Logs. By default, cluster control plane
/// logs aren't exported to CloudWatch Logs. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html">Amazon
/// EKS Cluster Control Plane Logs</a> in the <i> <i>Amazon EKS User Guide</i> </i>.
/// </para>
/// <note>
/// <para>
/// CloudWatch Logs ingestion, archive storage, and data scanning rates apply to exported
/// control plane logs. For more information, see <a href="http://aws.amazon.com/cloudwatch/pricing/">Amazon
/// CloudWatch Pricing</a>.
/// </para>
/// </note>
/// <para>
/// You can also use this API operation to enable or disable public and private access
/// to your cluster's Kubernetes API server endpoint. By default, public access is enabled,
/// and private access is disabled. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html">Amazon
/// EKS Cluster Endpoint Access Control</a> in the <i> <i>Amazon EKS User Guide</i> </i>.
///
/// </para>
/// <important>
/// <para>
/// At this time, you can not update the subnets or security group IDs for an existing
/// cluster.
/// </para>
/// </important>
/// <para>
/// Cluster updates are asynchronous, and they should finish within a few minutes. During
/// an update, the cluster status moves to <code>UPDATING</code> (this status transition
/// is eventually consistent). When the update is complete (either <code>Failed</code>
/// or <code>Successful</code>), the cluster status moves to <code>Active</code>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateClusterConfig 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 UpdateClusterConfig service method, as returned by EKS.</returns>
/// <exception cref="Amazon.EKS.Model.ClientException">
/// These errors are usually caused by a client action. Actions can include using an action
/// or resource on behalf of a user that doesn't have permissions to use the action or
/// resource or specifying an identifier that is not valid.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidParameterException">
/// The specified parameter is invalid. Review the available parameters for the API request.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidRequestException">
/// The request is invalid given the state of the cluster. Check the state of the cluster
/// and the associated operations.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceInUseException">
/// The specified resource is in use.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceNotFoundException">
/// The specified resource could not be found. You can view your available clusters with
/// <a>ListClusters</a>. You can view your available managed node groups with <a>ListNodegroups</a>.
/// Amazon EKS clusters and node groups are Region-specific.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServerException">
/// These errors are usually caused by a server-side issue.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/UpdateClusterConfig">REST API Reference for UpdateClusterConfig Operation</seealso>
Task<UpdateClusterConfigResponse> UpdateClusterConfigAsync(UpdateClusterConfigRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region UpdateClusterVersion
/// <summary>
/// Updates an Amazon EKS cluster to the specified Kubernetes version. Your cluster continues
/// to function during the update. The response output includes an update ID that you
/// can use to track the status of your cluster update with the <a>DescribeUpdate</a>
/// API operation.
///
///
/// <para>
/// Cluster updates are asynchronous, and they should finish within a few minutes. During
/// an update, the cluster status moves to <code>UPDATING</code> (this status transition
/// is eventually consistent). When the update is complete (either <code>Failed</code>
/// or <code>Successful</code>), the cluster status moves to <code>Active</code>.
/// </para>
///
/// <para>
/// If your cluster has managed node groups attached to it, all of your node groups’ Kubernetes
/// versions must match the cluster’s Kubernetes version in order to update the cluster
/// to a new Kubernetes version.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateClusterVersion 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 UpdateClusterVersion service method, as returned by EKS.</returns>
/// <exception cref="Amazon.EKS.Model.ClientException">
/// These errors are usually caused by a client action. Actions can include using an action
/// or resource on behalf of a user that doesn't have permissions to use the action or
/// resource or specifying an identifier that is not valid.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidParameterException">
/// The specified parameter is invalid. Review the available parameters for the API request.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidRequestException">
/// The request is invalid given the state of the cluster. Check the state of the cluster
/// and the associated operations.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceInUseException">
/// The specified resource is in use.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceNotFoundException">
/// The specified resource could not be found. You can view your available clusters with
/// <a>ListClusters</a>. You can view your available managed node groups with <a>ListNodegroups</a>.
/// Amazon EKS clusters and node groups are Region-specific.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServerException">
/// These errors are usually caused by a server-side issue.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/UpdateClusterVersion">REST API Reference for UpdateClusterVersion Operation</seealso>
Task<UpdateClusterVersionResponse> UpdateClusterVersionAsync(UpdateClusterVersionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region UpdateNodegroupConfig
/// <summary>
/// Updates an Amazon EKS managed node group configuration. Your node group continues
/// to function during the update. The response output includes an update ID that you
/// can use to track the status of your node group update with the <a>DescribeUpdate</a>
/// API operation. Currently you can update the Kubernetes labels for a node group or
/// the scaling configuration.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateNodegroupConfig 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 UpdateNodegroupConfig service method, as returned by EKS.</returns>
/// <exception cref="Amazon.EKS.Model.ClientException">
/// These errors are usually caused by a client action. Actions can include using an action
/// or resource on behalf of a user that doesn't have permissions to use the action or
/// resource or specifying an identifier that is not valid.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidParameterException">
/// The specified parameter is invalid. Review the available parameters for the API request.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidRequestException">
/// The request is invalid given the state of the cluster. Check the state of the cluster
/// and the associated operations.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceInUseException">
/// The specified resource is in use.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceNotFoundException">
/// The specified resource could not be found. You can view your available clusters with
/// <a>ListClusters</a>. You can view your available managed node groups with <a>ListNodegroups</a>.
/// Amazon EKS clusters and node groups are Region-specific.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServerException">
/// These errors are usually caused by a server-side issue.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/UpdateNodegroupConfig">REST API Reference for UpdateNodegroupConfig Operation</seealso>
Task<UpdateNodegroupConfigResponse> UpdateNodegroupConfigAsync(UpdateNodegroupConfigRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region UpdateNodegroupVersion
/// <summary>
/// Updates the Kubernetes version or AMI version of an Amazon EKS managed node group.
///
///
/// <para>
/// You can update a node group using a launch template only if the node group was originally
/// deployed with a launch template. If you need to update a custom AMI in a node group
/// that was deployed with a launch template, then update your custom AMI, specify the
/// new ID in a new version of the launch template, and then update the node group to
/// the new version of the launch template.
/// </para>
///
/// <para>
/// If you update without a launch template, then you can update to the latest available
/// AMI version of a node group's current Kubernetes version by not specifying a Kubernetes
/// version in the request. You can update to the latest AMI version of your cluster's
/// current Kubernetes version by specifying your cluster's Kubernetes version in the
/// request. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-linux-ami-versions.html">Amazon
/// EKS optimized Amazon Linux 2 AMI versions</a> in the <i>Amazon EKS User Guide</i>.
/// </para>
///
/// <para>
/// You cannot roll back a node group to an earlier Kubernetes version or AMI version.
/// </para>
///
/// <para>
/// When a node in a managed node group is terminated due to a scaling action or update,
/// the pods in that node are drained first. Amazon EKS attempts to drain the nodes gracefully
/// and will fail if it is unable to do so. You can <code>force</code> the update if Amazon
/// EKS is unable to drain the nodes as a result of a pod disruption budget issue.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateNodegroupVersion 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 UpdateNodegroupVersion service method, as returned by EKS.</returns>
/// <exception cref="Amazon.EKS.Model.ClientException">
/// These errors are usually caused by a client action. Actions can include using an action
/// or resource on behalf of a user that doesn't have permissions to use the action or
/// resource or specifying an identifier that is not valid.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidParameterException">
/// The specified parameter is invalid. Review the available parameters for the API request.
/// </exception>
/// <exception cref="Amazon.EKS.Model.InvalidRequestException">
/// The request is invalid given the state of the cluster. Check the state of the cluster
/// and the associated operations.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceInUseException">
/// The specified resource is in use.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ResourceNotFoundException">
/// The specified resource could not be found. You can view your available clusters with
/// <a>ListClusters</a>. You can view your available managed node groups with <a>ListNodegroups</a>.
/// Amazon EKS clusters and node groups are Region-specific.
/// </exception>
/// <exception cref="Amazon.EKS.Model.ServerException">
/// These errors are usually caused by a server-side issue.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/UpdateNodegroupVersion">REST API Reference for UpdateNodegroupVersion Operation</seealso>
Task<UpdateNodegroupVersionResponse> UpdateNodegroupVersionAsync(UpdateNodegroupVersionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
}
} | 58.876351 | 256 | 0.662267 | [
"Apache-2.0"
] | diegodias/aws-sdk-net | sdk/src/Services/EKS/Generated/_netstandard/IAmazonEKS.cs | 87,143 | C# |
using System;
using System.Globalization;
using Modbus.Data;
using Modbus.Unme.Common;
namespace Modbus.Message
{
/// <summary>
///
/// </summary>
public class CustomMessageInfo
{
private readonly Type _type;
private readonly Func<IModbusMessage, DataStore, IModbusMessage> _applyRequest;
private readonly Func<IModbusMessageRtu> _instanceGetter;
/// <summary>
///
/// </summary>
/// <param name="type"></param>
/// <param name="applyRequest"></param>
/// <exception cref="ArgumentNullException"></exception>
/// <exception cref="ArgumentException"></exception>
public CustomMessageInfo(Type type, Func<IModbusMessage, DataStore, IModbusMessage> applyRequest)
{
if (type == null)
throw new ArgumentNullException("type");
if (applyRequest == null)
throw new ArgumentNullException("applyRequest");
_type = type;
_applyRequest = applyRequest;
// lazily initialize the instance, this will only be needed for the RTU protocol so
// we don't actually require the type argument to implement IModbusMessageRtu
_instanceGetter = FunctionalUtility.Memoize(() =>
{
if (!typeof(IModbusMessageRtu).IsAssignableFrom(type))
{
throw new ArgumentException(
String.Format(CultureInfo.InvariantCulture,
"Custom type {0} needs to implement the {1} interface.",
type.Name,
typeof(IModbusMessageRtu).Name));
}
return (IModbusMessageRtu) Activator.CreateInstance(Type);
});
}
/// <summary>
///
/// </summary>
public Type Type
{
get
{
return _type;
}
}
/// <summary>
///
/// </summary>
public Func<IModbusMessage, DataStore, IModbusMessage> ApplyRequest
{
get
{
return _applyRequest;
}
}
/// <summary>
///
/// </summary>
public IModbusMessageRtu Instance
{
get
{
return _instanceGetter.Invoke();
}
}
}
}
| 23.129412 | 100 | 0.637843 | [
"Unlicense"
] | KirillDZR/nmodbus | src/Modbus/Message/CustomMessageInfo.cs | 1,968 | C# |
// <auto-generated />
using Aiursoft.Probe.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using System;
namespace Aiursoft.Probe.Migrations
{
[DbContext(typeof(ProbeDbContext))]
[Migration("20191006094035_AddDownloadToken")]
partial class AddDownloadToken
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "3.0.0")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Aiursoft.Pylon.Models.Probe.File", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<int>("ContextId")
.HasColumnType("int");
b.Property<string>("FileName")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("UploadTime")
.HasColumnType("datetime2");
b.HasKey("Id");
b.HasIndex("ContextId");
b.ToTable("Files");
});
modelBuilder.Entity("Aiursoft.Pylon.Models.Probe.Folder", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<int?>("ContextId")
.HasColumnType("int");
b.Property<string>("FolderName")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("ContextId");
b.ToTable("Folders");
});
modelBuilder.Entity("Aiursoft.Pylon.Models.Probe.ProbeApp", b =>
{
b.Property<string>("AppId")
.HasColumnType("nvarchar(450)");
b.HasKey("AppId");
b.ToTable("Apps");
});
modelBuilder.Entity("Aiursoft.Pylon.Models.Probe.Site", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<string>("AppId")
.HasColumnType("nvarchar(450)");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2");
b.Property<int>("FolderId")
.HasColumnType("int");
b.Property<bool>("OpenToDownload")
.HasColumnType("bit");
b.Property<bool>("OpenToUpload")
.HasColumnType("bit");
b.Property<string>("SiteName")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("AppId");
b.HasIndex("FolderId");
b.ToTable("Sites");
});
modelBuilder.Entity("Aiursoft.Pylon.Models.Probe.File", b =>
{
b.HasOne("Aiursoft.Pylon.Models.Probe.Folder", "Context")
.WithMany("Files")
.HasForeignKey("ContextId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Aiursoft.Pylon.Models.Probe.Folder", b =>
{
b.HasOne("Aiursoft.Pylon.Models.Probe.Folder", "Context")
.WithMany("SubFolders")
.HasForeignKey("ContextId");
});
modelBuilder.Entity("Aiursoft.Pylon.Models.Probe.Site", b =>
{
b.HasOne("Aiursoft.Pylon.Models.Probe.ProbeApp", "Context")
.WithMany("Sites")
.HasForeignKey("AppId");
b.HasOne("Aiursoft.Pylon.Models.Probe.Folder", "Root")
.WithMany()
.HasForeignKey("FolderId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
#pragma warning restore 612, 618
}
}
}
| 35.669014 | 125 | 0.485489 | [
"MIT"
] | zhanghaiboshiwo/Nexus | Probe/Migrations/20191006094035_AddDownloadToken.Designer.cs | 5,067 | C# |
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/dialogflow/cx/v3/flow.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Google.Cloud.Dialogflow.Cx.V3 {
/// <summary>Holder for reflection information generated from google/cloud/dialogflow/cx/v3/flow.proto</summary>
public static partial class FlowReflection {
#region Descriptor
/// <summary>File descriptor for google/cloud/dialogflow/cx/v3/flow.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static FlowReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"Cihnb29nbGUvY2xvdWQvZGlhbG9nZmxvdy9jeC92My9mbG93LnByb3RvEh1n",
"b29nbGUuY2xvdWQuZGlhbG9nZmxvdy5jeC52MxocZ29vZ2xlL2FwaS9hbm5v",
"dGF0aW9ucy5wcm90bxoXZ29vZ2xlL2FwaS9jbGllbnQucHJvdG8aH2dvb2ds",
"ZS9hcGkvZmllbGRfYmVoYXZpb3IucHJvdG8aGWdvb2dsZS9hcGkvcmVzb3Vy",
"Y2UucHJvdG8aKGdvb2dsZS9jbG91ZC9kaWFsb2dmbG93L2N4L3YzL3BhZ2Uu",
"cHJvdG8aNmdvb2dsZS9jbG91ZC9kaWFsb2dmbG93L2N4L3YzL3ZhbGlkYXRp",
"b25fbWVzc2FnZS5wcm90bxojZ29vZ2xlL2xvbmdydW5uaW5nL29wZXJhdGlv",
"bnMucHJvdG8aG2dvb2dsZS9wcm90b2J1Zi9lbXB0eS5wcm90bxogZ29vZ2xl",
"L3Byb3RvYnVmL2ZpZWxkX21hc2sucHJvdG8aH2dvb2dsZS9wcm90b2J1Zi90",
"aW1lc3RhbXAucHJvdG8irAMKC05sdVNldHRpbmdzEkgKCm1vZGVsX3R5cGUY",
"ASABKA4yNC5nb29nbGUuY2xvdWQuZGlhbG9nZmxvdy5jeC52My5ObHVTZXR0",
"aW5ncy5Nb2RlbFR5cGUSIAoYY2xhc3NpZmljYXRpb25fdGhyZXNob2xkGAMg",
"ASgCElkKE21vZGVsX3RyYWluaW5nX21vZGUYBCABKA4yPC5nb29nbGUuY2xv",
"dWQuZGlhbG9nZmxvdy5jeC52My5ObHVTZXR0aW5ncy5Nb2RlbFRyYWluaW5n",
"TW9kZSJZCglNb2RlbFR5cGUSGgoWTU9ERUxfVFlQRV9VTlNQRUNJRklFRBAA",
"EhcKE01PREVMX1RZUEVfU1RBTkRBUkQQARIXChNNT0RFTF9UWVBFX0FEVkFO",
"Q0VEEAMiewoRTW9kZWxUcmFpbmluZ01vZGUSIwofTU9ERUxfVFJBSU5JTkdf",
"TU9ERV9VTlNQRUNJRklFRBAAEiEKHU1PREVMX1RSQUlOSU5HX01PREVfQVVU",
"T01BVElDEAESHgoaTU9ERUxfVFJBSU5JTkdfTU9ERV9NQU5VQUwQAiLWAwoE",
"RmxvdxIMCgRuYW1lGAEgASgJEhkKDGRpc3BsYXlfbmFtZRgCIAEoCUID4EEC",
"EhMKC2Rlc2NyaXB0aW9uGAMgASgJEkkKEXRyYW5zaXRpb25fcm91dGVzGAQg",
"AygLMi4uZ29vZ2xlLmNsb3VkLmRpYWxvZ2Zsb3cuY3gudjMuVHJhbnNpdGlv",
"blJvdXRlEkMKDmV2ZW50X2hhbmRsZXJzGAogAygLMisuZ29vZ2xlLmNsb3Vk",
"LmRpYWxvZ2Zsb3cuY3gudjMuRXZlbnRIYW5kbGVyElQKF3RyYW5zaXRpb25f",
"cm91dGVfZ3JvdXBzGA8gAygJQjP6QTAKLmRpYWxvZ2Zsb3cuZ29vZ2xlYXBp",
"cy5jb20vVHJhbnNpdGlvblJvdXRlR3JvdXASQAoMbmx1X3NldHRpbmdzGAsg",
"ASgLMiouZ29vZ2xlLmNsb3VkLmRpYWxvZ2Zsb3cuY3gudjMuTmx1U2V0dGlu",
"Z3M6aOpBZQoeZGlhbG9nZmxvdy5nb29nbGVhcGlzLmNvbS9GbG93EkNwcm9q",
"ZWN0cy97cHJvamVjdH0vbG9jYXRpb25zL3tsb2NhdGlvbn0vYWdlbnRzL3th",
"Z2VudH0vZmxvd3Mve2Zsb3d9IpoBChFDcmVhdGVGbG93UmVxdWVzdBI2CgZw",
"YXJlbnQYASABKAlCJuBBAvpBIBIeZGlhbG9nZmxvdy5nb29nbGVhcGlzLmNv",
"bS9GbG93EjYKBGZsb3cYAiABKAsyIy5nb29nbGUuY2xvdWQuZGlhbG9nZmxv",
"dy5jeC52My5GbG93QgPgQQISFQoNbGFuZ3VhZ2VfY29kZRgDIAEoCSJYChFE",
"ZWxldGVGbG93UmVxdWVzdBI0CgRuYW1lGAEgASgJQibgQQL6QSAKHmRpYWxv",
"Z2Zsb3cuZ29vZ2xlYXBpcy5jb20vRmxvdxINCgVmb3JjZRgCIAEoCCKIAQoQ",
"TGlzdEZsb3dzUmVxdWVzdBI2CgZwYXJlbnQYASABKAlCJuBBAvpBIBIeZGlh",
"bG9nZmxvdy5nb29nbGVhcGlzLmNvbS9GbG93EhEKCXBhZ2Vfc2l6ZRgCIAEo",
"BRISCgpwYWdlX3Rva2VuGAMgASgJEhUKDWxhbmd1YWdlX2NvZGUYBCABKAki",
"YAoRTGlzdEZsb3dzUmVzcG9uc2USMgoFZmxvd3MYASADKAsyIy5nb29nbGUu",
"Y2xvdWQuZGlhbG9nZmxvdy5jeC52My5GbG93EhcKD25leHRfcGFnZV90b2tl",
"bhgCIAEoCSJdCg5HZXRGbG93UmVxdWVzdBI0CgRuYW1lGAEgASgJQibgQQL6",
"QSAKHmRpYWxvZ2Zsb3cuZ29vZ2xlYXBpcy5jb20vRmxvdxIVCg1sYW5ndWFn",
"ZV9jb2RlGAIgASgJIpgBChFVcGRhdGVGbG93UmVxdWVzdBI2CgRmbG93GAEg",
"ASgLMiMuZ29vZ2xlLmNsb3VkLmRpYWxvZ2Zsb3cuY3gudjMuRmxvd0ID4EEC",
"EjQKC3VwZGF0ZV9tYXNrGAIgASgLMhouZ29vZ2xlLnByb3RvYnVmLkZpZWxk",
"TWFza0ID4EECEhUKDWxhbmd1YWdlX2NvZGUYAyABKAkiSAoQVHJhaW5GbG93",
"UmVxdWVzdBI0CgRuYW1lGAEgASgJQibgQQL6QSAKHmRpYWxvZ2Zsb3cuZ29v",
"Z2xlYXBpcy5jb20vRmxvdyJiChNWYWxpZGF0ZUZsb3dSZXF1ZXN0EjQKBG5h",
"bWUYASABKAlCJuBBAvpBIAoeZGlhbG9nZmxvdy5nb29nbGVhcGlzLmNvbS9G",
"bG93EhUKDWxhbmd1YWdlX2NvZGUYAiABKAkifQoeR2V0Rmxvd1ZhbGlkYXRp",
"b25SZXN1bHRSZXF1ZXN0EkQKBG5hbWUYASABKAlCNuBBAvpBMAouZGlhbG9n",
"Zmxvdy5nb29nbGVhcGlzLmNvbS9GbG93VmFsaWRhdGlvblJlc3VsdBIVCg1s",
"YW5ndWFnZV9jb2RlGAIgASgJIrECChRGbG93VmFsaWRhdGlvblJlc3VsdBIM",
"CgRuYW1lGAEgASgJEk0KE3ZhbGlkYXRpb25fbWVzc2FnZXMYAiADKAsyMC5n",
"b29nbGUuY2xvdWQuZGlhbG9nZmxvdy5jeC52My5WYWxpZGF0aW9uTWVzc2Fn",
"ZRIvCgt1cGRhdGVfdGltZRgDIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1l",
"c3RhbXA6igHqQYYBCi5kaWFsb2dmbG93Lmdvb2dsZWFwaXMuY29tL0Zsb3dW",
"YWxpZGF0aW9uUmVzdWx0ElRwcm9qZWN0cy97cHJvamVjdH0vbG9jYXRpb25z",
"L3tsb2NhdGlvbn0vYWdlbnRzL3thZ2VudH0vZmxvd3Mve2Zsb3d9L3ZhbGlk",
"YXRpb25SZXN1bHQy7gwKBUZsb3dzErMBCgpDcmVhdGVGbG93EjAuZ29vZ2xl",
"LmNsb3VkLmRpYWxvZ2Zsb3cuY3gudjMuQ3JlYXRlRmxvd1JlcXVlc3QaIy5n",
"b29nbGUuY2xvdWQuZGlhbG9nZmxvdy5jeC52My5GbG93Ik6C0+STAjoiMi92",
"My97cGFyZW50PXByb2plY3RzLyovbG9jYXRpb25zLyovYWdlbnRzLyp9L2Zs",
"b3dzOgRmbG932kELcGFyZW50LGZsb3cSmQEKCkRlbGV0ZUZsb3cSMC5nb29n",
"bGUuY2xvdWQuZGlhbG9nZmxvdy5jeC52My5EZWxldGVGbG93UmVxdWVzdBoW",
"Lmdvb2dsZS5wcm90b2J1Zi5FbXB0eSJBgtPkkwI0KjIvdjMve25hbWU9cHJv",
"amVjdHMvKi9sb2NhdGlvbnMvKi9hZ2VudHMvKi9mbG93cy8qfdpBBG5hbWUS",
"swEKCUxpc3RGbG93cxIvLmdvb2dsZS5jbG91ZC5kaWFsb2dmbG93LmN4LnYz",
"Lkxpc3RGbG93c1JlcXVlc3QaMC5nb29nbGUuY2xvdWQuZGlhbG9nZmxvdy5j",
"eC52My5MaXN0Rmxvd3NSZXNwb25zZSJDgtPkkwI0EjIvdjMve3BhcmVudD1w",
"cm9qZWN0cy8qL2xvY2F0aW9ucy8qL2FnZW50cy8qfS9mbG93c9pBBnBhcmVu",
"dBKgAQoHR2V0RmxvdxItLmdvb2dsZS5jbG91ZC5kaWFsb2dmbG93LmN4LnYz",
"LkdldEZsb3dSZXF1ZXN0GiMuZ29vZ2xlLmNsb3VkLmRpYWxvZ2Zsb3cuY3gu",
"djMuRmxvdyJBgtPkkwI0EjIvdjMve25hbWU9cHJvamVjdHMvKi9sb2NhdGlv",
"bnMvKi9hZ2VudHMvKi9mbG93cy8qfdpBBG5hbWUSvQEKClVwZGF0ZUZsb3cS",
"MC5nb29nbGUuY2xvdWQuZGlhbG9nZmxvdy5jeC52My5VcGRhdGVGbG93UmVx",
"dWVzdBojLmdvb2dsZS5jbG91ZC5kaWFsb2dmbG93LmN4LnYzLkZsb3ciWILT",
"5JMCPzI3L3YzL3tmbG93Lm5hbWU9cHJvamVjdHMvKi9sb2NhdGlvbnMvKi9h",
"Z2VudHMvKi9mbG93cy8qfToEZmxvd9pBEGZsb3csdXBkYXRlX21hc2sS2QEK",
"CVRyYWluRmxvdxIvLmdvb2dsZS5jbG91ZC5kaWFsb2dmbG93LmN4LnYzLlRy",
"YWluRmxvd1JlcXVlc3QaHS5nb29nbGUubG9uZ3J1bm5pbmcuT3BlcmF0aW9u",
"InyC0+STAj0iOC92My97bmFtZT1wcm9qZWN0cy8qL2xvY2F0aW9ucy8qL2Fn",
"ZW50cy8qL2Zsb3dzLyp9OnRyYWluOgEq2kEEbmFtZcpBLwoVZ29vZ2xlLnBy",
"b3RvYnVmLkVtcHR5EhZnb29nbGUucHJvdG9idWYuU3RydWN0Er8BCgxWYWxp",
"ZGF0ZUZsb3cSMi5nb29nbGUuY2xvdWQuZGlhbG9nZmxvdy5jeC52My5WYWxp",
"ZGF0ZUZsb3dSZXF1ZXN0GjMuZ29vZ2xlLmNsb3VkLmRpYWxvZ2Zsb3cuY3gu",
"djMuRmxvd1ZhbGlkYXRpb25SZXN1bHQiRoLT5JMCQCI7L3YzL3tuYW1lPXBy",
"b2plY3RzLyovbG9jYXRpb25zLyovYWdlbnRzLyovZmxvd3MvKn06dmFsaWRh",
"dGU6ASoS4QEKF0dldEZsb3dWYWxpZGF0aW9uUmVzdWx0Ej0uZ29vZ2xlLmNs",
"b3VkLmRpYWxvZ2Zsb3cuY3gudjMuR2V0Rmxvd1ZhbGlkYXRpb25SZXN1bHRS",
"ZXF1ZXN0GjMuZ29vZ2xlLmNsb3VkLmRpYWxvZ2Zsb3cuY3gudjMuRmxvd1Zh",
"bGlkYXRpb25SZXN1bHQiUoLT5JMCRRJDL3YzL3tuYW1lPXByb2plY3RzLyov",
"bG9jYXRpb25zLyovYWdlbnRzLyovZmxvd3MvKi92YWxpZGF0aW9uUmVzdWx0",
"fdpBBG5hbWUaeMpBGWRpYWxvZ2Zsb3cuZ29vZ2xlYXBpcy5jb23SQVlodHRw",
"czovL3d3dy5nb29nbGVhcGlzLmNvbS9hdXRoL2Nsb3VkLXBsYXRmb3JtLGh0",
"dHBzOi8vd3d3Lmdvb2dsZWFwaXMuY29tL2F1dGgvZGlhbG9nZmxvd0KZAQoh",
"Y29tLmdvb2dsZS5jbG91ZC5kaWFsb2dmbG93LmN4LnYzQglGbG93UHJvdG9Q",
"AVo/Z29vZ2xlLmdvbGFuZy5vcmcvZ2VucHJvdG8vZ29vZ2xlYXBpcy9jbG91",
"ZC9kaWFsb2dmbG93L2N4L3YzO2N4+AEBogICREaqAh1Hb29nbGUuQ2xvdWQu",
"RGlhbG9nZmxvdy5DeC5WM2IGcHJvdG8z"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Google.Api.AnnotationsReflection.Descriptor, global::Google.Api.ClientReflection.Descriptor, global::Google.Api.FieldBehaviorReflection.Descriptor, global::Google.Api.ResourceReflection.Descriptor, global::Google.Cloud.Dialogflow.Cx.V3.PageReflection.Descriptor, global::Google.Cloud.Dialogflow.Cx.V3.ValidationMessageReflection.Descriptor, global::Google.LongRunning.OperationsReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.EmptyReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.FieldMaskReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Dialogflow.Cx.V3.NluSettings), global::Google.Cloud.Dialogflow.Cx.V3.NluSettings.Parser, new[]{ "ModelType", "ClassificationThreshold", "ModelTrainingMode" }, null, new[]{ typeof(global::Google.Cloud.Dialogflow.Cx.V3.NluSettings.Types.ModelType), typeof(global::Google.Cloud.Dialogflow.Cx.V3.NluSettings.Types.ModelTrainingMode) }, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Dialogflow.Cx.V3.Flow), global::Google.Cloud.Dialogflow.Cx.V3.Flow.Parser, new[]{ "Name", "DisplayName", "Description", "TransitionRoutes", "EventHandlers", "TransitionRouteGroups", "NluSettings" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Dialogflow.Cx.V3.CreateFlowRequest), global::Google.Cloud.Dialogflow.Cx.V3.CreateFlowRequest.Parser, new[]{ "Parent", "Flow", "LanguageCode" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Dialogflow.Cx.V3.DeleteFlowRequest), global::Google.Cloud.Dialogflow.Cx.V3.DeleteFlowRequest.Parser, new[]{ "Name", "Force" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Dialogflow.Cx.V3.ListFlowsRequest), global::Google.Cloud.Dialogflow.Cx.V3.ListFlowsRequest.Parser, new[]{ "Parent", "PageSize", "PageToken", "LanguageCode" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Dialogflow.Cx.V3.ListFlowsResponse), global::Google.Cloud.Dialogflow.Cx.V3.ListFlowsResponse.Parser, new[]{ "Flows", "NextPageToken" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Dialogflow.Cx.V3.GetFlowRequest), global::Google.Cloud.Dialogflow.Cx.V3.GetFlowRequest.Parser, new[]{ "Name", "LanguageCode" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Dialogflow.Cx.V3.UpdateFlowRequest), global::Google.Cloud.Dialogflow.Cx.V3.UpdateFlowRequest.Parser, new[]{ "Flow", "UpdateMask", "LanguageCode" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Dialogflow.Cx.V3.TrainFlowRequest), global::Google.Cloud.Dialogflow.Cx.V3.TrainFlowRequest.Parser, new[]{ "Name" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Dialogflow.Cx.V3.ValidateFlowRequest), global::Google.Cloud.Dialogflow.Cx.V3.ValidateFlowRequest.Parser, new[]{ "Name", "LanguageCode" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Dialogflow.Cx.V3.GetFlowValidationResultRequest), global::Google.Cloud.Dialogflow.Cx.V3.GetFlowValidationResultRequest.Parser, new[]{ "Name", "LanguageCode" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Dialogflow.Cx.V3.FlowValidationResult), global::Google.Cloud.Dialogflow.Cx.V3.FlowValidationResult.Parser, new[]{ "Name", "ValidationMessages", "UpdateTime" }, null, null, null, null)
}));
}
#endregion
}
#region Messages
/// <summary>
/// Settings related to NLU.
/// </summary>
public sealed partial class NluSettings : pb::IMessage<NluSettings>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<NluSettings> _parser = new pb::MessageParser<NluSettings>(() => new NluSettings());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<NluSettings> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Cloud.Dialogflow.Cx.V3.FlowReflection.Descriptor.MessageTypes[0]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public NluSettings() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public NluSettings(NluSettings other) : this() {
modelType_ = other.modelType_;
classificationThreshold_ = other.classificationThreshold_;
modelTrainingMode_ = other.modelTrainingMode_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public NluSettings Clone() {
return new NluSettings(this);
}
/// <summary>Field number for the "model_type" field.</summary>
public const int ModelTypeFieldNumber = 1;
private global::Google.Cloud.Dialogflow.Cx.V3.NluSettings.Types.ModelType modelType_ = global::Google.Cloud.Dialogflow.Cx.V3.NluSettings.Types.ModelType.Unspecified;
/// <summary>
/// Indicates the type of NLU model.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Cloud.Dialogflow.Cx.V3.NluSettings.Types.ModelType ModelType {
get { return modelType_; }
set {
modelType_ = value;
}
}
/// <summary>Field number for the "classification_threshold" field.</summary>
public const int ClassificationThresholdFieldNumber = 3;
private float classificationThreshold_;
/// <summary>
/// To filter out false positive results and still get variety in matched
/// natural language inputs for your agent, you can tune the machine learning
/// classification threshold. If the returned score value is less than the
/// threshold value, then a no-match event will be triggered. The score values
/// range from 0.0 (completely uncertain) to 1.0 (completely certain). If set
/// to 0.0, the default of 0.3 is used.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public float ClassificationThreshold {
get { return classificationThreshold_; }
set {
classificationThreshold_ = value;
}
}
/// <summary>Field number for the "model_training_mode" field.</summary>
public const int ModelTrainingModeFieldNumber = 4;
private global::Google.Cloud.Dialogflow.Cx.V3.NluSettings.Types.ModelTrainingMode modelTrainingMode_ = global::Google.Cloud.Dialogflow.Cx.V3.NluSettings.Types.ModelTrainingMode.Unspecified;
/// <summary>
/// Indicates NLU model training mode.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Cloud.Dialogflow.Cx.V3.NluSettings.Types.ModelTrainingMode ModelTrainingMode {
get { return modelTrainingMode_; }
set {
modelTrainingMode_ = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as NluSettings);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(NluSettings other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (ModelType != other.ModelType) return false;
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(ClassificationThreshold, other.ClassificationThreshold)) return false;
if (ModelTrainingMode != other.ModelTrainingMode) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
if (ModelType != global::Google.Cloud.Dialogflow.Cx.V3.NluSettings.Types.ModelType.Unspecified) hash ^= ModelType.GetHashCode();
if (ClassificationThreshold != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(ClassificationThreshold);
if (ModelTrainingMode != global::Google.Cloud.Dialogflow.Cx.V3.NluSettings.Types.ModelTrainingMode.Unspecified) hash ^= ModelTrainingMode.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output.WriteRawMessage(this);
#else
if (ModelType != global::Google.Cloud.Dialogflow.Cx.V3.NluSettings.Types.ModelType.Unspecified) {
output.WriteRawTag(8);
output.WriteEnum((int) ModelType);
}
if (ClassificationThreshold != 0F) {
output.WriteRawTag(29);
output.WriteFloat(ClassificationThreshold);
}
if (ModelTrainingMode != global::Google.Cloud.Dialogflow.Cx.V3.NluSettings.Types.ModelTrainingMode.Unspecified) {
output.WriteRawTag(32);
output.WriteEnum((int) ModelTrainingMode);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
if (ModelType != global::Google.Cloud.Dialogflow.Cx.V3.NluSettings.Types.ModelType.Unspecified) {
output.WriteRawTag(8);
output.WriteEnum((int) ModelType);
}
if (ClassificationThreshold != 0F) {
output.WriteRawTag(29);
output.WriteFloat(ClassificationThreshold);
}
if (ModelTrainingMode != global::Google.Cloud.Dialogflow.Cx.V3.NluSettings.Types.ModelTrainingMode.Unspecified) {
output.WriteRawTag(32);
output.WriteEnum((int) ModelTrainingMode);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
}
#endif
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
if (ModelType != global::Google.Cloud.Dialogflow.Cx.V3.NluSettings.Types.ModelType.Unspecified) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ModelType);
}
if (ClassificationThreshold != 0F) {
size += 1 + 4;
}
if (ModelTrainingMode != global::Google.Cloud.Dialogflow.Cx.V3.NluSettings.Types.ModelTrainingMode.Unspecified) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ModelTrainingMode);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(NluSettings other) {
if (other == null) {
return;
}
if (other.ModelType != global::Google.Cloud.Dialogflow.Cx.V3.NluSettings.Types.ModelType.Unspecified) {
ModelType = other.ModelType;
}
if (other.ClassificationThreshold != 0F) {
ClassificationThreshold = other.ClassificationThreshold;
}
if (other.ModelTrainingMode != global::Google.Cloud.Dialogflow.Cx.V3.NluSettings.Types.ModelTrainingMode.Unspecified) {
ModelTrainingMode = other.ModelTrainingMode;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
input.ReadRawMessage(this);
#else
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 8: {
ModelType = (global::Google.Cloud.Dialogflow.Cx.V3.NluSettings.Types.ModelType) input.ReadEnum();
break;
}
case 29: {
ClassificationThreshold = input.ReadFloat();
break;
}
case 32: {
ModelTrainingMode = (global::Google.Cloud.Dialogflow.Cx.V3.NluSettings.Types.ModelTrainingMode) input.ReadEnum();
break;
}
}
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
break;
case 8: {
ModelType = (global::Google.Cloud.Dialogflow.Cx.V3.NluSettings.Types.ModelType) input.ReadEnum();
break;
}
case 29: {
ClassificationThreshold = input.ReadFloat();
break;
}
case 32: {
ModelTrainingMode = (global::Google.Cloud.Dialogflow.Cx.V3.NluSettings.Types.ModelTrainingMode) input.ReadEnum();
break;
}
}
}
}
#endif
#region Nested types
/// <summary>Container for nested types declared in the NluSettings message type.</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static partial class Types {
/// <summary>
/// NLU model type.
/// </summary>
public enum ModelType {
/// <summary>
/// Not specified. `MODEL_TYPE_STANDARD` will be used.
/// </summary>
[pbr::OriginalName("MODEL_TYPE_UNSPECIFIED")] Unspecified = 0,
/// <summary>
/// Use standard NLU model.
/// </summary>
[pbr::OriginalName("MODEL_TYPE_STANDARD")] Standard = 1,
/// <summary>
/// Use advanced NLU model.
/// </summary>
[pbr::OriginalName("MODEL_TYPE_ADVANCED")] Advanced = 3,
}
/// <summary>
/// NLU model training mode.
/// </summary>
public enum ModelTrainingMode {
/// <summary>
/// Not specified. `MODEL_TRAINING_MODE_AUTOMATIC` will be used.
/// </summary>
[pbr::OriginalName("MODEL_TRAINING_MODE_UNSPECIFIED")] Unspecified = 0,
/// <summary>
/// NLU model training is automatically triggered when a flow gets modified.
/// User can also manually trigger model training in this mode.
/// </summary>
[pbr::OriginalName("MODEL_TRAINING_MODE_AUTOMATIC")] Automatic = 1,
/// <summary>
/// User needs to manually trigger NLU model training. Best for large flows
/// whose models take long time to train.
/// </summary>
[pbr::OriginalName("MODEL_TRAINING_MODE_MANUAL")] Manual = 2,
}
}
#endregion
}
/// <summary>
/// Flows represents the conversation flows when you build your chatbot agent.
///
/// A flow consists of many pages connected by the transition routes.
/// Conversations always start with the built-in Start Flow (with an all-0 ID).
/// Transition routes can direct the conversation session from the current flow
/// (parent flow) to another flow (sub flow). When the sub flow is finished,
/// Dialogflow will bring the session back to the parent flow, where the sub flow
/// is started.
///
/// Usually, when a transition route is followed by a matched intent, the intent
/// will be "consumed". This means the intent won't activate more transition
/// routes. However, when the followed transition route moves the conversation
/// session into a different flow, the matched intent can be carried over and to
/// be consumed in the target flow.
/// </summary>
public sealed partial class Flow : pb::IMessage<Flow>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<Flow> _parser = new pb::MessageParser<Flow>(() => new Flow());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<Flow> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Cloud.Dialogflow.Cx.V3.FlowReflection.Descriptor.MessageTypes[1]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Flow() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Flow(Flow other) : this() {
name_ = other.name_;
displayName_ = other.displayName_;
description_ = other.description_;
transitionRoutes_ = other.transitionRoutes_.Clone();
eventHandlers_ = other.eventHandlers_.Clone();
transitionRouteGroups_ = other.transitionRouteGroups_.Clone();
nluSettings_ = other.nluSettings_ != null ? other.nluSettings_.Clone() : null;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Flow Clone() {
return new Flow(this);
}
/// <summary>Field number for the "name" field.</summary>
public const int NameFieldNumber = 1;
private string name_ = "";
/// <summary>
/// The unique identifier of the flow.
/// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
/// ID>/flows/<Flow ID>`.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Name {
get { return name_; }
set {
name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "display_name" field.</summary>
public const int DisplayNameFieldNumber = 2;
private string displayName_ = "";
/// <summary>
/// Required. The human-readable name of the flow.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string DisplayName {
get { return displayName_; }
set {
displayName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "description" field.</summary>
public const int DescriptionFieldNumber = 3;
private string description_ = "";
/// <summary>
/// The description of the flow. The maximum length is 500 characters. If
/// exceeded, the request is rejected.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Description {
get { return description_; }
set {
description_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "transition_routes" field.</summary>
public const int TransitionRoutesFieldNumber = 4;
private static readonly pb::FieldCodec<global::Google.Cloud.Dialogflow.Cx.V3.TransitionRoute> _repeated_transitionRoutes_codec
= pb::FieldCodec.ForMessage(34, global::Google.Cloud.Dialogflow.Cx.V3.TransitionRoute.Parser);
private readonly pbc::RepeatedField<global::Google.Cloud.Dialogflow.Cx.V3.TransitionRoute> transitionRoutes_ = new pbc::RepeatedField<global::Google.Cloud.Dialogflow.Cx.V3.TransitionRoute>();
/// <summary>
/// A flow's transition routes serve two purposes:
///
/// * They are responsible for matching the user's first utterances in the
/// flow.
/// * They are inherited by every page's [transition
/// routes][Page.transition_routes] and can support use cases such as the user
/// saying "help" or "can I talk to a human?", which can be handled in a common
/// way regardless of the current page. Transition routes defined in the page
/// have higher priority than those defined in the flow.
///
/// TransitionRoutes are evalauted in the following order:
///
/// * TransitionRoutes with intent specified..
/// * TransitionRoutes with only condition specified.
///
/// TransitionRoutes with intent specified are inherited by pages in the flow.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Cloud.Dialogflow.Cx.V3.TransitionRoute> TransitionRoutes {
get { return transitionRoutes_; }
}
/// <summary>Field number for the "event_handlers" field.</summary>
public const int EventHandlersFieldNumber = 10;
private static readonly pb::FieldCodec<global::Google.Cloud.Dialogflow.Cx.V3.EventHandler> _repeated_eventHandlers_codec
= pb::FieldCodec.ForMessage(82, global::Google.Cloud.Dialogflow.Cx.V3.EventHandler.Parser);
private readonly pbc::RepeatedField<global::Google.Cloud.Dialogflow.Cx.V3.EventHandler> eventHandlers_ = new pbc::RepeatedField<global::Google.Cloud.Dialogflow.Cx.V3.EventHandler>();
/// <summary>
/// A flow's event handlers serve two purposes:
///
/// * They are responsible for handling events (e.g. no match,
/// webhook errors) in the flow.
/// * They are inherited by every page's [event
/// handlers][Page.event_handlers], which can be used to handle common events
/// regardless of the current page. Event handlers defined in the page
/// have higher priority than those defined in the flow.
///
/// Unlike [transition_routes][google.cloud.dialogflow.cx.v3.Flow.transition_routes], these handlers are
/// evaluated on a first-match basis. The first one that matches the event
/// get executed, with the rest being ignored.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Cloud.Dialogflow.Cx.V3.EventHandler> EventHandlers {
get { return eventHandlers_; }
}
/// <summary>Field number for the "transition_route_groups" field.</summary>
public const int TransitionRouteGroupsFieldNumber = 15;
private static readonly pb::FieldCodec<string> _repeated_transitionRouteGroups_codec
= pb::FieldCodec.ForString(122);
private readonly pbc::RepeatedField<string> transitionRouteGroups_ = new pbc::RepeatedField<string>();
/// <summary>
/// A flow's transition route group serve two purposes:
///
/// * They are responsible for matching the user's first utterances in the
/// flow.
/// * They are inherited by every page's [transition
/// route groups][Page.transition_route_groups]. Transition route groups
/// defined in the page have higher priority than those defined in the flow.
///
/// Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
/// ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<string> TransitionRouteGroups {
get { return transitionRouteGroups_; }
}
/// <summary>Field number for the "nlu_settings" field.</summary>
public const int NluSettingsFieldNumber = 11;
private global::Google.Cloud.Dialogflow.Cx.V3.NluSettings nluSettings_;
/// <summary>
/// NLU related settings of the flow.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Cloud.Dialogflow.Cx.V3.NluSettings NluSettings {
get { return nluSettings_; }
set {
nluSettings_ = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as Flow);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(Flow other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Name != other.Name) return false;
if (DisplayName != other.DisplayName) return false;
if (Description != other.Description) return false;
if(!transitionRoutes_.Equals(other.transitionRoutes_)) return false;
if(!eventHandlers_.Equals(other.eventHandlers_)) return false;
if(!transitionRouteGroups_.Equals(other.transitionRouteGroups_)) return false;
if (!object.Equals(NluSettings, other.NluSettings)) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
if (Name.Length != 0) hash ^= Name.GetHashCode();
if (DisplayName.Length != 0) hash ^= DisplayName.GetHashCode();
if (Description.Length != 0) hash ^= Description.GetHashCode();
hash ^= transitionRoutes_.GetHashCode();
hash ^= eventHandlers_.GetHashCode();
hash ^= transitionRouteGroups_.GetHashCode();
if (nluSettings_ != null) hash ^= NluSettings.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output.WriteRawMessage(this);
#else
if (Name.Length != 0) {
output.WriteRawTag(10);
output.WriteString(Name);
}
if (DisplayName.Length != 0) {
output.WriteRawTag(18);
output.WriteString(DisplayName);
}
if (Description.Length != 0) {
output.WriteRawTag(26);
output.WriteString(Description);
}
transitionRoutes_.WriteTo(output, _repeated_transitionRoutes_codec);
eventHandlers_.WriteTo(output, _repeated_eventHandlers_codec);
if (nluSettings_ != null) {
output.WriteRawTag(90);
output.WriteMessage(NluSettings);
}
transitionRouteGroups_.WriteTo(output, _repeated_transitionRouteGroups_codec);
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
if (Name.Length != 0) {
output.WriteRawTag(10);
output.WriteString(Name);
}
if (DisplayName.Length != 0) {
output.WriteRawTag(18);
output.WriteString(DisplayName);
}
if (Description.Length != 0) {
output.WriteRawTag(26);
output.WriteString(Description);
}
transitionRoutes_.WriteTo(ref output, _repeated_transitionRoutes_codec);
eventHandlers_.WriteTo(ref output, _repeated_eventHandlers_codec);
if (nluSettings_ != null) {
output.WriteRawTag(90);
output.WriteMessage(NluSettings);
}
transitionRouteGroups_.WriteTo(ref output, _repeated_transitionRouteGroups_codec);
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
}
#endif
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
if (Name.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
}
if (DisplayName.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(DisplayName);
}
if (Description.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Description);
}
size += transitionRoutes_.CalculateSize(_repeated_transitionRoutes_codec);
size += eventHandlers_.CalculateSize(_repeated_eventHandlers_codec);
size += transitionRouteGroups_.CalculateSize(_repeated_transitionRouteGroups_codec);
if (nluSettings_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(NluSettings);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(Flow other) {
if (other == null) {
return;
}
if (other.Name.Length != 0) {
Name = other.Name;
}
if (other.DisplayName.Length != 0) {
DisplayName = other.DisplayName;
}
if (other.Description.Length != 0) {
Description = other.Description;
}
transitionRoutes_.Add(other.transitionRoutes_);
eventHandlers_.Add(other.eventHandlers_);
transitionRouteGroups_.Add(other.transitionRouteGroups_);
if (other.nluSettings_ != null) {
if (nluSettings_ == null) {
NluSettings = new global::Google.Cloud.Dialogflow.Cx.V3.NluSettings();
}
NluSettings.MergeFrom(other.NluSettings);
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
input.ReadRawMessage(this);
#else
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
Name = input.ReadString();
break;
}
case 18: {
DisplayName = input.ReadString();
break;
}
case 26: {
Description = input.ReadString();
break;
}
case 34: {
transitionRoutes_.AddEntriesFrom(input, _repeated_transitionRoutes_codec);
break;
}
case 82: {
eventHandlers_.AddEntriesFrom(input, _repeated_eventHandlers_codec);
break;
}
case 90: {
if (nluSettings_ == null) {
NluSettings = new global::Google.Cloud.Dialogflow.Cx.V3.NluSettings();
}
input.ReadMessage(NluSettings);
break;
}
case 122: {
transitionRouteGroups_.AddEntriesFrom(input, _repeated_transitionRouteGroups_codec);
break;
}
}
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
break;
case 10: {
Name = input.ReadString();
break;
}
case 18: {
DisplayName = input.ReadString();
break;
}
case 26: {
Description = input.ReadString();
break;
}
case 34: {
transitionRoutes_.AddEntriesFrom(ref input, _repeated_transitionRoutes_codec);
break;
}
case 82: {
eventHandlers_.AddEntriesFrom(ref input, _repeated_eventHandlers_codec);
break;
}
case 90: {
if (nluSettings_ == null) {
NluSettings = new global::Google.Cloud.Dialogflow.Cx.V3.NluSettings();
}
input.ReadMessage(NluSettings);
break;
}
case 122: {
transitionRouteGroups_.AddEntriesFrom(ref input, _repeated_transitionRouteGroups_codec);
break;
}
}
}
}
#endif
}
/// <summary>
/// The request message for [Flows.CreateFlow][google.cloud.dialogflow.cx.v3.Flows.CreateFlow].
/// </summary>
public sealed partial class CreateFlowRequest : pb::IMessage<CreateFlowRequest>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<CreateFlowRequest> _parser = new pb::MessageParser<CreateFlowRequest>(() => new CreateFlowRequest());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<CreateFlowRequest> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Cloud.Dialogflow.Cx.V3.FlowReflection.Descriptor.MessageTypes[2]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public CreateFlowRequest() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public CreateFlowRequest(CreateFlowRequest other) : this() {
parent_ = other.parent_;
flow_ = other.flow_ != null ? other.flow_.Clone() : null;
languageCode_ = other.languageCode_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public CreateFlowRequest Clone() {
return new CreateFlowRequest(this);
}
/// <summary>Field number for the "parent" field.</summary>
public const int ParentFieldNumber = 1;
private string parent_ = "";
/// <summary>
/// Required. The agent to create a flow for.
/// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Parent {
get { return parent_; }
set {
parent_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "flow" field.</summary>
public const int FlowFieldNumber = 2;
private global::Google.Cloud.Dialogflow.Cx.V3.Flow flow_;
/// <summary>
/// Required. The flow to create.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Cloud.Dialogflow.Cx.V3.Flow Flow {
get { return flow_; }
set {
flow_ = value;
}
}
/// <summary>Field number for the "language_code" field.</summary>
public const int LanguageCodeFieldNumber = 3;
private string languageCode_ = "";
/// <summary>
/// The language of the following fields in `flow`:
///
/// * `Flow.event_handlers.trigger_fulfillment.messages`
/// * `Flow.transition_routes.trigger_fulfillment.messages`
///
/// If not specified, the agent's default language is used.
/// [Many
/// languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
/// are supported.
/// Note: languages must be enabled in the agent before they can be used.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string LanguageCode {
get { return languageCode_; }
set {
languageCode_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as CreateFlowRequest);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(CreateFlowRequest other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Parent != other.Parent) return false;
if (!object.Equals(Flow, other.Flow)) return false;
if (LanguageCode != other.LanguageCode) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
if (Parent.Length != 0) hash ^= Parent.GetHashCode();
if (flow_ != null) hash ^= Flow.GetHashCode();
if (LanguageCode.Length != 0) hash ^= LanguageCode.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output.WriteRawMessage(this);
#else
if (Parent.Length != 0) {
output.WriteRawTag(10);
output.WriteString(Parent);
}
if (flow_ != null) {
output.WriteRawTag(18);
output.WriteMessage(Flow);
}
if (LanguageCode.Length != 0) {
output.WriteRawTag(26);
output.WriteString(LanguageCode);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
if (Parent.Length != 0) {
output.WriteRawTag(10);
output.WriteString(Parent);
}
if (flow_ != null) {
output.WriteRawTag(18);
output.WriteMessage(Flow);
}
if (LanguageCode.Length != 0) {
output.WriteRawTag(26);
output.WriteString(LanguageCode);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
}
#endif
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
if (Parent.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Parent);
}
if (flow_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Flow);
}
if (LanguageCode.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(LanguageCode);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(CreateFlowRequest other) {
if (other == null) {
return;
}
if (other.Parent.Length != 0) {
Parent = other.Parent;
}
if (other.flow_ != null) {
if (flow_ == null) {
Flow = new global::Google.Cloud.Dialogflow.Cx.V3.Flow();
}
Flow.MergeFrom(other.Flow);
}
if (other.LanguageCode.Length != 0) {
LanguageCode = other.LanguageCode;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
input.ReadRawMessage(this);
#else
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
Parent = input.ReadString();
break;
}
case 18: {
if (flow_ == null) {
Flow = new global::Google.Cloud.Dialogflow.Cx.V3.Flow();
}
input.ReadMessage(Flow);
break;
}
case 26: {
LanguageCode = input.ReadString();
break;
}
}
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
break;
case 10: {
Parent = input.ReadString();
break;
}
case 18: {
if (flow_ == null) {
Flow = new global::Google.Cloud.Dialogflow.Cx.V3.Flow();
}
input.ReadMessage(Flow);
break;
}
case 26: {
LanguageCode = input.ReadString();
break;
}
}
}
}
#endif
}
/// <summary>
/// The request message for [Flows.DeleteFlow][google.cloud.dialogflow.cx.v3.Flows.DeleteFlow].
/// </summary>
public sealed partial class DeleteFlowRequest : pb::IMessage<DeleteFlowRequest>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<DeleteFlowRequest> _parser = new pb::MessageParser<DeleteFlowRequest>(() => new DeleteFlowRequest());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<DeleteFlowRequest> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Cloud.Dialogflow.Cx.V3.FlowReflection.Descriptor.MessageTypes[3]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public DeleteFlowRequest() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public DeleteFlowRequest(DeleteFlowRequest other) : this() {
name_ = other.name_;
force_ = other.force_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public DeleteFlowRequest Clone() {
return new DeleteFlowRequest(this);
}
/// <summary>Field number for the "name" field.</summary>
public const int NameFieldNumber = 1;
private string name_ = "";
/// <summary>
/// Required. The name of the flow to delete.
/// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
/// ID>/flows/<Flow ID>`.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Name {
get { return name_; }
set {
name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "force" field.</summary>
public const int ForceFieldNumber = 2;
private bool force_;
/// <summary>
/// This field has no effect for flows with no incoming transitions.
/// For flows with incoming transitions:
///
/// * If `force` is set to false, an error will be returned with message
/// indicating the incoming transitions.
/// * If `force` is set to true, Dialogflow will remove the flow, as well as
/// any transitions to the flow (i.e. [Target
/// flow][EventHandler.target_flow] in event handlers or [Target
/// flow][TransitionRoute.target_flow] in transition routes that point to
/// this flow will be cleared).
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Force {
get { return force_; }
set {
force_ = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as DeleteFlowRequest);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(DeleteFlowRequest other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Name != other.Name) return false;
if (Force != other.Force) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
if (Name.Length != 0) hash ^= Name.GetHashCode();
if (Force != false) hash ^= Force.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output.WriteRawMessage(this);
#else
if (Name.Length != 0) {
output.WriteRawTag(10);
output.WriteString(Name);
}
if (Force != false) {
output.WriteRawTag(16);
output.WriteBool(Force);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
if (Name.Length != 0) {
output.WriteRawTag(10);
output.WriteString(Name);
}
if (Force != false) {
output.WriteRawTag(16);
output.WriteBool(Force);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
}
#endif
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
if (Name.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
}
if (Force != false) {
size += 1 + 1;
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(DeleteFlowRequest other) {
if (other == null) {
return;
}
if (other.Name.Length != 0) {
Name = other.Name;
}
if (other.Force != false) {
Force = other.Force;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
input.ReadRawMessage(this);
#else
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
Name = input.ReadString();
break;
}
case 16: {
Force = input.ReadBool();
break;
}
}
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
break;
case 10: {
Name = input.ReadString();
break;
}
case 16: {
Force = input.ReadBool();
break;
}
}
}
}
#endif
}
/// <summary>
/// The request message for [Flows.ListFlows][google.cloud.dialogflow.cx.v3.Flows.ListFlows].
/// </summary>
public sealed partial class ListFlowsRequest : pb::IMessage<ListFlowsRequest>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<ListFlowsRequest> _parser = new pb::MessageParser<ListFlowsRequest>(() => new ListFlowsRequest());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<ListFlowsRequest> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Cloud.Dialogflow.Cx.V3.FlowReflection.Descriptor.MessageTypes[4]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ListFlowsRequest() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ListFlowsRequest(ListFlowsRequest other) : this() {
parent_ = other.parent_;
pageSize_ = other.pageSize_;
pageToken_ = other.pageToken_;
languageCode_ = other.languageCode_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ListFlowsRequest Clone() {
return new ListFlowsRequest(this);
}
/// <summary>Field number for the "parent" field.</summary>
public const int ParentFieldNumber = 1;
private string parent_ = "";
/// <summary>
/// Required. The agent containing the flows.
/// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Parent {
get { return parent_; }
set {
parent_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "page_size" field.</summary>
public const int PageSizeFieldNumber = 2;
private int pageSize_;
/// <summary>
/// The maximum number of items to return in a single page. By default 100 and
/// at most 1000.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int PageSize {
get { return pageSize_; }
set {
pageSize_ = value;
}
}
/// <summary>Field number for the "page_token" field.</summary>
public const int PageTokenFieldNumber = 3;
private string pageToken_ = "";
/// <summary>
/// The next_page_token value returned from a previous list request.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string PageToken {
get { return pageToken_; }
set {
pageToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "language_code" field.</summary>
public const int LanguageCodeFieldNumber = 4;
private string languageCode_ = "";
/// <summary>
/// The language to list flows for. The following fields are language
/// dependent:
///
/// * `Flow.event_handlers.trigger_fulfillment.messages`
/// * `Flow.transition_routes.trigger_fulfillment.messages`
///
/// If not specified, the agent's default language is used.
/// [Many
/// languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
/// are supported.
/// Note: languages must be enabled in the agent before they can be used.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string LanguageCode {
get { return languageCode_; }
set {
languageCode_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as ListFlowsRequest);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(ListFlowsRequest other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Parent != other.Parent) return false;
if (PageSize != other.PageSize) return false;
if (PageToken != other.PageToken) return false;
if (LanguageCode != other.LanguageCode) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
if (Parent.Length != 0) hash ^= Parent.GetHashCode();
if (PageSize != 0) hash ^= PageSize.GetHashCode();
if (PageToken.Length != 0) hash ^= PageToken.GetHashCode();
if (LanguageCode.Length != 0) hash ^= LanguageCode.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output.WriteRawMessage(this);
#else
if (Parent.Length != 0) {
output.WriteRawTag(10);
output.WriteString(Parent);
}
if (PageSize != 0) {
output.WriteRawTag(16);
output.WriteInt32(PageSize);
}
if (PageToken.Length != 0) {
output.WriteRawTag(26);
output.WriteString(PageToken);
}
if (LanguageCode.Length != 0) {
output.WriteRawTag(34);
output.WriteString(LanguageCode);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
if (Parent.Length != 0) {
output.WriteRawTag(10);
output.WriteString(Parent);
}
if (PageSize != 0) {
output.WriteRawTag(16);
output.WriteInt32(PageSize);
}
if (PageToken.Length != 0) {
output.WriteRawTag(26);
output.WriteString(PageToken);
}
if (LanguageCode.Length != 0) {
output.WriteRawTag(34);
output.WriteString(LanguageCode);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
}
#endif
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
if (Parent.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Parent);
}
if (PageSize != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(PageSize);
}
if (PageToken.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(PageToken);
}
if (LanguageCode.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(LanguageCode);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(ListFlowsRequest other) {
if (other == null) {
return;
}
if (other.Parent.Length != 0) {
Parent = other.Parent;
}
if (other.PageSize != 0) {
PageSize = other.PageSize;
}
if (other.PageToken.Length != 0) {
PageToken = other.PageToken;
}
if (other.LanguageCode.Length != 0) {
LanguageCode = other.LanguageCode;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
input.ReadRawMessage(this);
#else
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
Parent = input.ReadString();
break;
}
case 16: {
PageSize = input.ReadInt32();
break;
}
case 26: {
PageToken = input.ReadString();
break;
}
case 34: {
LanguageCode = input.ReadString();
break;
}
}
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
break;
case 10: {
Parent = input.ReadString();
break;
}
case 16: {
PageSize = input.ReadInt32();
break;
}
case 26: {
PageToken = input.ReadString();
break;
}
case 34: {
LanguageCode = input.ReadString();
break;
}
}
}
}
#endif
}
/// <summary>
/// The response message for [Flows.ListFlows][google.cloud.dialogflow.cx.v3.Flows.ListFlows].
/// </summary>
public sealed partial class ListFlowsResponse : pb::IMessage<ListFlowsResponse>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<ListFlowsResponse> _parser = new pb::MessageParser<ListFlowsResponse>(() => new ListFlowsResponse());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<ListFlowsResponse> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Cloud.Dialogflow.Cx.V3.FlowReflection.Descriptor.MessageTypes[5]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ListFlowsResponse() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ListFlowsResponse(ListFlowsResponse other) : this() {
flows_ = other.flows_.Clone();
nextPageToken_ = other.nextPageToken_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ListFlowsResponse Clone() {
return new ListFlowsResponse(this);
}
/// <summary>Field number for the "flows" field.</summary>
public const int FlowsFieldNumber = 1;
private static readonly pb::FieldCodec<global::Google.Cloud.Dialogflow.Cx.V3.Flow> _repeated_flows_codec
= pb::FieldCodec.ForMessage(10, global::Google.Cloud.Dialogflow.Cx.V3.Flow.Parser);
private readonly pbc::RepeatedField<global::Google.Cloud.Dialogflow.Cx.V3.Flow> flows_ = new pbc::RepeatedField<global::Google.Cloud.Dialogflow.Cx.V3.Flow>();
/// <summary>
/// The list of flows. There will be a maximum number of items returned based
/// on the page_size field in the request.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Cloud.Dialogflow.Cx.V3.Flow> Flows {
get { return flows_; }
}
/// <summary>Field number for the "next_page_token" field.</summary>
public const int NextPageTokenFieldNumber = 2;
private string nextPageToken_ = "";
/// <summary>
/// Token to retrieve the next page of results, or empty if there are no more
/// results in the list.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string NextPageToken {
get { return nextPageToken_; }
set {
nextPageToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as ListFlowsResponse);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(ListFlowsResponse other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if(!flows_.Equals(other.flows_)) return false;
if (NextPageToken != other.NextPageToken) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
hash ^= flows_.GetHashCode();
if (NextPageToken.Length != 0) hash ^= NextPageToken.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output.WriteRawMessage(this);
#else
flows_.WriteTo(output, _repeated_flows_codec);
if (NextPageToken.Length != 0) {
output.WriteRawTag(18);
output.WriteString(NextPageToken);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
flows_.WriteTo(ref output, _repeated_flows_codec);
if (NextPageToken.Length != 0) {
output.WriteRawTag(18);
output.WriteString(NextPageToken);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
}
#endif
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
size += flows_.CalculateSize(_repeated_flows_codec);
if (NextPageToken.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(NextPageToken);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(ListFlowsResponse other) {
if (other == null) {
return;
}
flows_.Add(other.flows_);
if (other.NextPageToken.Length != 0) {
NextPageToken = other.NextPageToken;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
input.ReadRawMessage(this);
#else
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
flows_.AddEntriesFrom(input, _repeated_flows_codec);
break;
}
case 18: {
NextPageToken = input.ReadString();
break;
}
}
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
break;
case 10: {
flows_.AddEntriesFrom(ref input, _repeated_flows_codec);
break;
}
case 18: {
NextPageToken = input.ReadString();
break;
}
}
}
}
#endif
}
/// <summary>
/// The response message for [Flows.GetFlow][google.cloud.dialogflow.cx.v3.Flows.GetFlow].
/// </summary>
public sealed partial class GetFlowRequest : pb::IMessage<GetFlowRequest>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<GetFlowRequest> _parser = new pb::MessageParser<GetFlowRequest>(() => new GetFlowRequest());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<GetFlowRequest> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Cloud.Dialogflow.Cx.V3.FlowReflection.Descriptor.MessageTypes[6]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public GetFlowRequest() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public GetFlowRequest(GetFlowRequest other) : this() {
name_ = other.name_;
languageCode_ = other.languageCode_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public GetFlowRequest Clone() {
return new GetFlowRequest(this);
}
/// <summary>Field number for the "name" field.</summary>
public const int NameFieldNumber = 1;
private string name_ = "";
/// <summary>
/// Required. The name of the flow to get.
/// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
/// ID>/flows/<Flow ID>`.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Name {
get { return name_; }
set {
name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "language_code" field.</summary>
public const int LanguageCodeFieldNumber = 2;
private string languageCode_ = "";
/// <summary>
/// The language to retrieve the flow for. The following fields are language
/// dependent:
///
/// * `Flow.event_handlers.trigger_fulfillment.messages`
/// * `Flow.transition_routes.trigger_fulfillment.messages`
///
/// If not specified, the agent's default language is used.
/// [Many
/// languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
/// are supported.
/// Note: languages must be enabled in the agent before they can be used.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string LanguageCode {
get { return languageCode_; }
set {
languageCode_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as GetFlowRequest);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(GetFlowRequest other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Name != other.Name) return false;
if (LanguageCode != other.LanguageCode) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
if (Name.Length != 0) hash ^= Name.GetHashCode();
if (LanguageCode.Length != 0) hash ^= LanguageCode.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output.WriteRawMessage(this);
#else
if (Name.Length != 0) {
output.WriteRawTag(10);
output.WriteString(Name);
}
if (LanguageCode.Length != 0) {
output.WriteRawTag(18);
output.WriteString(LanguageCode);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
if (Name.Length != 0) {
output.WriteRawTag(10);
output.WriteString(Name);
}
if (LanguageCode.Length != 0) {
output.WriteRawTag(18);
output.WriteString(LanguageCode);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
}
#endif
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
if (Name.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
}
if (LanguageCode.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(LanguageCode);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(GetFlowRequest other) {
if (other == null) {
return;
}
if (other.Name.Length != 0) {
Name = other.Name;
}
if (other.LanguageCode.Length != 0) {
LanguageCode = other.LanguageCode;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
input.ReadRawMessage(this);
#else
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
Name = input.ReadString();
break;
}
case 18: {
LanguageCode = input.ReadString();
break;
}
}
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
break;
case 10: {
Name = input.ReadString();
break;
}
case 18: {
LanguageCode = input.ReadString();
break;
}
}
}
}
#endif
}
/// <summary>
/// The request message for [Flows.UpdateFlow][google.cloud.dialogflow.cx.v3.Flows.UpdateFlow].
/// </summary>
public sealed partial class UpdateFlowRequest : pb::IMessage<UpdateFlowRequest>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<UpdateFlowRequest> _parser = new pb::MessageParser<UpdateFlowRequest>(() => new UpdateFlowRequest());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<UpdateFlowRequest> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Cloud.Dialogflow.Cx.V3.FlowReflection.Descriptor.MessageTypes[7]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public UpdateFlowRequest() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public UpdateFlowRequest(UpdateFlowRequest other) : this() {
flow_ = other.flow_ != null ? other.flow_.Clone() : null;
updateMask_ = other.updateMask_ != null ? other.updateMask_.Clone() : null;
languageCode_ = other.languageCode_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public UpdateFlowRequest Clone() {
return new UpdateFlowRequest(this);
}
/// <summary>Field number for the "flow" field.</summary>
public const int FlowFieldNumber = 1;
private global::Google.Cloud.Dialogflow.Cx.V3.Flow flow_;
/// <summary>
/// Required. The flow to update.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Cloud.Dialogflow.Cx.V3.Flow Flow {
get { return flow_; }
set {
flow_ = value;
}
}
/// <summary>Field number for the "update_mask" field.</summary>
public const int UpdateMaskFieldNumber = 2;
private global::Google.Protobuf.WellKnownTypes.FieldMask updateMask_;
/// <summary>
/// Required. The mask to control which fields get updated. If `update_mask` is not
/// specified, an error will be returned.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.FieldMask UpdateMask {
get { return updateMask_; }
set {
updateMask_ = value;
}
}
/// <summary>Field number for the "language_code" field.</summary>
public const int LanguageCodeFieldNumber = 3;
private string languageCode_ = "";
/// <summary>
/// The language of the following fields in `flow`:
///
/// * `Flow.event_handlers.trigger_fulfillment.messages`
/// * `Flow.transition_routes.trigger_fulfillment.messages`
///
/// If not specified, the agent's default language is used.
/// [Many
/// languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
/// are supported.
/// Note: languages must be enabled in the agent before they can be used.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string LanguageCode {
get { return languageCode_; }
set {
languageCode_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as UpdateFlowRequest);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(UpdateFlowRequest other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (!object.Equals(Flow, other.Flow)) return false;
if (!object.Equals(UpdateMask, other.UpdateMask)) return false;
if (LanguageCode != other.LanguageCode) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
if (flow_ != null) hash ^= Flow.GetHashCode();
if (updateMask_ != null) hash ^= UpdateMask.GetHashCode();
if (LanguageCode.Length != 0) hash ^= LanguageCode.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output.WriteRawMessage(this);
#else
if (flow_ != null) {
output.WriteRawTag(10);
output.WriteMessage(Flow);
}
if (updateMask_ != null) {
output.WriteRawTag(18);
output.WriteMessage(UpdateMask);
}
if (LanguageCode.Length != 0) {
output.WriteRawTag(26);
output.WriteString(LanguageCode);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
if (flow_ != null) {
output.WriteRawTag(10);
output.WriteMessage(Flow);
}
if (updateMask_ != null) {
output.WriteRawTag(18);
output.WriteMessage(UpdateMask);
}
if (LanguageCode.Length != 0) {
output.WriteRawTag(26);
output.WriteString(LanguageCode);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
}
#endif
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
if (flow_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Flow);
}
if (updateMask_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(UpdateMask);
}
if (LanguageCode.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(LanguageCode);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(UpdateFlowRequest other) {
if (other == null) {
return;
}
if (other.flow_ != null) {
if (flow_ == null) {
Flow = new global::Google.Cloud.Dialogflow.Cx.V3.Flow();
}
Flow.MergeFrom(other.Flow);
}
if (other.updateMask_ != null) {
if (updateMask_ == null) {
UpdateMask = new global::Google.Protobuf.WellKnownTypes.FieldMask();
}
UpdateMask.MergeFrom(other.UpdateMask);
}
if (other.LanguageCode.Length != 0) {
LanguageCode = other.LanguageCode;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
input.ReadRawMessage(this);
#else
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
if (flow_ == null) {
Flow = new global::Google.Cloud.Dialogflow.Cx.V3.Flow();
}
input.ReadMessage(Flow);
break;
}
case 18: {
if (updateMask_ == null) {
UpdateMask = new global::Google.Protobuf.WellKnownTypes.FieldMask();
}
input.ReadMessage(UpdateMask);
break;
}
case 26: {
LanguageCode = input.ReadString();
break;
}
}
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
break;
case 10: {
if (flow_ == null) {
Flow = new global::Google.Cloud.Dialogflow.Cx.V3.Flow();
}
input.ReadMessage(Flow);
break;
}
case 18: {
if (updateMask_ == null) {
UpdateMask = new global::Google.Protobuf.WellKnownTypes.FieldMask();
}
input.ReadMessage(UpdateMask);
break;
}
case 26: {
LanguageCode = input.ReadString();
break;
}
}
}
}
#endif
}
/// <summary>
/// The request message for [Flows.TrainFlow][google.cloud.dialogflow.cx.v3.Flows.TrainFlow].
/// </summary>
public sealed partial class TrainFlowRequest : pb::IMessage<TrainFlowRequest>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<TrainFlowRequest> _parser = new pb::MessageParser<TrainFlowRequest>(() => new TrainFlowRequest());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<TrainFlowRequest> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Cloud.Dialogflow.Cx.V3.FlowReflection.Descriptor.MessageTypes[8]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public TrainFlowRequest() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public TrainFlowRequest(TrainFlowRequest other) : this() {
name_ = other.name_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public TrainFlowRequest Clone() {
return new TrainFlowRequest(this);
}
/// <summary>Field number for the "name" field.</summary>
public const int NameFieldNumber = 1;
private string name_ = "";
/// <summary>
/// Required. The flow to train.
/// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
/// ID>/flows/<Flow ID>`.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Name {
get { return name_; }
set {
name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as TrainFlowRequest);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(TrainFlowRequest other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Name != other.Name) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
if (Name.Length != 0) hash ^= Name.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output.WriteRawMessage(this);
#else
if (Name.Length != 0) {
output.WriteRawTag(10);
output.WriteString(Name);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
if (Name.Length != 0) {
output.WriteRawTag(10);
output.WriteString(Name);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
}
#endif
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
if (Name.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(TrainFlowRequest other) {
if (other == null) {
return;
}
if (other.Name.Length != 0) {
Name = other.Name;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
input.ReadRawMessage(this);
#else
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
Name = input.ReadString();
break;
}
}
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
break;
case 10: {
Name = input.ReadString();
break;
}
}
}
}
#endif
}
/// <summary>
/// The request message for [Flows.ValidateFlow][google.cloud.dialogflow.cx.v3.Flows.ValidateFlow].
/// </summary>
public sealed partial class ValidateFlowRequest : pb::IMessage<ValidateFlowRequest>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<ValidateFlowRequest> _parser = new pb::MessageParser<ValidateFlowRequest>(() => new ValidateFlowRequest());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<ValidateFlowRequest> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Cloud.Dialogflow.Cx.V3.FlowReflection.Descriptor.MessageTypes[9]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ValidateFlowRequest() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ValidateFlowRequest(ValidateFlowRequest other) : this() {
name_ = other.name_;
languageCode_ = other.languageCode_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ValidateFlowRequest Clone() {
return new ValidateFlowRequest(this);
}
/// <summary>Field number for the "name" field.</summary>
public const int NameFieldNumber = 1;
private string name_ = "";
/// <summary>
/// Required. The flow to validate.
/// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
/// ID>/flows/<Flow ID>`.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Name {
get { return name_; }
set {
name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "language_code" field.</summary>
public const int LanguageCodeFieldNumber = 2;
private string languageCode_ = "";
/// <summary>
/// If not specified, the agent's default language is used.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string LanguageCode {
get { return languageCode_; }
set {
languageCode_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as ValidateFlowRequest);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(ValidateFlowRequest other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Name != other.Name) return false;
if (LanguageCode != other.LanguageCode) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
if (Name.Length != 0) hash ^= Name.GetHashCode();
if (LanguageCode.Length != 0) hash ^= LanguageCode.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output.WriteRawMessage(this);
#else
if (Name.Length != 0) {
output.WriteRawTag(10);
output.WriteString(Name);
}
if (LanguageCode.Length != 0) {
output.WriteRawTag(18);
output.WriteString(LanguageCode);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
if (Name.Length != 0) {
output.WriteRawTag(10);
output.WriteString(Name);
}
if (LanguageCode.Length != 0) {
output.WriteRawTag(18);
output.WriteString(LanguageCode);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
}
#endif
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
if (Name.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
}
if (LanguageCode.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(LanguageCode);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(ValidateFlowRequest other) {
if (other == null) {
return;
}
if (other.Name.Length != 0) {
Name = other.Name;
}
if (other.LanguageCode.Length != 0) {
LanguageCode = other.LanguageCode;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
input.ReadRawMessage(this);
#else
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
Name = input.ReadString();
break;
}
case 18: {
LanguageCode = input.ReadString();
break;
}
}
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
break;
case 10: {
Name = input.ReadString();
break;
}
case 18: {
LanguageCode = input.ReadString();
break;
}
}
}
}
#endif
}
/// <summary>
/// The request message for [Flows.GetFlowValidationResult][google.cloud.dialogflow.cx.v3.Flows.GetFlowValidationResult].
/// </summary>
public sealed partial class GetFlowValidationResultRequest : pb::IMessage<GetFlowValidationResultRequest>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<GetFlowValidationResultRequest> _parser = new pb::MessageParser<GetFlowValidationResultRequest>(() => new GetFlowValidationResultRequest());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<GetFlowValidationResultRequest> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Cloud.Dialogflow.Cx.V3.FlowReflection.Descriptor.MessageTypes[10]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public GetFlowValidationResultRequest() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public GetFlowValidationResultRequest(GetFlowValidationResultRequest other) : this() {
name_ = other.name_;
languageCode_ = other.languageCode_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public GetFlowValidationResultRequest Clone() {
return new GetFlowValidationResultRequest(this);
}
/// <summary>Field number for the "name" field.</summary>
public const int NameFieldNumber = 1;
private string name_ = "";
/// <summary>
/// Required. The flow name.
/// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
/// ID>/flows/<Flow ID>/validationResult`.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Name {
get { return name_; }
set {
name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "language_code" field.</summary>
public const int LanguageCodeFieldNumber = 2;
private string languageCode_ = "";
/// <summary>
/// If not specified, the agent's default language is used.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string LanguageCode {
get { return languageCode_; }
set {
languageCode_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as GetFlowValidationResultRequest);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(GetFlowValidationResultRequest other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Name != other.Name) return false;
if (LanguageCode != other.LanguageCode) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
if (Name.Length != 0) hash ^= Name.GetHashCode();
if (LanguageCode.Length != 0) hash ^= LanguageCode.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output.WriteRawMessage(this);
#else
if (Name.Length != 0) {
output.WriteRawTag(10);
output.WriteString(Name);
}
if (LanguageCode.Length != 0) {
output.WriteRawTag(18);
output.WriteString(LanguageCode);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
if (Name.Length != 0) {
output.WriteRawTag(10);
output.WriteString(Name);
}
if (LanguageCode.Length != 0) {
output.WriteRawTag(18);
output.WriteString(LanguageCode);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
}
#endif
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
if (Name.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
}
if (LanguageCode.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(LanguageCode);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(GetFlowValidationResultRequest other) {
if (other == null) {
return;
}
if (other.Name.Length != 0) {
Name = other.Name;
}
if (other.LanguageCode.Length != 0) {
LanguageCode = other.LanguageCode;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
input.ReadRawMessage(this);
#else
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
Name = input.ReadString();
break;
}
case 18: {
LanguageCode = input.ReadString();
break;
}
}
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
break;
case 10: {
Name = input.ReadString();
break;
}
case 18: {
LanguageCode = input.ReadString();
break;
}
}
}
}
#endif
}
/// <summary>
/// The response message for [Flows.GetFlowValidationResult][google.cloud.dialogflow.cx.v3.Flows.GetFlowValidationResult].
/// </summary>
public sealed partial class FlowValidationResult : pb::IMessage<FlowValidationResult>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<FlowValidationResult> _parser = new pb::MessageParser<FlowValidationResult>(() => new FlowValidationResult());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<FlowValidationResult> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Cloud.Dialogflow.Cx.V3.FlowReflection.Descriptor.MessageTypes[11]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public FlowValidationResult() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public FlowValidationResult(FlowValidationResult other) : this() {
name_ = other.name_;
validationMessages_ = other.validationMessages_.Clone();
updateTime_ = other.updateTime_ != null ? other.updateTime_.Clone() : null;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public FlowValidationResult Clone() {
return new FlowValidationResult(this);
}
/// <summary>Field number for the "name" field.</summary>
public const int NameFieldNumber = 1;
private string name_ = "";
/// <summary>
/// The unique identifier of the flow validation result.
/// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
/// ID>/flows/<Flow ID>/validationResult`.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Name {
get { return name_; }
set {
name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "validation_messages" field.</summary>
public const int ValidationMessagesFieldNumber = 2;
private static readonly pb::FieldCodec<global::Google.Cloud.Dialogflow.Cx.V3.ValidationMessage> _repeated_validationMessages_codec
= pb::FieldCodec.ForMessage(18, global::Google.Cloud.Dialogflow.Cx.V3.ValidationMessage.Parser);
private readonly pbc::RepeatedField<global::Google.Cloud.Dialogflow.Cx.V3.ValidationMessage> validationMessages_ = new pbc::RepeatedField<global::Google.Cloud.Dialogflow.Cx.V3.ValidationMessage>();
/// <summary>
/// Contains all validation messages.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Cloud.Dialogflow.Cx.V3.ValidationMessage> ValidationMessages {
get { return validationMessages_; }
}
/// <summary>Field number for the "update_time" field.</summary>
public const int UpdateTimeFieldNumber = 3;
private global::Google.Protobuf.WellKnownTypes.Timestamp updateTime_;
/// <summary>
/// Last time the flow was validated.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.Timestamp UpdateTime {
get { return updateTime_; }
set {
updateTime_ = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as FlowValidationResult);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(FlowValidationResult other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Name != other.Name) return false;
if(!validationMessages_.Equals(other.validationMessages_)) return false;
if (!object.Equals(UpdateTime, other.UpdateTime)) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
if (Name.Length != 0) hash ^= Name.GetHashCode();
hash ^= validationMessages_.GetHashCode();
if (updateTime_ != null) hash ^= UpdateTime.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output.WriteRawMessage(this);
#else
if (Name.Length != 0) {
output.WriteRawTag(10);
output.WriteString(Name);
}
validationMessages_.WriteTo(output, _repeated_validationMessages_codec);
if (updateTime_ != null) {
output.WriteRawTag(26);
output.WriteMessage(UpdateTime);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
if (Name.Length != 0) {
output.WriteRawTag(10);
output.WriteString(Name);
}
validationMessages_.WriteTo(ref output, _repeated_validationMessages_codec);
if (updateTime_ != null) {
output.WriteRawTag(26);
output.WriteMessage(UpdateTime);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
}
#endif
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
if (Name.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
}
size += validationMessages_.CalculateSize(_repeated_validationMessages_codec);
if (updateTime_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(UpdateTime);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(FlowValidationResult other) {
if (other == null) {
return;
}
if (other.Name.Length != 0) {
Name = other.Name;
}
validationMessages_.Add(other.validationMessages_);
if (other.updateTime_ != null) {
if (updateTime_ == null) {
UpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
}
UpdateTime.MergeFrom(other.UpdateTime);
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
input.ReadRawMessage(this);
#else
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
Name = input.ReadString();
break;
}
case 18: {
validationMessages_.AddEntriesFrom(input, _repeated_validationMessages_codec);
break;
}
case 26: {
if (updateTime_ == null) {
UpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
}
input.ReadMessage(UpdateTime);
break;
}
}
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
break;
case 10: {
Name = input.ReadString();
break;
}
case 18: {
validationMessages_.AddEntriesFrom(ref input, _repeated_validationMessages_codec);
break;
}
case 26: {
if (updateTime_ == null) {
UpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
}
input.ReadMessage(UpdateTime);
break;
}
}
}
}
#endif
}
#endregion
}
#endregion Designer generated code
| 36.719346 | 658 | 0.661109 | [
"Apache-2.0"
] | viacheslav-rostovtsev/google-cloud-dotnet | apis/Google.Cloud.Dialogflow.Cx.V3/Google.Cloud.Dialogflow.Cx.V3/Flow.cs | 121,284 | C# |
using System.Windows;
using System.Windows.Controls;
namespace AdaptiveCards.Rendering.Wpf
{
public static class AdaptiveTextInputRenderer
{
public static FrameworkElement Render(AdaptiveTextInput input, AdaptiveRenderContext context)
{
var textBox = new TextBox() { Text = input.Value };
if (input.IsMultiline == true)
{
textBox.AcceptsReturn = true;
textBox.TextWrapping = TextWrapping.Wrap;
textBox.HorizontalScrollBarVisibility = ScrollBarVisibility.Disabled;
}
if (input.MaxLength > 0)
textBox.MaxLength = input.MaxLength;
textBox.SetPlaceholder(input.Placeholder);
textBox.Style = context.GetStyle($"Adaptive.Input.Text.{input.Style}");
textBox.SetContext(input);
context.InputBindings.Add(input.Id, () => textBox.Text);
if(!input.IsVisible)
{
textBox.Visibility = Visibility.Collapsed;
}
return textBox;
}
}
}
| 30.416667 | 101 | 0.591781 | [
"MIT"
] | AllcryptoquickDevelopment/AdaptiveCards | source/dotnet/Library/AdaptiveCards.Rendering.Wpf/AdaptiveTextInputRenderer.cs | 1,095 | C# |
using System;
namespace Grillbot.Models.Math
{
public class MathAuditLogFilter
{
public ulong? GuildID { get; set; }
public long? UserID { get; set; }
public ulong? Channel { get; set; }
public DateTime? DateTimeFrom { get; set; }
public DateTime? DateTimeTo { get; set; }
public int Page { get; set; } = 1;
}
}
| 24.933333 | 51 | 0.585561 | [
"MIT"
] | LowwinCZ/GrillBot | Grillbot/Models/Math/MathAuditLogFilter.cs | 376 | C# |
// <auto-generated>
// This file was generated automatically by GenerateFromSchema. Do NOT edit it.
// https://github.com/AnalyticalGraphicsInc/czml-writer
// </auto-generated>
using CesiumLanguageWriter.Advanced;
using System;
using JetBrains.Annotations;
using System.Collections.Generic;
using System.Drawing;
namespace CesiumLanguageWriter
{
/// <summary>
/// Writes a <c>Ellipse</c> to a <see cref="CesiumOutputStream"/>. A <c>Ellipse</c> is an ellipse, which is a closed curve on or above the surface of the Earth.
/// </summary>
public class EllipseCesiumWriter : CesiumPropertyWriter<EllipseCesiumWriter>
{
/// <summary>
/// The name of the <c>show</c> property.
/// </summary>
public const string ShowPropertyName = "show";
/// <summary>
/// The name of the <c>semiMajorAxis</c> property.
/// </summary>
public const string SemiMajorAxisPropertyName = "semiMajorAxis";
/// <summary>
/// The name of the <c>semiMinorAxis</c> property.
/// </summary>
public const string SemiMinorAxisPropertyName = "semiMinorAxis";
/// <summary>
/// The name of the <c>height</c> property.
/// </summary>
public const string HeightPropertyName = "height";
/// <summary>
/// The name of the <c>heightReference</c> property.
/// </summary>
public const string HeightReferencePropertyName = "heightReference";
/// <summary>
/// The name of the <c>extrudedHeight</c> property.
/// </summary>
public const string ExtrudedHeightPropertyName = "extrudedHeight";
/// <summary>
/// The name of the <c>extrudedHeightReference</c> property.
/// </summary>
public const string ExtrudedHeightReferencePropertyName = "extrudedHeightReference";
/// <summary>
/// The name of the <c>rotation</c> property.
/// </summary>
public const string RotationPropertyName = "rotation";
/// <summary>
/// The name of the <c>stRotation</c> property.
/// </summary>
public const string StRotationPropertyName = "stRotation";
/// <summary>
/// The name of the <c>granularity</c> property.
/// </summary>
public const string GranularityPropertyName = "granularity";
/// <summary>
/// The name of the <c>fill</c> property.
/// </summary>
public const string FillPropertyName = "fill";
/// <summary>
/// The name of the <c>material</c> property.
/// </summary>
public const string MaterialPropertyName = "material";
/// <summary>
/// The name of the <c>outline</c> property.
/// </summary>
public const string OutlinePropertyName = "outline";
/// <summary>
/// The name of the <c>outlineColor</c> property.
/// </summary>
public const string OutlineColorPropertyName = "outlineColor";
/// <summary>
/// The name of the <c>outlineWidth</c> property.
/// </summary>
public const string OutlineWidthPropertyName = "outlineWidth";
/// <summary>
/// The name of the <c>numberOfVerticalLines</c> property.
/// </summary>
public const string NumberOfVerticalLinesPropertyName = "numberOfVerticalLines";
/// <summary>
/// The name of the <c>shadows</c> property.
/// </summary>
public const string ShadowsPropertyName = "shadows";
/// <summary>
/// The name of the <c>distanceDisplayCondition</c> property.
/// </summary>
public const string DistanceDisplayConditionPropertyName = "distanceDisplayCondition";
/// <summary>
/// The name of the <c>classificationType</c> property.
/// </summary>
public const string ClassificationTypePropertyName = "classificationType";
/// <summary>
/// The name of the <c>zIndex</c> property.
/// </summary>
public const string ZIndexPropertyName = "zIndex";
private readonly Lazy<BooleanCesiumWriter> m_show = new Lazy<BooleanCesiumWriter>(() => new BooleanCesiumWriter(ShowPropertyName), false);
private readonly Lazy<DoubleCesiumWriter> m_semiMajorAxis = new Lazy<DoubleCesiumWriter>(() => new DoubleCesiumWriter(SemiMajorAxisPropertyName), false);
private readonly Lazy<DoubleCesiumWriter> m_semiMinorAxis = new Lazy<DoubleCesiumWriter>(() => new DoubleCesiumWriter(SemiMinorAxisPropertyName), false);
private readonly Lazy<DoubleCesiumWriter> m_height = new Lazy<DoubleCesiumWriter>(() => new DoubleCesiumWriter(HeightPropertyName), false);
private readonly Lazy<HeightReferenceCesiumWriter> m_heightReference = new Lazy<HeightReferenceCesiumWriter>(() => new HeightReferenceCesiumWriter(HeightReferencePropertyName), false);
private readonly Lazy<DoubleCesiumWriter> m_extrudedHeight = new Lazy<DoubleCesiumWriter>(() => new DoubleCesiumWriter(ExtrudedHeightPropertyName), false);
private readonly Lazy<HeightReferenceCesiumWriter> m_extrudedHeightReference = new Lazy<HeightReferenceCesiumWriter>(() => new HeightReferenceCesiumWriter(ExtrudedHeightReferencePropertyName), false);
private readonly Lazy<DoubleCesiumWriter> m_rotation = new Lazy<DoubleCesiumWriter>(() => new DoubleCesiumWriter(RotationPropertyName), false);
private readonly Lazy<DoubleCesiumWriter> m_stRotation = new Lazy<DoubleCesiumWriter>(() => new DoubleCesiumWriter(StRotationPropertyName), false);
private readonly Lazy<DoubleCesiumWriter> m_granularity = new Lazy<DoubleCesiumWriter>(() => new DoubleCesiumWriter(GranularityPropertyName), false);
private readonly Lazy<BooleanCesiumWriter> m_fill = new Lazy<BooleanCesiumWriter>(() => new BooleanCesiumWriter(FillPropertyName), false);
private readonly Lazy<MaterialCesiumWriter> m_material = new Lazy<MaterialCesiumWriter>(() => new MaterialCesiumWriter(MaterialPropertyName), false);
private readonly Lazy<BooleanCesiumWriter> m_outline = new Lazy<BooleanCesiumWriter>(() => new BooleanCesiumWriter(OutlinePropertyName), false);
private readonly Lazy<ColorCesiumWriter> m_outlineColor = new Lazy<ColorCesiumWriter>(() => new ColorCesiumWriter(OutlineColorPropertyName), false);
private readonly Lazy<DoubleCesiumWriter> m_outlineWidth = new Lazy<DoubleCesiumWriter>(() => new DoubleCesiumWriter(OutlineWidthPropertyName), false);
private readonly Lazy<IntegerCesiumWriter> m_numberOfVerticalLines = new Lazy<IntegerCesiumWriter>(() => new IntegerCesiumWriter(NumberOfVerticalLinesPropertyName), false);
private readonly Lazy<ShadowModeCesiumWriter> m_shadows = new Lazy<ShadowModeCesiumWriter>(() => new ShadowModeCesiumWriter(ShadowsPropertyName), false);
private readonly Lazy<DistanceDisplayConditionCesiumWriter> m_distanceDisplayCondition = new Lazy<DistanceDisplayConditionCesiumWriter>(() => new DistanceDisplayConditionCesiumWriter(DistanceDisplayConditionPropertyName), false);
private readonly Lazy<ClassificationTypeCesiumWriter> m_classificationType = new Lazy<ClassificationTypeCesiumWriter>(() => new ClassificationTypeCesiumWriter(ClassificationTypePropertyName), false);
private readonly Lazy<IntegerCesiumWriter> m_zIndex = new Lazy<IntegerCesiumWriter>(() => new IntegerCesiumWriter(ZIndexPropertyName), false);
/// <summary>
/// Initializes a new instance.
/// </summary>
/// <param name="propertyName">The name of the property.</param>
public EllipseCesiumWriter([NotNull] string propertyName)
: base(propertyName)
{
}
/// <summary>
/// Initializes a new instance as a copy of an existing instance.
/// </summary>
/// <param name="existingInstance">The existing instance to copy.</param>
protected EllipseCesiumWriter([NotNull] EllipseCesiumWriter existingInstance)
: base(existingInstance)
{
}
/// <inheritdoc/>
public override EllipseCesiumWriter Clone()
{
return new EllipseCesiumWriter(this);
}
/// <summary>
/// Gets the writer for the <c>show</c> property. The returned instance must be opened by calling the <see cref="CesiumElementWriter.Open"/> method before it can be used for writing. The <c>show</c> property defines whether or not the ellipse is shown. If not specified, the default value is <see langword="true"/>.
/// </summary>
[NotNull]
public BooleanCesiumWriter ShowWriter
{
get { return m_show.Value; }
}
/// <summary>
/// Opens and returns the writer for the <c>show</c> property. The <c>show</c> property defines whether or not the ellipse is shown. If not specified, the default value is <see langword="true"/>.
/// </summary>
[NotNull]
public BooleanCesiumWriter OpenShowProperty()
{
OpenIntervalIfNecessary();
return OpenAndReturn(ShowWriter);
}
/// <summary>
/// Writes a value for the <c>show</c> property as a <c>boolean</c> value. The <c>show</c> property specifies whether or not the ellipse is shown. If not specified, the default value is <see langword="true"/>.
/// </summary>
/// <param name="value">The value.</param>
public void WriteShowProperty(bool value)
{
using (var writer = OpenShowProperty())
{
writer.WriteBoolean(value);
}
}
/// <summary>
/// Writes a value for the <c>show</c> property as a <c>reference</c> value. The <c>show</c> property specifies whether or not the ellipse is shown. If not specified, the default value is <see langword="true"/>.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteShowPropertyReference(Reference value)
{
using (var writer = OpenShowProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>show</c> property as a <c>reference</c> value. The <c>show</c> property specifies whether or not the ellipse is shown. If not specified, the default value is <see langword="true"/>.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteShowPropertyReference(string value)
{
using (var writer = OpenShowProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>show</c> property as a <c>reference</c> value. The <c>show</c> property specifies whether or not the ellipse is shown. If not specified, the default value is <see langword="true"/>.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyName">The property on the referenced object.</param>
public void WriteShowPropertyReference(string identifier, string propertyName)
{
using (var writer = OpenShowProperty())
{
writer.WriteReference(identifier, propertyName);
}
}
/// <summary>
/// Writes a value for the <c>show</c> property as a <c>reference</c> value. The <c>show</c> property specifies whether or not the ellipse is shown. If not specified, the default value is <see langword="true"/>.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyNames">The hierarchy of properties to be indexed on the referenced object.</param>
public void WriteShowPropertyReference(string identifier, string[] propertyNames)
{
using (var writer = OpenShowProperty())
{
writer.WriteReference(identifier, propertyNames);
}
}
/// <summary>
/// Gets the writer for the <c>semiMajorAxis</c> property. The returned instance must be opened by calling the <see cref="CesiumElementWriter.Open"/> method before it can be used for writing. The <c>semiMajorAxis</c> property defines the length of the ellipse's semi-major axis in meters. This value must be specified in order for the client to display graphics.
/// </summary>
[NotNull]
public DoubleCesiumWriter SemiMajorAxisWriter
{
get { return m_semiMajorAxis.Value; }
}
/// <summary>
/// Opens and returns the writer for the <c>semiMajorAxis</c> property. The <c>semiMajorAxis</c> property defines the length of the ellipse's semi-major axis in meters. This value must be specified in order for the client to display graphics.
/// </summary>
[NotNull]
public DoubleCesiumWriter OpenSemiMajorAxisProperty()
{
OpenIntervalIfNecessary();
return OpenAndReturn(SemiMajorAxisWriter);
}
/// <summary>
/// Writes a value for the <c>semiMajorAxis</c> property as a <c>number</c> value. The <c>semiMajorAxis</c> property specifies the length of the ellipse's semi-major axis in meters. This value must be specified in order for the client to display graphics.
/// </summary>
/// <param name="value">The value.</param>
public void WriteSemiMajorAxisProperty(double value)
{
using (var writer = OpenSemiMajorAxisProperty())
{
writer.WriteNumber(value);
}
}
/// <summary>
/// Writes a value for the <c>semiMajorAxis</c> property as a <c>number</c> value. The <c>semiMajorAxis</c> property specifies the length of the ellipse's semi-major axis in meters. This value must be specified in order for the client to display graphics.
/// </summary>
/// <param name="dates">The dates at which the value is specified.</param>
/// <param name="values">The values corresponding to each date.</param>
public void WriteSemiMajorAxisProperty(IList<JulianDate> dates, IList<double> values)
{
using (var writer = OpenSemiMajorAxisProperty())
{
writer.WriteNumber(dates, values);
}
}
/// <summary>
/// Writes a value for the <c>semiMajorAxis</c> property as a <c>number</c> value. The <c>semiMajorAxis</c> property specifies the length of the ellipse's semi-major axis in meters. This value must be specified in order for the client to display graphics.
/// </summary>
/// <param name="dates">The dates at which the value is specified.</param>
/// <param name="values">The value corresponding to each date.</param>
/// <param name="startIndex">The index of the first element to write.</param>
/// <param name="length">The number of elements to write.</param>
public void WriteSemiMajorAxisProperty(IList<JulianDate> dates, IList<double> values, int startIndex, int length)
{
using (var writer = OpenSemiMajorAxisProperty())
{
writer.WriteNumber(dates, values, startIndex, length);
}
}
/// <summary>
/// Writes a value for the <c>semiMajorAxis</c> property as a <c>reference</c> value. The <c>semiMajorAxis</c> property specifies the length of the ellipse's semi-major axis in meters. This value must be specified in order for the client to display graphics.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteSemiMajorAxisPropertyReference(Reference value)
{
using (var writer = OpenSemiMajorAxisProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>semiMajorAxis</c> property as a <c>reference</c> value. The <c>semiMajorAxis</c> property specifies the length of the ellipse's semi-major axis in meters. This value must be specified in order for the client to display graphics.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteSemiMajorAxisPropertyReference(string value)
{
using (var writer = OpenSemiMajorAxisProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>semiMajorAxis</c> property as a <c>reference</c> value. The <c>semiMajorAxis</c> property specifies the length of the ellipse's semi-major axis in meters. This value must be specified in order for the client to display graphics.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyName">The property on the referenced object.</param>
public void WriteSemiMajorAxisPropertyReference(string identifier, string propertyName)
{
using (var writer = OpenSemiMajorAxisProperty())
{
writer.WriteReference(identifier, propertyName);
}
}
/// <summary>
/// Writes a value for the <c>semiMajorAxis</c> property as a <c>reference</c> value. The <c>semiMajorAxis</c> property specifies the length of the ellipse's semi-major axis in meters. This value must be specified in order for the client to display graphics.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyNames">The hierarchy of properties to be indexed on the referenced object.</param>
public void WriteSemiMajorAxisPropertyReference(string identifier, string[] propertyNames)
{
using (var writer = OpenSemiMajorAxisProperty())
{
writer.WriteReference(identifier, propertyNames);
}
}
/// <summary>
/// Gets the writer for the <c>semiMinorAxis</c> property. The returned instance must be opened by calling the <see cref="CesiumElementWriter.Open"/> method before it can be used for writing. The <c>semiMinorAxis</c> property defines the length of the ellipse's semi-minor axis in meters. This value must be specified in order for the client to display graphics.
/// </summary>
[NotNull]
public DoubleCesiumWriter SemiMinorAxisWriter
{
get { return m_semiMinorAxis.Value; }
}
/// <summary>
/// Opens and returns the writer for the <c>semiMinorAxis</c> property. The <c>semiMinorAxis</c> property defines the length of the ellipse's semi-minor axis in meters. This value must be specified in order for the client to display graphics.
/// </summary>
[NotNull]
public DoubleCesiumWriter OpenSemiMinorAxisProperty()
{
OpenIntervalIfNecessary();
return OpenAndReturn(SemiMinorAxisWriter);
}
/// <summary>
/// Writes a value for the <c>semiMinorAxis</c> property as a <c>number</c> value. The <c>semiMinorAxis</c> property specifies the length of the ellipse's semi-minor axis in meters. This value must be specified in order for the client to display graphics.
/// </summary>
/// <param name="value">The value.</param>
public void WriteSemiMinorAxisProperty(double value)
{
using (var writer = OpenSemiMinorAxisProperty())
{
writer.WriteNumber(value);
}
}
/// <summary>
/// Writes a value for the <c>semiMinorAxis</c> property as a <c>number</c> value. The <c>semiMinorAxis</c> property specifies the length of the ellipse's semi-minor axis in meters. This value must be specified in order for the client to display graphics.
/// </summary>
/// <param name="dates">The dates at which the value is specified.</param>
/// <param name="values">The values corresponding to each date.</param>
public void WriteSemiMinorAxisProperty(IList<JulianDate> dates, IList<double> values)
{
using (var writer = OpenSemiMinorAxisProperty())
{
writer.WriteNumber(dates, values);
}
}
/// <summary>
/// Writes a value for the <c>semiMinorAxis</c> property as a <c>number</c> value. The <c>semiMinorAxis</c> property specifies the length of the ellipse's semi-minor axis in meters. This value must be specified in order for the client to display graphics.
/// </summary>
/// <param name="dates">The dates at which the value is specified.</param>
/// <param name="values">The value corresponding to each date.</param>
/// <param name="startIndex">The index of the first element to write.</param>
/// <param name="length">The number of elements to write.</param>
public void WriteSemiMinorAxisProperty(IList<JulianDate> dates, IList<double> values, int startIndex, int length)
{
using (var writer = OpenSemiMinorAxisProperty())
{
writer.WriteNumber(dates, values, startIndex, length);
}
}
/// <summary>
/// Writes a value for the <c>semiMinorAxis</c> property as a <c>reference</c> value. The <c>semiMinorAxis</c> property specifies the length of the ellipse's semi-minor axis in meters. This value must be specified in order for the client to display graphics.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteSemiMinorAxisPropertyReference(Reference value)
{
using (var writer = OpenSemiMinorAxisProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>semiMinorAxis</c> property as a <c>reference</c> value. The <c>semiMinorAxis</c> property specifies the length of the ellipse's semi-minor axis in meters. This value must be specified in order for the client to display graphics.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteSemiMinorAxisPropertyReference(string value)
{
using (var writer = OpenSemiMinorAxisProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>semiMinorAxis</c> property as a <c>reference</c> value. The <c>semiMinorAxis</c> property specifies the length of the ellipse's semi-minor axis in meters. This value must be specified in order for the client to display graphics.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyName">The property on the referenced object.</param>
public void WriteSemiMinorAxisPropertyReference(string identifier, string propertyName)
{
using (var writer = OpenSemiMinorAxisProperty())
{
writer.WriteReference(identifier, propertyName);
}
}
/// <summary>
/// Writes a value for the <c>semiMinorAxis</c> property as a <c>reference</c> value. The <c>semiMinorAxis</c> property specifies the length of the ellipse's semi-minor axis in meters. This value must be specified in order for the client to display graphics.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyNames">The hierarchy of properties to be indexed on the referenced object.</param>
public void WriteSemiMinorAxisPropertyReference(string identifier, string[] propertyNames)
{
using (var writer = OpenSemiMinorAxisProperty())
{
writer.WriteReference(identifier, propertyNames);
}
}
/// <summary>
/// Gets the writer for the <c>height</c> property. The returned instance must be opened by calling the <see cref="CesiumElementWriter.Open"/> method before it can be used for writing. The <c>height</c> property defines the altitude of the ellipse relative to the surface. If not specified, the default value is 0.0.
/// </summary>
[NotNull]
public DoubleCesiumWriter HeightWriter
{
get { return m_height.Value; }
}
/// <summary>
/// Opens and returns the writer for the <c>height</c> property. The <c>height</c> property defines the altitude of the ellipse relative to the surface. If not specified, the default value is 0.0.
/// </summary>
[NotNull]
public DoubleCesiumWriter OpenHeightProperty()
{
OpenIntervalIfNecessary();
return OpenAndReturn(HeightWriter);
}
/// <summary>
/// Writes a value for the <c>height</c> property as a <c>number</c> value. The <c>height</c> property specifies the altitude of the ellipse relative to the surface. If not specified, the default value is 0.0.
/// </summary>
/// <param name="value">The value.</param>
public void WriteHeightProperty(double value)
{
using (var writer = OpenHeightProperty())
{
writer.WriteNumber(value);
}
}
/// <summary>
/// Writes a value for the <c>height</c> property as a <c>number</c> value. The <c>height</c> property specifies the altitude of the ellipse relative to the surface. If not specified, the default value is 0.0.
/// </summary>
/// <param name="dates">The dates at which the value is specified.</param>
/// <param name="values">The values corresponding to each date.</param>
public void WriteHeightProperty(IList<JulianDate> dates, IList<double> values)
{
using (var writer = OpenHeightProperty())
{
writer.WriteNumber(dates, values);
}
}
/// <summary>
/// Writes a value for the <c>height</c> property as a <c>number</c> value. The <c>height</c> property specifies the altitude of the ellipse relative to the surface. If not specified, the default value is 0.0.
/// </summary>
/// <param name="dates">The dates at which the value is specified.</param>
/// <param name="values">The value corresponding to each date.</param>
/// <param name="startIndex">The index of the first element to write.</param>
/// <param name="length">The number of elements to write.</param>
public void WriteHeightProperty(IList<JulianDate> dates, IList<double> values, int startIndex, int length)
{
using (var writer = OpenHeightProperty())
{
writer.WriteNumber(dates, values, startIndex, length);
}
}
/// <summary>
/// Writes a value for the <c>height</c> property as a <c>reference</c> value. The <c>height</c> property specifies the altitude of the ellipse relative to the surface. If not specified, the default value is 0.0.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteHeightPropertyReference(Reference value)
{
using (var writer = OpenHeightProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>height</c> property as a <c>reference</c> value. The <c>height</c> property specifies the altitude of the ellipse relative to the surface. If not specified, the default value is 0.0.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteHeightPropertyReference(string value)
{
using (var writer = OpenHeightProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>height</c> property as a <c>reference</c> value. The <c>height</c> property specifies the altitude of the ellipse relative to the surface. If not specified, the default value is 0.0.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyName">The property on the referenced object.</param>
public void WriteHeightPropertyReference(string identifier, string propertyName)
{
using (var writer = OpenHeightProperty())
{
writer.WriteReference(identifier, propertyName);
}
}
/// <summary>
/// Writes a value for the <c>height</c> property as a <c>reference</c> value. The <c>height</c> property specifies the altitude of the ellipse relative to the surface. If not specified, the default value is 0.0.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyNames">The hierarchy of properties to be indexed on the referenced object.</param>
public void WriteHeightPropertyReference(string identifier, string[] propertyNames)
{
using (var writer = OpenHeightProperty())
{
writer.WriteReference(identifier, propertyNames);
}
}
/// <summary>
/// Gets the writer for the <c>heightReference</c> property. The returned instance must be opened by calling the <see cref="CesiumElementWriter.Open"/> method before it can be used for writing. The <c>heightReference</c> property defines the height reference of the ellipse, which indicates if <c>height</c> is relative to terrain or not. If not specified, the default value is NONE.
/// </summary>
[NotNull]
public HeightReferenceCesiumWriter HeightReferenceWriter
{
get { return m_heightReference.Value; }
}
/// <summary>
/// Opens and returns the writer for the <c>heightReference</c> property. The <c>heightReference</c> property defines the height reference of the ellipse, which indicates if <c>height</c> is relative to terrain or not. If not specified, the default value is NONE.
/// </summary>
[NotNull]
public HeightReferenceCesiumWriter OpenHeightReferenceProperty()
{
OpenIntervalIfNecessary();
return OpenAndReturn(HeightReferenceWriter);
}
/// <summary>
/// Writes a value for the <c>heightReference</c> property as a <c>heightReference</c> value. The <c>heightReference</c> property specifies the height reference of the ellipse, which indicates if <c>height</c> is relative to terrain or not. If not specified, the default value is NONE.
/// </summary>
/// <param name="value">The height reference.</param>
public void WriteHeightReferenceProperty(CesiumHeightReference value)
{
using (var writer = OpenHeightReferenceProperty())
{
writer.WriteHeightReference(value);
}
}
/// <summary>
/// Writes a value for the <c>heightReference</c> property as a <c>reference</c> value. The <c>heightReference</c> property specifies the height reference of the ellipse, which indicates if <c>height</c> is relative to terrain or not. If not specified, the default value is NONE.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteHeightReferencePropertyReference(Reference value)
{
using (var writer = OpenHeightReferenceProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>heightReference</c> property as a <c>reference</c> value. The <c>heightReference</c> property specifies the height reference of the ellipse, which indicates if <c>height</c> is relative to terrain or not. If not specified, the default value is NONE.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteHeightReferencePropertyReference(string value)
{
using (var writer = OpenHeightReferenceProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>heightReference</c> property as a <c>reference</c> value. The <c>heightReference</c> property specifies the height reference of the ellipse, which indicates if <c>height</c> is relative to terrain or not. If not specified, the default value is NONE.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyName">The property on the referenced object.</param>
public void WriteHeightReferencePropertyReference(string identifier, string propertyName)
{
using (var writer = OpenHeightReferenceProperty())
{
writer.WriteReference(identifier, propertyName);
}
}
/// <summary>
/// Writes a value for the <c>heightReference</c> property as a <c>reference</c> value. The <c>heightReference</c> property specifies the height reference of the ellipse, which indicates if <c>height</c> is relative to terrain or not. If not specified, the default value is NONE.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyNames">The hierarchy of properties to be indexed on the referenced object.</param>
public void WriteHeightReferencePropertyReference(string identifier, string[] propertyNames)
{
using (var writer = OpenHeightReferenceProperty())
{
writer.WriteReference(identifier, propertyNames);
}
}
/// <summary>
/// Gets the writer for the <c>extrudedHeight</c> property. The returned instance must be opened by calling the <see cref="CesiumElementWriter.Open"/> method before it can be used for writing. The <c>extrudedHeight</c> property defines the altitude of the ellipse's extruded face relative to the surface.
/// </summary>
[NotNull]
public DoubleCesiumWriter ExtrudedHeightWriter
{
get { return m_extrudedHeight.Value; }
}
/// <summary>
/// Opens and returns the writer for the <c>extrudedHeight</c> property. The <c>extrudedHeight</c> property defines the altitude of the ellipse's extruded face relative to the surface.
/// </summary>
[NotNull]
public DoubleCesiumWriter OpenExtrudedHeightProperty()
{
OpenIntervalIfNecessary();
return OpenAndReturn(ExtrudedHeightWriter);
}
/// <summary>
/// Writes a value for the <c>extrudedHeight</c> property as a <c>number</c> value. The <c>extrudedHeight</c> property specifies the altitude of the ellipse's extruded face relative to the surface.
/// </summary>
/// <param name="value">The value.</param>
public void WriteExtrudedHeightProperty(double value)
{
using (var writer = OpenExtrudedHeightProperty())
{
writer.WriteNumber(value);
}
}
/// <summary>
/// Writes a value for the <c>extrudedHeight</c> property as a <c>number</c> value. The <c>extrudedHeight</c> property specifies the altitude of the ellipse's extruded face relative to the surface.
/// </summary>
/// <param name="dates">The dates at which the value is specified.</param>
/// <param name="values">The values corresponding to each date.</param>
public void WriteExtrudedHeightProperty(IList<JulianDate> dates, IList<double> values)
{
using (var writer = OpenExtrudedHeightProperty())
{
writer.WriteNumber(dates, values);
}
}
/// <summary>
/// Writes a value for the <c>extrudedHeight</c> property as a <c>number</c> value. The <c>extrudedHeight</c> property specifies the altitude of the ellipse's extruded face relative to the surface.
/// </summary>
/// <param name="dates">The dates at which the value is specified.</param>
/// <param name="values">The value corresponding to each date.</param>
/// <param name="startIndex">The index of the first element to write.</param>
/// <param name="length">The number of elements to write.</param>
public void WriteExtrudedHeightProperty(IList<JulianDate> dates, IList<double> values, int startIndex, int length)
{
using (var writer = OpenExtrudedHeightProperty())
{
writer.WriteNumber(dates, values, startIndex, length);
}
}
/// <summary>
/// Writes a value for the <c>extrudedHeight</c> property as a <c>reference</c> value. The <c>extrudedHeight</c> property specifies the altitude of the ellipse's extruded face relative to the surface.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteExtrudedHeightPropertyReference(Reference value)
{
using (var writer = OpenExtrudedHeightProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>extrudedHeight</c> property as a <c>reference</c> value. The <c>extrudedHeight</c> property specifies the altitude of the ellipse's extruded face relative to the surface.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteExtrudedHeightPropertyReference(string value)
{
using (var writer = OpenExtrudedHeightProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>extrudedHeight</c> property as a <c>reference</c> value. The <c>extrudedHeight</c> property specifies the altitude of the ellipse's extruded face relative to the surface.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyName">The property on the referenced object.</param>
public void WriteExtrudedHeightPropertyReference(string identifier, string propertyName)
{
using (var writer = OpenExtrudedHeightProperty())
{
writer.WriteReference(identifier, propertyName);
}
}
/// <summary>
/// Writes a value for the <c>extrudedHeight</c> property as a <c>reference</c> value. The <c>extrudedHeight</c> property specifies the altitude of the ellipse's extruded face relative to the surface.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyNames">The hierarchy of properties to be indexed on the referenced object.</param>
public void WriteExtrudedHeightPropertyReference(string identifier, string[] propertyNames)
{
using (var writer = OpenExtrudedHeightProperty())
{
writer.WriteReference(identifier, propertyNames);
}
}
/// <summary>
/// Gets the writer for the <c>extrudedHeightReference</c> property. The returned instance must be opened by calling the <see cref="CesiumElementWriter.Open"/> method before it can be used for writing. The <c>extrudedHeightReference</c> property defines the extruded height reference of the ellipse, which indicates if <c>extrudedHeight</c> is relative to terrain or not. If not specified, the default value is NONE.
/// </summary>
[NotNull]
public HeightReferenceCesiumWriter ExtrudedHeightReferenceWriter
{
get { return m_extrudedHeightReference.Value; }
}
/// <summary>
/// Opens and returns the writer for the <c>extrudedHeightReference</c> property. The <c>extrudedHeightReference</c> property defines the extruded height reference of the ellipse, which indicates if <c>extrudedHeight</c> is relative to terrain or not. If not specified, the default value is NONE.
/// </summary>
[NotNull]
public HeightReferenceCesiumWriter OpenExtrudedHeightReferenceProperty()
{
OpenIntervalIfNecessary();
return OpenAndReturn(ExtrudedHeightReferenceWriter);
}
/// <summary>
/// Writes a value for the <c>extrudedHeightReference</c> property as a <c>heightReference</c> value. The <c>extrudedHeightReference</c> property specifies the extruded height reference of the ellipse, which indicates if <c>extrudedHeight</c> is relative to terrain or not. If not specified, the default value is NONE.
/// </summary>
/// <param name="value">The height reference.</param>
public void WriteExtrudedHeightReferenceProperty(CesiumHeightReference value)
{
using (var writer = OpenExtrudedHeightReferenceProperty())
{
writer.WriteHeightReference(value);
}
}
/// <summary>
/// Writes a value for the <c>extrudedHeightReference</c> property as a <c>reference</c> value. The <c>extrudedHeightReference</c> property specifies the extruded height reference of the ellipse, which indicates if <c>extrudedHeight</c> is relative to terrain or not. If not specified, the default value is NONE.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteExtrudedHeightReferencePropertyReference(Reference value)
{
using (var writer = OpenExtrudedHeightReferenceProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>extrudedHeightReference</c> property as a <c>reference</c> value. The <c>extrudedHeightReference</c> property specifies the extruded height reference of the ellipse, which indicates if <c>extrudedHeight</c> is relative to terrain or not. If not specified, the default value is NONE.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteExtrudedHeightReferencePropertyReference(string value)
{
using (var writer = OpenExtrudedHeightReferenceProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>extrudedHeightReference</c> property as a <c>reference</c> value. The <c>extrudedHeightReference</c> property specifies the extruded height reference of the ellipse, which indicates if <c>extrudedHeight</c> is relative to terrain or not. If not specified, the default value is NONE.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyName">The property on the referenced object.</param>
public void WriteExtrudedHeightReferencePropertyReference(string identifier, string propertyName)
{
using (var writer = OpenExtrudedHeightReferenceProperty())
{
writer.WriteReference(identifier, propertyName);
}
}
/// <summary>
/// Writes a value for the <c>extrudedHeightReference</c> property as a <c>reference</c> value. The <c>extrudedHeightReference</c> property specifies the extruded height reference of the ellipse, which indicates if <c>extrudedHeight</c> is relative to terrain or not. If not specified, the default value is NONE.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyNames">The hierarchy of properties to be indexed on the referenced object.</param>
public void WriteExtrudedHeightReferencePropertyReference(string identifier, string[] propertyNames)
{
using (var writer = OpenExtrudedHeightReferenceProperty())
{
writer.WriteReference(identifier, propertyNames);
}
}
/// <summary>
/// Gets the writer for the <c>rotation</c> property. The returned instance must be opened by calling the <see cref="CesiumElementWriter.Open"/> method before it can be used for writing. The <c>rotation</c> property defines the angle from north (counter-clockwise) in radians. If not specified, the default value is 0.0.
/// </summary>
[NotNull]
public DoubleCesiumWriter RotationWriter
{
get { return m_rotation.Value; }
}
/// <summary>
/// Opens and returns the writer for the <c>rotation</c> property. The <c>rotation</c> property defines the angle from north (counter-clockwise) in radians. If not specified, the default value is 0.0.
/// </summary>
[NotNull]
public DoubleCesiumWriter OpenRotationProperty()
{
OpenIntervalIfNecessary();
return OpenAndReturn(RotationWriter);
}
/// <summary>
/// Writes a value for the <c>rotation</c> property as a <c>number</c> value. The <c>rotation</c> property specifies the angle from north (counter-clockwise) in radians. If not specified, the default value is 0.0.
/// </summary>
/// <param name="value">The value.</param>
public void WriteRotationProperty(double value)
{
using (var writer = OpenRotationProperty())
{
writer.WriteNumber(value);
}
}
/// <summary>
/// Writes a value for the <c>rotation</c> property as a <c>number</c> value. The <c>rotation</c> property specifies the angle from north (counter-clockwise) in radians. If not specified, the default value is 0.0.
/// </summary>
/// <param name="dates">The dates at which the value is specified.</param>
/// <param name="values">The values corresponding to each date.</param>
public void WriteRotationProperty(IList<JulianDate> dates, IList<double> values)
{
using (var writer = OpenRotationProperty())
{
writer.WriteNumber(dates, values);
}
}
/// <summary>
/// Writes a value for the <c>rotation</c> property as a <c>number</c> value. The <c>rotation</c> property specifies the angle from north (counter-clockwise) in radians. If not specified, the default value is 0.0.
/// </summary>
/// <param name="dates">The dates at which the value is specified.</param>
/// <param name="values">The value corresponding to each date.</param>
/// <param name="startIndex">The index of the first element to write.</param>
/// <param name="length">The number of elements to write.</param>
public void WriteRotationProperty(IList<JulianDate> dates, IList<double> values, int startIndex, int length)
{
using (var writer = OpenRotationProperty())
{
writer.WriteNumber(dates, values, startIndex, length);
}
}
/// <summary>
/// Writes a value for the <c>rotation</c> property as a <c>reference</c> value. The <c>rotation</c> property specifies the angle from north (counter-clockwise) in radians. If not specified, the default value is 0.0.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteRotationPropertyReference(Reference value)
{
using (var writer = OpenRotationProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>rotation</c> property as a <c>reference</c> value. The <c>rotation</c> property specifies the angle from north (counter-clockwise) in radians. If not specified, the default value is 0.0.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteRotationPropertyReference(string value)
{
using (var writer = OpenRotationProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>rotation</c> property as a <c>reference</c> value. The <c>rotation</c> property specifies the angle from north (counter-clockwise) in radians. If not specified, the default value is 0.0.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyName">The property on the referenced object.</param>
public void WriteRotationPropertyReference(string identifier, string propertyName)
{
using (var writer = OpenRotationProperty())
{
writer.WriteReference(identifier, propertyName);
}
}
/// <summary>
/// Writes a value for the <c>rotation</c> property as a <c>reference</c> value. The <c>rotation</c> property specifies the angle from north (counter-clockwise) in radians. If not specified, the default value is 0.0.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyNames">The hierarchy of properties to be indexed on the referenced object.</param>
public void WriteRotationPropertyReference(string identifier, string[] propertyNames)
{
using (var writer = OpenRotationProperty())
{
writer.WriteReference(identifier, propertyNames);
}
}
/// <summary>
/// Gets the writer for the <c>stRotation</c> property. The returned instance must be opened by calling the <see cref="CesiumElementWriter.Open"/> method before it can be used for writing. The <c>stRotation</c> property defines the rotation of any applied texture coordinates. If not specified, the default value is 0.0.
/// </summary>
[NotNull]
public DoubleCesiumWriter StRotationWriter
{
get { return m_stRotation.Value; }
}
/// <summary>
/// Opens and returns the writer for the <c>stRotation</c> property. The <c>stRotation</c> property defines the rotation of any applied texture coordinates. If not specified, the default value is 0.0.
/// </summary>
[NotNull]
public DoubleCesiumWriter OpenStRotationProperty()
{
OpenIntervalIfNecessary();
return OpenAndReturn(StRotationWriter);
}
/// <summary>
/// Writes a value for the <c>stRotation</c> property as a <c>number</c> value. The <c>stRotation</c> property specifies the rotation of any applied texture coordinates. If not specified, the default value is 0.0.
/// </summary>
/// <param name="value">The value.</param>
public void WriteStRotationProperty(double value)
{
using (var writer = OpenStRotationProperty())
{
writer.WriteNumber(value);
}
}
/// <summary>
/// Writes a value for the <c>stRotation</c> property as a <c>number</c> value. The <c>stRotation</c> property specifies the rotation of any applied texture coordinates. If not specified, the default value is 0.0.
/// </summary>
/// <param name="dates">The dates at which the value is specified.</param>
/// <param name="values">The values corresponding to each date.</param>
public void WriteStRotationProperty(IList<JulianDate> dates, IList<double> values)
{
using (var writer = OpenStRotationProperty())
{
writer.WriteNumber(dates, values);
}
}
/// <summary>
/// Writes a value for the <c>stRotation</c> property as a <c>number</c> value. The <c>stRotation</c> property specifies the rotation of any applied texture coordinates. If not specified, the default value is 0.0.
/// </summary>
/// <param name="dates">The dates at which the value is specified.</param>
/// <param name="values">The value corresponding to each date.</param>
/// <param name="startIndex">The index of the first element to write.</param>
/// <param name="length">The number of elements to write.</param>
public void WriteStRotationProperty(IList<JulianDate> dates, IList<double> values, int startIndex, int length)
{
using (var writer = OpenStRotationProperty())
{
writer.WriteNumber(dates, values, startIndex, length);
}
}
/// <summary>
/// Writes a value for the <c>stRotation</c> property as a <c>reference</c> value. The <c>stRotation</c> property specifies the rotation of any applied texture coordinates. If not specified, the default value is 0.0.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteStRotationPropertyReference(Reference value)
{
using (var writer = OpenStRotationProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>stRotation</c> property as a <c>reference</c> value. The <c>stRotation</c> property specifies the rotation of any applied texture coordinates. If not specified, the default value is 0.0.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteStRotationPropertyReference(string value)
{
using (var writer = OpenStRotationProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>stRotation</c> property as a <c>reference</c> value. The <c>stRotation</c> property specifies the rotation of any applied texture coordinates. If not specified, the default value is 0.0.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyName">The property on the referenced object.</param>
public void WriteStRotationPropertyReference(string identifier, string propertyName)
{
using (var writer = OpenStRotationProperty())
{
writer.WriteReference(identifier, propertyName);
}
}
/// <summary>
/// Writes a value for the <c>stRotation</c> property as a <c>reference</c> value. The <c>stRotation</c> property specifies the rotation of any applied texture coordinates. If not specified, the default value is 0.0.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyNames">The hierarchy of properties to be indexed on the referenced object.</param>
public void WriteStRotationPropertyReference(string identifier, string[] propertyNames)
{
using (var writer = OpenStRotationProperty())
{
writer.WriteReference(identifier, propertyNames);
}
}
/// <summary>
/// Gets the writer for the <c>granularity</c> property. The returned instance must be opened by calling the <see cref="CesiumElementWriter.Open"/> method before it can be used for writing. The <c>granularity</c> property defines the sampling distance, in radians. If not specified, the default value is π / 180.0.
/// </summary>
[NotNull]
public DoubleCesiumWriter GranularityWriter
{
get { return m_granularity.Value; }
}
/// <summary>
/// Opens and returns the writer for the <c>granularity</c> property. The <c>granularity</c> property defines the sampling distance, in radians. If not specified, the default value is π / 180.0.
/// </summary>
[NotNull]
public DoubleCesiumWriter OpenGranularityProperty()
{
OpenIntervalIfNecessary();
return OpenAndReturn(GranularityWriter);
}
/// <summary>
/// Writes a value for the <c>granularity</c> property as a <c>number</c> value. The <c>granularity</c> property specifies the sampling distance, in radians. If not specified, the default value is π / 180.0.
/// </summary>
/// <param name="value">The value.</param>
public void WriteGranularityProperty(double value)
{
using (var writer = OpenGranularityProperty())
{
writer.WriteNumber(value);
}
}
/// <summary>
/// Writes a value for the <c>granularity</c> property as a <c>number</c> value. The <c>granularity</c> property specifies the sampling distance, in radians. If not specified, the default value is π / 180.0.
/// </summary>
/// <param name="dates">The dates at which the value is specified.</param>
/// <param name="values">The values corresponding to each date.</param>
public void WriteGranularityProperty(IList<JulianDate> dates, IList<double> values)
{
using (var writer = OpenGranularityProperty())
{
writer.WriteNumber(dates, values);
}
}
/// <summary>
/// Writes a value for the <c>granularity</c> property as a <c>number</c> value. The <c>granularity</c> property specifies the sampling distance, in radians. If not specified, the default value is π / 180.0.
/// </summary>
/// <param name="dates">The dates at which the value is specified.</param>
/// <param name="values">The value corresponding to each date.</param>
/// <param name="startIndex">The index of the first element to write.</param>
/// <param name="length">The number of elements to write.</param>
public void WriteGranularityProperty(IList<JulianDate> dates, IList<double> values, int startIndex, int length)
{
using (var writer = OpenGranularityProperty())
{
writer.WriteNumber(dates, values, startIndex, length);
}
}
/// <summary>
/// Writes a value for the <c>granularity</c> property as a <c>reference</c> value. The <c>granularity</c> property specifies the sampling distance, in radians. If not specified, the default value is π / 180.0.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteGranularityPropertyReference(Reference value)
{
using (var writer = OpenGranularityProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>granularity</c> property as a <c>reference</c> value. The <c>granularity</c> property specifies the sampling distance, in radians. If not specified, the default value is π / 180.0.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteGranularityPropertyReference(string value)
{
using (var writer = OpenGranularityProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>granularity</c> property as a <c>reference</c> value. The <c>granularity</c> property specifies the sampling distance, in radians. If not specified, the default value is π / 180.0.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyName">The property on the referenced object.</param>
public void WriteGranularityPropertyReference(string identifier, string propertyName)
{
using (var writer = OpenGranularityProperty())
{
writer.WriteReference(identifier, propertyName);
}
}
/// <summary>
/// Writes a value for the <c>granularity</c> property as a <c>reference</c> value. The <c>granularity</c> property specifies the sampling distance, in radians. If not specified, the default value is π / 180.0.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyNames">The hierarchy of properties to be indexed on the referenced object.</param>
public void WriteGranularityPropertyReference(string identifier, string[] propertyNames)
{
using (var writer = OpenGranularityProperty())
{
writer.WriteReference(identifier, propertyNames);
}
}
/// <summary>
/// Gets the writer for the <c>fill</c> property. The returned instance must be opened by calling the <see cref="CesiumElementWriter.Open"/> method before it can be used for writing. The <c>fill</c> property defines whether or not the ellipse is filled. If not specified, the default value is <see langword="true"/>.
/// </summary>
[NotNull]
public BooleanCesiumWriter FillWriter
{
get { return m_fill.Value; }
}
/// <summary>
/// Opens and returns the writer for the <c>fill</c> property. The <c>fill</c> property defines whether or not the ellipse is filled. If not specified, the default value is <see langword="true"/>.
/// </summary>
[NotNull]
public BooleanCesiumWriter OpenFillProperty()
{
OpenIntervalIfNecessary();
return OpenAndReturn(FillWriter);
}
/// <summary>
/// Writes a value for the <c>fill</c> property as a <c>boolean</c> value. The <c>fill</c> property specifies whether or not the ellipse is filled. If not specified, the default value is <see langword="true"/>.
/// </summary>
/// <param name="value">The value.</param>
public void WriteFillProperty(bool value)
{
using (var writer = OpenFillProperty())
{
writer.WriteBoolean(value);
}
}
/// <summary>
/// Writes a value for the <c>fill</c> property as a <c>reference</c> value. The <c>fill</c> property specifies whether or not the ellipse is filled. If not specified, the default value is <see langword="true"/>.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteFillPropertyReference(Reference value)
{
using (var writer = OpenFillProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>fill</c> property as a <c>reference</c> value. The <c>fill</c> property specifies whether or not the ellipse is filled. If not specified, the default value is <see langword="true"/>.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteFillPropertyReference(string value)
{
using (var writer = OpenFillProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>fill</c> property as a <c>reference</c> value. The <c>fill</c> property specifies whether or not the ellipse is filled. If not specified, the default value is <see langword="true"/>.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyName">The property on the referenced object.</param>
public void WriteFillPropertyReference(string identifier, string propertyName)
{
using (var writer = OpenFillProperty())
{
writer.WriteReference(identifier, propertyName);
}
}
/// <summary>
/// Writes a value for the <c>fill</c> property as a <c>reference</c> value. The <c>fill</c> property specifies whether or not the ellipse is filled. If not specified, the default value is <see langword="true"/>.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyNames">The hierarchy of properties to be indexed on the referenced object.</param>
public void WriteFillPropertyReference(string identifier, string[] propertyNames)
{
using (var writer = OpenFillProperty())
{
writer.WriteReference(identifier, propertyNames);
}
}
/// <summary>
/// Gets the writer for the <c>material</c> property. The returned instance must be opened by calling the <see cref="CesiumElementWriter.Open"/> method before it can be used for writing. The <c>material</c> property defines the material to use to fill the ellipse. If not specified, the default value is solid white.
/// </summary>
[NotNull]
public MaterialCesiumWriter MaterialWriter
{
get { return m_material.Value; }
}
/// <summary>
/// Opens and returns the writer for the <c>material</c> property. The <c>material</c> property defines the material to use to fill the ellipse. If not specified, the default value is solid white.
/// </summary>
[NotNull]
public MaterialCesiumWriter OpenMaterialProperty()
{
OpenIntervalIfNecessary();
return OpenAndReturn(MaterialWriter);
}
/// <summary>
/// Gets the writer for the <c>outline</c> property. The returned instance must be opened by calling the <see cref="CesiumElementWriter.Open"/> method before it can be used for writing. The <c>outline</c> property defines whether or not the ellipse is outlined. If not specified, the default value is <see langword="false"/>.
/// </summary>
[NotNull]
public BooleanCesiumWriter OutlineWriter
{
get { return m_outline.Value; }
}
/// <summary>
/// Opens and returns the writer for the <c>outline</c> property. The <c>outline</c> property defines whether or not the ellipse is outlined. If not specified, the default value is <see langword="false"/>.
/// </summary>
[NotNull]
public BooleanCesiumWriter OpenOutlineProperty()
{
OpenIntervalIfNecessary();
return OpenAndReturn(OutlineWriter);
}
/// <summary>
/// Writes a value for the <c>outline</c> property as a <c>boolean</c> value. The <c>outline</c> property specifies whether or not the ellipse is outlined. If not specified, the default value is <see langword="false"/>.
/// </summary>
/// <param name="value">The value.</param>
public void WriteOutlineProperty(bool value)
{
using (var writer = OpenOutlineProperty())
{
writer.WriteBoolean(value);
}
}
/// <summary>
/// Writes a value for the <c>outline</c> property as a <c>reference</c> value. The <c>outline</c> property specifies whether or not the ellipse is outlined. If not specified, the default value is <see langword="false"/>.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteOutlinePropertyReference(Reference value)
{
using (var writer = OpenOutlineProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>outline</c> property as a <c>reference</c> value. The <c>outline</c> property specifies whether or not the ellipse is outlined. If not specified, the default value is <see langword="false"/>.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteOutlinePropertyReference(string value)
{
using (var writer = OpenOutlineProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>outline</c> property as a <c>reference</c> value. The <c>outline</c> property specifies whether or not the ellipse is outlined. If not specified, the default value is <see langword="false"/>.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyName">The property on the referenced object.</param>
public void WriteOutlinePropertyReference(string identifier, string propertyName)
{
using (var writer = OpenOutlineProperty())
{
writer.WriteReference(identifier, propertyName);
}
}
/// <summary>
/// Writes a value for the <c>outline</c> property as a <c>reference</c> value. The <c>outline</c> property specifies whether or not the ellipse is outlined. If not specified, the default value is <see langword="false"/>.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyNames">The hierarchy of properties to be indexed on the referenced object.</param>
public void WriteOutlinePropertyReference(string identifier, string[] propertyNames)
{
using (var writer = OpenOutlineProperty())
{
writer.WriteReference(identifier, propertyNames);
}
}
/// <summary>
/// Gets the writer for the <c>outlineColor</c> property. The returned instance must be opened by calling the <see cref="CesiumElementWriter.Open"/> method before it can be used for writing. The <c>outlineColor</c> property defines the color of the ellipse outline. If not specified, the default value is black.
/// </summary>
[NotNull]
public ColorCesiumWriter OutlineColorWriter
{
get { return m_outlineColor.Value; }
}
/// <summary>
/// Opens and returns the writer for the <c>outlineColor</c> property. The <c>outlineColor</c> property defines the color of the ellipse outline. If not specified, the default value is black.
/// </summary>
[NotNull]
public ColorCesiumWriter OpenOutlineColorProperty()
{
OpenIntervalIfNecessary();
return OpenAndReturn(OutlineColorWriter);
}
/// <summary>
/// Writes a value for the <c>outlineColor</c> property as a <c>rgba</c> value. The <c>outlineColor</c> property specifies the color of the ellipse outline. If not specified, the default value is black.
/// </summary>
/// <param name="color">The color.</param>
public void WriteOutlineColorProperty(Color color)
{
using (var writer = OpenOutlineColorProperty())
{
writer.WriteRgba(color);
}
}
/// <summary>
/// Writes a value for the <c>outlineColor</c> property as a <c>rgba</c> value. The <c>outlineColor</c> property specifies the color of the ellipse outline. If not specified, the default value is black.
/// </summary>
/// <param name="red">The red component in the range 0 to 255.</param>
/// <param name="green">The green component in the range 0 to 255.</param>
/// <param name="blue">The blue component in the range 0 to 255.</param>
/// <param name="alpha">The alpha component in the range 0 to 255.</param>
public void WriteOutlineColorProperty(int red, int green, int blue, int alpha)
{
using (var writer = OpenOutlineColorProperty())
{
writer.WriteRgba(red, green, blue, alpha);
}
}
/// <summary>
/// Writes a value for the <c>outlineColor</c> property as a <c>rgba</c> value. The <c>outlineColor</c> property specifies the color of the ellipse outline. If not specified, the default value is black.
/// </summary>
/// <param name="dates">The dates at which the value is specified.</param>
/// <param name="values">The values corresponding to each date.</param>
public void WriteOutlineColorProperty(IList<JulianDate> dates, IList<Color> values)
{
using (var writer = OpenOutlineColorProperty())
{
writer.WriteRgba(dates, values);
}
}
/// <summary>
/// Writes a value for the <c>outlineColor</c> property as a <c>rgba</c> value. The <c>outlineColor</c> property specifies the color of the ellipse outline. If not specified, the default value is black.
/// </summary>
/// <param name="dates">The dates at which the value is specified.</param>
/// <param name="colors">The color corresponding to each date.</param>
/// <param name="startIndex">The index of the first element to write.</param>
/// <param name="length">The number of elements to write.</param>
public void WriteOutlineColorProperty(IList<JulianDate> dates, IList<Color> colors, int startIndex, int length)
{
using (var writer = OpenOutlineColorProperty())
{
writer.WriteRgba(dates, colors, startIndex, length);
}
}
/// <summary>
/// Writes a value for the <c>outlineColor</c> property as a <c>rgbaf</c> value. The <c>outlineColor</c> property specifies the color of the ellipse outline. If not specified, the default value is black.
/// </summary>
/// <param name="color">The color.</param>
public void WriteOutlineColorPropertyRgbaf(Color color)
{
using (var writer = OpenOutlineColorProperty())
{
writer.WriteRgbaf(color);
}
}
/// <summary>
/// Writes a value for the <c>outlineColor</c> property as a <c>rgbaf</c> value. The <c>outlineColor</c> property specifies the color of the ellipse outline. If not specified, the default value is black.
/// </summary>
/// <param name="red">The red component in the range 0 to 1.0.</param>
/// <param name="green">The green component in the range 0 to 1.0.</param>
/// <param name="blue">The blue component in the range 0 to 1.0.</param>
/// <param name="alpha">The alpha component in the range 0 to 1.0.</param>
public void WriteOutlineColorPropertyRgbaf(float red, float green, float blue, float alpha)
{
using (var writer = OpenOutlineColorProperty())
{
writer.WriteRgbaf(red, green, blue, alpha);
}
}
/// <summary>
/// Writes a value for the <c>outlineColor</c> property as a <c>rgbaf</c> value. The <c>outlineColor</c> property specifies the color of the ellipse outline. If not specified, the default value is black.
/// </summary>
/// <param name="dates">The dates at which the value is specified.</param>
/// <param name="values">The values corresponding to each date.</param>
public void WriteOutlineColorPropertyRgbaf(IList<JulianDate> dates, IList<Color> values)
{
using (var writer = OpenOutlineColorProperty())
{
writer.WriteRgbaf(dates, values);
}
}
/// <summary>
/// Writes a value for the <c>outlineColor</c> property as a <c>rgbaf</c> value. The <c>outlineColor</c> property specifies the color of the ellipse outline. If not specified, the default value is black.
/// </summary>
/// <param name="dates">The dates at which the value is specified.</param>
/// <param name="colors">The color corresponding to each date.</param>
/// <param name="startIndex">The index of the first element to write.</param>
/// <param name="length">The number of elements to write.</param>
public void WriteOutlineColorPropertyRgbaf(IList<JulianDate> dates, IList<Color> colors, int startIndex, int length)
{
using (var writer = OpenOutlineColorProperty())
{
writer.WriteRgbaf(dates, colors, startIndex, length);
}
}
/// <summary>
/// Writes a value for the <c>outlineColor</c> property as a <c>reference</c> value. The <c>outlineColor</c> property specifies the color of the ellipse outline. If not specified, the default value is black.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteOutlineColorPropertyReference(Reference value)
{
using (var writer = OpenOutlineColorProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>outlineColor</c> property as a <c>reference</c> value. The <c>outlineColor</c> property specifies the color of the ellipse outline. If not specified, the default value is black.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteOutlineColorPropertyReference(string value)
{
using (var writer = OpenOutlineColorProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>outlineColor</c> property as a <c>reference</c> value. The <c>outlineColor</c> property specifies the color of the ellipse outline. If not specified, the default value is black.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyName">The property on the referenced object.</param>
public void WriteOutlineColorPropertyReference(string identifier, string propertyName)
{
using (var writer = OpenOutlineColorProperty())
{
writer.WriteReference(identifier, propertyName);
}
}
/// <summary>
/// Writes a value for the <c>outlineColor</c> property as a <c>reference</c> value. The <c>outlineColor</c> property specifies the color of the ellipse outline. If not specified, the default value is black.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyNames">The hierarchy of properties to be indexed on the referenced object.</param>
public void WriteOutlineColorPropertyReference(string identifier, string[] propertyNames)
{
using (var writer = OpenOutlineColorProperty())
{
writer.WriteReference(identifier, propertyNames);
}
}
/// <summary>
/// Gets the writer for the <c>outlineWidth</c> property. The returned instance must be opened by calling the <see cref="CesiumElementWriter.Open"/> method before it can be used for writing. The <c>outlineWidth</c> property defines the width of the ellipse outline. If not specified, the default value is 1.0.
/// </summary>
[NotNull]
public DoubleCesiumWriter OutlineWidthWriter
{
get { return m_outlineWidth.Value; }
}
/// <summary>
/// Opens and returns the writer for the <c>outlineWidth</c> property. The <c>outlineWidth</c> property defines the width of the ellipse outline. If not specified, the default value is 1.0.
/// </summary>
[NotNull]
public DoubleCesiumWriter OpenOutlineWidthProperty()
{
OpenIntervalIfNecessary();
return OpenAndReturn(OutlineWidthWriter);
}
/// <summary>
/// Writes a value for the <c>outlineWidth</c> property as a <c>number</c> value. The <c>outlineWidth</c> property specifies the width of the ellipse outline. If not specified, the default value is 1.0.
/// </summary>
/// <param name="value">The value.</param>
public void WriteOutlineWidthProperty(double value)
{
using (var writer = OpenOutlineWidthProperty())
{
writer.WriteNumber(value);
}
}
/// <summary>
/// Writes a value for the <c>outlineWidth</c> property as a <c>number</c> value. The <c>outlineWidth</c> property specifies the width of the ellipse outline. If not specified, the default value is 1.0.
/// </summary>
/// <param name="dates">The dates at which the value is specified.</param>
/// <param name="values">The values corresponding to each date.</param>
public void WriteOutlineWidthProperty(IList<JulianDate> dates, IList<double> values)
{
using (var writer = OpenOutlineWidthProperty())
{
writer.WriteNumber(dates, values);
}
}
/// <summary>
/// Writes a value for the <c>outlineWidth</c> property as a <c>number</c> value. The <c>outlineWidth</c> property specifies the width of the ellipse outline. If not specified, the default value is 1.0.
/// </summary>
/// <param name="dates">The dates at which the value is specified.</param>
/// <param name="values">The value corresponding to each date.</param>
/// <param name="startIndex">The index of the first element to write.</param>
/// <param name="length">The number of elements to write.</param>
public void WriteOutlineWidthProperty(IList<JulianDate> dates, IList<double> values, int startIndex, int length)
{
using (var writer = OpenOutlineWidthProperty())
{
writer.WriteNumber(dates, values, startIndex, length);
}
}
/// <summary>
/// Writes a value for the <c>outlineWidth</c> property as a <c>reference</c> value. The <c>outlineWidth</c> property specifies the width of the ellipse outline. If not specified, the default value is 1.0.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteOutlineWidthPropertyReference(Reference value)
{
using (var writer = OpenOutlineWidthProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>outlineWidth</c> property as a <c>reference</c> value. The <c>outlineWidth</c> property specifies the width of the ellipse outline. If not specified, the default value is 1.0.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteOutlineWidthPropertyReference(string value)
{
using (var writer = OpenOutlineWidthProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>outlineWidth</c> property as a <c>reference</c> value. The <c>outlineWidth</c> property specifies the width of the ellipse outline. If not specified, the default value is 1.0.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyName">The property on the referenced object.</param>
public void WriteOutlineWidthPropertyReference(string identifier, string propertyName)
{
using (var writer = OpenOutlineWidthProperty())
{
writer.WriteReference(identifier, propertyName);
}
}
/// <summary>
/// Writes a value for the <c>outlineWidth</c> property as a <c>reference</c> value. The <c>outlineWidth</c> property specifies the width of the ellipse outline. If not specified, the default value is 1.0.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyNames">The hierarchy of properties to be indexed on the referenced object.</param>
public void WriteOutlineWidthPropertyReference(string identifier, string[] propertyNames)
{
using (var writer = OpenOutlineWidthProperty())
{
writer.WriteReference(identifier, propertyNames);
}
}
/// <summary>
/// Gets the writer for the <c>numberOfVerticalLines</c> property. The returned instance must be opened by calling the <see cref="CesiumElementWriter.Open"/> method before it can be used for writing. The <c>numberOfVerticalLines</c> property defines the number of vertical lines to use when outlining an extruded ellipse. If not specified, the default value is 16.
/// </summary>
[NotNull]
public IntegerCesiumWriter NumberOfVerticalLinesWriter
{
get { return m_numberOfVerticalLines.Value; }
}
/// <summary>
/// Opens and returns the writer for the <c>numberOfVerticalLines</c> property. The <c>numberOfVerticalLines</c> property defines the number of vertical lines to use when outlining an extruded ellipse. If not specified, the default value is 16.
/// </summary>
[NotNull]
public IntegerCesiumWriter OpenNumberOfVerticalLinesProperty()
{
OpenIntervalIfNecessary();
return OpenAndReturn(NumberOfVerticalLinesWriter);
}
/// <summary>
/// Writes a value for the <c>numberOfVerticalLines</c> property as a <c>number</c> value. The <c>numberOfVerticalLines</c> property specifies the number of vertical lines to use when outlining an extruded ellipse. If not specified, the default value is 16.
/// </summary>
/// <param name="value">The value.</param>
public void WriteNumberOfVerticalLinesProperty(int value)
{
using (var writer = OpenNumberOfVerticalLinesProperty())
{
writer.WriteNumber(value);
}
}
/// <summary>
/// Writes a value for the <c>numberOfVerticalLines</c> property as a <c>number</c> value. The <c>numberOfVerticalLines</c> property specifies the number of vertical lines to use when outlining an extruded ellipse. If not specified, the default value is 16.
/// </summary>
/// <param name="dates">The dates at which the value is specified.</param>
/// <param name="values">The values corresponding to each date.</param>
public void WriteNumberOfVerticalLinesProperty(IList<JulianDate> dates, IList<int> values)
{
using (var writer = OpenNumberOfVerticalLinesProperty())
{
writer.WriteNumber(dates, values);
}
}
/// <summary>
/// Writes a value for the <c>numberOfVerticalLines</c> property as a <c>number</c> value. The <c>numberOfVerticalLines</c> property specifies the number of vertical lines to use when outlining an extruded ellipse. If not specified, the default value is 16.
/// </summary>
/// <param name="dates">The dates at which the value is specified.</param>
/// <param name="values">The value corresponding to each date.</param>
/// <param name="startIndex">The index of the first element to write.</param>
/// <param name="length">The number of elements to write.</param>
public void WriteNumberOfVerticalLinesProperty(IList<JulianDate> dates, IList<int> values, int startIndex, int length)
{
using (var writer = OpenNumberOfVerticalLinesProperty())
{
writer.WriteNumber(dates, values, startIndex, length);
}
}
/// <summary>
/// Writes a value for the <c>numberOfVerticalLines</c> property as a <c>reference</c> value. The <c>numberOfVerticalLines</c> property specifies the number of vertical lines to use when outlining an extruded ellipse. If not specified, the default value is 16.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteNumberOfVerticalLinesPropertyReference(Reference value)
{
using (var writer = OpenNumberOfVerticalLinesProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>numberOfVerticalLines</c> property as a <c>reference</c> value. The <c>numberOfVerticalLines</c> property specifies the number of vertical lines to use when outlining an extruded ellipse. If not specified, the default value is 16.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteNumberOfVerticalLinesPropertyReference(string value)
{
using (var writer = OpenNumberOfVerticalLinesProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>numberOfVerticalLines</c> property as a <c>reference</c> value. The <c>numberOfVerticalLines</c> property specifies the number of vertical lines to use when outlining an extruded ellipse. If not specified, the default value is 16.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyName">The property on the referenced object.</param>
public void WriteNumberOfVerticalLinesPropertyReference(string identifier, string propertyName)
{
using (var writer = OpenNumberOfVerticalLinesProperty())
{
writer.WriteReference(identifier, propertyName);
}
}
/// <summary>
/// Writes a value for the <c>numberOfVerticalLines</c> property as a <c>reference</c> value. The <c>numberOfVerticalLines</c> property specifies the number of vertical lines to use when outlining an extruded ellipse. If not specified, the default value is 16.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyNames">The hierarchy of properties to be indexed on the referenced object.</param>
public void WriteNumberOfVerticalLinesPropertyReference(string identifier, string[] propertyNames)
{
using (var writer = OpenNumberOfVerticalLinesProperty())
{
writer.WriteReference(identifier, propertyNames);
}
}
/// <summary>
/// Gets the writer for the <c>shadows</c> property. The returned instance must be opened by calling the <see cref="CesiumElementWriter.Open"/> method before it can be used for writing. The <c>shadows</c> property defines whether or not the ellipse casts or receives shadows. If not specified, the default value is DISABLED.
/// </summary>
[NotNull]
public ShadowModeCesiumWriter ShadowsWriter
{
get { return m_shadows.Value; }
}
/// <summary>
/// Opens and returns the writer for the <c>shadows</c> property. The <c>shadows</c> property defines whether or not the ellipse casts or receives shadows. If not specified, the default value is DISABLED.
/// </summary>
[NotNull]
public ShadowModeCesiumWriter OpenShadowsProperty()
{
OpenIntervalIfNecessary();
return OpenAndReturn(ShadowsWriter);
}
/// <summary>
/// Writes a value for the <c>shadows</c> property as a <c>shadowMode</c> value. The <c>shadows</c> property specifies whether or not the ellipse casts or receives shadows. If not specified, the default value is DISABLED.
/// </summary>
/// <param name="value">The shadow mode.</param>
public void WriteShadowsProperty(CesiumShadowMode value)
{
using (var writer = OpenShadowsProperty())
{
writer.WriteShadowMode(value);
}
}
/// <summary>
/// Writes a value for the <c>shadows</c> property as a <c>reference</c> value. The <c>shadows</c> property specifies whether or not the ellipse casts or receives shadows. If not specified, the default value is DISABLED.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteShadowsPropertyReference(Reference value)
{
using (var writer = OpenShadowsProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>shadows</c> property as a <c>reference</c> value. The <c>shadows</c> property specifies whether or not the ellipse casts or receives shadows. If not specified, the default value is DISABLED.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteShadowsPropertyReference(string value)
{
using (var writer = OpenShadowsProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>shadows</c> property as a <c>reference</c> value. The <c>shadows</c> property specifies whether or not the ellipse casts or receives shadows. If not specified, the default value is DISABLED.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyName">The property on the referenced object.</param>
public void WriteShadowsPropertyReference(string identifier, string propertyName)
{
using (var writer = OpenShadowsProperty())
{
writer.WriteReference(identifier, propertyName);
}
}
/// <summary>
/// Writes a value for the <c>shadows</c> property as a <c>reference</c> value. The <c>shadows</c> property specifies whether or not the ellipse casts or receives shadows. If not specified, the default value is DISABLED.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyNames">The hierarchy of properties to be indexed on the referenced object.</param>
public void WriteShadowsPropertyReference(string identifier, string[] propertyNames)
{
using (var writer = OpenShadowsProperty())
{
writer.WriteReference(identifier, propertyNames);
}
}
/// <summary>
/// Gets the writer for the <c>distanceDisplayCondition</c> property. The returned instance must be opened by calling the <see cref="CesiumElementWriter.Open"/> method before it can be used for writing. The <c>distanceDisplayCondition</c> property defines the display condition specifying at what distance from the camera this ellipse will be displayed.
/// </summary>
[NotNull]
public DistanceDisplayConditionCesiumWriter DistanceDisplayConditionWriter
{
get { return m_distanceDisplayCondition.Value; }
}
/// <summary>
/// Opens and returns the writer for the <c>distanceDisplayCondition</c> property. The <c>distanceDisplayCondition</c> property defines the display condition specifying at what distance from the camera this ellipse will be displayed.
/// </summary>
[NotNull]
public DistanceDisplayConditionCesiumWriter OpenDistanceDisplayConditionProperty()
{
OpenIntervalIfNecessary();
return OpenAndReturn(DistanceDisplayConditionWriter);
}
/// <summary>
/// Writes a value for the <c>distanceDisplayCondition</c> property as a <c>distanceDisplayCondition</c> value. The <c>distanceDisplayCondition</c> property specifies the display condition specifying at what distance from the camera this ellipse will be displayed.
/// </summary>
/// <param name="value">The value.</param>
public void WriteDistanceDisplayConditionProperty(Bounds value)
{
using (var writer = OpenDistanceDisplayConditionProperty())
{
writer.WriteDistanceDisplayCondition(value);
}
}
/// <summary>
/// Writes a value for the <c>distanceDisplayCondition</c> property as a <c>distanceDisplayCondition</c> value. The <c>distanceDisplayCondition</c> property specifies the display condition specifying at what distance from the camera this ellipse will be displayed.
/// </summary>
/// <param name="lowerBound">The lower bound.</param>
/// <param name="upperBound">The upper bound.</param>
public void WriteDistanceDisplayConditionProperty(double lowerBound, double upperBound)
{
using (var writer = OpenDistanceDisplayConditionProperty())
{
writer.WriteDistanceDisplayCondition(lowerBound, upperBound);
}
}
/// <summary>
/// Writes a value for the <c>distanceDisplayCondition</c> property as a <c>distanceDisplayCondition</c> value. The <c>distanceDisplayCondition</c> property specifies the display condition specifying at what distance from the camera this ellipse will be displayed.
/// </summary>
/// <param name="dates">The dates at which the value is specified.</param>
/// <param name="values">The values corresponding to each date.</param>
public void WriteDistanceDisplayConditionProperty(IList<JulianDate> dates, IList<Bounds> values)
{
using (var writer = OpenDistanceDisplayConditionProperty())
{
writer.WriteDistanceDisplayCondition(dates, values);
}
}
/// <summary>
/// Writes a value for the <c>distanceDisplayCondition</c> property as a <c>distanceDisplayCondition</c> value. The <c>distanceDisplayCondition</c> property specifies the display condition specifying at what distance from the camera this ellipse will be displayed.
/// </summary>
/// <param name="dates">The dates at which the value is specified.</param>
/// <param name="values">The values corresponding to each date.</param>
/// <param name="startIndex">The index of the first element to write.</param>
/// <param name="length">The number of elements to write.</param>
public void WriteDistanceDisplayConditionProperty(IList<JulianDate> dates, IList<Bounds> values, int startIndex, int length)
{
using (var writer = OpenDistanceDisplayConditionProperty())
{
writer.WriteDistanceDisplayCondition(dates, values, startIndex, length);
}
}
/// <summary>
/// Writes a value for the <c>distanceDisplayCondition</c> property as a <c>reference</c> value. The <c>distanceDisplayCondition</c> property specifies the display condition specifying at what distance from the camera this ellipse will be displayed.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteDistanceDisplayConditionPropertyReference(Reference value)
{
using (var writer = OpenDistanceDisplayConditionProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>distanceDisplayCondition</c> property as a <c>reference</c> value. The <c>distanceDisplayCondition</c> property specifies the display condition specifying at what distance from the camera this ellipse will be displayed.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteDistanceDisplayConditionPropertyReference(string value)
{
using (var writer = OpenDistanceDisplayConditionProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>distanceDisplayCondition</c> property as a <c>reference</c> value. The <c>distanceDisplayCondition</c> property specifies the display condition specifying at what distance from the camera this ellipse will be displayed.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyName">The property on the referenced object.</param>
public void WriteDistanceDisplayConditionPropertyReference(string identifier, string propertyName)
{
using (var writer = OpenDistanceDisplayConditionProperty())
{
writer.WriteReference(identifier, propertyName);
}
}
/// <summary>
/// Writes a value for the <c>distanceDisplayCondition</c> property as a <c>reference</c> value. The <c>distanceDisplayCondition</c> property specifies the display condition specifying at what distance from the camera this ellipse will be displayed.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyNames">The hierarchy of properties to be indexed on the referenced object.</param>
public void WriteDistanceDisplayConditionPropertyReference(string identifier, string[] propertyNames)
{
using (var writer = OpenDistanceDisplayConditionProperty())
{
writer.WriteReference(identifier, propertyNames);
}
}
/// <summary>
/// Gets the writer for the <c>classificationType</c> property. The returned instance must be opened by calling the <see cref="CesiumElementWriter.Open"/> method before it can be used for writing. The <c>classificationType</c> property defines whether a classification affects terrain, 3D Tiles, or both. If not specified, the default value is BOTH.
/// </summary>
[NotNull]
public ClassificationTypeCesiumWriter ClassificationTypeWriter
{
get { return m_classificationType.Value; }
}
/// <summary>
/// Opens and returns the writer for the <c>classificationType</c> property. The <c>classificationType</c> property defines whether a classification affects terrain, 3D Tiles, or both. If not specified, the default value is BOTH.
/// </summary>
[NotNull]
public ClassificationTypeCesiumWriter OpenClassificationTypeProperty()
{
OpenIntervalIfNecessary();
return OpenAndReturn(ClassificationTypeWriter);
}
/// <summary>
/// Writes a value for the <c>classificationType</c> property as a <c>classificationType</c> value. The <c>classificationType</c> property specifies whether a classification affects terrain, 3D Tiles, or both. If not specified, the default value is BOTH.
/// </summary>
/// <param name="value">The classification type.</param>
public void WriteClassificationTypeProperty(CesiumClassificationType value)
{
using (var writer = OpenClassificationTypeProperty())
{
writer.WriteClassificationType(value);
}
}
/// <summary>
/// Writes a value for the <c>classificationType</c> property as a <c>reference</c> value. The <c>classificationType</c> property specifies whether a classification affects terrain, 3D Tiles, or both. If not specified, the default value is BOTH.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteClassificationTypePropertyReference(Reference value)
{
using (var writer = OpenClassificationTypeProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>classificationType</c> property as a <c>reference</c> value. The <c>classificationType</c> property specifies whether a classification affects terrain, 3D Tiles, or both. If not specified, the default value is BOTH.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteClassificationTypePropertyReference(string value)
{
using (var writer = OpenClassificationTypeProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>classificationType</c> property as a <c>reference</c> value. The <c>classificationType</c> property specifies whether a classification affects terrain, 3D Tiles, or both. If not specified, the default value is BOTH.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyName">The property on the referenced object.</param>
public void WriteClassificationTypePropertyReference(string identifier, string propertyName)
{
using (var writer = OpenClassificationTypeProperty())
{
writer.WriteReference(identifier, propertyName);
}
}
/// <summary>
/// Writes a value for the <c>classificationType</c> property as a <c>reference</c> value. The <c>classificationType</c> property specifies whether a classification affects terrain, 3D Tiles, or both. If not specified, the default value is BOTH.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyNames">The hierarchy of properties to be indexed on the referenced object.</param>
public void WriteClassificationTypePropertyReference(string identifier, string[] propertyNames)
{
using (var writer = OpenClassificationTypeProperty())
{
writer.WriteReference(identifier, propertyNames);
}
}
/// <summary>
/// Gets the writer for the <c>zIndex</c> property. The returned instance must be opened by calling the <see cref="CesiumElementWriter.Open"/> method before it can be used for writing. The <c>zIndex</c> property defines the z-index of the ellipse, used for ordering ground geometry. Only has an effect if the ellipse is constant, and <c>height</c> and <c>extrudedHeight</c> are not specified. If not specified, the default value is 0.
/// </summary>
[NotNull]
public IntegerCesiumWriter ZIndexWriter
{
get { return m_zIndex.Value; }
}
/// <summary>
/// Opens and returns the writer for the <c>zIndex</c> property. The <c>zIndex</c> property defines the z-index of the ellipse, used for ordering ground geometry. Only has an effect if the ellipse is constant, and <c>height</c> and <c>extrudedHeight</c> are not specified. If not specified, the default value is 0.
/// </summary>
[NotNull]
public IntegerCesiumWriter OpenZIndexProperty()
{
OpenIntervalIfNecessary();
return OpenAndReturn(ZIndexWriter);
}
/// <summary>
/// Writes a value for the <c>zIndex</c> property as a <c>number</c> value. The <c>zIndex</c> property specifies the z-index of the ellipse, used for ordering ground geometry. Only has an effect if the ellipse is constant, and <c>height</c> and <c>extrudedHeight</c> are not specified. If not specified, the default value is 0.
/// </summary>
/// <param name="value">The value.</param>
public void WriteZIndexProperty(int value)
{
using (var writer = OpenZIndexProperty())
{
writer.WriteNumber(value);
}
}
/// <summary>
/// Writes a value for the <c>zIndex</c> property as a <c>number</c> value. The <c>zIndex</c> property specifies the z-index of the ellipse, used for ordering ground geometry. Only has an effect if the ellipse is constant, and <c>height</c> and <c>extrudedHeight</c> are not specified. If not specified, the default value is 0.
/// </summary>
/// <param name="dates">The dates at which the value is specified.</param>
/// <param name="values">The values corresponding to each date.</param>
public void WriteZIndexProperty(IList<JulianDate> dates, IList<int> values)
{
using (var writer = OpenZIndexProperty())
{
writer.WriteNumber(dates, values);
}
}
/// <summary>
/// Writes a value for the <c>zIndex</c> property as a <c>number</c> value. The <c>zIndex</c> property specifies the z-index of the ellipse, used for ordering ground geometry. Only has an effect if the ellipse is constant, and <c>height</c> and <c>extrudedHeight</c> are not specified. If not specified, the default value is 0.
/// </summary>
/// <param name="dates">The dates at which the value is specified.</param>
/// <param name="values">The value corresponding to each date.</param>
/// <param name="startIndex">The index of the first element to write.</param>
/// <param name="length">The number of elements to write.</param>
public void WriteZIndexProperty(IList<JulianDate> dates, IList<int> values, int startIndex, int length)
{
using (var writer = OpenZIndexProperty())
{
writer.WriteNumber(dates, values, startIndex, length);
}
}
/// <summary>
/// Writes a value for the <c>zIndex</c> property as a <c>reference</c> value. The <c>zIndex</c> property specifies the z-index of the ellipse, used for ordering ground geometry. Only has an effect if the ellipse is constant, and <c>height</c> and <c>extrudedHeight</c> are not specified. If not specified, the default value is 0.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteZIndexPropertyReference(Reference value)
{
using (var writer = OpenZIndexProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>zIndex</c> property as a <c>reference</c> value. The <c>zIndex</c> property specifies the z-index of the ellipse, used for ordering ground geometry. Only has an effect if the ellipse is constant, and <c>height</c> and <c>extrudedHeight</c> are not specified. If not specified, the default value is 0.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteZIndexPropertyReference(string value)
{
using (var writer = OpenZIndexProperty())
{
writer.WriteReference(value);
}
}
/// <summary>
/// Writes a value for the <c>zIndex</c> property as a <c>reference</c> value. The <c>zIndex</c> property specifies the z-index of the ellipse, used for ordering ground geometry. Only has an effect if the ellipse is constant, and <c>height</c> and <c>extrudedHeight</c> are not specified. If not specified, the default value is 0.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyName">The property on the referenced object.</param>
public void WriteZIndexPropertyReference(string identifier, string propertyName)
{
using (var writer = OpenZIndexProperty())
{
writer.WriteReference(identifier, propertyName);
}
}
/// <summary>
/// Writes a value for the <c>zIndex</c> property as a <c>reference</c> value. The <c>zIndex</c> property specifies the z-index of the ellipse, used for ordering ground geometry. Only has an effect if the ellipse is constant, and <c>height</c> and <c>extrudedHeight</c> are not specified. If not specified, the default value is 0.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyNames">The hierarchy of properties to be indexed on the referenced object.</param>
public void WriteZIndexPropertyReference(string identifier, string[] propertyNames)
{
using (var writer = OpenZIndexProperty())
{
writer.WriteReference(identifier, propertyNames);
}
}
}
}
| 53.360243 | 442 | 0.632421 | [
"Apache-2.0"
] | NextechGS/czml-writer | DotNet/CesiumLanguageWriter/Generated/EllipseCesiumWriter.cs | 114,362 | C# |
/********************************************************
* Project Name : VAdvantage
* Class Name : DistributionVerify
* Purpose : Verify GL Distribution
* Class Used : ProcessEngine.SvrProcess class
* Chronological Development
* Deepak 20-Nov-2009
******************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VAdvantage.Process;
using VAdvantage.Classes;
using VAdvantage.Model;
using VAdvantage.DataBase;
using VAdvantage.SqlExec;
using System.Data;
using VAdvantage.Logging;
using VAdvantage.Utility;
using VAdvantage.ProcessEngine;namespace VAdvantage.Process
{
public class DistributionVerify:ProcessEngine.SvrProcess
{
/// <summary>
/// Prepare
/// </summary>
protected override void Prepare ()
{
} // prepare
/// <summary>
/// Process
/// </summary>
/// <returns>message</returns>
protected override String DoIt()
{
log.Info("doIt - GL_Distribution_ID=" + GetRecord_ID());
MDistribution distribution = new MDistribution (GetCtx(), GetRecord_ID(), Get_TrxName());
if (distribution.Get_ID() == 0)
{
throw new Exception("Not found GL_Distribution_ID=" + GetRecord_ID());
}
String error = distribution.Validate();
Boolean saved = distribution.Save();
if (error != null)
{
throw new Exception(error);
}
if (!saved)
{
throw new Exception("@NotSaved@");
}
return "@OK@";
} // doIt
} // DistributionVerify
}
| 26.4 | 91 | 0.606692 | [
"Apache-2.0"
] | AsimKhan2019/ERP-CMR-DMS | ViennaAdvantageWeb/ModelLibrary/Process/DistributionVerify.cs | 1,586 | 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.
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
namespace System.Numerics
{
[Serializable]
[System.Runtime.CompilerServices.TypeForwardedFrom("System.Numerics, Version=4.0.0.0, PublicKeyToken=b77a5c561934e089")]
public readonly struct BigInteger : IFormattable, IComparable, IComparable<BigInteger>, IEquatable<BigInteger>
{
private const uint kuMaskHighBit = unchecked((uint)int.MinValue);
private const int kcbitUint = 32;
private const int kcbitUlong = 64;
private const int DecimalScaleFactorMask = 0x00FF0000;
private const int DecimalSignMask = unchecked((int)0x80000000);
// For values int.MinValue < n <= int.MaxValue, the value is stored in sign
// and _bits is null. For all other values, sign is +1 or -1 and the bits are in _bits
internal readonly int _sign; // Do not rename (binary serialization)
internal readonly uint[]? _bits; // Do not rename (binary serialization)
// We have to make a choice of how to represent int.MinValue. This is the one
// value that fits in an int, but whose negation does not fit in an int.
// We choose to use a large representation, so we're symmetric with respect to negation.
private static readonly BigInteger s_bnMinInt = new BigInteger(-1, new uint[] { kuMaskHighBit });
private static readonly BigInteger s_bnOneInt = new BigInteger(1);
private static readonly BigInteger s_bnZeroInt = new BigInteger(0);
private static readonly BigInteger s_bnMinusOneInt = new BigInteger(-1);
public BigInteger(int value)
{
if (value == int.MinValue)
this = s_bnMinInt;
else
{
_sign = value;
_bits = null;
}
AssertValid();
}
[CLSCompliant(false)]
public BigInteger(uint value)
{
if (value <= int.MaxValue)
{
_sign = (int)value;
_bits = null;
}
else
{
_sign = +1;
_bits = new uint[1];
_bits[0] = value;
}
AssertValid();
}
public BigInteger(long value)
{
if (int.MinValue < value && value <= int.MaxValue)
{
_sign = (int)value;
_bits = null;
}
else if (value == int.MinValue)
{
this = s_bnMinInt;
}
else
{
ulong x = 0;
if (value < 0)
{
x = unchecked((ulong)-value);
_sign = -1;
}
else
{
x = (ulong)value;
_sign = +1;
}
if (x <= uint.MaxValue)
{
_bits = new uint[1];
_bits[0] = (uint)x;
}
else
{
_bits = new uint[2];
_bits[0] = unchecked((uint)x);
_bits[1] = (uint)(x >> kcbitUint);
}
}
AssertValid();
}
[CLSCompliant(false)]
public BigInteger(ulong value)
{
if (value <= int.MaxValue)
{
_sign = (int)value;
_bits = null;
}
else if (value <= uint.MaxValue)
{
_sign = +1;
_bits = new uint[1];
_bits[0] = (uint)value;
}
else
{
_sign = +1;
_bits = new uint[2];
_bits[0] = unchecked((uint)value);
_bits[1] = (uint)(value >> kcbitUint);
}
AssertValid();
}
public BigInteger(float value) : this((double)value)
{
}
public BigInteger(double value)
{
if (!double.IsFinite(value))
{
if (double.IsInfinity(value))
{
throw new OverflowException(SR.Overflow_BigIntInfinity);
}
else // NaN
{
throw new OverflowException(SR.Overflow_NotANumber);
}
}
_sign = 0;
_bits = null;
int sign, exp;
ulong man;
bool fFinite;
NumericsHelpers.GetDoubleParts(value, out sign, out exp, out man, out fFinite);
Debug.Assert(sign == +1 || sign == -1);
if (man == 0)
{
this = Zero;
return;
}
Debug.Assert(man < (1UL << 53));
Debug.Assert(exp <= 0 || man >= (1UL << 52));
if (exp <= 0)
{
if (exp <= -kcbitUlong)
{
this = Zero;
return;
}
this = man >> -exp;
if (sign < 0)
_sign = -_sign;
}
else if (exp <= 11)
{
this = man << exp;
if (sign < 0)
_sign = -_sign;
}
else
{
// Overflow into at least 3 uints.
// Move the leading 1 to the high bit.
man <<= 11;
exp -= 11;
// Compute cu and cbit so that exp == 32 * cu - cbit and 0 <= cbit < 32.
int cu = (exp - 1) / kcbitUint + 1;
int cbit = cu * kcbitUint - exp;
Debug.Assert(0 <= cbit && cbit < kcbitUint);
Debug.Assert(cu >= 1);
// Populate the uints.
_bits = new uint[cu + 2];
_bits[cu + 1] = (uint)(man >> (cbit + kcbitUint));
_bits[cu] = unchecked((uint)(man >> cbit));
if (cbit > 0)
_bits[cu - 1] = unchecked((uint)man) << (kcbitUint - cbit);
_sign = sign;
}
AssertValid();
}
public BigInteger(decimal value)
{
// First truncate to get scale to 0 and extract bits
Span<int> bits = stackalloc int[4];
decimal.GetBits(decimal.Truncate(value), bits);
Debug.Assert(bits.Length == 4 && (bits[3] & DecimalScaleFactorMask) == 0);
int size = 3;
while (size > 0 && bits[size - 1] == 0)
size--;
if (size == 0)
{
this = s_bnZeroInt;
}
else if (size == 1 && bits[0] > 0)
{
// bits[0] is the absolute value of this decimal
// if bits[0] < 0 then it is too large to be packed into _sign
_sign = bits[0];
_sign *= ((bits[3] & DecimalSignMask) != 0) ? -1 : +1;
_bits = null;
}
else
{
_bits = new uint[size];
unchecked
{
_bits[0] = (uint)bits[0];
if (size > 1)
_bits[1] = (uint)bits[1];
if (size > 2)
_bits[2] = (uint)bits[2];
}
_sign = ((bits[3] & DecimalSignMask) != 0) ? -1 : +1;
}
AssertValid();
}
/// <summary>
/// Creates a BigInteger from a little-endian twos-complement byte array.
/// </summary>
/// <param name="value"></param>
[CLSCompliant(false)]
public BigInteger(byte[] value) :
this(new ReadOnlySpan<byte>(value ?? throw new ArgumentNullException(nameof(value))))
{
}
public BigInteger(ReadOnlySpan<byte> value, bool isUnsigned = false, bool isBigEndian = false)
{
int byteCount = value.Length;
bool isNegative;
if (byteCount > 0)
{
byte mostSignificantByte = isBigEndian ? value[0] : value[byteCount - 1];
isNegative = (mostSignificantByte & 0x80) != 0 && !isUnsigned;
if (mostSignificantByte == 0)
{
// Try to conserve space as much as possible by checking for wasted leading byte[] entries
if (isBigEndian)
{
int offset = 1;
while (offset < byteCount && value[offset] == 0)
{
offset++;
}
value = value.Slice(offset);
byteCount = value.Length;
}
else
{
byteCount -= 2;
while (byteCount >= 0 && value[byteCount] == 0)
{
byteCount--;
}
byteCount++;
}
}
}
else
{
isNegative = false;
}
if (byteCount == 0)
{
// BigInteger.Zero
_sign = 0;
_bits = null;
AssertValid();
return;
}
if (byteCount <= 4)
{
_sign = isNegative ? unchecked((int)0xffffffff) : 0;
if (isBigEndian)
{
for (int i = 0; i < byteCount; i++)
{
_sign = (_sign << 8) | value[i];
}
}
else
{
for (int i = byteCount - 1; i >= 0; i--)
{
_sign = (_sign << 8) | value[i];
}
}
_bits = null;
if (_sign < 0 && !isNegative)
{
// Int32 overflow
// Example: Int64 value 2362232011 (0xCB, 0xCC, 0xCC, 0x8C, 0x0)
// can be naively packed into 4 bytes (due to the leading 0x0)
// it overflows into the int32 sign bit
_bits = new uint[1] { unchecked((uint)_sign) };
_sign = +1;
}
if (_sign == int.MinValue)
{
this = s_bnMinInt;
}
}
else
{
int unalignedBytes = byteCount % 4;
int dwordCount = byteCount / 4 + (unalignedBytes == 0 ? 0 : 1);
uint[] val = new uint[dwordCount];
int byteCountMinus1 = byteCount - 1;
// Copy all dwords, except don't do the last one if it's not a full four bytes
int curDword, curByte;
if (isBigEndian)
{
curByte = byteCount - sizeof(int);
for (curDword = 0; curDword < dwordCount - (unalignedBytes == 0 ? 0 : 1); curDword++)
{
for (int byteInDword = 0; byteInDword < 4; byteInDword++)
{
byte curByteValue = value[curByte];
val[curDword] = (val[curDword] << 8) | curByteValue;
curByte++;
}
curByte -= 8;
}
}
else
{
curByte = sizeof(int) - 1;
for (curDword = 0; curDword < dwordCount - (unalignedBytes == 0 ? 0 : 1); curDword++)
{
for (int byteInDword = 0; byteInDword < 4; byteInDword++)
{
byte curByteValue = value[curByte];
val[curDword] = (val[curDword] << 8) | curByteValue;
curByte--;
}
curByte += 8;
}
}
// Copy the last dword specially if it's not aligned
if (unalignedBytes != 0)
{
if (isNegative)
{
val[dwordCount - 1] = 0xffffffff;
}
if (isBigEndian)
{
for (curByte = 0; curByte < unalignedBytes; curByte++)
{
byte curByteValue = value[curByte];
val[curDword] = (val[curDword] << 8) | curByteValue;
}
}
else
{
for (curByte = byteCountMinus1; curByte >= byteCount - unalignedBytes; curByte--)
{
byte curByteValue = value[curByte];
val[curDword] = (val[curDword] << 8) | curByteValue;
}
}
}
if (isNegative)
{
NumericsHelpers.DangerousMakeTwosComplement(val); // Mutates val
// Pack _bits to remove any wasted space after the twos complement
int len = val.Length - 1;
while (len >= 0 && val[len] == 0) len--;
len++;
if (len == 1)
{
switch (val[0])
{
case 1: // abs(-1)
this = s_bnMinusOneInt;
return;
case kuMaskHighBit: // abs(Int32.MinValue)
this = s_bnMinInt;
return;
default:
if (unchecked((int)val[0]) > 0)
{
_sign = (-1) * ((int)val[0]);
_bits = null;
AssertValid();
return;
}
break;
}
}
if (len != val.Length)
{
_sign = -1;
_bits = new uint[len];
Array.Copy(val, _bits, len);
}
else
{
_sign = -1;
_bits = val;
}
}
else
{
_sign = +1;
_bits = val;
}
}
AssertValid();
}
internal BigInteger(int n, uint[]? rgu)
{
_sign = n;
_bits = rgu;
AssertValid();
}
/// <summary>
/// Constructor used during bit manipulation and arithmetic.
/// When possible the uint[] will be packed into _sign to conserve space.
/// </summary>
/// <param name="value">The absolute value of the number</param>
/// <param name="negative">The bool indicating the sign of the value.</param>
internal BigInteger(uint[] value, bool negative)
{
if (value == null)
throw new ArgumentNullException(nameof(value));
int len;
// Try to conserve space as much as possible by checking for wasted leading uint[] entries
// sometimes the uint[] has leading zeros from bit manipulation operations & and ^
for (len = value.Length; len > 0 && value[len - 1] == 0; len--);
if (len == 0)
this = s_bnZeroInt;
// Values like (Int32.MaxValue+1) are stored as "0x80000000" and as such cannot be packed into _sign
else if (len == 1 && value[0] < kuMaskHighBit)
{
_sign = (negative ? -(int)value[0] : (int)value[0]);
_bits = null;
// Although Int32.MinValue fits in _sign, we represent this case differently for negate
if (_sign == int.MinValue)
this = s_bnMinInt;
}
else
{
_sign = negative ? -1 : +1;
_bits = new uint[len];
Array.Copy(value, _bits, len);
}
AssertValid();
}
/// <summary>
/// Create a BigInteger from a little-endian twos-complement UInt32 array.
/// When possible, value is assigned directly to this._bits without an array copy
/// so use this ctor with care.
/// </summary>
/// <param name="value"></param>
private BigInteger(uint[] value)
{
if (value == null)
throw new ArgumentNullException(nameof(value));
int dwordCount = value.Length;
bool isNegative = dwordCount > 0 && ((value[dwordCount - 1] & 0x80000000) == 0x80000000);
// Try to conserve space as much as possible by checking for wasted leading uint[] entries
while (dwordCount > 0 && value[dwordCount - 1] == 0) dwordCount--;
if (dwordCount == 0)
{
// BigInteger.Zero
this = s_bnZeroInt;
AssertValid();
return;
}
if (dwordCount == 1)
{
if (unchecked((int)value[0]) < 0 && !isNegative)
{
_bits = new uint[1];
_bits[0] = value[0];
_sign = +1;
}
// Handle the special cases where the BigInteger likely fits into _sign
else if (int.MinValue == unchecked((int)value[0]))
{
this = s_bnMinInt;
}
else
{
_sign = unchecked((int)value[0]);
_bits = null;
}
AssertValid();
return;
}
if (!isNegative)
{
// Handle the simple positive value cases where the input is already in sign magnitude
if (dwordCount != value.Length)
{
_sign = +1;
_bits = new uint[dwordCount];
Array.Copy(value, _bits, dwordCount);
}
// No trimming is possible. Assign value directly to _bits.
else
{
_sign = +1;
_bits = value;
}
AssertValid();
return;
}
// Finally handle the more complex cases where we must transform the input into sign magnitude
NumericsHelpers.DangerousMakeTwosComplement(value); // mutates val
// Pack _bits to remove any wasted space after the twos complement
int len = value.Length;
while (len > 0 && value[len - 1] == 0) len--;
// The number is represented by a single dword
if (len == 1 && unchecked((int)(value[0])) > 0)
{
if (value[0] == 1 /* abs(-1) */)
{
this = s_bnMinusOneInt;
}
else if (value[0] == kuMaskHighBit /* abs(Int32.MinValue) */)
{
this = s_bnMinInt;
}
else
{
_sign = (-1) * ((int)value[0]);
_bits = null;
}
}
// The number is represented by multiple dwords.
// Trim off any wasted uint values when possible.
else if (len != value.Length)
{
_sign = -1;
_bits = new uint[len];
Array.Copy(value, _bits, len);
}
// No trimming is possible. Assign value directly to _bits.
else
{
_sign = -1;
_bits = value;
}
AssertValid();
return;
}
public static BigInteger Zero { get { return s_bnZeroInt; } }
public static BigInteger One { get { return s_bnOneInt; } }
public static BigInteger MinusOne { get { return s_bnMinusOneInt; } }
public bool IsPowerOfTwo
{
get
{
AssertValid();
if (_bits == null)
return (_sign & (_sign - 1)) == 0 && _sign != 0;
if (_sign != 1)
return false;
int iu = _bits.Length - 1;
if ((_bits[iu] & (_bits[iu] - 1)) != 0)
return false;
while (--iu >= 0)
{
if (_bits[iu] != 0)
return false;
}
return true;
}
}
public bool IsZero { get { AssertValid(); return _sign == 0; } }
public bool IsOne { get { AssertValid(); return _sign == 1 && _bits == null; } }
public bool IsEven { get { AssertValid(); return _bits == null ? (_sign & 1) == 0 : (_bits[0] & 1) == 0; } }
public int Sign
{
get { AssertValid(); return (_sign >> (kcbitUint - 1)) - (-_sign >> (kcbitUint - 1)); }
}
public static BigInteger Parse(string value)
{
return Parse(value, NumberStyles.Integer);
}
public static BigInteger Parse(string value, NumberStyles style)
{
return Parse(value, style, NumberFormatInfo.CurrentInfo);
}
public static BigInteger Parse(string value, IFormatProvider? provider)
{
return Parse(value, NumberStyles.Integer, NumberFormatInfo.GetInstance(provider));
}
public static BigInteger Parse(string value, NumberStyles style, IFormatProvider? provider)
{
return BigNumber.ParseBigInteger(value, style, NumberFormatInfo.GetInstance(provider));
}
public static bool TryParse([NotNullWhen(true)] string? value, out BigInteger result)
{
return TryParse(value, NumberStyles.Integer, NumberFormatInfo.CurrentInfo, out result);
}
public static bool TryParse([NotNullWhen(true)] string? value, NumberStyles style, IFormatProvider? provider, out BigInteger result)
{
return BigNumber.TryParseBigInteger(value, style, NumberFormatInfo.GetInstance(provider), out result);
}
public static BigInteger Parse(ReadOnlySpan<char> value, NumberStyles style = NumberStyles.Integer, IFormatProvider? provider = null)
{
return BigNumber.ParseBigInteger(value, style, NumberFormatInfo.GetInstance(provider));
}
public static bool TryParse(ReadOnlySpan<char> value, out BigInteger result)
{
return BigNumber.TryParseBigInteger(value, NumberStyles.Integer, NumberFormatInfo.CurrentInfo, out result);
}
public static bool TryParse(ReadOnlySpan<char> value, NumberStyles style, IFormatProvider? provider, out BigInteger result)
{
return BigNumber.TryParseBigInteger(value, style, NumberFormatInfo.GetInstance(provider), out result);
}
public static int Compare(BigInteger left, BigInteger right)
{
return left.CompareTo(right);
}
public static BigInteger Abs(BigInteger value)
{
return (value >= Zero) ? value : -value;
}
public static BigInteger Add(BigInteger left, BigInteger right)
{
return left + right;
}
public static BigInteger Subtract(BigInteger left, BigInteger right)
{
return left - right;
}
public static BigInteger Multiply(BigInteger left, BigInteger right)
{
return left * right;
}
public static BigInteger Divide(BigInteger dividend, BigInteger divisor)
{
return dividend / divisor;
}
public static BigInteger Remainder(BigInteger dividend, BigInteger divisor)
{
return dividend % divisor;
}
public static BigInteger DivRem(BigInteger dividend, BigInteger divisor, out BigInteger remainder)
{
dividend.AssertValid();
divisor.AssertValid();
bool trivialDividend = dividend._bits == null;
bool trivialDivisor = divisor._bits == null;
if (trivialDividend && trivialDivisor)
{
remainder = dividend._sign % divisor._sign;
return dividend._sign / divisor._sign;
}
if (trivialDividend)
{
// The divisor is non-trivial
// and therefore the bigger one
remainder = dividend;
return s_bnZeroInt;
}
Debug.Assert(dividend._bits != null);
if (trivialDivisor)
{
uint rest;
uint[] bits = BigIntegerCalculator.Divide(dividend._bits, NumericsHelpers.Abs(divisor._sign), out rest);
remainder = dividend._sign < 0 ? -1 * rest : rest;
return new BigInteger(bits, (dividend._sign < 0) ^ (divisor._sign < 0));
}
Debug.Assert(divisor._bits != null);
if (dividend._bits.Length < divisor._bits.Length)
{
remainder = dividend;
return s_bnZeroInt;
}
else
{
uint[] rest;
uint[] bits = BigIntegerCalculator.Divide(dividend._bits, divisor._bits, out rest);
remainder = new BigInteger(rest, dividend._sign < 0);
return new BigInteger(bits, (dividend._sign < 0) ^ (divisor._sign < 0));
}
}
public static BigInteger Negate(BigInteger value)
{
return -value;
}
public static double Log(BigInteger value)
{
return Log(value, Math.E);
}
public static double Log(BigInteger value, double baseValue)
{
if (value._sign < 0 || baseValue == 1.0D)
return double.NaN;
if (baseValue == double.PositiveInfinity)
return value.IsOne ? 0.0D : double.NaN;
if (baseValue == 0.0D && !value.IsOne)
return double.NaN;
if (value._bits == null)
return Math.Log(value._sign, baseValue);
ulong h = value._bits[value._bits.Length - 1];
ulong m = value._bits.Length > 1 ? value._bits[value._bits.Length - 2] : 0;
ulong l = value._bits.Length > 2 ? value._bits[value._bits.Length - 3] : 0;
// Measure the exact bit count
int c = NumericsHelpers.CbitHighZero((uint)h);
long b = (long)value._bits.Length * 32 - c;
// Extract most significant bits
ulong x = (h << 32 + c) | (m << c) | (l >> 32 - c);
// Let v = value, b = bit count, x = v/2^b-64
// log ( v/2^b-64 * 2^b-64 ) = log ( x ) + log ( 2^b-64 )
return Math.Log(x, baseValue) + (b - 64) / Math.Log(baseValue, 2);
}
public static double Log10(BigInteger value)
{
return Log(value, 10);
}
public static BigInteger GreatestCommonDivisor(BigInteger left, BigInteger right)
{
left.AssertValid();
right.AssertValid();
bool trivialLeft = left._bits == null;
bool trivialRight = right._bits == null;
if (trivialLeft && trivialRight)
{
return BigIntegerCalculator.Gcd(NumericsHelpers.Abs(left._sign), NumericsHelpers.Abs(right._sign));
}
if (trivialLeft)
{
Debug.Assert(right._bits != null);
return left._sign != 0
? BigIntegerCalculator.Gcd(right._bits, NumericsHelpers.Abs(left._sign))
: new BigInteger(right._bits, false);
}
if (trivialRight)
{
Debug.Assert(left._bits != null);
return right._sign != 0
? BigIntegerCalculator.Gcd(left._bits, NumericsHelpers.Abs(right._sign))
: new BigInteger(left._bits, false);
}
Debug.Assert(left._bits != null && right._bits != null);
if (BigIntegerCalculator.Compare(left._bits, right._bits) < 0)
{
return GreatestCommonDivisor(right._bits, left._bits);
}
else
{
return GreatestCommonDivisor(left._bits, right._bits);
}
}
private static BigInteger GreatestCommonDivisor(uint[] leftBits, uint[] rightBits)
{
Debug.Assert(BigIntegerCalculator.Compare(leftBits, rightBits) >= 0);
// Short circuits to spare some allocations...
if (rightBits.Length == 1)
{
uint temp = BigIntegerCalculator.Remainder(leftBits, rightBits[0]);
return BigIntegerCalculator.Gcd(rightBits[0], temp);
}
if (rightBits.Length == 2)
{
uint[] tempBits = BigIntegerCalculator.Remainder(leftBits, rightBits);
ulong left = ((ulong)rightBits[1] << 32) | rightBits[0];
ulong right = ((ulong)tempBits[1] << 32) | tempBits[0];
return BigIntegerCalculator.Gcd(left, right);
}
uint[] bits = BigIntegerCalculator.Gcd(leftBits, rightBits);
return new BigInteger(bits, false);
}
public static BigInteger Max(BigInteger left, BigInteger right)
{
if (left.CompareTo(right) < 0)
return right;
return left;
}
public static BigInteger Min(BigInteger left, BigInteger right)
{
if (left.CompareTo(right) <= 0)
return left;
return right;
}
public static BigInteger ModPow(BigInteger value, BigInteger exponent, BigInteger modulus)
{
if (exponent.Sign < 0)
throw new ArgumentOutOfRangeException(nameof(exponent), SR.ArgumentOutOfRange_MustBeNonNeg);
value.AssertValid();
exponent.AssertValid();
modulus.AssertValid();
bool trivialValue = value._bits == null;
bool trivialExponent = exponent._bits == null;
bool trivialModulus = modulus._bits == null;
if (trivialModulus)
{
uint bits = trivialValue && trivialExponent ? BigIntegerCalculator.Pow(NumericsHelpers.Abs(value._sign), NumericsHelpers.Abs(exponent._sign), NumericsHelpers.Abs(modulus._sign)) :
trivialValue ? BigIntegerCalculator.Pow(NumericsHelpers.Abs(value._sign), exponent._bits!, NumericsHelpers.Abs(modulus._sign)) :
trivialExponent ? BigIntegerCalculator.Pow(value._bits!, NumericsHelpers.Abs(exponent._sign), NumericsHelpers.Abs(modulus._sign)) :
BigIntegerCalculator.Pow(value._bits!, exponent._bits!, NumericsHelpers.Abs(modulus._sign));
return value._sign < 0 && !exponent.IsEven ? -1 * bits : bits;
}
else
{
uint[] bits = trivialValue && trivialExponent ? BigIntegerCalculator.Pow(NumericsHelpers.Abs(value._sign), NumericsHelpers.Abs(exponent._sign), modulus._bits!) :
trivialValue ? BigIntegerCalculator.Pow(NumericsHelpers.Abs(value._sign), exponent._bits!, modulus._bits!) :
trivialExponent ? BigIntegerCalculator.Pow(value._bits!, NumericsHelpers.Abs(exponent._sign), modulus._bits!) :
BigIntegerCalculator.Pow(value._bits!, exponent._bits!, modulus._bits!);
return new BigInteger(bits, value._sign < 0 && !exponent.IsEven);
}
}
public static BigInteger Pow(BigInteger value, int exponent)
{
if (exponent < 0)
throw new ArgumentOutOfRangeException(nameof(exponent), SR.ArgumentOutOfRange_MustBeNonNeg);
value.AssertValid();
if (exponent == 0)
return s_bnOneInt;
if (exponent == 1)
return value;
bool trivialValue = value._bits == null;
if (trivialValue)
{
if (value._sign == 1)
return value;
if (value._sign == -1)
return (exponent & 1) != 0 ? value : s_bnOneInt;
if (value._sign == 0)
return value;
}
uint[] bits = trivialValue
? BigIntegerCalculator.Pow(NumericsHelpers.Abs(value._sign), NumericsHelpers.Abs(exponent))
: BigIntegerCalculator.Pow(value._bits!, NumericsHelpers.Abs(exponent));
return new BigInteger(bits, value._sign < 0 && (exponent & 1) != 0);
}
public override int GetHashCode()
{
AssertValid();
if (_bits == null)
return _sign;
int hash = _sign;
for (int iv = _bits.Length; --iv >= 0;)
hash = NumericsHelpers.CombineHash(hash, unchecked((int)_bits[iv]));
return hash;
}
public override bool Equals(object? obj)
{
AssertValid();
if (!(obj is BigInteger))
return false;
return Equals((BigInteger)obj);
}
public bool Equals(long other)
{
AssertValid();
if (_bits == null)
return _sign == other;
int cu;
if ((_sign ^ other) < 0 || (cu = _bits.Length) > 2)
return false;
ulong uu = other < 0 ? (ulong)-other : (ulong)other;
if (cu == 1)
return _bits[0] == uu;
return NumericsHelpers.MakeUlong(_bits[1], _bits[0]) == uu;
}
[CLSCompliant(false)]
public bool Equals(ulong other)
{
AssertValid();
if (_sign < 0)
return false;
if (_bits == null)
return (ulong)_sign == other;
int cu = _bits.Length;
if (cu > 2)
return false;
if (cu == 1)
return _bits[0] == other;
return NumericsHelpers.MakeUlong(_bits[1], _bits[0]) == other;
}
public bool Equals(BigInteger other)
{
AssertValid();
other.AssertValid();
if (_sign != other._sign)
return false;
if (_bits == other._bits)
// _sign == other._sign && _bits == null && other._bits == null
return true;
if (_bits == null || other._bits == null)
return false;
int cu = _bits.Length;
if (cu != other._bits.Length)
return false;
int cuDiff = GetDiffLength(_bits, other._bits, cu);
return cuDiff == 0;
}
public int CompareTo(long other)
{
AssertValid();
if (_bits == null)
return ((long)_sign).CompareTo(other);
int cu;
if ((_sign ^ other) < 0 || (cu = _bits.Length) > 2)
return _sign;
ulong uu = other < 0 ? (ulong)-other : (ulong)other;
ulong uuTmp = cu == 2 ? NumericsHelpers.MakeUlong(_bits[1], _bits[0]) : _bits[0];
return _sign * uuTmp.CompareTo(uu);
}
[CLSCompliant(false)]
public int CompareTo(ulong other)
{
AssertValid();
if (_sign < 0)
return -1;
if (_bits == null)
return ((ulong)_sign).CompareTo(other);
int cu = _bits.Length;
if (cu > 2)
return +1;
ulong uuTmp = cu == 2 ? NumericsHelpers.MakeUlong(_bits[1], _bits[0]) : _bits[0];
return uuTmp.CompareTo(other);
}
public int CompareTo(BigInteger other)
{
AssertValid();
other.AssertValid();
if ((_sign ^ other._sign) < 0)
{
// Different signs, so the comparison is easy.
return _sign < 0 ? -1 : +1;
}
// Same signs
if (_bits == null)
{
if (other._bits == null)
return _sign < other._sign ? -1 : _sign > other._sign ? +1 : 0;
return -other._sign;
}
int cuThis, cuOther;
if (other._bits == null || (cuThis = _bits.Length) > (cuOther = other._bits.Length))
return _sign;
if (cuThis < cuOther)
return -_sign;
int cuDiff = GetDiffLength(_bits, other._bits, cuThis);
if (cuDiff == 0)
return 0;
return _bits[cuDiff - 1] < other._bits[cuDiff - 1] ? -_sign : _sign;
}
public int CompareTo(object? obj)
{
if (obj == null)
return 1;
if (!(obj is BigInteger))
throw new ArgumentException(SR.Argument_MustBeBigInt, nameof(obj));
return CompareTo((BigInteger)obj);
}
/// <summary>
/// Returns the value of this BigInteger as a little-endian twos-complement
/// byte array, using the fewest number of bytes possible. If the value is zero,
/// return an array of one byte whose element is 0x00.
/// </summary>
/// <returns></returns>
public byte[] ToByteArray() => ToByteArray(isUnsigned: false, isBigEndian: false);
/// <summary>
/// Returns the value of this BigInteger as a byte array using the fewest number of bytes possible.
/// If the value is zero, returns an array of one byte whose element is 0x00.
/// </summary>
/// <param name="isUnsigned">Whether or not an unsigned encoding is to be used</param>
/// <param name="isBigEndian">Whether or not to write the bytes in a big-endian byte order</param>
/// <returns></returns>
/// <exception cref="OverflowException">
/// If <paramref name="isUnsigned"/> is <c>true</c> and <see cref="Sign"/> is negative.
/// </exception>
/// <remarks>
/// The integer value <c>33022</c> can be exported as four different arrays.
///
/// <list type="bullet">
/// <item>
/// <description>
/// <c>(isUnsigned: false, isBigEndian: false)</c> => <c>new byte[] { 0xFE, 0x80, 0x00 }</c>
/// </description>
/// </item>
/// <item>
/// <description>
/// <c>(isUnsigned: false, isBigEndian: true)</c> => <c>new byte[] { 0x00, 0x80, 0xFE }</c>
/// </description>
/// </item>
/// <item>
/// <description>
/// <c>(isUnsigned: true, isBigEndian: false)</c> => <c>new byte[] { 0xFE, 0x80 }</c>
/// </description>
/// </item>
/// <item>
/// <description>
/// <c>(isUnsigned: true, isBigEndian: true)</c> => <c>new byte[] { 0x80, 0xFE }</c>
/// </description>
/// </item>
/// </list>
/// </remarks>
public byte[] ToByteArray(bool isUnsigned = false, bool isBigEndian = false)
{
int ignored = 0;
return TryGetBytes(GetBytesMode.AllocateArray, default, isUnsigned, isBigEndian, ref ignored)!;
}
/// <summary>
/// Copies the value of this BigInteger as little-endian twos-complement
/// bytes, using the fewest number of bytes possible. If the value is zero,
/// outputs one byte whose element is 0x00.
/// </summary>
/// <param name="destination">The destination span to which the resulting bytes should be written.</param>
/// <param name="bytesWritten">The number of bytes written to <paramref name="destination"/>.</param>
/// <param name="isUnsigned">Whether or not an unsigned encoding is to be used</param>
/// <param name="isBigEndian">Whether or not to write the bytes in a big-endian byte order</param>
/// <returns>true if the bytes fit in <paramref name="destination"/>; false if not all bytes could be written due to lack of space.</returns>
/// <exception cref="OverflowException">If <paramref name="isUnsigned"/> is <c>true</c> and <see cref="Sign"/> is negative.</exception>
public bool TryWriteBytes(Span<byte> destination, out int bytesWritten, bool isUnsigned = false, bool isBigEndian = false)
{
bytesWritten = 0;
if (TryGetBytes(GetBytesMode.Span, destination, isUnsigned, isBigEndian, ref bytesWritten) == null)
{
bytesWritten = 0;
return false;
}
return true;
}
internal bool TryWriteOrCountBytes(Span<byte> destination, out int bytesWritten, bool isUnsigned = false, bool isBigEndian = false)
{
bytesWritten = 0;
return TryGetBytes(GetBytesMode.Span, destination, isUnsigned, isBigEndian, ref bytesWritten) != null;
}
/// <summary>Gets the number of bytes that will be output by <see cref="ToByteArray(bool, bool)"/> and <see cref="TryWriteBytes(Span{byte}, out int, bool, bool)"/>.</summary>
/// <returns>The number of bytes.</returns>
public int GetByteCount(bool isUnsigned = false)
{
int count = 0;
// Big or Little Endian doesn't matter for the byte count.
const bool IsBigEndian = false;
TryGetBytes(GetBytesMode.Count, default(Span<byte>), isUnsigned, IsBigEndian, ref count);
return count;
}
/// <summary>Mode used to enable sharing <see cref="TryGetBytes(GetBytesMode, Span{byte}, bool, bool, ref int)"/> for multiple purposes.</summary>
private enum GetBytesMode { AllocateArray, Count, Span }
/// <summary>Dummy array returned from TryGetBytes to indicate success when in span mode.</summary>
private static readonly byte[] s_success = Array.Empty<byte>();
/// <summary>Shared logic for <see cref="ToByteArray(bool, bool)"/>, <see cref="TryWriteBytes(Span{byte}, out int, bool, bool)"/>, and <see cref="GetByteCount"/>.</summary>
/// <param name="mode">Which entry point is being used.</param>
/// <param name="destination">The destination span, if mode is <see cref="GetBytesMode.Span"/>.</param>
/// <param name="isUnsigned">True to never write a padding byte, false to write it if the high bit is set.</param>
/// <param name="isBigEndian">True for big endian byte ordering, false for little endian byte ordering.</param>
/// <param name="bytesWritten">
/// If <paramref name="mode"/>==<see cref="GetBytesMode.AllocateArray"/>, ignored.
/// If <paramref name="mode"/>==<see cref="GetBytesMode.Count"/>, the number of bytes that would be written.
/// If <paramref name="mode"/>==<see cref="GetBytesMode.Span"/>, the number of bytes written to the span or that would be written if it were long enough.
/// </param>
/// <returns>
/// If <paramref name="mode"/>==<see cref="GetBytesMode.AllocateArray"/>, the result array.
/// If <paramref name="mode"/>==<see cref="GetBytesMode.Count"/>, null.
/// If <paramref name="mode"/>==<see cref="GetBytesMode.Span"/>, non-null if the span was long enough, null if there wasn't enough room.
/// </returns>
/// <exception cref="OverflowException">If <paramref name="isUnsigned"/> is <c>true</c> and <see cref="Sign"/> is negative.</exception>
private byte[]? TryGetBytes(GetBytesMode mode, Span<byte> destination, bool isUnsigned, bool isBigEndian, ref int bytesWritten)
{
Debug.Assert(mode == GetBytesMode.AllocateArray || mode == GetBytesMode.Count || mode == GetBytesMode.Span, $"Unexpected mode {mode}.");
Debug.Assert(mode == GetBytesMode.Span || destination.IsEmpty, $"If we're not in span mode, we shouldn't have been passed a destination.");
int sign = _sign;
if (sign == 0)
{
switch (mode)
{
case GetBytesMode.AllocateArray:
return new byte[] { 0 };
case GetBytesMode.Count:
bytesWritten = 1;
return null;
default: // case GetBytesMode.Span:
bytesWritten = 1;
if (destination.Length != 0)
{
destination[0] = 0;
return s_success;
}
return null;
}
}
if (isUnsigned && sign < 0)
{
throw new OverflowException(SR.Overflow_Negative_Unsigned);
}
byte highByte;
int nonZeroDwordIndex = 0;
uint highDword;
uint[]? bits = _bits;
if (bits == null)
{
highByte = (byte)((sign < 0) ? 0xff : 0x00);
highDword = unchecked((uint)sign);
}
else if (sign == -1)
{
highByte = 0xff;
// If sign is -1, we will need to two's complement bits.
// Previously this was accomplished via NumericsHelpers.DangerousMakeTwosComplement(),
// however, we can do the two's complement on the stack so as to avoid
// creating a temporary copy of bits just to hold the two's complement.
// One special case in DangerousMakeTwosComplement() is that if the array
// is all zeros, then it would allocate a new array with the high-order
// uint set to 1 (for the carry). In our usage, we will not hit this case
// because a bits array of all zeros would represent 0, and this case
// would be encoded as _bits = null and _sign = 0.
Debug.Assert(bits.Length > 0);
Debug.Assert(bits[bits.Length - 1] != 0);
while (bits[nonZeroDwordIndex] == 0U)
{
nonZeroDwordIndex++;
}
highDword = ~bits[bits.Length - 1];
if (bits.Length - 1 == nonZeroDwordIndex)
{
// This will not overflow because highDword is less than or equal to uint.MaxValue - 1.
Debug.Assert(highDword <= uint.MaxValue - 1);
highDword += 1U;
}
}
else
{
Debug.Assert(sign == 1);
highByte = 0x00;
highDword = bits[bits.Length - 1];
}
byte msb;
int msbIndex;
if ((msb = unchecked((byte)(highDword >> 24))) != highByte)
{
msbIndex = 3;
}
else if ((msb = unchecked((byte)(highDword >> 16))) != highByte)
{
msbIndex = 2;
}
else if ((msb = unchecked((byte)(highDword >> 8))) != highByte)
{
msbIndex = 1;
}
else
{
msb = unchecked((byte)highDword);
msbIndex = 0;
}
// Ensure high bit is 0 if positive, 1 if negative
bool needExtraByte = (msb & 0x80) != (highByte & 0x80) && !isUnsigned;
int length = msbIndex + 1 + (needExtraByte ? 1 : 0);
if (bits != null)
{
length = checked(4 * (bits.Length - 1) + length);
}
byte[] array;
switch (mode)
{
case GetBytesMode.AllocateArray:
destination = array = new byte[length];
break;
case GetBytesMode.Count:
bytesWritten = length;
return null;
default: // case GetBytesMode.Span:
bytesWritten = length;
if (destination.Length < length)
{
return null;
}
array = s_success;
break;
}
int curByte = isBigEndian ? length - 1 : 0;
int increment = isBigEndian ? -1 : 1;
if (bits != null)
{
for (int i = 0; i < bits.Length - 1; i++)
{
uint dword = bits[i];
if (sign == -1)
{
dword = ~dword;
if (i <= nonZeroDwordIndex)
{
dword = unchecked(dword + 1U);
}
}
destination[curByte] = unchecked((byte)dword);
curByte += increment;
destination[curByte] = unchecked((byte)(dword >> 8));
curByte += increment;
destination[curByte] = unchecked((byte)(dword >> 16));
curByte += increment;
destination[curByte] = unchecked((byte)(dword >> 24));
curByte += increment;
}
}
Debug.Assert(msbIndex >= 0 && msbIndex <= 3);
destination[curByte] = unchecked((byte)highDword);
if (msbIndex != 0)
{
curByte += increment;
destination[curByte] = unchecked((byte)(highDword >> 8));
if (msbIndex != 1)
{
curByte += increment;
destination[curByte] = unchecked((byte)(highDword >> 16));
if (msbIndex != 2)
{
curByte += increment;
destination[curByte] = unchecked((byte)(highDword >> 24));
}
}
}
// Assert we're big endian, or little endian consistency holds.
Debug.Assert(isBigEndian || (!needExtraByte && curByte == length - 1) || (needExtraByte && curByte == length - 2));
// Assert we're little endian, or big endian consistency holds.
Debug.Assert(!isBigEndian || (!needExtraByte && curByte == 0) || (needExtraByte && curByte == 1));
if (needExtraByte)
{
curByte += increment;
destination[curByte] = highByte;
}
return array;
}
/// <summary>
/// Return the value of this BigInteger as a little-endian twos-complement
/// uint array, using the fewest number of uints possible. If the value is zero,
/// return an array of one uint whose element is 0.
/// </summary>
/// <returns></returns>
private uint[] ToUInt32Array()
{
if (_bits == null && _sign == 0)
return new uint[] { 0 };
uint[] dwords;
uint highDWord;
if (_bits == null)
{
dwords = new uint[] { unchecked((uint)_sign) };
highDWord = (_sign < 0) ? uint.MaxValue : 0;
}
else if (_sign == -1)
{
dwords = (uint[])_bits.Clone();
NumericsHelpers.DangerousMakeTwosComplement(dwords); // Mutates dwords
highDWord = uint.MaxValue;
}
else
{
dwords = _bits;
highDWord = 0;
}
// Find highest significant byte
int msb;
for (msb = dwords.Length - 1; msb > 0; msb--)
{
if (dwords[msb] != highDWord) break;
}
// Ensure high bit is 0 if positive, 1 if negative
bool needExtraByte = (dwords[msb] & 0x80000000) != (highDWord & 0x80000000);
uint[] trimmed = new uint[msb + 1 + (needExtraByte ? 1 : 0)];
Array.Copy(dwords, trimmed, msb + 1);
if (needExtraByte) trimmed[trimmed.Length - 1] = highDWord;
return trimmed;
}
public override string ToString()
{
return BigNumber.FormatBigInteger(this, null, NumberFormatInfo.CurrentInfo);
}
public string ToString(IFormatProvider? provider)
{
return BigNumber.FormatBigInteger(this, null, NumberFormatInfo.GetInstance(provider));
}
public string ToString(string? format)
{
return BigNumber.FormatBigInteger(this, format, NumberFormatInfo.CurrentInfo);
}
public string ToString(string? format, IFormatProvider? provider)
{
return BigNumber.FormatBigInteger(this, format, NumberFormatInfo.GetInstance(provider));
}
public bool TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
{
return BigNumber.TryFormatBigInteger(this, format, NumberFormatInfo.GetInstance(provider), destination, out charsWritten);
}
private static BigInteger Add(uint[]? leftBits, int leftSign, uint[]? rightBits, int rightSign)
{
bool trivialLeft = leftBits == null;
bool trivialRight = rightBits == null;
if (trivialLeft && trivialRight)
{
return (long)leftSign + rightSign;
}
if (trivialLeft)
{
Debug.Assert(rightBits != null);
uint[] bits = BigIntegerCalculator.Add(rightBits, NumericsHelpers.Abs(leftSign));
return new BigInteger(bits, leftSign < 0);
}
if (trivialRight)
{
Debug.Assert(leftBits != null);
uint[] bits = BigIntegerCalculator.Add(leftBits, NumericsHelpers.Abs(rightSign));
return new BigInteger(bits, leftSign < 0);
}
Debug.Assert(leftBits != null && rightBits != null);
if (leftBits.Length < rightBits.Length)
{
uint[] bits = BigIntegerCalculator.Add(rightBits, leftBits);
return new BigInteger(bits, leftSign < 0);
}
else
{
uint[] bits = BigIntegerCalculator.Add(leftBits, rightBits);
return new BigInteger(bits, leftSign < 0);
}
}
public static BigInteger operator -(BigInteger left, BigInteger right)
{
left.AssertValid();
right.AssertValid();
if (left._sign < 0 != right._sign < 0)
return Add(left._bits, left._sign, right._bits, -1 * right._sign);
return Subtract(left._bits, left._sign, right._bits, right._sign);
}
private static BigInteger Subtract(uint[]? leftBits, int leftSign, uint[]? rightBits, int rightSign)
{
bool trivialLeft = leftBits == null;
bool trivialRight = rightBits == null;
if (trivialLeft && trivialRight)
{
return (long)leftSign - rightSign;
}
if (trivialLeft)
{
Debug.Assert(rightBits != null);
uint[] bits = BigIntegerCalculator.Subtract(rightBits, NumericsHelpers.Abs(leftSign));
return new BigInteger(bits, leftSign >= 0);
}
if (trivialRight)
{
Debug.Assert(leftBits != null);
uint[] bits = BigIntegerCalculator.Subtract(leftBits, NumericsHelpers.Abs(rightSign));
return new BigInteger(bits, leftSign < 0);
}
Debug.Assert(leftBits != null && rightBits != null);
if (BigIntegerCalculator.Compare(leftBits, rightBits) < 0)
{
uint[] bits = BigIntegerCalculator.Subtract(rightBits, leftBits);
return new BigInteger(bits, leftSign >= 0);
}
else
{
uint[] bits = BigIntegerCalculator.Subtract(leftBits, rightBits);
return new BigInteger(bits, leftSign < 0);
}
}
public static implicit operator BigInteger(byte value)
{
return new BigInteger(value);
}
[CLSCompliant(false)]
public static implicit operator BigInteger(sbyte value)
{
return new BigInteger(value);
}
public static implicit operator BigInteger(short value)
{
return new BigInteger(value);
}
[CLSCompliant(false)]
public static implicit operator BigInteger(ushort value)
{
return new BigInteger(value);
}
public static implicit operator BigInteger(int value)
{
return new BigInteger(value);
}
[CLSCompliant(false)]
public static implicit operator BigInteger(uint value)
{
return new BigInteger(value);
}
public static implicit operator BigInteger(long value)
{
return new BigInteger(value);
}
[CLSCompliant(false)]
public static implicit operator BigInteger(ulong value)
{
return new BigInteger(value);
}
public static explicit operator BigInteger(float value)
{
return new BigInteger(value);
}
public static explicit operator BigInteger(double value)
{
return new BigInteger(value);
}
public static explicit operator BigInteger(decimal value)
{
return new BigInteger(value);
}
public static explicit operator byte(BigInteger value)
{
return checked((byte)((int)value));
}
[CLSCompliant(false)]
public static explicit operator sbyte(BigInteger value)
{
return checked((sbyte)((int)value));
}
public static explicit operator short(BigInteger value)
{
return checked((short)((int)value));
}
[CLSCompliant(false)]
public static explicit operator ushort(BigInteger value)
{
return checked((ushort)((int)value));
}
public static explicit operator int(BigInteger value)
{
value.AssertValid();
if (value._bits == null)
{
return value._sign; // Value packed into int32 sign
}
if (value._bits.Length > 1)
{
// More than 32 bits
throw new OverflowException(SR.Overflow_Int32);
}
if (value._sign > 0)
{
return checked((int)value._bits[0]);
}
if (value._bits[0] > kuMaskHighBit)
{
// Value > Int32.MinValue
throw new OverflowException(SR.Overflow_Int32);
}
return unchecked(-(int)value._bits[0]);
}
[CLSCompliant(false)]
public static explicit operator uint(BigInteger value)
{
value.AssertValid();
if (value._bits == null)
{
return checked((uint)value._sign);
}
else if (value._bits.Length > 1 || value._sign < 0)
{
throw new OverflowException(SR.Overflow_UInt32);
}
else
{
return value._bits[0];
}
}
public static explicit operator long(BigInteger value)
{
value.AssertValid();
if (value._bits == null)
{
return value._sign;
}
int len = value._bits.Length;
if (len > 2)
{
throw new OverflowException(SR.Overflow_Int64);
}
ulong uu;
if (len > 1)
{
uu = NumericsHelpers.MakeUlong(value._bits[1], value._bits[0]);
}
else
{
uu = value._bits[0];
}
long ll = value._sign > 0 ? unchecked((long)uu) : unchecked(-(long)uu);
if ((ll > 0 && value._sign > 0) || (ll < 0 && value._sign < 0))
{
// Signs match, no overflow
return ll;
}
throw new OverflowException(SR.Overflow_Int64);
}
[CLSCompliant(false)]
public static explicit operator ulong(BigInteger value)
{
value.AssertValid();
if (value._bits == null)
{
return checked((ulong)value._sign);
}
int len = value._bits.Length;
if (len > 2 || value._sign < 0)
{
throw new OverflowException(SR.Overflow_UInt64);
}
if (len > 1)
{
return NumericsHelpers.MakeUlong(value._bits[1], value._bits[0]);
}
return value._bits[0];
}
public static explicit operator float(BigInteger value)
{
return (float)((double)value);
}
public static explicit operator double(BigInteger value)
{
value.AssertValid();
int sign = value._sign;
uint[]? bits = value._bits;
if (bits == null)
return sign;
int length = bits.Length;
// The maximum exponent for doubles is 1023, which corresponds to a uint bit length of 32.
// All BigIntegers with bits[] longer than 32 evaluate to Double.Infinity (or NegativeInfinity).
// Cases where the exponent is between 1024 and 1035 are handled in NumericsHelpers.GetDoubleFromParts.
const int InfinityLength = 1024 / kcbitUint;
if (length > InfinityLength)
{
if (sign == 1)
return double.PositiveInfinity;
else
return double.NegativeInfinity;
}
ulong h = bits[length - 1];
ulong m = length > 1 ? bits[length - 2] : 0;
ulong l = length > 2 ? bits[length - 3] : 0;
int z = NumericsHelpers.CbitHighZero((uint)h);
int exp = (length - 2) * 32 - z;
ulong man = (h << 32 + z) | (m << z) | (l >> 32 - z);
return NumericsHelpers.GetDoubleFromParts(sign, exp, man);
}
public static explicit operator decimal(BigInteger value)
{
value.AssertValid();
if (value._bits == null)
return value._sign;
int length = value._bits.Length;
if (length > 3) throw new OverflowException(SR.Overflow_Decimal);
int lo = 0, mi = 0, hi = 0;
unchecked
{
if (length > 2) hi = (int)value._bits[2];
if (length > 1) mi = (int)value._bits[1];
if (length > 0) lo = (int)value._bits[0];
}
return new decimal(lo, mi, hi, value._sign < 0, 0);
}
public static BigInteger operator &(BigInteger left, BigInteger right)
{
if (left.IsZero || right.IsZero)
{
return Zero;
}
if (left._bits == null && right._bits == null)
{
return left._sign & right._sign;
}
uint[] x = left.ToUInt32Array();
uint[] y = right.ToUInt32Array();
uint[] z = new uint[Math.Max(x.Length, y.Length)];
uint xExtend = (left._sign < 0) ? uint.MaxValue : 0;
uint yExtend = (right._sign < 0) ? uint.MaxValue : 0;
for (int i = 0; i < z.Length; i++)
{
uint xu = (i < x.Length) ? x[i] : xExtend;
uint yu = (i < y.Length) ? y[i] : yExtend;
z[i] = xu & yu;
}
return new BigInteger(z);
}
public static BigInteger operator |(BigInteger left, BigInteger right)
{
if (left.IsZero)
return right;
if (right.IsZero)
return left;
if (left._bits == null && right._bits == null)
{
return left._sign | right._sign;
}
uint[] x = left.ToUInt32Array();
uint[] y = right.ToUInt32Array();
uint[] z = new uint[Math.Max(x.Length, y.Length)];
uint xExtend = (left._sign < 0) ? uint.MaxValue : 0;
uint yExtend = (right._sign < 0) ? uint.MaxValue : 0;
for (int i = 0; i < z.Length; i++)
{
uint xu = (i < x.Length) ? x[i] : xExtend;
uint yu = (i < y.Length) ? y[i] : yExtend;
z[i] = xu | yu;
}
return new BigInteger(z);
}
public static BigInteger operator ^(BigInteger left, BigInteger right)
{
if (left._bits == null && right._bits == null)
{
return left._sign ^ right._sign;
}
uint[] x = left.ToUInt32Array();
uint[] y = right.ToUInt32Array();
uint[] z = new uint[Math.Max(x.Length, y.Length)];
uint xExtend = (left._sign < 0) ? uint.MaxValue : 0;
uint yExtend = (right._sign < 0) ? uint.MaxValue : 0;
for (int i = 0; i < z.Length; i++)
{
uint xu = (i < x.Length) ? x[i] : xExtend;
uint yu = (i < y.Length) ? y[i] : yExtend;
z[i] = xu ^ yu;
}
return new BigInteger(z);
}
public static BigInteger operator <<(BigInteger value, int shift)
{
if (shift == 0) return value;
else if (shift == int.MinValue) return ((value >> int.MaxValue) >> 1);
else if (shift < 0) return value >> -shift;
int digitShift = shift / kcbitUint;
int smallShift = shift - (digitShift * kcbitUint);
uint[] xd; int xl; bool negx;
negx = GetPartsForBitManipulation(ref value, out xd, out xl);
int zl = xl + digitShift + 1;
uint[] zd = new uint[zl];
if (smallShift == 0)
{
for (int i = 0; i < xl; i++)
{
zd[i + digitShift] = xd[i];
}
}
else
{
int carryShift = kcbitUint - smallShift;
uint carry = 0;
int i;
for (i = 0; i < xl; i++)
{
uint rot = xd[i];
zd[i + digitShift] = rot << smallShift | carry;
carry = rot >> carryShift;
}
zd[i + digitShift] = carry;
}
return new BigInteger(zd, negx);
}
public static BigInteger operator >>(BigInteger value, int shift)
{
if (shift == 0) return value;
else if (shift == int.MinValue) return ((value << int.MaxValue) << 1);
else if (shift < 0) return value << -shift;
int digitShift = shift / kcbitUint;
int smallShift = shift - (digitShift * kcbitUint);
uint[] xd; int xl; bool negx;
negx = GetPartsForBitManipulation(ref value, out xd, out xl);
if (negx)
{
if (shift >= (kcbitUint * xl))
{
return MinusOne;
}
uint[] temp = new uint[xl];
Array.Copy(xd /* sourceArray */, 0 /* sourceIndex */, temp /* destinationArray */, 0 /* destinationIndex */, xl /* length */); // Make a copy of immutable value._bits
xd = temp;
NumericsHelpers.DangerousMakeTwosComplement(xd); // Mutates xd
}
int zl = xl - digitShift;
if (zl < 0) zl = 0;
uint[] zd = new uint[zl];
if (smallShift == 0)
{
for (int i = xl - 1; i >= digitShift; i--)
{
zd[i - digitShift] = xd[i];
}
}
else
{
int carryShift = kcbitUint - smallShift;
uint carry = 0;
for (int i = xl - 1; i >= digitShift; i--)
{
uint rot = xd[i];
if (negx && i == xl - 1)
// Sign-extend the first shift for negative ints then let the carry propagate
zd[i - digitShift] = (rot >> smallShift) | (0xFFFFFFFF << carryShift);
else
zd[i - digitShift] = (rot >> smallShift) | carry;
carry = rot << carryShift;
}
}
if (negx)
{
NumericsHelpers.DangerousMakeTwosComplement(zd); // Mutates zd
}
return new BigInteger(zd, negx);
}
public static BigInteger operator ~(BigInteger value)
{
return -(value + One);
}
public static BigInteger operator -(BigInteger value)
{
value.AssertValid();
return new BigInteger(-value._sign, value._bits);
}
public static BigInteger operator +(BigInteger value)
{
value.AssertValid();
return value;
}
public static BigInteger operator ++(BigInteger value)
{
return value + One;
}
public static BigInteger operator --(BigInteger value)
{
return value - One;
}
public static BigInteger operator +(BigInteger left, BigInteger right)
{
left.AssertValid();
right.AssertValid();
if (left._sign < 0 != right._sign < 0)
return Subtract(left._bits, left._sign, right._bits, -1 * right._sign);
return Add(left._bits, left._sign, right._bits, right._sign);
}
public static BigInteger operator *(BigInteger left, BigInteger right)
{
left.AssertValid();
right.AssertValid();
bool trivialLeft = left._bits == null;
bool trivialRight = right._bits == null;
if (trivialLeft && trivialRight)
{
return (long)left._sign * right._sign;
}
if (trivialLeft)
{
Debug.Assert(right._bits != null);
uint[] bits = BigIntegerCalculator.Multiply(right._bits, NumericsHelpers.Abs(left._sign));
return new BigInteger(bits, (left._sign < 0) ^ (right._sign < 0));
}
if (trivialRight)
{
Debug.Assert(left._bits != null);
uint[] bits = BigIntegerCalculator.Multiply(left._bits, NumericsHelpers.Abs(right._sign));
return new BigInteger(bits, (left._sign < 0) ^ (right._sign < 0));
}
Debug.Assert(left._bits != null && right._bits != null);
if (left._bits == right._bits)
{
uint[] bits = BigIntegerCalculator.Square(left._bits);
return new BigInteger(bits, (left._sign < 0) ^ (right._sign < 0));
}
if (left._bits.Length < right._bits.Length)
{
uint[] bits = BigIntegerCalculator.Multiply(right._bits, left._bits);
return new BigInteger(bits, (left._sign < 0) ^ (right._sign < 0));
}
else
{
uint[] bits = BigIntegerCalculator.Multiply(left._bits, right._bits);
return new BigInteger(bits, (left._sign < 0) ^ (right._sign < 0));
}
}
public static BigInteger operator /(BigInteger dividend, BigInteger divisor)
{
dividend.AssertValid();
divisor.AssertValid();
bool trivialDividend = dividend._bits == null;
bool trivialDivisor = divisor._bits == null;
if (trivialDividend && trivialDivisor)
{
return dividend._sign / divisor._sign;
}
if (trivialDividend)
{
// The divisor is non-trivial
// and therefore the bigger one
return s_bnZeroInt;
}
if (trivialDivisor)
{
Debug.Assert(dividend._bits != null);
uint[] bits = BigIntegerCalculator.Divide(dividend._bits, NumericsHelpers.Abs(divisor._sign));
return new BigInteger(bits, (dividend._sign < 0) ^ (divisor._sign < 0));
}
Debug.Assert(dividend._bits != null && divisor._bits != null);
if (dividend._bits.Length < divisor._bits.Length)
{
return s_bnZeroInt;
}
else
{
uint[] bits = BigIntegerCalculator.Divide(dividend._bits, divisor._bits);
return new BigInteger(bits, (dividend._sign < 0) ^ (divisor._sign < 0));
}
}
public static BigInteger operator %(BigInteger dividend, BigInteger divisor)
{
dividend.AssertValid();
divisor.AssertValid();
bool trivialDividend = dividend._bits == null;
bool trivialDivisor = divisor._bits == null;
if (trivialDividend && trivialDivisor)
{
return dividend._sign % divisor._sign;
}
if (trivialDividend)
{
// The divisor is non-trivial
// and therefore the bigger one
return dividend;
}
if (trivialDivisor)
{
Debug.Assert(dividend._bits != null);
uint remainder = BigIntegerCalculator.Remainder(dividend._bits, NumericsHelpers.Abs(divisor._sign));
return dividend._sign < 0 ? -1 * remainder : remainder;
}
Debug.Assert(dividend._bits != null && divisor._bits != null);
if (dividend._bits.Length < divisor._bits.Length)
{
return dividend;
}
uint[] bits = BigIntegerCalculator.Remainder(dividend._bits, divisor._bits);
return new BigInteger(bits, dividend._sign < 0);
}
public static bool operator <(BigInteger left, BigInteger right)
{
return left.CompareTo(right) < 0;
}
public static bool operator <=(BigInteger left, BigInteger right)
{
return left.CompareTo(right) <= 0;
}
public static bool operator >(BigInteger left, BigInteger right)
{
return left.CompareTo(right) > 0;
}
public static bool operator >=(BigInteger left, BigInteger right)
{
return left.CompareTo(right) >= 0;
}
public static bool operator ==(BigInteger left, BigInteger right)
{
return left.Equals(right);
}
public static bool operator !=(BigInteger left, BigInteger right)
{
return !left.Equals(right);
}
public static bool operator <(BigInteger left, long right)
{
return left.CompareTo(right) < 0;
}
public static bool operator <=(BigInteger left, long right)
{
return left.CompareTo(right) <= 0;
}
public static bool operator >(BigInteger left, long right)
{
return left.CompareTo(right) > 0;
}
public static bool operator >=(BigInteger left, long right)
{
return left.CompareTo(right) >= 0;
}
public static bool operator ==(BigInteger left, long right)
{
return left.Equals(right);
}
public static bool operator !=(BigInteger left, long right)
{
return !left.Equals(right);
}
public static bool operator <(long left, BigInteger right)
{
return right.CompareTo(left) > 0;
}
public static bool operator <=(long left, BigInteger right)
{
return right.CompareTo(left) >= 0;
}
public static bool operator >(long left, BigInteger right)
{
return right.CompareTo(left) < 0;
}
public static bool operator >=(long left, BigInteger right)
{
return right.CompareTo(left) <= 0;
}
public static bool operator ==(long left, BigInteger right)
{
return right.Equals(left);
}
public static bool operator !=(long left, BigInteger right)
{
return !right.Equals(left);
}
[CLSCompliant(false)]
public static bool operator <(BigInteger left, ulong right)
{
return left.CompareTo(right) < 0;
}
[CLSCompliant(false)]
public static bool operator <=(BigInteger left, ulong right)
{
return left.CompareTo(right) <= 0;
}
[CLSCompliant(false)]
public static bool operator >(BigInteger left, ulong right)
{
return left.CompareTo(right) > 0;
}
[CLSCompliant(false)]
public static bool operator >=(BigInteger left, ulong right)
{
return left.CompareTo(right) >= 0;
}
[CLSCompliant(false)]
public static bool operator ==(BigInteger left, ulong right)
{
return left.Equals(right);
}
[CLSCompliant(false)]
public static bool operator !=(BigInteger left, ulong right)
{
return !left.Equals(right);
}
[CLSCompliant(false)]
public static bool operator <(ulong left, BigInteger right)
{
return right.CompareTo(left) > 0;
}
[CLSCompliant(false)]
public static bool operator <=(ulong left, BigInteger right)
{
return right.CompareTo(left) >= 0;
}
[CLSCompliant(false)]
public static bool operator >(ulong left, BigInteger right)
{
return right.CompareTo(left) < 0;
}
[CLSCompliant(false)]
public static bool operator >=(ulong left, BigInteger right)
{
return right.CompareTo(left) <= 0;
}
[CLSCompliant(false)]
public static bool operator ==(ulong left, BigInteger right)
{
return right.Equals(left);
}
[CLSCompliant(false)]
public static bool operator !=(ulong left, BigInteger right)
{
return !right.Equals(left);
}
/// <summary>
/// Encapsulate the logic of normalizing the "small" and "large" forms of BigInteger
/// into the "large" form so that Bit Manipulation algorithms can be simplified.
/// </summary>
/// <param name="x"></param>
/// <param name="xd">
/// The UInt32 array containing the entire big integer in "large" (denormalized) form.
/// E.g., the number one (1) and negative one (-1) are both stored as 0x00000001
/// BigInteger values Int32.MinValue < x <= Int32.MaxValue are converted to this
/// format for convenience.
/// </param>
/// <param name="xl">The length of xd.</param>
/// <returns>True for negative numbers.</returns>
private static bool GetPartsForBitManipulation(ref BigInteger x, out uint[] xd, out int xl)
{
if (x._bits == null)
{
if (x._sign < 0)
{
xd = new uint[] { (uint)-x._sign };
}
else
{
xd = new uint[] { (uint)x._sign };
}
}
else
{
xd = x._bits;
}
xl = (x._bits == null ? 1 : x._bits.Length);
return x._sign < 0;
}
internal static int GetDiffLength(uint[] rgu1, uint[] rgu2, int cu)
{
for (int iv = cu; --iv >= 0;)
{
if (rgu1[iv] != rgu2[iv])
return iv + 1;
}
return 0;
}
[Conditional("DEBUG")]
private void AssertValid()
{
if (_bits != null)
{
// _sign must be +1 or -1 when _bits is non-null
Debug.Assert(_sign == 1 || _sign == -1);
// _bits must contain at least 1 element or be null
Debug.Assert(_bits.Length > 0);
// Wasted space: _bits[0] could have been packed into _sign
Debug.Assert(_bits.Length > 1 || _bits[0] >= kuMaskHighBit);
// Wasted space: leading zeros could have been truncated
Debug.Assert(_bits[_bits.Length - 1] != 0);
}
else
{
// Int32.MinValue should not be stored in the _sign field
Debug.Assert(_sign > int.MinValue);
}
}
}
}
| 35.091906 | 195 | 0.481018 | [
"MIT"
] | CometstarMH/runtime | src/libraries/System.Runtime.Numerics/src/System/Numerics/BigInteger.cs | 83,238 | C# |
using System;
using LSVRP.Database.Models;
namespace LSVRP.New.Entities.Item
{
public class Medicine : ItemEntity
{
public Medicine(Database.Models.Item itemData) : base(itemData){}
public override void UseItem(Character charData)
{
base.UseItem(charData);
throw new NotImplementedException();
}
}
} | 23.0625 | 73 | 0.642276 | [
"MIT"
] | KubasGC/lsvrp-rage-cs | LSVRP/New/Entities/Item/Medicine.cs | 369 | C# |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
using System.Runtime.CompilerServices;
using Unity.Profiling;
using UnityEngine;
using UnityEngine.EventSystems;
[assembly: InternalsVisibleTo("Microsoft.MixedReality.Toolkit.Tests.PlayModeTests")]
namespace Microsoft.MixedReality.Toolkit.Diagnostics
{
/// <summary>
/// The default implementation of the <see cref="Microsoft.MixedReality.Toolkit.Diagnostics.IMixedRealityDiagnosticsSystem"/>
/// </summary>
[HelpURL("https://microsoft.github.io/MixedRealityToolkit-Unity/Documentation/Diagnostics/DiagnosticsSystemGettingStarted.html")]
public class MixedRealityDiagnosticsSystem : BaseCoreSystem, IMixedRealityDiagnosticsSystem
{
/// <summary>
/// Constructor.
/// </summary>
/// <param name="registrar">The <see cref="IMixedRealityServiceRegistrar"/> instance that loaded the service.</param>
/// <param name="profile">The configuration profile for the service.</param>
[System.Obsolete("This constructor is obsolete (registrar parameter is no longer required) and will be removed in a future version of the Microsoft Mixed Reality Toolkit.")]
public MixedRealityDiagnosticsSystem(
IMixedRealityServiceRegistrar registrar,
MixedRealityDiagnosticsProfile profile) : this(profile)
{
Registrar = registrar;
}
/// <summary>
/// Constructor.
/// </summary>
/// <param name="profile">The configuration profile for the service.</param>
public MixedRealityDiagnosticsSystem(
MixedRealityDiagnosticsProfile profile) : base(profile)
{ }
/// <inheritdoc/>
public override string Name { get; protected set; } = "Mixed Reality Diagnostics System";
/// <summary>
/// The parent object under which all visualization game objects will be placed.
/// </summary>
private GameObject diagnosticVisualizationParent = null;
/// <summary>
/// Creates the diagnostic visualizations and parents them so that the scene hierarchy does not get overly cluttered.
/// </summary>
private void CreateVisualizations()
{
diagnosticVisualizationParent = new GameObject("Diagnostics");
diagnosticVisualizationParent.AddComponent<DiagnosticsSystemVoiceControls>();
MixedRealityPlayspace.AddChild(diagnosticVisualizationParent.transform);
diagnosticVisualizationParent.SetActive(ShowDiagnostics);
// visual profiler settings
visualProfiler = diagnosticVisualizationParent.AddComponent<MixedRealityToolkitVisualProfiler>();
visualProfiler.WindowParent = diagnosticVisualizationParent.transform;
visualProfiler.IsVisible = ShowProfiler;
visualProfiler.FrameInfoVisible = ShowFrameInfo;
visualProfiler.MemoryStatsVisible = ShowMemoryStats;
visualProfiler.FrameSampleRate = FrameSampleRate;
visualProfiler.WindowAnchor = WindowAnchor;
visualProfiler.WindowOffset = WindowOffset;
visualProfiler.WindowScale = WindowScale;
visualProfiler.WindowFollowSpeed = WindowFollowSpeed;
visualProfiler.ShowProfilerDuringMRC = ShowProfilerDuringMRC;
}
private MixedRealityToolkitVisualProfiler visualProfiler = null;
#region IMixedRealityService
/// <inheritdoc />
public override void Initialize()
{
if (!Application.isPlaying) { return; }
MixedRealityDiagnosticsProfile profile = ConfigurationProfile as MixedRealityDiagnosticsProfile;
if (profile == null) { return; }
eventData = new DiagnosticsEventData(EventSystem.current);
// Apply profile settings
ShowDiagnostics = profile.ShowDiagnostics;
ShowProfiler = profile.ShowProfiler;
ShowFrameInfo = profile.ShowFrameInfo;
ShowMemoryStats = profile.ShowMemoryStats;
FrameSampleRate = profile.FrameSampleRate;
WindowAnchor = profile.WindowAnchor;
WindowOffset = profile.WindowOffset;
WindowScale = profile.WindowScale;
WindowFollowSpeed = profile.WindowFollowSpeed;
ShowProfilerDuringMRC = profile.ShowProfilerDuringMRC;
CreateVisualizations();
}
/// <inheritdoc />
public override void Destroy()
{
if (diagnosticVisualizationParent != null)
{
if (Application.isEditor)
{
Object.DestroyImmediate(diagnosticVisualizationParent);
}
else
{
diagnosticVisualizationParent.transform.DetachChildren();
Object.Destroy(diagnosticVisualizationParent);
}
diagnosticVisualizationParent = null;
}
}
#endregion IMixedRealityService
#region IMixedRealityDiagnosticsSystem
private MixedRealityDiagnosticsProfile diagnosticsSystemProfile = null;
/// <inheritdoc/>
public MixedRealityDiagnosticsProfile DiagnosticsSystemProfile
{
get
{
if (diagnosticsSystemProfile == null)
{
diagnosticsSystemProfile = ConfigurationProfile as MixedRealityDiagnosticsProfile;
}
return diagnosticsSystemProfile;
}
}
private bool showDiagnostics;
/// <inheritdoc />
public bool ShowDiagnostics
{
get { return showDiagnostics; }
set
{
if (value != showDiagnostics)
{
showDiagnostics = value;
// The voice commands are handled by the diagnosticVisualizationParent GameObject, we cannot disable the parent
// or we lose the ability to re-show the visualizations. Instead, disable each visualization as appropriate.
if (ShowProfiler)
{
visualProfiler.IsVisible = value;
}
}
}
}
private bool showProfiler;
/// <inheritdoc />
public bool ShowProfiler
{
get
{
return showProfiler;
}
set
{
if (value != showProfiler)
{
showProfiler = value;
if ((visualProfiler != null) && ShowDiagnostics)
{
visualProfiler.IsVisible = value;
}
}
}
}
private bool showFrameInfo;
/// <inheritdoc />
public bool ShowFrameInfo
{
get
{
return showFrameInfo;
}
set
{
if (value != showFrameInfo)
{
showFrameInfo = value;
if (visualProfiler != null)
{
visualProfiler.FrameInfoVisible = value;
}
}
}
}
private bool showMemoryStats;
/// <inheritdoc />
public bool ShowMemoryStats
{
get
{
return showMemoryStats;
}
set
{
if (value != showMemoryStats)
{
showMemoryStats = value;
if (visualProfiler != null)
{
visualProfiler.MemoryStatsVisible = value;
}
}
}
}
private float frameSampleRate = 0.1f;
/// <inheritdoc />
public float FrameSampleRate
{
get
{
return frameSampleRate;
}
set
{
if (!Mathf.Approximately(frameSampleRate, value))
{
frameSampleRate = value;
if (visualProfiler != null)
{
visualProfiler.FrameSampleRate = frameSampleRate;
}
}
}
}
#endregion IMixedRealityDiagnosticsSystem
#region IMixedRealityEventSource
private DiagnosticsEventData eventData;
/// <inheritdoc />
public uint SourceId => (uint)SourceName.GetHashCode();
/// <inheritdoc />
public string SourceName => "Mixed Reality Diagnostics System";
/// <inheritdoc />
public new bool Equals(object x, object y) => false;
/// <inheritdoc />
public int GetHashCode(object obj) => SourceName.GetHashCode();
internal void RaiseDiagnosticsChanged()
{
eventData.Initialize(this);
HandleEvent(eventData, OnDiagnosticsChanged);
}
private static readonly ProfilerMarker OnDiagnosticsChangedPerfMarker = new ProfilerMarker("[MRTK] MixedRealityDiagnosticsSystem.OnDiagnosticsChanged - Raise event");
/// <summary>
/// Event sent whenever the diagnostics visualization changes.
/// </summary>
private static readonly ExecuteEvents.EventFunction<IMixedRealityDiagnosticsHandler> OnDiagnosticsChanged =
delegate (IMixedRealityDiagnosticsHandler handler, BaseEventData eventData)
{
using (OnDiagnosticsChangedPerfMarker.Auto())
{
var diagnosticsEventsData = ExecuteEvents.ValidateEventData<DiagnosticsEventData>(eventData);
handler.OnDiagnosticSettingsChanged(diagnosticsEventsData);
}
};
#endregion IMixedRealityEventSource
private TextAnchor windowAnchor = TextAnchor.LowerCenter;
/// <summary>
/// What part of the view port to anchor the window to.
/// </summary>
public TextAnchor WindowAnchor
{
get { return windowAnchor; }
set
{
if (value != windowAnchor)
{
windowAnchor = value;
if (visualProfiler != null)
{
visualProfiler.WindowAnchor = windowAnchor;
}
}
}
}
private Vector2 windowOffset = new Vector2(0.1f, 0.1f);
/// <summary>
/// The offset from the view port center applied based on the window anchor selection.
/// </summary>
public Vector2 WindowOffset
{
get { return windowOffset; }
set
{
if (value != windowOffset)
{
windowOffset = value;
if (visualProfiler != null)
{
visualProfiler.WindowOffset = windowOffset;
}
}
}
}
private float windowScale = 1.0f;
/// <summary>
/// Use to scale the window size up or down, can simulate a zooming effect.
/// </summary>
public float WindowScale
{
get { return windowScale; }
set
{
if (value != windowScale)
{
windowScale = value;
if (visualProfiler != null)
{
visualProfiler.WindowScale = windowScale;
}
}
}
}
private float windowFollowSpeed = 5.0f;
/// <summary>
/// How quickly to interpolate the window towards its target position and rotation.
/// </summary>
public float WindowFollowSpeed
{
get { return windowFollowSpeed; }
set
{
if (value != windowFollowSpeed)
{
windowFollowSpeed = value;
if (visualProfiler != null)
{
visualProfiler.WindowFollowSpeed = windowFollowSpeed;
}
}
}
}
private bool showProfilerDuringMRC = false;
/// <summary>
/// If the diagnostics profiler should be visible while a mixed reality capture is happening on HoloLens.
/// </summary>
/// <remarks>This is not usually recommended, as MRC can have an effect on an app's frame rate.</remarks>
public bool ShowProfilerDuringMRC
{
get { return showProfilerDuringMRC; }
set
{
if (value != showProfilerDuringMRC)
{
showProfilerDuringMRC = value;
if (visualProfiler != null)
{
visualProfiler.ShowProfilerDuringMRC = showProfilerDuringMRC;
}
}
}
}
}
}
| 32.520581 | 181 | 0.543146 | [
"MIT"
] | 1ft-seabass/hololens2-work-sample-202101 | Assets/MRTK/Services/DiagnosticsSystem/MixedRealityDiagnosticsSystem.cs | 13,433 | C# |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Destructable1Controller : MonoBehaviour
{
public List<Destructable1> destructables = new List<Destructable1>();
public float explosionForce = 100.0f;
public float explosionRadius = 10.0f;
public float upwardsModifier = 10.0f;
public ForceMode mode = ForceMode.Force;
public bool doFading = true;
public float rigidBodyMaxLifetime = 4.0f;
public float fadeTime = 1.0f;
// Start is void called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
if (Input.GetKeyDown("space"))
{
Debug.Log("space key was pressed");
foreach (var d in destructables)
d.GetComponent<Destructable1>().Destruct(doFading, rigidBodyMaxLifetime, fadeTime, explosionForce, explosionRadius, upwardsModifier, mode);
}
}
}
| 29.181818 | 155 | 0.674974 | [
"MIT"
] | MacgyverLin/FBXPreprocessor | UnityTest/Destruction/Assets/Method1/Scripts/Destructable1Controller.cs | 965 | C# |
using System.Collections.Generic;
namespace OYMLCN.JdVop.Models
{
/// <summary>
/// 商品池商品编号列表
/// </summary>
public class PageNumSku
{
/// <summary>
/// 总页数
/// </summary>
public int PageCount { get; set; }
/// <summary>
/// skuId集合
/// </summary>
public List<long> SkuIds { get; set; }
}
}
| 18.47619 | 46 | 0.481959 | [
"MIT"
] | VicBilibily/OYMLCN.JdVop | src/Models/Product/PageNumSku.cs | 418 | C# |
using System;
using System.Collections;
public class ConvertToSingle
{
public static int Main()
{
ConvertToSingle ac = new ConvertToSingle();
TestLibrary.TestFramework.BeginTestCase("Convert.ToSingle(...)");
if (ac.RunTests())
{
TestLibrary.TestFramework.EndTestCase();
TestLibrary.TestFramework.LogInformation("PASS");
return 100;
}
else
{
TestLibrary.TestFramework.EndTestCase();
TestLibrary.TestFramework.LogInformation("FAIL");
return 0;
}
}
public bool RunTests()
{
bool retVal = true;
TestLibrary.TestFramework.LogInformation("[Positive]");
retVal = PosTest1() && retVal;
retVal = PosTest2() && retVal;
retVal = PosTest3() && retVal;
retVal = PosTest4() && retVal;
retVal = PosTest5() && retVal;
retVal = PosTest6() && retVal;
retVal = PosTest7() && retVal;
retVal = PosTest8() && retVal;
retVal = PosTest9() && retVal;
retVal = PosTest10() && retVal;
TestLibrary.TestFramework.LogInformation("");
TestLibrary.TestFramework.LogInformation("[Negative]");
retVal = NegTest1() && retVal;
return retVal;
}
public bool PosTest1() { return PosTest<object>(1, (object)Single.MaxValue, Single.MaxValue); }
public bool PosTest2() { return PosTest<object>(2, (object)Single.MinValue, Single.MinValue); }
public bool PosTest3() { return PosTest<object>(3, null, 0); }
public bool PosTest4() { return PosTest<Boolean>(4, true, 1f); }
public bool PosTest5() { return PosTest<Boolean>(5, false, 0f); }
public bool PosTest6() { return PosTest2(6, null, 0f); }
public bool PosTest7() { return PosTest2(7, "28098" + System.Globalization.CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator + "23", 28098.23f); }
public bool PosTest8() { return PosTest<object>(8, (object)Single.PositiveInfinity, Single.PositiveInfinity); }
public bool PosTest9() { return PosTest<object>(9, (object)Single.NegativeInfinity, Single.NegativeInfinity); }
public bool PosTest10() { return PosTest<object>(10, (object)Single.NaN, Single.NaN); }
public bool NegTest1() { return NegTest<char>(1, ' ', typeof(System.InvalidCastException)); }
public bool PosTest<T>(int id, T curValue, Single expValue)
{
bool retVal = true;
Single newValue;
IFormatProvider myfp;
TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Convert.ToSingle(...) (curValue:"+typeof(T)+" " +curValue+" newType:"+expValue.GetType()+")");
try
{
newValue = Convert.ToSingle(curValue);
if (!newValue.Equals(expValue))
{
TestLibrary.TestFramework.LogError("000", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
retVal = false;
}
myfp = null;
newValue = Convert.ToSingle(curValue, myfp);
if (!newValue.Equals(expValue))
{
TestLibrary.TestFramework.LogError("001", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
retVal = false;
}
}
catch (Exception e)
{
TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
retVal = false;
}
return retVal;
}
public bool PosTest2(int id, String curValue, Single expValue)
{
bool retVal = true;
Single newValue;
IFormatProvider myfp;
TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Convert.ToSingle(...) (curValue:string " +curValue+" newType:"+expValue.GetType()+")");
try
{
newValue = Convert.ToSingle(curValue);
if (!newValue.Equals(expValue))
{
TestLibrary.TestFramework.LogError("003", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
retVal = false;
}
myfp = null;
newValue = Convert.ToSingle(curValue, myfp);
if (!newValue.Equals(expValue))
{
TestLibrary.TestFramework.LogError("004", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
retVal = false;
}
}
catch (Exception e)
{
TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
retVal = false;
}
return retVal;
}
public bool NegTest<T>(int id, T curValue, Type exception)
{
bool retVal = true;
Single newValue;
TestLibrary.TestFramework.BeginScenario("NegTest"+id+": Convert.ToSingle(...) (curValue:string " +curValue+")");
try
{
newValue = Convert.ToSingle(curValue);
TestLibrary.TestFramework.LogError("006", "Exception expected");
retVal = false;
}
catch (Exception e)
{
if (e.GetType() != exception)
{
TestLibrary.TestFramework.LogError("007", "Unexpected exception: " + e);
retVal = false;
}
}
return retVal;
}
}
| 32.650602 | 163 | 0.563838 | [
"MIT"
] | CyberSys/coreclr-mono | tests/src/CoreMangLib/cti/system/convert/converttosingle.cs | 5,420 | C# |
using SHAutomation.Core;
using System;
using UIA = Interop.UIAutomationClient;
namespace SHAutomation.UIA3.Converters
{
public static class TextRangeConverter
{
public static ITextRange[] NativeArrayToManaged(UIA3Automation automation, UIA.IUIAutomationTextRangeArray nativeTextRangeArray)
{
if (nativeTextRangeArray == null)
{
return Array.Empty<ITextRange>();
}
var retArray = new ITextRange[nativeTextRangeArray.Length];
for (var i = 0; i < nativeTextRangeArray.Length; i++)
{
retArray[i] = NativeToManaged(automation, nativeTextRangeArray.GetElement(i));
}
return retArray;
}
public static UIA3TextRange NativeToManaged(UIA3Automation automation, UIA.IUIAutomationTextRange nativeTextRange)
{
return nativeTextRange == null ? null : new UIA3TextRange(automation, nativeTextRange);
}
public static UIA3TextRange2 NativeToManaged(UIA3Automation automation, UIA.IUIAutomationTextRange2 nativeTextRange2)
{
return nativeTextRange2 == null ? null : new UIA3TextRange2(automation, nativeTextRange2);
}
public static UIA3TextRange3 NativeToManaged(UIA3Automation automation, UIA.IUIAutomationTextRange3 nativeTextRange3)
{
return nativeTextRange3 == null ? null : new UIA3TextRange3(automation, nativeTextRange3);
}
}
}
| 38.307692 | 136 | 0.670683 | [
"MIT"
] | Streets-Heaver/SHAutomation | src/SHAutomation.UIA3/Converters/TextRangeConverter.cs | 1,496 | C# |
using System;
using System.Windows.Forms;
namespace FundTracking
{
/// <summary>
/// Class with program entry point.
/// </summary>
internal sealed class Program
{
/// <summary>
/// Program entry point.
/// </summary>
[STAThread]
private static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
}
}
}
| 18.695652 | 56 | 0.686047 | [
"MIT"
] | Sagleft/FundTracking | Controller/Loader.cs | 432 | C# |
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* 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.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``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 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;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using OpenMetaverse;
using OpenSim.Framework;
using Npgsql;
namespace OpenSim.Data.PGSQL
{
/// <summary>
/// A database interface class to a user profile storage system
/// </summary>
public class PGSqlFramework
{
private static readonly log4net.ILog m_log =
log4net.LogManager.GetLogger(
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
protected string m_connectionString;
protected object m_dbLock = new object();
protected PGSqlFramework(string connectionString)
{
m_connectionString = connectionString;
}
//////////////////////////////////////////////////////////////
//
// All non queries are funneled through one connection
// to increase performance a little
//
protected int ExecuteNonQuery(NpgsqlCommand cmd)
{
lock (m_dbLock)
{
using (NpgsqlConnection dbcon = new NpgsqlConnection(m_connectionString))
{
dbcon.Open();
cmd.Connection = dbcon;
try
{
return cmd.ExecuteNonQuery();
}
catch (Exception e)
{
m_log.Error(e.Message, e);
return 0;
}
}
}
}
}
}
| 38.433735 | 89 | 0.630721 | [
"BSD-3-Clause"
] | hack13/opensimulator | OpenSim/Data/PGSQL/PGSQLFramework.cs | 3,190 | C# |
using System;
using System.Runtime.Serialization;
using Domain.Interfaces.Properties;
namespace Domain.Interfaces
{
[Serializable]
public class ResourceNotFoundException : Exception
{
public ResourceNotFoundException()
: base(Resources.ResourceNotFoundException_Message)
{
}
public ResourceNotFoundException(string message)
: base(message)
{
}
public ResourceNotFoundException(string message, Exception inner)
: base(message, inner)
{
}
protected ResourceNotFoundException(
SerializationInfo info,
StreamingContext context)
: base(info, context)
{
}
}
} | 23.1875 | 73 | 0.61186 | [
"Apache-2.0"
] | jezzsantos/clinics | src/Domain.Interfaces/ResourceNotFoundException.cs | 744 | C# |
using Lego.Ev3.Framework.Firmware;
using System.Threading.Tasks;
namespace Lego.Ev3.Framework
{
/// <summary>
/// Led located in center of brick
/// </summary>
public sealed class Led
{
/// <summary>
/// Current mode of the led
/// default = Green
/// </summary>
public LedMode Mode { get; private set; }
internal Led()
{
Mode = LedMode.Green;
}
/// <summary>
/// Change the current led mode.
/// </summary>
/// <param name="mode">the mode to change led to</param>
public async void SetValue(LedMode mode)
{
Mode = mode;
await UIWriteMethods.Led(Brick.Socket, mode);
}
/// <summary>
/// Resets the led back to color green
/// </summary>
/// <returns></returns>
public async Task Reset()
{
if (Mode != LedMode.Green)
{
Mode = LedMode.Green;
await UIWriteMethods.Led(Brick.Socket, Mode);
}
}
}
}
| 23.020833 | 64 | 0.489593 | [
"MIT"
] | mvanderelsen/Lego.Ev3.Framework | Lego.Ev3.Framework/Led.cs | 1,107 | C# |
namespace Interpreter.Models.Report
{
public class TestReport
{
}
}
| 10.25 | 36 | 0.646341 | [
"MIT"
] | marcdacz/interpreter | Code/Interpreter.Models/Report/TestReport.cs | 84 | C# |
using Ryujinx.Common.Logging;
using System;
using System.Threading;
namespace Ryujinx.Graphics.Gpu.Synchronization
{
/// <summary>
/// GPU synchronization manager.
/// </summary>
public class SynchronizationManager
{
/// <summary>
/// The maximum number of syncpoints supported by the GM20B.
/// </summary>
public const int MaxHardwareSyncpoints = 192;
/// <summary>
/// Array containing all hardware syncpoints.
/// </summary>
private Syncpoint[] _syncpoints;
public SynchronizationManager()
{
_syncpoints = new Syncpoint[MaxHardwareSyncpoints];
for (uint i = 0; i < _syncpoints.Length; i++)
{
_syncpoints[i] = new Syncpoint(i);
}
}
/// <summary>
/// Increment the value of a syncpoint with a given id.
/// </summary>
/// <param name="id">The id of the syncpoint</param>
/// <exception cref="System.ArgumentOutOfRangeException">Thrown when id >= MaxHardwareSyncpoints</exception>
/// <returns>The incremented value of the syncpoint</returns>
public uint IncrementSyncpoint(uint id)
{
if (id >= MaxHardwareSyncpoints)
{
throw new ArgumentOutOfRangeException(nameof(id));
}
return _syncpoints[id].Increment();
}
/// <summary>
/// Get the value of a syncpoint with a given id.
/// </summary>
/// <param name="id">The id of the syncpoint</param>
/// <exception cref="System.ArgumentOutOfRangeException">Thrown when id >= MaxHardwareSyncpoints</exception>
/// <returns>The value of the syncpoint</returns>
public uint GetSyncpointValue(uint id)
{
if (id >= MaxHardwareSyncpoints)
{
throw new ArgumentOutOfRangeException(nameof(id));
}
return _syncpoints[id].Value;
}
/// <summary>
/// Register a new callback on a syncpoint with a given id at a target threshold.
/// The callback will be called once the threshold is reached and will automatically be unregistered.
/// </summary>
/// <param name="id">The id of the syncpoint</param>
/// <param name="threshold">The target threshold</param>
/// <param name="callback">The callback to call when the threshold is reached</param>
/// <exception cref="System.ArgumentOutOfRangeException">Thrown when id >= MaxHardwareSyncpoints</exception>
/// <returns>The created SyncpointWaiterHandle object or null if already past threshold</returns>
public SyncpointWaiterHandle RegisterCallbackOnSyncpoint(uint id, uint threshold, Action callback)
{
if (id >= MaxHardwareSyncpoints)
{
throw new ArgumentOutOfRangeException(nameof(id));
}
return _syncpoints[id].RegisterCallback(threshold, callback);
}
/// <summary>
/// Unregister a callback on a given syncpoint.
/// </summary>
/// <param name="id">The id of the syncpoint</param>
/// <param name="waiterInformation">The waiter information to unregister</param>
/// <exception cref="System.ArgumentOutOfRangeException">Thrown when id >= MaxHardwareSyncpoints</exception>
public void UnregisterCallback(uint id, SyncpointWaiterHandle waiterInformation)
{
if (id >= MaxHardwareSyncpoints)
{
throw new ArgumentOutOfRangeException(nameof(id));
}
_syncpoints[id].UnregisterCallback(waiterInformation);
}
/// <summary>
/// Wait on a syncpoint with a given id at a target threshold.
/// The callback will be called once the threshold is reached and will automatically be unregistered.
/// </summary>
/// <param name="id">The id of the syncpoint</param>
/// <param name="threshold">The target threshold</param>
/// <param name="timeout">The timeout</param>
/// <exception cref="System.ArgumentOutOfRangeException">Thrown when id >= MaxHardwareSyncpoints</exception>
/// <returns>True if timed out</returns>
public bool WaitOnSyncpoint(uint id, uint threshold, TimeSpan timeout)
{
if (id >= MaxHardwareSyncpoints)
{
throw new ArgumentOutOfRangeException(nameof(id));
}
// TODO: Remove this when GPU channel scheduling will be implemented.
if (timeout == Timeout.InfiniteTimeSpan)
{
timeout = TimeSpan.FromSeconds(1);
}
using (ManualResetEvent waitEvent = new ManualResetEvent(false))
{
var info = _syncpoints[id].RegisterCallback(threshold, () => waitEvent.Set());
if (info == null)
{
return false;
}
bool signaled = waitEvent.WaitOne(timeout);
if (!signaled && info != null)
{
Logger.PrintError(LogClass.Gpu, $"Wait on syncpoint {id} for threshold {threshold} took more than {timeout.TotalMilliseconds}ms, resuming execution...");
_syncpoints[id].UnregisterCallback(info);
}
return !signaled;
}
}
}
}
| 38.131944 | 173 | 0.585504 | [
"MIT"
] | CJBok/Ryujinx | Ryujinx.Graphics.Gpu/Synchronization/SynchronizationManager.cs | 5,493 | C# |
namespace MLOps.NET.SQLServer.IntegrationTests.Constants
{
internal class ConfigurationKeys
{
public static string ConnectionString = "SQLServer:ConnectionString";
public static string RegistryName = "Container:RegistryName";
public static string Username = "Container:Username";
public static string Password = "Container:Password";
}
}
| 34.818182 | 77 | 0.723238 | [
"MIT"
] | Brett-Parker/MLOps.NET | test/MLOps.NET.SQLServer.IntegrationTests/ConfigurationKeys.cs | 385 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
namespace MultiThread.semaphore
{
public class TestApp
{
static SemaphoreSlim _semaphore = new SemaphoreSlim(4);
static void AccessDataBase(string name, int seconds)
{
Console.WriteLine("{0}等待访问数据库", name);
_semaphore.Wait();
Console.WriteLine("{0}已经允许访问数据库", name);
Thread.Sleep(TimeSpan.FromSeconds(seconds));
Console.WriteLine("{0}已经完成!", name);
_semaphore.Release();
}
public static void Run()
{
int length = 6;
for (int i = 0; i < length; i++)
{
string threadName = "Thread" + i;
int secondsToWait = 2 + 2 * i;
var t = new Thread(() => AccessDataBase(threadName, secondsToWait));
t.Start();
}
}
}
}
| 27.166667 | 84 | 0.53272 | [
"MIT"
] | shenhx/DotNetAll | 02CSharp/DotNet_Theads/MultiThread/MultiThread/semaphore/TestApp.cs | 1,022 | 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
{
[JsonConverter(typeof(WidgetIdJsonConverter))]
public struct WidgetId1
{
public long Value { get; set; }
}
} | 40.30303 | 68 | 0.750376 | [
"MIT"
] | 0xced/Newtonsoft.Json | Src/Newtonsoft.Json.Tests/TestObjects/WidgetId1.cs | 1,330 | C# |
using System.Collections.Generic;
using System.Threading.Tasks;
using MAVN.Service.AdminAPI.Domain.Enums;
using MAVN.Service.AdminAPI.Domain.Models;
namespace MAVN.Service.AdminAPI.Domain.Services
{
public interface IAdminsService
{
Task<(AdminServiceCreateResponseError, AdminModel, string)> AuthenticateAsync(string email, string password);
Task<AdminChangePasswordErrorCodes> ChangePasswordAsync(
string email,
string currentPassword,
string newPassword);
Task<(AdminServiceCreateResponseError, AdminModel)> RegisterPartnerAdminAsync(AdminRegisterModel model);
Task<(AdminServiceCreateResponseError, AdminModel)> RegisterAsync(
string email,
string password,
string phoneNumber,
string firstName,
string lastName,
string company,
string department,
string jobTitle);
Task<(AdminServiceResponseError, AdminModel)> UpdateAdminAsync(
string adminId,
string phoneNumber,
string firstName,
string lastName,
string company,
string department,
string jobTitle,
bool isActive);
Task<(AdminServiceResponseError, AdminModel)> UpdateAdminPermissionsAsync(string adminId, List<Permission> permissions);
Task<(int, int, List<AdminModel>)> GetAsync(
int pageSize,
int pageNumber,
string searchValue,
bool? active);
Task<(AdminServiceResponseError, AdminModel)> GetAsync(string adminId);
List<PermissionType> GetAllPermissions();
Task<(AdminResetPasswordErrorCodes, AdminModel)> ResetPasswordAsync(string adminId);
}
}
| 33.37037 | 128 | 0.654273 | [
"MIT"
] | HannaAndreevna/MAVN.Service.AdminAPI | src/MAVN.Service.AdminAPI.Domain/Services/IAdminsService.cs | 1,804 | C# |
using System;
using Framework.DomainDriven.Attributes;
using Framework.Restriction;
namespace Framework.Configuration.Domain
{
/// <summary>
/// Сообщение, отправленное пользователю
/// </summary>
[NotAuditedClass]
public class SentMessage : AuditPersistentDomainObjectBase
{
private readonly string from;
private readonly string to;
private readonly string copy;
private readonly string subject;
private readonly string message;
private readonly string templateName;
private readonly string comment;
private readonly string contextObjectType;
private readonly Guid? contextObjectId;
private readonly string replyTo;
protected SentMessage()
{
}
/// <summary>
/// Конструктор
/// </summary>
/// <param name="from">Отправитель</param>
/// <param name="to">Получатель</param>
/// <param name="subject">Шаблон темы сообщения</param>
/// <param name="message">Сообщение</param>
/// <param name="templateName">Имя шаблона</param>
/// <param name="comment">Комментарий</param>
/// <param name="copy">Дополнительные получатели в копии письма</param>
/// <param name="contextObjectType">Доменный тип, на который зарегистрирована подписка</param>
/// <param name="contextObjectId">ID доменного типа, на который зарегистрирована подписка</param>
public SentMessage(string @from, string to, string subject, string message, string templateName, string comment, string copy, string contextObjectType, Guid? contextObjectId, string replyTo)
{
this.from = from;
this.contextObjectId = contextObjectId;
this.contextObjectType = contextObjectType;
this.copy = copy;
this.comment = comment;
this.templateName = templateName;
this.message = message;
this.subject = subject;
this.to = to;
this.replyTo = replyTo;
}
/// <summary>
/// ID доменного типа, на который зарегистрирована подписка
/// </summary>
public virtual Guid? ContextObjectId
{
get { return this.contextObjectId; }
}
/// <summary>
/// Доменный тип, на который зарегистрирована подписка
/// </summary>
public virtual string ContextObjectType
{
get { return this.contextObjectType; }
}
/// <summary>
/// Дополнительный получатель в копии письма
/// </summary>
[MaxLength]
public virtual string Copy
{
get { return this.copy; }
}
/// <summary>
/// Получатель(и) нотификации
/// </summary>
[MaxLength]
public virtual string To
{
get { return this.to; }
}
/// <summary>
/// Шаблон темы нотификации
/// </summary>
[MaxLength(1000)]
public virtual string Subject
{
get { return this.subject; }
}
/// <summary>
/// Шаблон текста нотифкации
/// </summary>
[MaxLength]
public virtual string Message
{
get { return this.message; }
}
/// <summary>
/// Название шаблона нотификации
/// </summary>
public virtual string TemplateName
{
get { return this.templateName; }
}
/// <summary>
/// Комментарии
/// </summary>
public virtual string Comment
{
get { return this.comment; }
}
/// <summary>
/// Отправитель нотификации
/// </summary>
public virtual string From
{
get { return this.from; }
}
/// <summary>
/// ReplyTo нотификации
/// </summary>
[MaxLength]
public virtual string ReplyTo
{
get { return this.replyTo; }
}
}
}
| 29.746479 | 199 | 0.535038 | [
"MIT"
] | Luxoft/BSSFramework | src/_Configuration/Framework.Configuration.Domain/SentMessage.cs | 4,586 | 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 elasticmapreduce-2009-03-31.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Net;
using Amazon.ElasticMapReduce.Model;
using Amazon.ElasticMapReduce.Model.Internal.MarshallTransformations;
using Amazon.ElasticMapReduce.Internal;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Auth;
using Amazon.Runtime.Internal.Transform;
namespace Amazon.ElasticMapReduce
{
/// <summary>
/// Implementation for accessing ElasticMapReduce
///
/// Amazon EMR is a web service that makes it easier to process large amounts of data
/// efficiently. Amazon EMR uses Hadoop processing combined with several Amazon Web Services
/// services to do tasks such as web indexing, data mining, log file analysis, machine
/// learning, scientific simulation, and data warehouse management.
/// </summary>
public partial class AmazonElasticMapReduceClient : AmazonServiceClient, IAmazonElasticMapReduce
{
private static IServiceMetadata serviceMetadata = new AmazonElasticMapReduceMetadata();
#region Constructors
/// <summary>
/// Constructs AmazonElasticMapReduceClient 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 AmazonElasticMapReduceClient()
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonElasticMapReduceConfig()) { }
/// <summary>
/// Constructs AmazonElasticMapReduceClient 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 AmazonElasticMapReduceClient(RegionEndpoint region)
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonElasticMapReduceConfig{RegionEndpoint = region}) { }
/// <summary>
/// Constructs AmazonElasticMapReduceClient 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 AmazonElasticMapReduceClient Configuration Object</param>
public AmazonElasticMapReduceClient(AmazonElasticMapReduceConfig config)
: base(FallbackCredentialsFactory.GetCredentials(), config) { }
/// <summary>
/// Constructs AmazonElasticMapReduceClient with AWS Credentials
/// </summary>
/// <param name="credentials">AWS Credentials</param>
public AmazonElasticMapReduceClient(AWSCredentials credentials)
: this(credentials, new AmazonElasticMapReduceConfig())
{
}
/// <summary>
/// Constructs AmazonElasticMapReduceClient with AWS Credentials
/// </summary>
/// <param name="credentials">AWS Credentials</param>
/// <param name="region">The region to connect.</param>
public AmazonElasticMapReduceClient(AWSCredentials credentials, RegionEndpoint region)
: this(credentials, new AmazonElasticMapReduceConfig{RegionEndpoint = region})
{
}
/// <summary>
/// Constructs AmazonElasticMapReduceClient with AWS Credentials and an
/// AmazonElasticMapReduceClient Configuration object.
/// </summary>
/// <param name="credentials">AWS Credentials</param>
/// <param name="clientConfig">The AmazonElasticMapReduceClient Configuration Object</param>
public AmazonElasticMapReduceClient(AWSCredentials credentials, AmazonElasticMapReduceConfig clientConfig)
: base(credentials, clientConfig)
{
}
/// <summary>
/// Constructs AmazonElasticMapReduceClient 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 AmazonElasticMapReduceClient(string awsAccessKeyId, string awsSecretAccessKey)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonElasticMapReduceConfig())
{
}
/// <summary>
/// Constructs AmazonElasticMapReduceClient 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 AmazonElasticMapReduceClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonElasticMapReduceConfig() {RegionEndpoint=region})
{
}
/// <summary>
/// Constructs AmazonElasticMapReduceClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonElasticMapReduceClient Configuration object.
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="clientConfig">The AmazonElasticMapReduceClient Configuration Object</param>
public AmazonElasticMapReduceClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonElasticMapReduceConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, clientConfig)
{
}
/// <summary>
/// Constructs AmazonElasticMapReduceClient 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 AmazonElasticMapReduceClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonElasticMapReduceConfig())
{
}
/// <summary>
/// Constructs AmazonElasticMapReduceClient 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 AmazonElasticMapReduceClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonElasticMapReduceConfig{RegionEndpoint = region})
{
}
/// <summary>
/// Constructs AmazonElasticMapReduceClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonElasticMapReduceClient 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 AmazonElasticMapReduceClient Configuration Object</param>
public AmazonElasticMapReduceClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonElasticMapReduceConfig 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>
/// 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 AddInstanceFleet
/// <summary>
/// Adds an instance fleet to a running cluster.
///
/// <note>
/// <para>
/// The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and
/// later, excluding 5.0.x.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AddInstanceFleet service method.</param>
///
/// <returns>The response from the AddInstanceFleet service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException">
/// This exception occurs when there is an internal failure in the Amazon EMR service.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/AddInstanceFleet">REST API Reference for AddInstanceFleet Operation</seealso>
public virtual AddInstanceFleetResponse AddInstanceFleet(AddInstanceFleetRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AddInstanceFleetRequestMarshaller.Instance;
options.ResponseUnmarshaller = AddInstanceFleetResponseUnmarshaller.Instance;
return Invoke<AddInstanceFleetResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the AddInstanceFleet operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the AddInstanceFleet operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndAddInstanceFleet
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/AddInstanceFleet">REST API Reference for AddInstanceFleet Operation</seealso>
public virtual IAsyncResult BeginAddInstanceFleet(AddInstanceFleetRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = AddInstanceFleetRequestMarshaller.Instance;
options.ResponseUnmarshaller = AddInstanceFleetResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the AddInstanceFleet operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginAddInstanceFleet.</param>
///
/// <returns>Returns a AddInstanceFleetResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/AddInstanceFleet">REST API Reference for AddInstanceFleet Operation</seealso>
public virtual AddInstanceFleetResponse EndAddInstanceFleet(IAsyncResult asyncResult)
{
return EndInvoke<AddInstanceFleetResponse>(asyncResult);
}
#endregion
#region AddInstanceGroups
/// <summary>
/// Adds one or more instance groups to a running cluster.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AddInstanceGroups service method.</param>
///
/// <returns>The response from the AddInstanceGroups service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException">
/// Indicates that an error occurred while processing the request and that the request
/// was not completed.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/AddInstanceGroups">REST API Reference for AddInstanceGroups Operation</seealso>
public virtual AddInstanceGroupsResponse AddInstanceGroups(AddInstanceGroupsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AddInstanceGroupsRequestMarshaller.Instance;
options.ResponseUnmarshaller = AddInstanceGroupsResponseUnmarshaller.Instance;
return Invoke<AddInstanceGroupsResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the AddInstanceGroups operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the AddInstanceGroups operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndAddInstanceGroups
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/AddInstanceGroups">REST API Reference for AddInstanceGroups Operation</seealso>
public virtual IAsyncResult BeginAddInstanceGroups(AddInstanceGroupsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = AddInstanceGroupsRequestMarshaller.Instance;
options.ResponseUnmarshaller = AddInstanceGroupsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the AddInstanceGroups operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginAddInstanceGroups.</param>
///
/// <returns>Returns a AddInstanceGroupsResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/AddInstanceGroups">REST API Reference for AddInstanceGroups Operation</seealso>
public virtual AddInstanceGroupsResponse EndAddInstanceGroups(IAsyncResult asyncResult)
{
return EndInvoke<AddInstanceGroupsResponse>(asyncResult);
}
#endregion
#region AddJobFlowSteps
/// <summary>
/// AddJobFlowSteps adds new steps to a running cluster. A maximum of 256 steps are allowed
/// in each job flow.
///
///
/// <para>
/// If your cluster is long-running (such as a Hive data warehouse) or complex, you may
/// require more than 256 steps to process your data. You can bypass the 256-step limitation
/// in various ways, including using SSH to connect to the master node and submitting
/// queries directly to the software running on the master node, such as Hive and Hadoop.
/// For more information on how to do this, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/AddMoreThan256Steps.html">Add
/// More than 256 Steps to a Cluster</a> in the <i>Amazon EMR Management Guide</i>.
/// </para>
///
/// <para>
/// A step specifies the location of a JAR file stored either on the master node of the
/// cluster or in Amazon S3. Each step is performed by the main function of the main class
/// of the JAR file. The main class can be specified either in the manifest of the JAR
/// or by using the MainFunction parameter of the step.
/// </para>
///
/// <para>
/// Amazon EMR executes each step in the order listed. For a step to be considered complete,
/// the main function must exit with a zero exit code and all Hadoop jobs started while
/// the step was running must have completed and run successfully.
/// </para>
///
/// <para>
/// You can only add steps to a cluster that is in one of the following states: STARTING,
/// BOOTSTRAPPING, RUNNING, or WAITING.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AddJobFlowSteps service method.</param>
///
/// <returns>The response from the AddJobFlowSteps service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException">
/// Indicates that an error occurred while processing the request and that the request
/// was not completed.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/AddJobFlowSteps">REST API Reference for AddJobFlowSteps Operation</seealso>
public virtual AddJobFlowStepsResponse AddJobFlowSteps(AddJobFlowStepsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AddJobFlowStepsRequestMarshaller.Instance;
options.ResponseUnmarshaller = AddJobFlowStepsResponseUnmarshaller.Instance;
return Invoke<AddJobFlowStepsResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the AddJobFlowSteps operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the AddJobFlowSteps operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndAddJobFlowSteps
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/AddJobFlowSteps">REST API Reference for AddJobFlowSteps Operation</seealso>
public virtual IAsyncResult BeginAddJobFlowSteps(AddJobFlowStepsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = AddJobFlowStepsRequestMarshaller.Instance;
options.ResponseUnmarshaller = AddJobFlowStepsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the AddJobFlowSteps operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginAddJobFlowSteps.</param>
///
/// <returns>Returns a AddJobFlowStepsResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/AddJobFlowSteps">REST API Reference for AddJobFlowSteps Operation</seealso>
public virtual AddJobFlowStepsResponse EndAddJobFlowSteps(IAsyncResult asyncResult)
{
return EndInvoke<AddJobFlowStepsResponse>(asyncResult);
}
#endregion
#region AddTags
/// <summary>
/// Adds tags to an Amazon EMR resource, such as a cluster or an Amazon EMR Studio. Tags
/// make it easier to associate resources in various ways, such as grouping clusters to
/// track your Amazon EMR resource allocation costs. For more information, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-tags.html">Tag
/// Clusters</a>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AddTags service method.</param>
///
/// <returns>The response from the AddTags service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException">
/// This exception occurs when there is an internal failure in the Amazon EMR service.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/AddTags">REST API Reference for AddTags Operation</seealso>
public virtual AddTagsResponse AddTags(AddTagsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AddTagsRequestMarshaller.Instance;
options.ResponseUnmarshaller = AddTagsResponseUnmarshaller.Instance;
return Invoke<AddTagsResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the AddTags operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the AddTags operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndAddTags
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/AddTags">REST API Reference for AddTags Operation</seealso>
public virtual IAsyncResult BeginAddTags(AddTagsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = AddTagsRequestMarshaller.Instance;
options.ResponseUnmarshaller = AddTagsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the AddTags operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginAddTags.</param>
///
/// <returns>Returns a AddTagsResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/AddTags">REST API Reference for AddTags Operation</seealso>
public virtual AddTagsResponse EndAddTags(IAsyncResult asyncResult)
{
return EndInvoke<AddTagsResponse>(asyncResult);
}
#endregion
#region CancelSteps
/// <summary>
/// Cancels a pending step or steps in a running cluster. Available only in Amazon EMR
/// versions 4.8.0 and later, excluding version 5.0.0. A maximum of 256 steps are allowed
/// in each CancelSteps request. CancelSteps is idempotent but asynchronous; it does not
/// guarantee that a step will be canceled, even if the request is successfully submitted.
/// When you use Amazon EMR versions 5.28.0 and later, you can cancel steps that are in
/// a <code>PENDING</code> or <code>RUNNING</code> state. In earlier versions of Amazon
/// EMR, you can only cancel steps that are in a <code>PENDING</code> state.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CancelSteps service method.</param>
///
/// <returns>The response from the CancelSteps service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException">
/// Indicates that an error occurred while processing the request and that the request
/// was not completed.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/CancelSteps">REST API Reference for CancelSteps Operation</seealso>
public virtual CancelStepsResponse CancelSteps(CancelStepsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CancelStepsRequestMarshaller.Instance;
options.ResponseUnmarshaller = CancelStepsResponseUnmarshaller.Instance;
return Invoke<CancelStepsResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the CancelSteps operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the CancelSteps operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndCancelSteps
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/CancelSteps">REST API Reference for CancelSteps Operation</seealso>
public virtual IAsyncResult BeginCancelSteps(CancelStepsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = CancelStepsRequestMarshaller.Instance;
options.ResponseUnmarshaller = CancelStepsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the CancelSteps operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginCancelSteps.</param>
///
/// <returns>Returns a CancelStepsResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/CancelSteps">REST API Reference for CancelSteps Operation</seealso>
public virtual CancelStepsResponse EndCancelSteps(IAsyncResult asyncResult)
{
return EndInvoke<CancelStepsResponse>(asyncResult);
}
#endregion
#region CreateSecurityConfiguration
/// <summary>
/// Creates a security configuration, which is stored in the service and can be specified
/// when a cluster is created.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateSecurityConfiguration service method.</param>
///
/// <returns>The response from the CreateSecurityConfiguration service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException">
/// This exception occurs when there is an internal failure in the Amazon EMR service.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/CreateSecurityConfiguration">REST API Reference for CreateSecurityConfiguration Operation</seealso>
public virtual CreateSecurityConfigurationResponse CreateSecurityConfiguration(CreateSecurityConfigurationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateSecurityConfigurationRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateSecurityConfigurationResponseUnmarshaller.Instance;
return Invoke<CreateSecurityConfigurationResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the CreateSecurityConfiguration operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the CreateSecurityConfiguration operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndCreateSecurityConfiguration
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/CreateSecurityConfiguration">REST API Reference for CreateSecurityConfiguration Operation</seealso>
public virtual IAsyncResult BeginCreateSecurityConfiguration(CreateSecurityConfigurationRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateSecurityConfigurationRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateSecurityConfigurationResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the CreateSecurityConfiguration operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginCreateSecurityConfiguration.</param>
///
/// <returns>Returns a CreateSecurityConfigurationResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/CreateSecurityConfiguration">REST API Reference for CreateSecurityConfiguration Operation</seealso>
public virtual CreateSecurityConfigurationResponse EndCreateSecurityConfiguration(IAsyncResult asyncResult)
{
return EndInvoke<CreateSecurityConfigurationResponse>(asyncResult);
}
#endregion
#region CreateStudio
/// <summary>
/// Creates a new Amazon EMR Studio.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateStudio service method.</param>
///
/// <returns>The response from the CreateStudio service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException">
/// This exception occurs when there is an internal failure in the Amazon EMR service.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/CreateStudio">REST API Reference for CreateStudio Operation</seealso>
public virtual CreateStudioResponse CreateStudio(CreateStudioRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateStudioRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateStudioResponseUnmarshaller.Instance;
return Invoke<CreateStudioResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the CreateStudio operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the CreateStudio operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndCreateStudio
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/CreateStudio">REST API Reference for CreateStudio Operation</seealso>
public virtual IAsyncResult BeginCreateStudio(CreateStudioRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateStudioRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateStudioResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the CreateStudio operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginCreateStudio.</param>
///
/// <returns>Returns a CreateStudioResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/CreateStudio">REST API Reference for CreateStudio Operation</seealso>
public virtual CreateStudioResponse EndCreateStudio(IAsyncResult asyncResult)
{
return EndInvoke<CreateStudioResponse>(asyncResult);
}
#endregion
#region CreateStudioSessionMapping
/// <summary>
/// Maps a user or group to the Amazon EMR Studio specified by <code>StudioId</code>,
/// and applies a session policy to refine Studio permissions for that user or group.
/// Use <code>CreateStudioSessionMapping</code> to assign users to a Studio when you use
/// Amazon Web Services SSO authentication. For instructions on how to assign users to
/// a Studio when you use IAM authentication, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-studio-manage-users.html#emr-studio-assign-users-groups">Assign
/// a user or group to your EMR Studio</a>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateStudioSessionMapping service method.</param>
///
/// <returns>The response from the CreateStudioSessionMapping service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException">
/// Indicates that an error occurred while processing the request and that the request
/// was not completed.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/CreateStudioSessionMapping">REST API Reference for CreateStudioSessionMapping Operation</seealso>
public virtual CreateStudioSessionMappingResponse CreateStudioSessionMapping(CreateStudioSessionMappingRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateStudioSessionMappingRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateStudioSessionMappingResponseUnmarshaller.Instance;
return Invoke<CreateStudioSessionMappingResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the CreateStudioSessionMapping operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the CreateStudioSessionMapping operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndCreateStudioSessionMapping
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/CreateStudioSessionMapping">REST API Reference for CreateStudioSessionMapping Operation</seealso>
public virtual IAsyncResult BeginCreateStudioSessionMapping(CreateStudioSessionMappingRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateStudioSessionMappingRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateStudioSessionMappingResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the CreateStudioSessionMapping operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginCreateStudioSessionMapping.</param>
///
/// <returns>Returns a CreateStudioSessionMappingResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/CreateStudioSessionMapping">REST API Reference for CreateStudioSessionMapping Operation</seealso>
public virtual CreateStudioSessionMappingResponse EndCreateStudioSessionMapping(IAsyncResult asyncResult)
{
return EndInvoke<CreateStudioSessionMappingResponse>(asyncResult);
}
#endregion
#region DeleteSecurityConfiguration
/// <summary>
/// Deletes a security configuration.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteSecurityConfiguration service method.</param>
///
/// <returns>The response from the DeleteSecurityConfiguration service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException">
/// This exception occurs when there is an internal failure in the Amazon EMR service.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DeleteSecurityConfiguration">REST API Reference for DeleteSecurityConfiguration Operation</seealso>
public virtual DeleteSecurityConfigurationResponse DeleteSecurityConfiguration(DeleteSecurityConfigurationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteSecurityConfigurationRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteSecurityConfigurationResponseUnmarshaller.Instance;
return Invoke<DeleteSecurityConfigurationResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the DeleteSecurityConfiguration operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the DeleteSecurityConfiguration operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDeleteSecurityConfiguration
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DeleteSecurityConfiguration">REST API Reference for DeleteSecurityConfiguration Operation</seealso>
public virtual IAsyncResult BeginDeleteSecurityConfiguration(DeleteSecurityConfigurationRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteSecurityConfigurationRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteSecurityConfigurationResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the DeleteSecurityConfiguration operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginDeleteSecurityConfiguration.</param>
///
/// <returns>Returns a DeleteSecurityConfigurationResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DeleteSecurityConfiguration">REST API Reference for DeleteSecurityConfiguration Operation</seealso>
public virtual DeleteSecurityConfigurationResponse EndDeleteSecurityConfiguration(IAsyncResult asyncResult)
{
return EndInvoke<DeleteSecurityConfigurationResponse>(asyncResult);
}
#endregion
#region DeleteStudio
/// <summary>
/// Removes an Amazon EMR Studio from the Studio metadata store.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteStudio service method.</param>
///
/// <returns>The response from the DeleteStudio service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException">
/// This exception occurs when there is an internal failure in the Amazon EMR service.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DeleteStudio">REST API Reference for DeleteStudio Operation</seealso>
public virtual DeleteStudioResponse DeleteStudio(DeleteStudioRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteStudioRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteStudioResponseUnmarshaller.Instance;
return Invoke<DeleteStudioResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the DeleteStudio operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the DeleteStudio operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDeleteStudio
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DeleteStudio">REST API Reference for DeleteStudio Operation</seealso>
public virtual IAsyncResult BeginDeleteStudio(DeleteStudioRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteStudioRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteStudioResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the DeleteStudio operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginDeleteStudio.</param>
///
/// <returns>Returns a DeleteStudioResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DeleteStudio">REST API Reference for DeleteStudio Operation</seealso>
public virtual DeleteStudioResponse EndDeleteStudio(IAsyncResult asyncResult)
{
return EndInvoke<DeleteStudioResponse>(asyncResult);
}
#endregion
#region DeleteStudioSessionMapping
/// <summary>
/// Removes a user or group from an Amazon EMR Studio.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteStudioSessionMapping service method.</param>
///
/// <returns>The response from the DeleteStudioSessionMapping service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException">
/// Indicates that an error occurred while processing the request and that the request
/// was not completed.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DeleteStudioSessionMapping">REST API Reference for DeleteStudioSessionMapping Operation</seealso>
public virtual DeleteStudioSessionMappingResponse DeleteStudioSessionMapping(DeleteStudioSessionMappingRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteStudioSessionMappingRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteStudioSessionMappingResponseUnmarshaller.Instance;
return Invoke<DeleteStudioSessionMappingResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the DeleteStudioSessionMapping operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the DeleteStudioSessionMapping operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDeleteStudioSessionMapping
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DeleteStudioSessionMapping">REST API Reference for DeleteStudioSessionMapping Operation</seealso>
public virtual IAsyncResult BeginDeleteStudioSessionMapping(DeleteStudioSessionMappingRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteStudioSessionMappingRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteStudioSessionMappingResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the DeleteStudioSessionMapping operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginDeleteStudioSessionMapping.</param>
///
/// <returns>Returns a DeleteStudioSessionMappingResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DeleteStudioSessionMapping">REST API Reference for DeleteStudioSessionMapping Operation</seealso>
public virtual DeleteStudioSessionMappingResponse EndDeleteStudioSessionMapping(IAsyncResult asyncResult)
{
return EndInvoke<DeleteStudioSessionMappingResponse>(asyncResult);
}
#endregion
#region DescribeCluster
/// <summary>
/// Provides cluster-level details including status, hardware and software configuration,
/// VPC settings, and so on.
/// </summary>
///
/// <returns>The response from the DescribeCluster service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException">
/// This exception occurs when there is an internal failure in the Amazon EMR service.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeCluster">REST API Reference for DescribeCluster Operation</seealso>
public virtual DescribeClusterResponse DescribeCluster()
{
return DescribeCluster(new DescribeClusterRequest());
}
/// <summary>
/// Provides cluster-level details including status, hardware and software configuration,
/// VPC settings, and so on.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeCluster service method.</param>
///
/// <returns>The response from the DescribeCluster service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException">
/// This exception occurs when there is an internal failure in the Amazon EMR service.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeCluster">REST API Reference for DescribeCluster Operation</seealso>
public virtual DescribeClusterResponse DescribeCluster(DescribeClusterRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeClusterResponseUnmarshaller.Instance;
return Invoke<DescribeClusterResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the DescribeCluster operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the DescribeCluster operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDescribeCluster
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeCluster">REST API Reference for DescribeCluster Operation</seealso>
public virtual IAsyncResult BeginDescribeCluster(DescribeClusterRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeClusterResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the DescribeCluster operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginDescribeCluster.</param>
///
/// <returns>Returns a DescribeClusterResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeCluster">REST API Reference for DescribeCluster Operation</seealso>
public virtual DescribeClusterResponse EndDescribeCluster(IAsyncResult asyncResult)
{
return EndInvoke<DescribeClusterResponse>(asyncResult);
}
#endregion
#region DescribeJobFlows
/// <summary>
/// This API is no longer supported and will eventually be removed. We recommend you use
/// <a>ListClusters</a>, <a>DescribeCluster</a>, <a>ListSteps</a>, <a>ListInstanceGroups</a>
/// and <a>ListBootstrapActions</a> instead.
///
///
/// <para>
/// DescribeJobFlows returns a list of job flows that match all of the supplied parameters.
/// The parameters can include a list of job flow IDs, job flow states, and restrictions
/// on job flow creation date and time.
/// </para>
///
/// <para>
/// Regardless of supplied parameters, only job flows created within the last two months
/// are returned.
/// </para>
///
/// <para>
/// If no parameters are supplied, then job flows matching either of the following criteria
/// are returned:
/// </para>
/// <ul> <li>
/// <para>
/// Job flows created and completed in the last two weeks
/// </para>
/// </li> <li>
/// <para>
/// Job flows created within the last two months that are in one of the following states:
/// <code>RUNNING</code>, <code>WAITING</code>, <code>SHUTTING_DOWN</code>, <code>STARTING</code>
///
/// </para>
/// </li> </ul>
/// <para>
/// Amazon EMR can return a maximum of 512 job flow descriptions.
/// </para>
/// </summary>
///
/// <returns>The response from the DescribeJobFlows service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException">
/// Indicates that an error occurred while processing the request and that the request
/// was not completed.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeJobFlows">REST API Reference for DescribeJobFlows Operation</seealso>
[Obsolete("This API is deprecated and will eventually be removed. We recommend that you use ListClusters, DescribeCluster, ListSteps, ListInstanceGroups and ListBootstrapActions instead.")]
public virtual DescribeJobFlowsResponse DescribeJobFlows()
{
return DescribeJobFlows(new DescribeJobFlowsRequest());
}
/// <summary>
/// This API is no longer supported and will eventually be removed. We recommend you use
/// <a>ListClusters</a>, <a>DescribeCluster</a>, <a>ListSteps</a>, <a>ListInstanceGroups</a>
/// and <a>ListBootstrapActions</a> instead.
///
///
/// <para>
/// DescribeJobFlows returns a list of job flows that match all of the supplied parameters.
/// The parameters can include a list of job flow IDs, job flow states, and restrictions
/// on job flow creation date and time.
/// </para>
///
/// <para>
/// Regardless of supplied parameters, only job flows created within the last two months
/// are returned.
/// </para>
///
/// <para>
/// If no parameters are supplied, then job flows matching either of the following criteria
/// are returned:
/// </para>
/// <ul> <li>
/// <para>
/// Job flows created and completed in the last two weeks
/// </para>
/// </li> <li>
/// <para>
/// Job flows created within the last two months that are in one of the following states:
/// <code>RUNNING</code>, <code>WAITING</code>, <code>SHUTTING_DOWN</code>, <code>STARTING</code>
///
/// </para>
/// </li> </ul>
/// <para>
/// Amazon EMR can return a maximum of 512 job flow descriptions.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeJobFlows service method.</param>
///
/// <returns>The response from the DescribeJobFlows service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException">
/// Indicates that an error occurred while processing the request and that the request
/// was not completed.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeJobFlows">REST API Reference for DescribeJobFlows Operation</seealso>
[Obsolete("This API is deprecated and will eventually be removed. We recommend that you use ListClusters, DescribeCluster, ListSteps, ListInstanceGroups and ListBootstrapActions instead.")]
public virtual DescribeJobFlowsResponse DescribeJobFlows(DescribeJobFlowsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeJobFlowsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeJobFlowsResponseUnmarshaller.Instance;
return Invoke<DescribeJobFlowsResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the DescribeJobFlows operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the DescribeJobFlows operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDescribeJobFlows
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeJobFlows">REST API Reference for DescribeJobFlows Operation</seealso>
[Obsolete("This API is deprecated and will eventually be removed. We recommend that you use ListClusters, DescribeCluster, ListSteps, ListInstanceGroups and ListBootstrapActions instead.")]
public virtual IAsyncResult BeginDescribeJobFlows(DescribeJobFlowsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeJobFlowsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeJobFlowsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the DescribeJobFlows operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginDescribeJobFlows.</param>
///
/// <returns>Returns a DescribeJobFlowsResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeJobFlows">REST API Reference for DescribeJobFlows Operation</seealso>
[Obsolete("This API is deprecated and will eventually be removed. We recommend that you use ListClusters, DescribeCluster, ListSteps, ListInstanceGroups and ListBootstrapActions instead.")]
public virtual DescribeJobFlowsResponse EndDescribeJobFlows(IAsyncResult asyncResult)
{
return EndInvoke<DescribeJobFlowsResponse>(asyncResult);
}
#endregion
#region DescribeNotebookExecution
/// <summary>
/// Provides details of a notebook execution.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeNotebookExecution service method.</param>
///
/// <returns>The response from the DescribeNotebookExecution service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException">
/// Indicates that an error occurred while processing the request and that the request
/// was not completed.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeNotebookExecution">REST API Reference for DescribeNotebookExecution Operation</seealso>
public virtual DescribeNotebookExecutionResponse DescribeNotebookExecution(DescribeNotebookExecutionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeNotebookExecutionRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeNotebookExecutionResponseUnmarshaller.Instance;
return Invoke<DescribeNotebookExecutionResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the DescribeNotebookExecution operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the DescribeNotebookExecution operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDescribeNotebookExecution
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeNotebookExecution">REST API Reference for DescribeNotebookExecution Operation</seealso>
public virtual IAsyncResult BeginDescribeNotebookExecution(DescribeNotebookExecutionRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeNotebookExecutionRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeNotebookExecutionResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the DescribeNotebookExecution operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginDescribeNotebookExecution.</param>
///
/// <returns>Returns a DescribeNotebookExecutionResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeNotebookExecution">REST API Reference for DescribeNotebookExecution Operation</seealso>
public virtual DescribeNotebookExecutionResponse EndDescribeNotebookExecution(IAsyncResult asyncResult)
{
return EndInvoke<DescribeNotebookExecutionResponse>(asyncResult);
}
#endregion
#region DescribeReleaseLabel
/// <summary>
/// Provides EMR release label details, such as releases available the region where the
/// API request is run, and the available applications for a specific EMR release label.
/// Can also list EMR release versions that support a specified version of Spark.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeReleaseLabel service method.</param>
///
/// <returns>The response from the DescribeReleaseLabel service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException">
/// This exception occurs when there is an internal failure in the Amazon EMR service.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeReleaseLabel">REST API Reference for DescribeReleaseLabel Operation</seealso>
public virtual DescribeReleaseLabelResponse DescribeReleaseLabel(DescribeReleaseLabelRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeReleaseLabelRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeReleaseLabelResponseUnmarshaller.Instance;
return Invoke<DescribeReleaseLabelResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the DescribeReleaseLabel operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the DescribeReleaseLabel operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDescribeReleaseLabel
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeReleaseLabel">REST API Reference for DescribeReleaseLabel Operation</seealso>
public virtual IAsyncResult BeginDescribeReleaseLabel(DescribeReleaseLabelRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeReleaseLabelRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeReleaseLabelResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the DescribeReleaseLabel operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginDescribeReleaseLabel.</param>
///
/// <returns>Returns a DescribeReleaseLabelResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeReleaseLabel">REST API Reference for DescribeReleaseLabel Operation</seealso>
public virtual DescribeReleaseLabelResponse EndDescribeReleaseLabel(IAsyncResult asyncResult)
{
return EndInvoke<DescribeReleaseLabelResponse>(asyncResult);
}
#endregion
#region DescribeSecurityConfiguration
/// <summary>
/// Provides the details of a security configuration by returning the configuration JSON.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeSecurityConfiguration service method.</param>
///
/// <returns>The response from the DescribeSecurityConfiguration service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException">
/// This exception occurs when there is an internal failure in the Amazon EMR service.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeSecurityConfiguration">REST API Reference for DescribeSecurityConfiguration Operation</seealso>
public virtual DescribeSecurityConfigurationResponse DescribeSecurityConfiguration(DescribeSecurityConfigurationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeSecurityConfigurationRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeSecurityConfigurationResponseUnmarshaller.Instance;
return Invoke<DescribeSecurityConfigurationResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the DescribeSecurityConfiguration operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the DescribeSecurityConfiguration operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDescribeSecurityConfiguration
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeSecurityConfiguration">REST API Reference for DescribeSecurityConfiguration Operation</seealso>
public virtual IAsyncResult BeginDescribeSecurityConfiguration(DescribeSecurityConfigurationRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeSecurityConfigurationRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeSecurityConfigurationResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the DescribeSecurityConfiguration operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginDescribeSecurityConfiguration.</param>
///
/// <returns>Returns a DescribeSecurityConfigurationResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeSecurityConfiguration">REST API Reference for DescribeSecurityConfiguration Operation</seealso>
public virtual DescribeSecurityConfigurationResponse EndDescribeSecurityConfiguration(IAsyncResult asyncResult)
{
return EndInvoke<DescribeSecurityConfigurationResponse>(asyncResult);
}
#endregion
#region DescribeStep
/// <summary>
/// Provides more detail about the cluster step.
/// </summary>
///
/// <returns>The response from the DescribeStep service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException">
/// This exception occurs when there is an internal failure in the Amazon EMR service.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeStep">REST API Reference for DescribeStep Operation</seealso>
public virtual DescribeStepResponse DescribeStep()
{
return DescribeStep(new DescribeStepRequest());
}
/// <summary>
/// Provides more detail about the cluster step.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeStep service method.</param>
///
/// <returns>The response from the DescribeStep service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException">
/// This exception occurs when there is an internal failure in the Amazon EMR service.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeStep">REST API Reference for DescribeStep Operation</seealso>
public virtual DescribeStepResponse DescribeStep(DescribeStepRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeStepRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeStepResponseUnmarshaller.Instance;
return Invoke<DescribeStepResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the DescribeStep operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the DescribeStep operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDescribeStep
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeStep">REST API Reference for DescribeStep Operation</seealso>
public virtual IAsyncResult BeginDescribeStep(DescribeStepRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeStepRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeStepResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the DescribeStep operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginDescribeStep.</param>
///
/// <returns>Returns a DescribeStepResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeStep">REST API Reference for DescribeStep Operation</seealso>
public virtual DescribeStepResponse EndDescribeStep(IAsyncResult asyncResult)
{
return EndInvoke<DescribeStepResponse>(asyncResult);
}
#endregion
#region DescribeStudio
/// <summary>
/// Returns details for the specified Amazon EMR Studio including ID, Name, VPC, Studio
/// access URL, and so on.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeStudio service method.</param>
///
/// <returns>The response from the DescribeStudio service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException">
/// This exception occurs when there is an internal failure in the Amazon EMR service.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeStudio">REST API Reference for DescribeStudio Operation</seealso>
public virtual DescribeStudioResponse DescribeStudio(DescribeStudioRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeStudioRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeStudioResponseUnmarshaller.Instance;
return Invoke<DescribeStudioResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the DescribeStudio operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the DescribeStudio operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDescribeStudio
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeStudio">REST API Reference for DescribeStudio Operation</seealso>
public virtual IAsyncResult BeginDescribeStudio(DescribeStudioRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeStudioRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeStudioResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the DescribeStudio operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginDescribeStudio.</param>
///
/// <returns>Returns a DescribeStudioResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/DescribeStudio">REST API Reference for DescribeStudio Operation</seealso>
public virtual DescribeStudioResponse EndDescribeStudio(IAsyncResult asyncResult)
{
return EndInvoke<DescribeStudioResponse>(asyncResult);
}
#endregion
#region GetAutoTerminationPolicy
/// <summary>
/// Returns the auto-termination policy for an Amazon EMR cluster.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetAutoTerminationPolicy service method.</param>
///
/// <returns>The response from the GetAutoTerminationPolicy service method, as returned by ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/GetAutoTerminationPolicy">REST API Reference for GetAutoTerminationPolicy Operation</seealso>
public virtual GetAutoTerminationPolicyResponse GetAutoTerminationPolicy(GetAutoTerminationPolicyRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetAutoTerminationPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetAutoTerminationPolicyResponseUnmarshaller.Instance;
return Invoke<GetAutoTerminationPolicyResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the GetAutoTerminationPolicy operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the GetAutoTerminationPolicy operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetAutoTerminationPolicy
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/GetAutoTerminationPolicy">REST API Reference for GetAutoTerminationPolicy Operation</seealso>
public virtual IAsyncResult BeginGetAutoTerminationPolicy(GetAutoTerminationPolicyRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetAutoTerminationPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetAutoTerminationPolicyResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the GetAutoTerminationPolicy operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginGetAutoTerminationPolicy.</param>
///
/// <returns>Returns a GetAutoTerminationPolicyResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/GetAutoTerminationPolicy">REST API Reference for GetAutoTerminationPolicy Operation</seealso>
public virtual GetAutoTerminationPolicyResponse EndGetAutoTerminationPolicy(IAsyncResult asyncResult)
{
return EndInvoke<GetAutoTerminationPolicyResponse>(asyncResult);
}
#endregion
#region GetBlockPublicAccessConfiguration
/// <summary>
/// Returns the Amazon EMR block public access configuration for your Amazon Web Services
/// account in the current Region. For more information see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/configure-block-public-access.html">Configure
/// Block Public Access for Amazon EMR</a> in the <i>Amazon EMR Management Guide</i>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetBlockPublicAccessConfiguration service method.</param>
///
/// <returns>The response from the GetBlockPublicAccessConfiguration service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException">
/// This exception occurs when there is an internal failure in the Amazon EMR service.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/GetBlockPublicAccessConfiguration">REST API Reference for GetBlockPublicAccessConfiguration Operation</seealso>
public virtual GetBlockPublicAccessConfigurationResponse GetBlockPublicAccessConfiguration(GetBlockPublicAccessConfigurationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetBlockPublicAccessConfigurationRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetBlockPublicAccessConfigurationResponseUnmarshaller.Instance;
return Invoke<GetBlockPublicAccessConfigurationResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the GetBlockPublicAccessConfiguration operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the GetBlockPublicAccessConfiguration operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetBlockPublicAccessConfiguration
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/GetBlockPublicAccessConfiguration">REST API Reference for GetBlockPublicAccessConfiguration Operation</seealso>
public virtual IAsyncResult BeginGetBlockPublicAccessConfiguration(GetBlockPublicAccessConfigurationRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetBlockPublicAccessConfigurationRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetBlockPublicAccessConfigurationResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the GetBlockPublicAccessConfiguration operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginGetBlockPublicAccessConfiguration.</param>
///
/// <returns>Returns a GetBlockPublicAccessConfigurationResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/GetBlockPublicAccessConfiguration">REST API Reference for GetBlockPublicAccessConfiguration Operation</seealso>
public virtual GetBlockPublicAccessConfigurationResponse EndGetBlockPublicAccessConfiguration(IAsyncResult asyncResult)
{
return EndInvoke<GetBlockPublicAccessConfigurationResponse>(asyncResult);
}
#endregion
#region GetManagedScalingPolicy
/// <summary>
/// Fetches the attached managed scaling policy for an Amazon EMR cluster.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetManagedScalingPolicy service method.</param>
///
/// <returns>The response from the GetManagedScalingPolicy service method, as returned by ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/GetManagedScalingPolicy">REST API Reference for GetManagedScalingPolicy Operation</seealso>
public virtual GetManagedScalingPolicyResponse GetManagedScalingPolicy(GetManagedScalingPolicyRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetManagedScalingPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetManagedScalingPolicyResponseUnmarshaller.Instance;
return Invoke<GetManagedScalingPolicyResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the GetManagedScalingPolicy operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the GetManagedScalingPolicy operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetManagedScalingPolicy
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/GetManagedScalingPolicy">REST API Reference for GetManagedScalingPolicy Operation</seealso>
public virtual IAsyncResult BeginGetManagedScalingPolicy(GetManagedScalingPolicyRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetManagedScalingPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetManagedScalingPolicyResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the GetManagedScalingPolicy operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginGetManagedScalingPolicy.</param>
///
/// <returns>Returns a GetManagedScalingPolicyResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/GetManagedScalingPolicy">REST API Reference for GetManagedScalingPolicy Operation</seealso>
public virtual GetManagedScalingPolicyResponse EndGetManagedScalingPolicy(IAsyncResult asyncResult)
{
return EndInvoke<GetManagedScalingPolicyResponse>(asyncResult);
}
#endregion
#region GetStudioSessionMapping
/// <summary>
/// Fetches mapping details for the specified Amazon EMR Studio and identity (user or
/// group).
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetStudioSessionMapping service method.</param>
///
/// <returns>The response from the GetStudioSessionMapping service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException">
/// Indicates that an error occurred while processing the request and that the request
/// was not completed.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/GetStudioSessionMapping">REST API Reference for GetStudioSessionMapping Operation</seealso>
public virtual GetStudioSessionMappingResponse GetStudioSessionMapping(GetStudioSessionMappingRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetStudioSessionMappingRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetStudioSessionMappingResponseUnmarshaller.Instance;
return Invoke<GetStudioSessionMappingResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the GetStudioSessionMapping operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the GetStudioSessionMapping operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetStudioSessionMapping
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/GetStudioSessionMapping">REST API Reference for GetStudioSessionMapping Operation</seealso>
public virtual IAsyncResult BeginGetStudioSessionMapping(GetStudioSessionMappingRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetStudioSessionMappingRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetStudioSessionMappingResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the GetStudioSessionMapping operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginGetStudioSessionMapping.</param>
///
/// <returns>Returns a GetStudioSessionMappingResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/GetStudioSessionMapping">REST API Reference for GetStudioSessionMapping Operation</seealso>
public virtual GetStudioSessionMappingResponse EndGetStudioSessionMapping(IAsyncResult asyncResult)
{
return EndInvoke<GetStudioSessionMappingResponse>(asyncResult);
}
#endregion
#region ListBootstrapActions
/// <summary>
/// Provides information about the bootstrap actions associated with a cluster.
/// </summary>
///
/// <returns>The response from the ListBootstrapActions service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException">
/// This exception occurs when there is an internal failure in the Amazon EMR service.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListBootstrapActions">REST API Reference for ListBootstrapActions Operation</seealso>
public virtual ListBootstrapActionsResponse ListBootstrapActions()
{
return ListBootstrapActions(new ListBootstrapActionsRequest());
}
/// <summary>
/// Provides information about the bootstrap actions associated with a cluster.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListBootstrapActions service method.</param>
///
/// <returns>The response from the ListBootstrapActions service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException">
/// This exception occurs when there is an internal failure in the Amazon EMR service.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListBootstrapActions">REST API Reference for ListBootstrapActions Operation</seealso>
public virtual ListBootstrapActionsResponse ListBootstrapActions(ListBootstrapActionsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListBootstrapActionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListBootstrapActionsResponseUnmarshaller.Instance;
return Invoke<ListBootstrapActionsResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the ListBootstrapActions operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the ListBootstrapActions operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListBootstrapActions
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListBootstrapActions">REST API Reference for ListBootstrapActions Operation</seealso>
public virtual IAsyncResult BeginListBootstrapActions(ListBootstrapActionsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListBootstrapActionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListBootstrapActionsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the ListBootstrapActions operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginListBootstrapActions.</param>
///
/// <returns>Returns a ListBootstrapActionsResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListBootstrapActions">REST API Reference for ListBootstrapActions Operation</seealso>
public virtual ListBootstrapActionsResponse EndListBootstrapActions(IAsyncResult asyncResult)
{
return EndInvoke<ListBootstrapActionsResponse>(asyncResult);
}
#endregion
#region ListClusters
/// <summary>
/// Provides the status of all clusters visible to this Amazon Web Services account. Allows
/// you to filter the list of clusters based on certain criteria; for example, filtering
/// by cluster creation date and time or by status. This call returns a maximum of 50
/// clusters in unsorted order per call, but returns a marker to track the paging of the
/// cluster list across multiple ListClusters calls.
/// </summary>
///
/// <returns>The response from the ListClusters service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException">
/// This exception occurs when there is an internal failure in the Amazon EMR service.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListClusters">REST API Reference for ListClusters Operation</seealso>
public virtual ListClustersResponse ListClusters()
{
return ListClusters(new ListClustersRequest());
}
/// <summary>
/// Provides the status of all clusters visible to this Amazon Web Services account. Allows
/// you to filter the list of clusters based on certain criteria; for example, filtering
/// by cluster creation date and time or by status. This call returns a maximum of 50
/// clusters in unsorted order per call, but returns a marker to track the paging of the
/// cluster list across multiple ListClusters calls.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListClusters service method.</param>
///
/// <returns>The response from the ListClusters service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException">
/// This exception occurs when there is an internal failure in the Amazon EMR service.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListClusters">REST API Reference for ListClusters Operation</seealso>
public virtual ListClustersResponse ListClusters(ListClustersRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListClustersRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListClustersResponseUnmarshaller.Instance;
return Invoke<ListClustersResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the ListClusters operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the ListClusters operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListClusters
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListClusters">REST API Reference for ListClusters Operation</seealso>
public virtual IAsyncResult BeginListClusters(ListClustersRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListClustersRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListClustersResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the ListClusters operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginListClusters.</param>
///
/// <returns>Returns a ListClustersResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListClusters">REST API Reference for ListClusters Operation</seealso>
public virtual ListClustersResponse EndListClusters(IAsyncResult asyncResult)
{
return EndInvoke<ListClustersResponse>(asyncResult);
}
#endregion
#region ListInstanceFleets
/// <summary>
/// Lists all available details about the instance fleets in a cluster.
///
/// <note>
/// <para>
/// The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and
/// later, excluding 5.0.x versions.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListInstanceFleets service method.</param>
///
/// <returns>The response from the ListInstanceFleets service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException">
/// This exception occurs when there is an internal failure in the Amazon EMR service.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListInstanceFleets">REST API Reference for ListInstanceFleets Operation</seealso>
public virtual ListInstanceFleetsResponse ListInstanceFleets(ListInstanceFleetsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListInstanceFleetsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListInstanceFleetsResponseUnmarshaller.Instance;
return Invoke<ListInstanceFleetsResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the ListInstanceFleets operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the ListInstanceFleets operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListInstanceFleets
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListInstanceFleets">REST API Reference for ListInstanceFleets Operation</seealso>
public virtual IAsyncResult BeginListInstanceFleets(ListInstanceFleetsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListInstanceFleetsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListInstanceFleetsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the ListInstanceFleets operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginListInstanceFleets.</param>
///
/// <returns>Returns a ListInstanceFleetsResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListInstanceFleets">REST API Reference for ListInstanceFleets Operation</seealso>
public virtual ListInstanceFleetsResponse EndListInstanceFleets(IAsyncResult asyncResult)
{
return EndInvoke<ListInstanceFleetsResponse>(asyncResult);
}
#endregion
#region ListInstanceGroups
/// <summary>
/// Provides all available details about the instance groups in a cluster.
/// </summary>
///
/// <returns>The response from the ListInstanceGroups service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException">
/// This exception occurs when there is an internal failure in the Amazon EMR service.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListInstanceGroups">REST API Reference for ListInstanceGroups Operation</seealso>
public virtual ListInstanceGroupsResponse ListInstanceGroups()
{
return ListInstanceGroups(new ListInstanceGroupsRequest());
}
/// <summary>
/// Provides all available details about the instance groups in a cluster.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListInstanceGroups service method.</param>
///
/// <returns>The response from the ListInstanceGroups service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException">
/// This exception occurs when there is an internal failure in the Amazon EMR service.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListInstanceGroups">REST API Reference for ListInstanceGroups Operation</seealso>
public virtual ListInstanceGroupsResponse ListInstanceGroups(ListInstanceGroupsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListInstanceGroupsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListInstanceGroupsResponseUnmarshaller.Instance;
return Invoke<ListInstanceGroupsResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the ListInstanceGroups operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the ListInstanceGroups operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListInstanceGroups
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListInstanceGroups">REST API Reference for ListInstanceGroups Operation</seealso>
public virtual IAsyncResult BeginListInstanceGroups(ListInstanceGroupsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListInstanceGroupsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListInstanceGroupsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the ListInstanceGroups operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginListInstanceGroups.</param>
///
/// <returns>Returns a ListInstanceGroupsResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListInstanceGroups">REST API Reference for ListInstanceGroups Operation</seealso>
public virtual ListInstanceGroupsResponse EndListInstanceGroups(IAsyncResult asyncResult)
{
return EndInvoke<ListInstanceGroupsResponse>(asyncResult);
}
#endregion
#region ListInstances
/// <summary>
/// Provides information for all active EC2 instances and EC2 instances terminated in
/// the last 30 days, up to a maximum of 2,000. EC2 instances in any of the following
/// states are considered active: AWAITING_FULFILLMENT, PROVISIONING, BOOTSTRAPPING, RUNNING.
/// </summary>
///
/// <returns>The response from the ListInstances service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException">
/// This exception occurs when there is an internal failure in the Amazon EMR service.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListInstances">REST API Reference for ListInstances Operation</seealso>
public virtual ListInstancesResponse ListInstances()
{
return ListInstances(new ListInstancesRequest());
}
/// <summary>
/// Provides information for all active EC2 instances and EC2 instances terminated in
/// the last 30 days, up to a maximum of 2,000. EC2 instances in any of the following
/// states are considered active: AWAITING_FULFILLMENT, PROVISIONING, BOOTSTRAPPING, RUNNING.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListInstances service method.</param>
///
/// <returns>The response from the ListInstances service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException">
/// This exception occurs when there is an internal failure in the Amazon EMR service.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListInstances">REST API Reference for ListInstances Operation</seealso>
public virtual ListInstancesResponse ListInstances(ListInstancesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListInstancesResponseUnmarshaller.Instance;
return Invoke<ListInstancesResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the ListInstances operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the ListInstances operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListInstances
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListInstances">REST API Reference for ListInstances Operation</seealso>
public virtual IAsyncResult BeginListInstances(ListInstancesRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListInstancesResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the ListInstances operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginListInstances.</param>
///
/// <returns>Returns a ListInstancesResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListInstances">REST API Reference for ListInstances Operation</seealso>
public virtual ListInstancesResponse EndListInstances(IAsyncResult asyncResult)
{
return EndInvoke<ListInstancesResponse>(asyncResult);
}
#endregion
#region ListNotebookExecutions
/// <summary>
/// Provides summaries of all notebook executions. You can filter the list based on multiple
/// criteria such as status, time range, and editor id. Returns a maximum of 50 notebook
/// executions and a marker to track the paging of a longer notebook execution list across
/// multiple <code>ListNotebookExecution</code> calls.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListNotebookExecutions service method.</param>
///
/// <returns>The response from the ListNotebookExecutions service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException">
/// Indicates that an error occurred while processing the request and that the request
/// was not completed.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListNotebookExecutions">REST API Reference for ListNotebookExecutions Operation</seealso>
public virtual ListNotebookExecutionsResponse ListNotebookExecutions(ListNotebookExecutionsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListNotebookExecutionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListNotebookExecutionsResponseUnmarshaller.Instance;
return Invoke<ListNotebookExecutionsResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the ListNotebookExecutions operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the ListNotebookExecutions operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListNotebookExecutions
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListNotebookExecutions">REST API Reference for ListNotebookExecutions Operation</seealso>
public virtual IAsyncResult BeginListNotebookExecutions(ListNotebookExecutionsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListNotebookExecutionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListNotebookExecutionsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the ListNotebookExecutions operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginListNotebookExecutions.</param>
///
/// <returns>Returns a ListNotebookExecutionsResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListNotebookExecutions">REST API Reference for ListNotebookExecutions Operation</seealso>
public virtual ListNotebookExecutionsResponse EndListNotebookExecutions(IAsyncResult asyncResult)
{
return EndInvoke<ListNotebookExecutionsResponse>(asyncResult);
}
#endregion
#region ListReleaseLabels
/// <summary>
/// Retrieves release labels of EMR services in the region where the API is called.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListReleaseLabels service method.</param>
///
/// <returns>The response from the ListReleaseLabels service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException">
/// This exception occurs when there is an internal failure in the Amazon EMR service.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListReleaseLabels">REST API Reference for ListReleaseLabels Operation</seealso>
public virtual ListReleaseLabelsResponse ListReleaseLabels(ListReleaseLabelsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListReleaseLabelsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListReleaseLabelsResponseUnmarshaller.Instance;
return Invoke<ListReleaseLabelsResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the ListReleaseLabels operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the ListReleaseLabels operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListReleaseLabels
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListReleaseLabels">REST API Reference for ListReleaseLabels Operation</seealso>
public virtual IAsyncResult BeginListReleaseLabels(ListReleaseLabelsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListReleaseLabelsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListReleaseLabelsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the ListReleaseLabels operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginListReleaseLabels.</param>
///
/// <returns>Returns a ListReleaseLabelsResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListReleaseLabels">REST API Reference for ListReleaseLabels Operation</seealso>
public virtual ListReleaseLabelsResponse EndListReleaseLabels(IAsyncResult asyncResult)
{
return EndInvoke<ListReleaseLabelsResponse>(asyncResult);
}
#endregion
#region ListSecurityConfigurations
/// <summary>
/// Lists all the security configurations visible to this account, providing their creation
/// dates and times, and their names. This call returns a maximum of 50 clusters per call,
/// but returns a marker to track the paging of the cluster list across multiple ListSecurityConfigurations
/// calls.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListSecurityConfigurations service method.</param>
///
/// <returns>The response from the ListSecurityConfigurations service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException">
/// This exception occurs when there is an internal failure in the Amazon EMR service.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListSecurityConfigurations">REST API Reference for ListSecurityConfigurations Operation</seealso>
public virtual ListSecurityConfigurationsResponse ListSecurityConfigurations(ListSecurityConfigurationsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListSecurityConfigurationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListSecurityConfigurationsResponseUnmarshaller.Instance;
return Invoke<ListSecurityConfigurationsResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the ListSecurityConfigurations operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the ListSecurityConfigurations operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListSecurityConfigurations
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListSecurityConfigurations">REST API Reference for ListSecurityConfigurations Operation</seealso>
public virtual IAsyncResult BeginListSecurityConfigurations(ListSecurityConfigurationsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListSecurityConfigurationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListSecurityConfigurationsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the ListSecurityConfigurations operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginListSecurityConfigurations.</param>
///
/// <returns>Returns a ListSecurityConfigurationsResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListSecurityConfigurations">REST API Reference for ListSecurityConfigurations Operation</seealso>
public virtual ListSecurityConfigurationsResponse EndListSecurityConfigurations(IAsyncResult asyncResult)
{
return EndInvoke<ListSecurityConfigurationsResponse>(asyncResult);
}
#endregion
#region ListSteps
/// <summary>
/// Provides a list of steps for the cluster in reverse order unless you specify <code>stepIds</code>
/// with the request or filter by <code>StepStates</code>. You can specify a maximum of
/// 10 <code>stepIDs</code>. The CLI automatically paginates results to return a list
/// greater than 50 steps. To return more than 50 steps using the CLI, specify a <code>Marker</code>,
/// which is a pagination token that indicates the next set of steps to retrieve.
/// </summary>
///
/// <returns>The response from the ListSteps service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException">
/// This exception occurs when there is an internal failure in the Amazon EMR service.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListSteps">REST API Reference for ListSteps Operation</seealso>
public virtual ListStepsResponse ListSteps()
{
return ListSteps(new ListStepsRequest());
}
/// <summary>
/// Provides a list of steps for the cluster in reverse order unless you specify <code>stepIds</code>
/// with the request or filter by <code>StepStates</code>. You can specify a maximum of
/// 10 <code>stepIDs</code>. The CLI automatically paginates results to return a list
/// greater than 50 steps. To return more than 50 steps using the CLI, specify a <code>Marker</code>,
/// which is a pagination token that indicates the next set of steps to retrieve.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListSteps service method.</param>
///
/// <returns>The response from the ListSteps service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException">
/// This exception occurs when there is an internal failure in the Amazon EMR service.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListSteps">REST API Reference for ListSteps Operation</seealso>
public virtual ListStepsResponse ListSteps(ListStepsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListStepsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListStepsResponseUnmarshaller.Instance;
return Invoke<ListStepsResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the ListSteps operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the ListSteps operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListSteps
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListSteps">REST API Reference for ListSteps Operation</seealso>
public virtual IAsyncResult BeginListSteps(ListStepsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListStepsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListStepsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the ListSteps operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginListSteps.</param>
///
/// <returns>Returns a ListStepsResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListSteps">REST API Reference for ListSteps Operation</seealso>
public virtual ListStepsResponse EndListSteps(IAsyncResult asyncResult)
{
return EndInvoke<ListStepsResponse>(asyncResult);
}
#endregion
#region ListStudios
/// <summary>
/// Returns a list of all Amazon EMR Studios associated with the Amazon Web Services account.
/// The list includes details such as ID, Studio Access URL, and creation time for each
/// Studio.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListStudios service method.</param>
///
/// <returns>The response from the ListStudios service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException">
/// This exception occurs when there is an internal failure in the Amazon EMR service.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListStudios">REST API Reference for ListStudios Operation</seealso>
public virtual ListStudiosResponse ListStudios(ListStudiosRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListStudiosRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListStudiosResponseUnmarshaller.Instance;
return Invoke<ListStudiosResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the ListStudios operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the ListStudios operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListStudios
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListStudios">REST API Reference for ListStudios Operation</seealso>
public virtual IAsyncResult BeginListStudios(ListStudiosRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListStudiosRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListStudiosResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the ListStudios operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginListStudios.</param>
///
/// <returns>Returns a ListStudiosResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListStudios">REST API Reference for ListStudios Operation</seealso>
public virtual ListStudiosResponse EndListStudios(IAsyncResult asyncResult)
{
return EndInvoke<ListStudiosResponse>(asyncResult);
}
#endregion
#region ListStudioSessionMappings
/// <summary>
/// Returns a list of all user or group session mappings for the Amazon EMR Studio specified
/// by <code>StudioId</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListStudioSessionMappings service method.</param>
///
/// <returns>The response from the ListStudioSessionMappings service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException">
/// Indicates that an error occurred while processing the request and that the request
/// was not completed.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListStudioSessionMappings">REST API Reference for ListStudioSessionMappings Operation</seealso>
public virtual ListStudioSessionMappingsResponse ListStudioSessionMappings(ListStudioSessionMappingsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListStudioSessionMappingsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListStudioSessionMappingsResponseUnmarshaller.Instance;
return Invoke<ListStudioSessionMappingsResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the ListStudioSessionMappings operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the ListStudioSessionMappings operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListStudioSessionMappings
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListStudioSessionMappings">REST API Reference for ListStudioSessionMappings Operation</seealso>
public virtual IAsyncResult BeginListStudioSessionMappings(ListStudioSessionMappingsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListStudioSessionMappingsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListStudioSessionMappingsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the ListStudioSessionMappings operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginListStudioSessionMappings.</param>
///
/// <returns>Returns a ListStudioSessionMappingsResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ListStudioSessionMappings">REST API Reference for ListStudioSessionMappings Operation</seealso>
public virtual ListStudioSessionMappingsResponse EndListStudioSessionMappings(IAsyncResult asyncResult)
{
return EndInvoke<ListStudioSessionMappingsResponse>(asyncResult);
}
#endregion
#region ModifyCluster
/// <summary>
/// Modifies the number of steps that can be executed concurrently for the cluster specified
/// using ClusterID.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyCluster service method.</param>
///
/// <returns>The response from the ModifyCluster service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException">
/// Indicates that an error occurred while processing the request and that the request
/// was not completed.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ModifyCluster">REST API Reference for ModifyCluster Operation</seealso>
public virtual ModifyClusterResponse ModifyCluster(ModifyClusterRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyClusterResponseUnmarshaller.Instance;
return Invoke<ModifyClusterResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the ModifyCluster operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the ModifyCluster operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndModifyCluster
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ModifyCluster">REST API Reference for ModifyCluster Operation</seealso>
public virtual IAsyncResult BeginModifyCluster(ModifyClusterRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyClusterResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the ModifyCluster operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginModifyCluster.</param>
///
/// <returns>Returns a ModifyClusterResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ModifyCluster">REST API Reference for ModifyCluster Operation</seealso>
public virtual ModifyClusterResponse EndModifyCluster(IAsyncResult asyncResult)
{
return EndInvoke<ModifyClusterResponse>(asyncResult);
}
#endregion
#region ModifyInstanceFleet
/// <summary>
/// Modifies the target On-Demand and target Spot capacities for the instance fleet with
/// the specified InstanceFleetID within the cluster specified using ClusterID. The call
/// either succeeds or fails atomically.
///
/// <note>
/// <para>
/// The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and
/// later, excluding 5.0.x versions.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyInstanceFleet service method.</param>
///
/// <returns>The response from the ModifyInstanceFleet service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException">
/// This exception occurs when there is an internal failure in the Amazon EMR service.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ModifyInstanceFleet">REST API Reference for ModifyInstanceFleet Operation</seealso>
public virtual ModifyInstanceFleetResponse ModifyInstanceFleet(ModifyInstanceFleetRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyInstanceFleetRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyInstanceFleetResponseUnmarshaller.Instance;
return Invoke<ModifyInstanceFleetResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the ModifyInstanceFleet operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the ModifyInstanceFleet operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndModifyInstanceFleet
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ModifyInstanceFleet">REST API Reference for ModifyInstanceFleet Operation</seealso>
public virtual IAsyncResult BeginModifyInstanceFleet(ModifyInstanceFleetRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyInstanceFleetRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyInstanceFleetResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the ModifyInstanceFleet operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginModifyInstanceFleet.</param>
///
/// <returns>Returns a ModifyInstanceFleetResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ModifyInstanceFleet">REST API Reference for ModifyInstanceFleet Operation</seealso>
public virtual ModifyInstanceFleetResponse EndModifyInstanceFleet(IAsyncResult asyncResult)
{
return EndInvoke<ModifyInstanceFleetResponse>(asyncResult);
}
#endregion
#region ModifyInstanceGroups
/// <summary>
/// ModifyInstanceGroups modifies the number of nodes and configuration settings of an
/// instance group. The input parameters include the new target instance count for the
/// group and the instance group ID. The call will either succeed or fail atomically.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyInstanceGroups service method.</param>
///
/// <returns>The response from the ModifyInstanceGroups service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException">
/// Indicates that an error occurred while processing the request and that the request
/// was not completed.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ModifyInstanceGroups">REST API Reference for ModifyInstanceGroups Operation</seealso>
public virtual ModifyInstanceGroupsResponse ModifyInstanceGroups(ModifyInstanceGroupsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyInstanceGroupsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyInstanceGroupsResponseUnmarshaller.Instance;
return Invoke<ModifyInstanceGroupsResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the ModifyInstanceGroups operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the ModifyInstanceGroups operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndModifyInstanceGroups
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ModifyInstanceGroups">REST API Reference for ModifyInstanceGroups Operation</seealso>
public virtual IAsyncResult BeginModifyInstanceGroups(ModifyInstanceGroupsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyInstanceGroupsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyInstanceGroupsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the ModifyInstanceGroups operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginModifyInstanceGroups.</param>
///
/// <returns>Returns a ModifyInstanceGroupsResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/ModifyInstanceGroups">REST API Reference for ModifyInstanceGroups Operation</seealso>
public virtual ModifyInstanceGroupsResponse EndModifyInstanceGroups(IAsyncResult asyncResult)
{
return EndInvoke<ModifyInstanceGroupsResponse>(asyncResult);
}
#endregion
#region PutAutoScalingPolicy
/// <summary>
/// Creates or updates an automatic scaling policy for a core instance group or task instance
/// group in an Amazon EMR cluster. The automatic scaling policy defines how an instance
/// group dynamically adds and terminates EC2 instances in response to the value of a
/// CloudWatch metric.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutAutoScalingPolicy service method.</param>
///
/// <returns>The response from the PutAutoScalingPolicy service method, as returned by ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/PutAutoScalingPolicy">REST API Reference for PutAutoScalingPolicy Operation</seealso>
public virtual PutAutoScalingPolicyResponse PutAutoScalingPolicy(PutAutoScalingPolicyRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = PutAutoScalingPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutAutoScalingPolicyResponseUnmarshaller.Instance;
return Invoke<PutAutoScalingPolicyResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the PutAutoScalingPolicy operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the PutAutoScalingPolicy operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndPutAutoScalingPolicy
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/PutAutoScalingPolicy">REST API Reference for PutAutoScalingPolicy Operation</seealso>
public virtual IAsyncResult BeginPutAutoScalingPolicy(PutAutoScalingPolicyRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = PutAutoScalingPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutAutoScalingPolicyResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the PutAutoScalingPolicy operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginPutAutoScalingPolicy.</param>
///
/// <returns>Returns a PutAutoScalingPolicyResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/PutAutoScalingPolicy">REST API Reference for PutAutoScalingPolicy Operation</seealso>
public virtual PutAutoScalingPolicyResponse EndPutAutoScalingPolicy(IAsyncResult asyncResult)
{
return EndInvoke<PutAutoScalingPolicyResponse>(asyncResult);
}
#endregion
#region PutAutoTerminationPolicy
/// <summary>
/// Creates or updates an auto-termination policy for an Amazon EMR cluster. An auto-termination
/// policy defines the amount of idle time in seconds after which a cluster automatically
/// terminates. For alternative cluster termination options, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-termination.html">Control
/// cluster termination</a>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutAutoTerminationPolicy service method.</param>
///
/// <returns>The response from the PutAutoTerminationPolicy service method, as returned by ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/PutAutoTerminationPolicy">REST API Reference for PutAutoTerminationPolicy Operation</seealso>
public virtual PutAutoTerminationPolicyResponse PutAutoTerminationPolicy(PutAutoTerminationPolicyRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = PutAutoTerminationPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutAutoTerminationPolicyResponseUnmarshaller.Instance;
return Invoke<PutAutoTerminationPolicyResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the PutAutoTerminationPolicy operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the PutAutoTerminationPolicy operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndPutAutoTerminationPolicy
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/PutAutoTerminationPolicy">REST API Reference for PutAutoTerminationPolicy Operation</seealso>
public virtual IAsyncResult BeginPutAutoTerminationPolicy(PutAutoTerminationPolicyRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = PutAutoTerminationPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutAutoTerminationPolicyResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the PutAutoTerminationPolicy operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginPutAutoTerminationPolicy.</param>
///
/// <returns>Returns a PutAutoTerminationPolicyResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/PutAutoTerminationPolicy">REST API Reference for PutAutoTerminationPolicy Operation</seealso>
public virtual PutAutoTerminationPolicyResponse EndPutAutoTerminationPolicy(IAsyncResult asyncResult)
{
return EndInvoke<PutAutoTerminationPolicyResponse>(asyncResult);
}
#endregion
#region PutBlockPublicAccessConfiguration
/// <summary>
/// Creates or updates an Amazon EMR block public access configuration for your Amazon
/// Web Services account in the current Region. For more information see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/configure-block-public-access.html">Configure
/// Block Public Access for Amazon EMR</a> in the <i>Amazon EMR Management Guide</i>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutBlockPublicAccessConfiguration service method.</param>
///
/// <returns>The response from the PutBlockPublicAccessConfiguration service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException">
/// This exception occurs when there is an internal failure in the Amazon EMR service.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/PutBlockPublicAccessConfiguration">REST API Reference for PutBlockPublicAccessConfiguration Operation</seealso>
public virtual PutBlockPublicAccessConfigurationResponse PutBlockPublicAccessConfiguration(PutBlockPublicAccessConfigurationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = PutBlockPublicAccessConfigurationRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutBlockPublicAccessConfigurationResponseUnmarshaller.Instance;
return Invoke<PutBlockPublicAccessConfigurationResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the PutBlockPublicAccessConfiguration operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the PutBlockPublicAccessConfiguration operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndPutBlockPublicAccessConfiguration
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/PutBlockPublicAccessConfiguration">REST API Reference for PutBlockPublicAccessConfiguration Operation</seealso>
public virtual IAsyncResult BeginPutBlockPublicAccessConfiguration(PutBlockPublicAccessConfigurationRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = PutBlockPublicAccessConfigurationRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutBlockPublicAccessConfigurationResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the PutBlockPublicAccessConfiguration operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginPutBlockPublicAccessConfiguration.</param>
///
/// <returns>Returns a PutBlockPublicAccessConfigurationResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/PutBlockPublicAccessConfiguration">REST API Reference for PutBlockPublicAccessConfiguration Operation</seealso>
public virtual PutBlockPublicAccessConfigurationResponse EndPutBlockPublicAccessConfiguration(IAsyncResult asyncResult)
{
return EndInvoke<PutBlockPublicAccessConfigurationResponse>(asyncResult);
}
#endregion
#region PutManagedScalingPolicy
/// <summary>
/// Creates or updates a managed scaling policy for an Amazon EMR cluster. The managed
/// scaling policy defines the limits for resources, such as EC2 instances that can be
/// added or terminated from a cluster. The policy only applies to the core and task nodes.
/// The master node cannot be scaled after initial configuration.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutManagedScalingPolicy service method.</param>
///
/// <returns>The response from the PutManagedScalingPolicy service method, as returned by ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/PutManagedScalingPolicy">REST API Reference for PutManagedScalingPolicy Operation</seealso>
public virtual PutManagedScalingPolicyResponse PutManagedScalingPolicy(PutManagedScalingPolicyRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = PutManagedScalingPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutManagedScalingPolicyResponseUnmarshaller.Instance;
return Invoke<PutManagedScalingPolicyResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the PutManagedScalingPolicy operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the PutManagedScalingPolicy operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndPutManagedScalingPolicy
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/PutManagedScalingPolicy">REST API Reference for PutManagedScalingPolicy Operation</seealso>
public virtual IAsyncResult BeginPutManagedScalingPolicy(PutManagedScalingPolicyRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = PutManagedScalingPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutManagedScalingPolicyResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the PutManagedScalingPolicy operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginPutManagedScalingPolicy.</param>
///
/// <returns>Returns a PutManagedScalingPolicyResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/PutManagedScalingPolicy">REST API Reference for PutManagedScalingPolicy Operation</seealso>
public virtual PutManagedScalingPolicyResponse EndPutManagedScalingPolicy(IAsyncResult asyncResult)
{
return EndInvoke<PutManagedScalingPolicyResponse>(asyncResult);
}
#endregion
#region RemoveAutoScalingPolicy
/// <summary>
/// Removes an automatic scaling policy from a specified instance group within an EMR
/// cluster.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RemoveAutoScalingPolicy service method.</param>
///
/// <returns>The response from the RemoveAutoScalingPolicy service method, as returned by ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/RemoveAutoScalingPolicy">REST API Reference for RemoveAutoScalingPolicy Operation</seealso>
public virtual RemoveAutoScalingPolicyResponse RemoveAutoScalingPolicy(RemoveAutoScalingPolicyRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RemoveAutoScalingPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = RemoveAutoScalingPolicyResponseUnmarshaller.Instance;
return Invoke<RemoveAutoScalingPolicyResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the RemoveAutoScalingPolicy operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the RemoveAutoScalingPolicy operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndRemoveAutoScalingPolicy
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/RemoveAutoScalingPolicy">REST API Reference for RemoveAutoScalingPolicy Operation</seealso>
public virtual IAsyncResult BeginRemoveAutoScalingPolicy(RemoveAutoScalingPolicyRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = RemoveAutoScalingPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = RemoveAutoScalingPolicyResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the RemoveAutoScalingPolicy operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginRemoveAutoScalingPolicy.</param>
///
/// <returns>Returns a RemoveAutoScalingPolicyResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/RemoveAutoScalingPolicy">REST API Reference for RemoveAutoScalingPolicy Operation</seealso>
public virtual RemoveAutoScalingPolicyResponse EndRemoveAutoScalingPolicy(IAsyncResult asyncResult)
{
return EndInvoke<RemoveAutoScalingPolicyResponse>(asyncResult);
}
#endregion
#region RemoveAutoTerminationPolicy
/// <summary>
/// Removes an auto-termination policy from an Amazon EMR cluster.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RemoveAutoTerminationPolicy service method.</param>
///
/// <returns>The response from the RemoveAutoTerminationPolicy service method, as returned by ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/RemoveAutoTerminationPolicy">REST API Reference for RemoveAutoTerminationPolicy Operation</seealso>
public virtual RemoveAutoTerminationPolicyResponse RemoveAutoTerminationPolicy(RemoveAutoTerminationPolicyRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RemoveAutoTerminationPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = RemoveAutoTerminationPolicyResponseUnmarshaller.Instance;
return Invoke<RemoveAutoTerminationPolicyResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the RemoveAutoTerminationPolicy operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the RemoveAutoTerminationPolicy operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndRemoveAutoTerminationPolicy
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/RemoveAutoTerminationPolicy">REST API Reference for RemoveAutoTerminationPolicy Operation</seealso>
public virtual IAsyncResult BeginRemoveAutoTerminationPolicy(RemoveAutoTerminationPolicyRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = RemoveAutoTerminationPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = RemoveAutoTerminationPolicyResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the RemoveAutoTerminationPolicy operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginRemoveAutoTerminationPolicy.</param>
///
/// <returns>Returns a RemoveAutoTerminationPolicyResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/RemoveAutoTerminationPolicy">REST API Reference for RemoveAutoTerminationPolicy Operation</seealso>
public virtual RemoveAutoTerminationPolicyResponse EndRemoveAutoTerminationPolicy(IAsyncResult asyncResult)
{
return EndInvoke<RemoveAutoTerminationPolicyResponse>(asyncResult);
}
#endregion
#region RemoveManagedScalingPolicy
/// <summary>
/// Removes a managed scaling policy from a specified EMR cluster.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RemoveManagedScalingPolicy service method.</param>
///
/// <returns>The response from the RemoveManagedScalingPolicy service method, as returned by ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/RemoveManagedScalingPolicy">REST API Reference for RemoveManagedScalingPolicy Operation</seealso>
public virtual RemoveManagedScalingPolicyResponse RemoveManagedScalingPolicy(RemoveManagedScalingPolicyRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RemoveManagedScalingPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = RemoveManagedScalingPolicyResponseUnmarshaller.Instance;
return Invoke<RemoveManagedScalingPolicyResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the RemoveManagedScalingPolicy operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the RemoveManagedScalingPolicy operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndRemoveManagedScalingPolicy
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/RemoveManagedScalingPolicy">REST API Reference for RemoveManagedScalingPolicy Operation</seealso>
public virtual IAsyncResult BeginRemoveManagedScalingPolicy(RemoveManagedScalingPolicyRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = RemoveManagedScalingPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = RemoveManagedScalingPolicyResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the RemoveManagedScalingPolicy operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginRemoveManagedScalingPolicy.</param>
///
/// <returns>Returns a RemoveManagedScalingPolicyResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/RemoveManagedScalingPolicy">REST API Reference for RemoveManagedScalingPolicy Operation</seealso>
public virtual RemoveManagedScalingPolicyResponse EndRemoveManagedScalingPolicy(IAsyncResult asyncResult)
{
return EndInvoke<RemoveManagedScalingPolicyResponse>(asyncResult);
}
#endregion
#region RemoveTags
/// <summary>
/// Removes tags from an Amazon EMR resource, such as a cluster or Amazon EMR Studio.
/// Tags make it easier to associate resources in various ways, such as grouping clusters
/// to track your Amazon EMR resource allocation costs. For more information, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-tags.html">Tag
/// Clusters</a>.
///
///
/// <para>
/// The following example removes the stack tag with value Prod from a cluster:
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RemoveTags service method.</param>
///
/// <returns>The response from the RemoveTags service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException">
/// This exception occurs when there is an internal failure in the Amazon EMR service.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/RemoveTags">REST API Reference for RemoveTags Operation</seealso>
public virtual RemoveTagsResponse RemoveTags(RemoveTagsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RemoveTagsRequestMarshaller.Instance;
options.ResponseUnmarshaller = RemoveTagsResponseUnmarshaller.Instance;
return Invoke<RemoveTagsResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the RemoveTags operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the RemoveTags operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndRemoveTags
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/RemoveTags">REST API Reference for RemoveTags Operation</seealso>
public virtual IAsyncResult BeginRemoveTags(RemoveTagsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = RemoveTagsRequestMarshaller.Instance;
options.ResponseUnmarshaller = RemoveTagsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the RemoveTags operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginRemoveTags.</param>
///
/// <returns>Returns a RemoveTagsResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/RemoveTags">REST API Reference for RemoveTags Operation</seealso>
public virtual RemoveTagsResponse EndRemoveTags(IAsyncResult asyncResult)
{
return EndInvoke<RemoveTagsResponse>(asyncResult);
}
#endregion
#region RunJobFlow
/// <summary>
/// RunJobFlow creates and starts running a new cluster (job flow). The cluster runs the
/// steps specified. After the steps complete, the cluster stops and the HDFS partition
/// is lost. To prevent loss of data, configure the last step of the job flow to store
/// results in Amazon S3. If the <a>JobFlowInstancesConfig</a> <code>KeepJobFlowAliveWhenNoSteps</code>
/// parameter is set to <code>TRUE</code>, the cluster transitions to the WAITING state
/// rather than shutting down after the steps have completed.
///
///
/// <para>
/// For additional protection, you can set the <a>JobFlowInstancesConfig</a> <code>TerminationProtected</code>
/// parameter to <code>TRUE</code> to lock the cluster and prevent it from being terminated
/// by API call, user intervention, or in the event of a job flow error.
/// </para>
///
/// <para>
/// A maximum of 256 steps are allowed in each job flow.
/// </para>
///
/// <para>
/// If your cluster is long-running (such as a Hive data warehouse) or complex, you may
/// require more than 256 steps to process your data. You can bypass the 256-step limitation
/// in various ways, including using the SSH shell to connect to the master node and submitting
/// queries directly to the software running on the master node, such as Hive and Hadoop.
/// For more information on how to do this, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/AddMoreThan256Steps.html">Add
/// More than 256 Steps to a Cluster</a> in the <i>Amazon EMR Management Guide</i>.
/// </para>
///
/// <para>
/// For long running clusters, we recommend that you periodically store your results.
/// </para>
/// <note>
/// <para>
/// The instance fleets configuration is available only in Amazon EMR versions 4.8.0 and
/// later, excluding 5.0.x versions. The RunJobFlow request can contain InstanceFleets
/// parameters or InstanceGroups parameters, but not both.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RunJobFlow service method.</param>
///
/// <returns>The response from the RunJobFlow service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException">
/// Indicates that an error occurred while processing the request and that the request
/// was not completed.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/RunJobFlow">REST API Reference for RunJobFlow Operation</seealso>
public virtual RunJobFlowResponse RunJobFlow(RunJobFlowRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RunJobFlowRequestMarshaller.Instance;
options.ResponseUnmarshaller = RunJobFlowResponseUnmarshaller.Instance;
return Invoke<RunJobFlowResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the RunJobFlow operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the RunJobFlow operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndRunJobFlow
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/RunJobFlow">REST API Reference for RunJobFlow Operation</seealso>
public virtual IAsyncResult BeginRunJobFlow(RunJobFlowRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = RunJobFlowRequestMarshaller.Instance;
options.ResponseUnmarshaller = RunJobFlowResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the RunJobFlow operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginRunJobFlow.</param>
///
/// <returns>Returns a RunJobFlowResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/RunJobFlow">REST API Reference for RunJobFlow Operation</seealso>
public virtual RunJobFlowResponse EndRunJobFlow(IAsyncResult asyncResult)
{
return EndInvoke<RunJobFlowResponse>(asyncResult);
}
#endregion
#region SetTerminationProtection
/// <summary>
/// SetTerminationProtection locks a cluster (job flow) so the EC2 instances in the cluster
/// cannot be terminated by user intervention, an API call, or in the event of a job-flow
/// error. The cluster still terminates upon successful completion of the job flow. Calling
/// <code>SetTerminationProtection</code> on a cluster is similar to calling the Amazon
/// EC2 <code>DisableAPITermination</code> API on all EC2 instances in a cluster.
///
///
/// <para>
/// <code>SetTerminationProtection</code> is used to prevent accidental termination of
/// a cluster and to ensure that in the event of an error, the instances persist so that
/// you can recover any data stored in their ephemeral instance storage.
/// </para>
///
/// <para>
/// To terminate a cluster that has been locked by setting <code>SetTerminationProtection</code>
/// to <code>true</code>, you must first unlock the job flow by a subsequent call to <code>SetTerminationProtection</code>
/// in which you set the value to <code>false</code>.
/// </para>
///
/// <para>
/// For more information, see<a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/UsingEMR_TerminationProtection.html">Managing
/// Cluster Termination</a> in the <i>Amazon EMR Management Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the SetTerminationProtection service method.</param>
///
/// <returns>The response from the SetTerminationProtection service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException">
/// Indicates that an error occurred while processing the request and that the request
/// was not completed.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/SetTerminationProtection">REST API Reference for SetTerminationProtection Operation</seealso>
public virtual SetTerminationProtectionResponse SetTerminationProtection(SetTerminationProtectionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = SetTerminationProtectionRequestMarshaller.Instance;
options.ResponseUnmarshaller = SetTerminationProtectionResponseUnmarshaller.Instance;
return Invoke<SetTerminationProtectionResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the SetTerminationProtection operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the SetTerminationProtection operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndSetTerminationProtection
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/SetTerminationProtection">REST API Reference for SetTerminationProtection Operation</seealso>
public virtual IAsyncResult BeginSetTerminationProtection(SetTerminationProtectionRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = SetTerminationProtectionRequestMarshaller.Instance;
options.ResponseUnmarshaller = SetTerminationProtectionResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the SetTerminationProtection operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginSetTerminationProtection.</param>
///
/// <returns>Returns a SetTerminationProtectionResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/SetTerminationProtection">REST API Reference for SetTerminationProtection Operation</seealso>
public virtual SetTerminationProtectionResponse EndSetTerminationProtection(IAsyncResult asyncResult)
{
return EndInvoke<SetTerminationProtectionResponse>(asyncResult);
}
#endregion
#region SetVisibleToAllUsers
/// <summary>
/// Sets the <a>Cluster$VisibleToAllUsers</a> value for an EMR cluster. When <code>true</code>,
/// IAM principals in the Amazon Web Services account can perform EMR cluster actions
/// that their IAM policies allow. When <code>false</code>, only the IAM principal that
/// created the cluster and the Amazon Web Services account root user can perform EMR
/// actions on the cluster, regardless of IAM permissions policies attached to other IAM
/// principals.
///
///
/// <para>
/// This action works on running clusters. When you create a cluster, use the <a>RunJobFlowInput$VisibleToAllUsers</a>
/// parameter.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/security_iam_emr-with-iam.html#security_set_visible_to_all_users">Understanding
/// the EMR Cluster VisibleToAllUsers Setting</a> in the <i>Amazon EMRManagement Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the SetVisibleToAllUsers service method.</param>
///
/// <returns>The response from the SetVisibleToAllUsers service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException">
/// Indicates that an error occurred while processing the request and that the request
/// was not completed.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/SetVisibleToAllUsers">REST API Reference for SetVisibleToAllUsers Operation</seealso>
public virtual SetVisibleToAllUsersResponse SetVisibleToAllUsers(SetVisibleToAllUsersRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = SetVisibleToAllUsersRequestMarshaller.Instance;
options.ResponseUnmarshaller = SetVisibleToAllUsersResponseUnmarshaller.Instance;
return Invoke<SetVisibleToAllUsersResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the SetVisibleToAllUsers operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the SetVisibleToAllUsers operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndSetVisibleToAllUsers
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/SetVisibleToAllUsers">REST API Reference for SetVisibleToAllUsers Operation</seealso>
public virtual IAsyncResult BeginSetVisibleToAllUsers(SetVisibleToAllUsersRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = SetVisibleToAllUsersRequestMarshaller.Instance;
options.ResponseUnmarshaller = SetVisibleToAllUsersResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the SetVisibleToAllUsers operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginSetVisibleToAllUsers.</param>
///
/// <returns>Returns a SetVisibleToAllUsersResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/SetVisibleToAllUsers">REST API Reference for SetVisibleToAllUsers Operation</seealso>
public virtual SetVisibleToAllUsersResponse EndSetVisibleToAllUsers(IAsyncResult asyncResult)
{
return EndInvoke<SetVisibleToAllUsersResponse>(asyncResult);
}
#endregion
#region StartNotebookExecution
/// <summary>
/// Starts a notebook execution.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartNotebookExecution service method.</param>
///
/// <returns>The response from the StartNotebookExecution service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException">
/// This exception occurs when there is an internal failure in the Amazon EMR service.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/StartNotebookExecution">REST API Reference for StartNotebookExecution Operation</seealso>
public virtual StartNotebookExecutionResponse StartNotebookExecution(StartNotebookExecutionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StartNotebookExecutionRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartNotebookExecutionResponseUnmarshaller.Instance;
return Invoke<StartNotebookExecutionResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the StartNotebookExecution operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the StartNotebookExecution operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndStartNotebookExecution
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/StartNotebookExecution">REST API Reference for StartNotebookExecution Operation</seealso>
public virtual IAsyncResult BeginStartNotebookExecution(StartNotebookExecutionRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = StartNotebookExecutionRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartNotebookExecutionResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the StartNotebookExecution operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginStartNotebookExecution.</param>
///
/// <returns>Returns a StartNotebookExecutionResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/StartNotebookExecution">REST API Reference for StartNotebookExecution Operation</seealso>
public virtual StartNotebookExecutionResponse EndStartNotebookExecution(IAsyncResult asyncResult)
{
return EndInvoke<StartNotebookExecutionResponse>(asyncResult);
}
#endregion
#region StopNotebookExecution
/// <summary>
/// Stops a notebook execution.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopNotebookExecution service method.</param>
///
/// <returns>The response from the StopNotebookExecution service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException">
/// Indicates that an error occurred while processing the request and that the request
/// was not completed.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/StopNotebookExecution">REST API Reference for StopNotebookExecution Operation</seealso>
public virtual StopNotebookExecutionResponse StopNotebookExecution(StopNotebookExecutionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StopNotebookExecutionRequestMarshaller.Instance;
options.ResponseUnmarshaller = StopNotebookExecutionResponseUnmarshaller.Instance;
return Invoke<StopNotebookExecutionResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the StopNotebookExecution operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the StopNotebookExecution operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndStopNotebookExecution
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/StopNotebookExecution">REST API Reference for StopNotebookExecution Operation</seealso>
public virtual IAsyncResult BeginStopNotebookExecution(StopNotebookExecutionRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = StopNotebookExecutionRequestMarshaller.Instance;
options.ResponseUnmarshaller = StopNotebookExecutionResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the StopNotebookExecution operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginStopNotebookExecution.</param>
///
/// <returns>Returns a StopNotebookExecutionResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/StopNotebookExecution">REST API Reference for StopNotebookExecution Operation</seealso>
public virtual StopNotebookExecutionResponse EndStopNotebookExecution(IAsyncResult asyncResult)
{
return EndInvoke<StopNotebookExecutionResponse>(asyncResult);
}
#endregion
#region TerminateJobFlows
/// <summary>
/// TerminateJobFlows shuts a list of clusters (job flows) down. When a job flow is shut
/// down, any step not yet completed is canceled and the EC2 instances on which the cluster
/// is running are stopped. Any log files not already saved are uploaded to Amazon S3
/// if a LogUri was specified when the cluster was created.
///
///
/// <para>
/// The maximum number of clusters allowed is 10. The call to <code>TerminateJobFlows</code>
/// is asynchronous. Depending on the configuration of the cluster, it may take up to
/// 1-5 minutes for the cluster to completely terminate and release allocated resources,
/// such as Amazon EC2 instances.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the TerminateJobFlows service method.</param>
///
/// <returns>The response from the TerminateJobFlows service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException">
/// Indicates that an error occurred while processing the request and that the request
/// was not completed.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/TerminateJobFlows">REST API Reference for TerminateJobFlows Operation</seealso>
public virtual TerminateJobFlowsResponse TerminateJobFlows(TerminateJobFlowsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = TerminateJobFlowsRequestMarshaller.Instance;
options.ResponseUnmarshaller = TerminateJobFlowsResponseUnmarshaller.Instance;
return Invoke<TerminateJobFlowsResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the TerminateJobFlows operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the TerminateJobFlows operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndTerminateJobFlows
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/TerminateJobFlows">REST API Reference for TerminateJobFlows Operation</seealso>
public virtual IAsyncResult BeginTerminateJobFlows(TerminateJobFlowsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = TerminateJobFlowsRequestMarshaller.Instance;
options.ResponseUnmarshaller = TerminateJobFlowsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the TerminateJobFlows operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginTerminateJobFlows.</param>
///
/// <returns>Returns a TerminateJobFlowsResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/TerminateJobFlows">REST API Reference for TerminateJobFlows Operation</seealso>
public virtual TerminateJobFlowsResponse EndTerminateJobFlows(IAsyncResult asyncResult)
{
return EndInvoke<TerminateJobFlowsResponse>(asyncResult);
}
#endregion
#region UpdateStudio
/// <summary>
/// Updates an Amazon EMR Studio configuration, including attributes such as name, description,
/// and subnets.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateStudio service method.</param>
///
/// <returns>The response from the UpdateStudio service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException">
/// This exception occurs when there is an internal failure in the Amazon EMR service.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/UpdateStudio">REST API Reference for UpdateStudio Operation</seealso>
public virtual UpdateStudioResponse UpdateStudio(UpdateStudioRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateStudioRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateStudioResponseUnmarshaller.Instance;
return Invoke<UpdateStudioResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the UpdateStudio operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the UpdateStudio operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndUpdateStudio
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/UpdateStudio">REST API Reference for UpdateStudio Operation</seealso>
public virtual IAsyncResult BeginUpdateStudio(UpdateStudioRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateStudioRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateStudioResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the UpdateStudio operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginUpdateStudio.</param>
///
/// <returns>Returns a UpdateStudioResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/UpdateStudio">REST API Reference for UpdateStudio Operation</seealso>
public virtual UpdateStudioResponse EndUpdateStudio(IAsyncResult asyncResult)
{
return EndInvoke<UpdateStudioResponse>(asyncResult);
}
#endregion
#region UpdateStudioSessionMapping
/// <summary>
/// Updates the session policy attached to the user or group for the specified Amazon
/// EMR Studio.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateStudioSessionMapping service method.</param>
///
/// <returns>The response from the UpdateStudioSessionMapping service method, as returned by ElasticMapReduce.</returns>
/// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException">
/// Indicates that an error occurred while processing the request and that the request
/// was not completed.
/// </exception>
/// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
/// This exception occurs when there is something wrong with user input.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/UpdateStudioSessionMapping">REST API Reference for UpdateStudioSessionMapping Operation</seealso>
public virtual UpdateStudioSessionMappingResponse UpdateStudioSessionMapping(UpdateStudioSessionMappingRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateStudioSessionMappingRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateStudioSessionMappingResponseUnmarshaller.Instance;
return Invoke<UpdateStudioSessionMappingResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the UpdateStudioSessionMapping operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the UpdateStudioSessionMapping operation on AmazonElasticMapReduceClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndUpdateStudioSessionMapping
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/UpdateStudioSessionMapping">REST API Reference for UpdateStudioSessionMapping Operation</seealso>
public virtual IAsyncResult BeginUpdateStudioSessionMapping(UpdateStudioSessionMappingRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateStudioSessionMappingRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateStudioSessionMappingResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the UpdateStudioSessionMapping operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginUpdateStudioSessionMapping.</param>
///
/// <returns>Returns a UpdateStudioSessionMappingResult from ElasticMapReduce.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/UpdateStudioSessionMapping">REST API Reference for UpdateStudioSessionMapping Operation</seealso>
public virtual UpdateStudioSessionMappingResponse EndUpdateStudioSessionMapping(IAsyncResult asyncResult)
{
return EndInvoke<UpdateStudioSessionMappingResponse>(asyncResult);
}
#endregion
}
} | 59.914431 | 205 | 0.689476 | [
"Apache-2.0"
] | bgrainger/aws-sdk-net | sdk/src/Services/ElasticMapReduce/Generated/_bcl35/AmazonElasticMapReduceClient.cs | 223,361 | C# |
// Copyright 2015-2016 Google Inc. All Rights Reserved.
// Licensed under the Apache License Version 2.0.
using Google.Apis.Bigquery.v2;
using Google.Cloud.BigQuery.V2;
using Google.PowerShell.Common;
using System;
namespace Google.PowerShell.BigQuery
{
/// <summary>
/// Base class for Google Cloud BigQuery cmdlets.
/// </summary>
public class BqCmdlet : GCloudCmdlet
{
private readonly Lazy<BigqueryService> _service;
private readonly Lazy<BigQueryClient> _client;
public BigqueryService Service => _service.Value;
public BigQueryClient Client => _client.Value;
internal static BigqueryService OptionalBigQueryService { private get; set; }
internal static BigQueryClient OptionalBigQueryClient { private get; set; }
public BqCmdlet()
{
_service = new Lazy<BigqueryService>(() => OptionalBigQueryService ??
new BigqueryService(GetBaseClientServiceInitializer()));
_client = new Lazy<BigQueryClient>(() => OptionalBigQueryClient ??
BigQueryClient.Create(Project));
}
// String value of DataFormats.JSON that is taken by the rest API.
public static string JSON_TEXT = "NEWLINE_DELIMITED_JSON";
public static string COMPRESSION_GZIP = "GZIP";
public static string COMPRESSION_NONE = "NONE";
public static string STATUS_DONE = "DONE";
// String value for Google.Apis.Requests.RequestError class to signal Database not found (404).
public static string DS_404 = "Not found: Dataset";
public static string TAB_404 = "Not found: Table";
}
/// <summary>
/// Data formats for input and output
/// </summary>
public enum DataFormats
{
AVRO, // Apache AVRO file format (avro.apache.org)
CSV, // Comma Separated Value file
JSON, // Newline-delimited JSON (ndjson.org)
DATASTORE_BACKUP // Cloud Datastore backup files
}
}
| 37.054545 | 103 | 0.652601 | [
"Apache-2.0"
] | GoogleCloudPlatform/google-cloud-powershell | Google.PowerShell/BigQuery/BqCmdlet.cs | 2,040 | 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.Mts.Model.V20140618;
namespace Aliyun.Acs.Mts.Transform.V20140618
{
public class UpdateTemplateResponseUnmarshaller
{
public static UpdateTemplateResponse Unmarshall(UnmarshallerContext context)
{
UpdateTemplateResponse updateTemplateResponse = new UpdateTemplateResponse();
updateTemplateResponse.HttpResponse = context.HttpResponse;
updateTemplateResponse.RequestId = context.StringValue("UpdateTemplate.RequestId");
UpdateTemplateResponse.UpdateTemplate_Template template = new UpdateTemplateResponse.UpdateTemplate_Template();
template.Id = context.StringValue("UpdateTemplate.Template.Id");
template.Name = context.StringValue("UpdateTemplate.Template.Name");
template.State = context.StringValue("UpdateTemplate.Template.State");
UpdateTemplateResponse.UpdateTemplate_Template.UpdateTemplate_Container container = new UpdateTemplateResponse.UpdateTemplate_Template.UpdateTemplate_Container();
container.Format = context.StringValue("UpdateTemplate.Template.Container.Format");
template.Container = container;
UpdateTemplateResponse.UpdateTemplate_Template.UpdateTemplate_Video video = new UpdateTemplateResponse.UpdateTemplate_Template.UpdateTemplate_Video();
video.Codec = context.StringValue("UpdateTemplate.Template.Video.Codec");
video.Profile = context.StringValue("UpdateTemplate.Template.Video.Profile");
video.Bitrate = context.StringValue("UpdateTemplate.Template.Video.Bitrate");
video.Crf = context.StringValue("UpdateTemplate.Template.Video.Crf");
video.Width = context.StringValue("UpdateTemplate.Template.Video.Width");
video.Height = context.StringValue("UpdateTemplate.Template.Video.Height");
video.LongShortMode = context.StringValue("UpdateTemplate.Template.Video.LongShortMode");
video.Fps = context.StringValue("UpdateTemplate.Template.Video.Fps");
video.Gop = context.StringValue("UpdateTemplate.Template.Video.Gop");
video.Preset = context.StringValue("UpdateTemplate.Template.Video.Preset");
video.ScanMode = context.StringValue("UpdateTemplate.Template.Video.ScanMode");
video.Bufsize = context.StringValue("UpdateTemplate.Template.Video.Bufsize");
video.Maxrate = context.StringValue("UpdateTemplate.Template.Video.Maxrate");
video.PixFmt = context.StringValue("UpdateTemplate.Template.Video.PixFmt");
video.Degrain = context.StringValue("UpdateTemplate.Template.Video.Degrain");
video.Qscale = context.StringValue("UpdateTemplate.Template.Video.Qscale");
video._Remove = context.StringValue("UpdateTemplate.Template.Video.Remove");
video.Crop = context.StringValue("UpdateTemplate.Template.Video.Crop");
video.Pad = context.StringValue("UpdateTemplate.Template.Video.Pad");
video.MaxFps = context.StringValue("UpdateTemplate.Template.Video.MaxFps");
video.ResoPriority = context.StringValue("UpdateTemplate.Template.Video.ResoPriority");
UpdateTemplateResponse.UpdateTemplate_Template.UpdateTemplate_Video.UpdateTemplate_BitrateBnd bitrateBnd = new UpdateTemplateResponse.UpdateTemplate_Template.UpdateTemplate_Video.UpdateTemplate_BitrateBnd();
bitrateBnd.Max = context.StringValue("UpdateTemplate.Template.Video.BitrateBnd.Max");
bitrateBnd.Min = context.StringValue("UpdateTemplate.Template.Video.BitrateBnd.Min");
video.BitrateBnd = bitrateBnd;
template.Video = video;
UpdateTemplateResponse.UpdateTemplate_Template.UpdateTemplate_Audio audio = new UpdateTemplateResponse.UpdateTemplate_Template.UpdateTemplate_Audio();
audio.Codec = context.StringValue("UpdateTemplate.Template.Audio.Codec");
audio.Profile = context.StringValue("UpdateTemplate.Template.Audio.Profile");
audio.Samplerate = context.StringValue("UpdateTemplate.Template.Audio.Samplerate");
audio.Bitrate = context.StringValue("UpdateTemplate.Template.Audio.Bitrate");
audio.Channels = context.StringValue("UpdateTemplate.Template.Audio.Channels");
audio.Qscale = context.StringValue("UpdateTemplate.Template.Audio.Qscale");
audio._Remove = context.StringValue("UpdateTemplate.Template.Audio.Remove");
template.Audio = audio;
UpdateTemplateResponse.UpdateTemplate_Template.UpdateTemplate_TransConfig transConfig = new UpdateTemplateResponse.UpdateTemplate_Template.UpdateTemplate_TransConfig();
transConfig.TransMode = context.StringValue("UpdateTemplate.Template.TransConfig.TransMode");
transConfig.IsCheckReso = context.StringValue("UpdateTemplate.Template.TransConfig.IsCheckReso");
transConfig.IsCheckResoFail = context.StringValue("UpdateTemplate.Template.TransConfig.IsCheckResoFail");
transConfig.IsCheckVideoBitrate = context.StringValue("UpdateTemplate.Template.TransConfig.IsCheckVideoBitrate");
transConfig.IsCheckAudioBitrate = context.StringValue("UpdateTemplate.Template.TransConfig.IsCheckAudioBitrate");
transConfig.AdjDarMethod = context.StringValue("UpdateTemplate.Template.TransConfig.AdjDarMethod");
transConfig.IsCheckVideoBitrateFail = context.StringValue("UpdateTemplate.Template.TransConfig.IsCheckVideoBitrateFail");
transConfig.IsCheckAudioBitrateFail = context.StringValue("UpdateTemplate.Template.TransConfig.IsCheckAudioBitrateFail");
template.TransConfig = transConfig;
UpdateTemplateResponse.UpdateTemplate_Template.UpdateTemplate_MuxConfig muxConfig = new UpdateTemplateResponse.UpdateTemplate_Template.UpdateTemplate_MuxConfig();
UpdateTemplateResponse.UpdateTemplate_Template.UpdateTemplate_MuxConfig.UpdateTemplate_Segment segment = new UpdateTemplateResponse.UpdateTemplate_Template.UpdateTemplate_MuxConfig.UpdateTemplate_Segment();
segment.Duration = context.StringValue("UpdateTemplate.Template.MuxConfig.Segment.Duration");
muxConfig.Segment = segment;
UpdateTemplateResponse.UpdateTemplate_Template.UpdateTemplate_MuxConfig.UpdateTemplate_Gif gif = new UpdateTemplateResponse.UpdateTemplate_Template.UpdateTemplate_MuxConfig.UpdateTemplate_Gif();
gif.Loop = context.StringValue("UpdateTemplate.Template.MuxConfig.Gif.Loop");
gif.FinalDelay = context.StringValue("UpdateTemplate.Template.MuxConfig.Gif.FinalDelay");
gif.IsCustomPalette = context.StringValue("UpdateTemplate.Template.MuxConfig.Gif.IsCustomPalette");
gif.DitherMode = context.StringValue("UpdateTemplate.Template.MuxConfig.Gif.DitherMode");
muxConfig.Gif = gif;
UpdateTemplateResponse.UpdateTemplate_Template.UpdateTemplate_MuxConfig.UpdateTemplate_Webp webp = new UpdateTemplateResponse.UpdateTemplate_Template.UpdateTemplate_MuxConfig.UpdateTemplate_Webp();
webp.Loop = context.StringValue("UpdateTemplate.Template.MuxConfig.Webp.Loop");
muxConfig.Webp = webp;
template.MuxConfig = muxConfig;
updateTemplateResponse.Template = template;
return updateTemplateResponse;
}
}
}
| 65.661017 | 211 | 0.804853 | [
"Apache-2.0"
] | AxiosCros/aliyun-openapi-net-sdk | aliyun-net-sdk-mts/Mts/Transform/V20140618/UpdateTemplateResponseUnmarshaller.cs | 7,748 | C# |
namespace MvvmNano
{
/// <summary>
/// A simple Service Locator, which is mainly used to enable
/// Dependency Injection within the View Models, so they can
/// be built in a testable fashion.
///
/// Static and unique within the whole application. SetUp()
/// needs to be called at app startup!
/// </summary>
public static class MvvmNanoIoC
{
private static IMvvmNanoIoCAdapter _adapter;
private static IMvvmNanoIoCAdapter Adapter
{
get
{
if (_adapter == null)
{
throw new MvvmNanoException("Please Call MvvmNanoIoC.SetUp() first, before using MvvmNanoIoC.");
}
return _adapter;
}
}
/// <summary>
/// Provides the IoC Container implementation, for example MvvmNano.Ninject
/// </summary>
public static void SetUp(IMvvmNanoIoCAdapter adapter)
{
_adapter = adapter;
}
/// <summary>
/// Registers an Interface and the Implementation type which should be used
/// at runtime for this Interface when Resolve() is being called.
/// </summary>
public static void Register<TInterface, TImplementation>()
where TImplementation : TInterface
{
Adapter.Register<TInterface, TImplementation>();
}
/// <summary>
/// Registers an Interface and the Implementation type which should be used
/// at runtime for this Interface when Resolve() is being called.
/// </summary>
public static void RegisterAsSingleton<TInterface, TImplementation>()
where TImplementation : TInterface
{
Adapter.RegisterAsSingleton<TInterface, TImplementation>();
}
/// <summary>
/// Registers and Interface and a concrete instance implementing this
/// interface, so the instance is not created when resolving the Interface
/// but it is passed this concrete instance back.
/// </summary>
public static void RegisterAsSingleton<TInterface>(TInterface instance)
{
Adapter.RegisterAsSingleton(instance);
}
/// <summary>
/// Resolves the implemenation of the Interface, if properly registered before.
/// </summary>
public static TInterface Resolve<TInterface>()
{
return Adapter.Resolve<TInterface>();
}
}
}
| 33.276316 | 116 | 0.590747 | [
"MIT"
] | 69grad/mvvm-nano | src/MvvmNano.Core/MvvmNanoIoC.cs | 2,531 | C# |
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class GameplayController : MonoBehaviour {
[SerializeField]
private GameObject pausePanel;
[SerializeField]
private Button resumeGame;
public void PauseGame() {
Time.timeScale = 0f;
pausePanel.SetActive (true);
resumeGame.onClick.RemoveAllListeners ();
resumeGame.onClick.AddListener (() => ResumeGame());
}
public void ResumeGame() {
Time.timeScale = 1f;
pausePanel.SetActive (false);
}
public void GoToMenu() {
Time.timeScale = 1f;
Application.LoadLevel ("MainMenu");
}
public void RestartGame() {
Time.timeScale = 1f;
Application.LoadLevel ("Gameplay");
}
public void PlayerDied() {
Time.timeScale = 0f;
pausePanel.SetActive (true);
resumeGame.onClick.RemoveAllListeners ();
resumeGame.onClick.AddListener (() => RestartGame ());
}
} // GameplayController
| 9.863158 | 56 | 0.683031 | [
"Apache-2.0"
] | DavePool/MexicoOriginsLevel2 | Assets/Scripts/Game Controllers/Gameplay controller/GameplayController.cs | 939 | C# |
namespace Eshop.Data.Models
{
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using BaseModels;
public class Cart : BaseModel
{
private ICollection<CartItem> cartItems;
public Cart()
{
this.cartItems = new HashSet<CartItem>();
}
[Key, ForeignKey("User")]
public string UserId { get; set; }
public virtual User User { get; set; }
public virtual ICollection<CartItem> CartItems
{
get { return this.cartItems; }
set { this.cartItems = value; }
}
}
}
| 23.448276 | 55 | 0.597059 | [
"Apache-2.0"
] | siderisltd/ShopRepo | Eshop/Data/Eshop.Data.Models/Cart.cs | 682 | C# |
namespace VisuMap.DataModeling {
partial class PromptInput {
/// <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.button1 = new System.Windows.Forms.Button();
this.btnOK = new System.Windows.Forms.Button();
this.inputTextBox = new System.Windows.Forms.TextBox();
this.msgLabel = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(130, 49);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(48, 32);
this.button1.TabIndex = 7;
this.button1.Text = "&Cancel";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// btnOK
//
this.btnOK.Location = new System.Drawing.Point(49, 49);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(48, 32);
this.btnOK.TabIndex = 6;
this.btnOK.Text = "&OK";
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// inputTextBox
//
this.inputTextBox.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.inputTextBox.BackColor = System.Drawing.SystemColors.GradientInactiveCaption;
this.inputTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.inputTextBox.Location = new System.Drawing.Point(12, 30);
this.inputTextBox.Name = "inputTextBox";
this.inputTextBox.Size = new System.Drawing.Size(300, 13);
this.inputTextBox.TabIndex = 5;
//
// msgLabel
//
this.msgLabel.BackColor = System.Drawing.SystemColors.Control;
this.msgLabel.Location = new System.Drawing.Point(12, 11);
this.msgLabel.Name = "msgLabel";
this.msgLabel.Size = new System.Drawing.Size(209, 16);
this.msgLabel.TabIndex = 4;
this.msgLabel.Text = "label";
//
// PromptInput
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(324, 91);
this.Controls.Add(this.button1);
this.Controls.Add(this.btnOK);
this.Controls.Add(this.inputTextBox);
this.Controls.Add(this.msgLabel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
this.Name = "PromptInput";
this.Text = "MessagePrompt";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.TextBox inputTextBox;
private System.Windows.Forms.Label msgLabel;
}
} | 42.736842 | 161 | 0.581527 | [
"MIT"
] | VisuMap/OpenVisuMap | DataModeling/PromptInput.Designer.cs | 4,062 | 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 appflow-2020-08-23.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.Appflow.Model
{
/// <summary>
/// The connector metadata specific to Slack.
/// </summary>
public partial class SlackMetadata
{
private List<string> _oAuthScopes = new List<string>();
/// <summary>
/// Gets and sets the property OAuthScopes.
/// <para>
/// The desired authorization scope for the Slack account.
/// </para>
/// </summary>
public List<string> OAuthScopes
{
get { return this._oAuthScopes; }
set { this._oAuthScopes = value; }
}
// Check to see if OAuthScopes property is set
internal bool IsSetOAuthScopes()
{
return this._oAuthScopes != null && this._oAuthScopes.Count > 0;
}
}
} | 30.333333 | 106 | 0.632736 | [
"Apache-2.0"
] | philasmar/aws-sdk-net | sdk/src/Services/Appflow/Generated/Model/SlackMetadata.cs | 1,729 | C# |
// namespace Trudograd.NuclearEdition
// {
// internal sealed class InventoryItem
// {
// public Item Item { get; }
// public Inventory Inventory { get; }
//
// public InventoryItem(Inventory inventory, Item item)
// {
// Inventory = inventory;
// Item = item;
// }
// }
// } | 25.142857 | 63 | 0.508523 | [
"MIT"
] | Albeoris/Trudograd.NuclearEdition | Trudograd.NuclearEdition/HUD/BarterHUD/PartyItems/InventoryItem.cs | 354 | C# |
using Verse;
using Verse.Sound;
using RimWorld;
using AbilityUser;
using System;
using System.Linq;
using System.Collections.Generic;
using UnityEngine;
namespace TorannMagic
{
[StaticConstructorOnStartup]
public class Projectile_LightLance : Projectile_AbilityBase
{
private bool initialized = false;
private int verVal = 0;
private int pwrVal = 0;
public int burnTime = 200;
private int age = -1;
private float arcaneDmg = 1;
private float lightPotency = .5f;
IntVec3 launchPosition;
Pawn caster;
ColorInt colorInt = new ColorInt(255, 255, 140);
private Sustainer sustainer;
private float angle = 0;
private float radius = 1;
private static readonly Material BeamMat = MaterialPool.MatFrom("Other/OrbitalBeam", ShaderDatabase.MoteGlow, MapMaterialRenderQueues.OrbitalBeam);
private static readonly Material BeamEndMat = MaterialPool.MatFrom("Other/OrbitalBeamEnd", ShaderDatabase.MoteGlow, MapMaterialRenderQueues.OrbitalBeam);
private static readonly MaterialPropertyBlock MatPropertyBlock = new MaterialPropertyBlock();
Vector3 lanceAngle;
Vector3 lanceAngleInv;
Vector3 drawPosStart;
Vector3 drawPosEnd;
float lanceLength;
Vector3 lanceVector;
Vector3 lanceVectorInv;
public override void ExposeData()
{
base.ExposeData();
//Scribe_Values.Look<bool>(ref this.initialized, "initialized", false, false);
Scribe_Values.Look<int>(ref this.age, "age", -1, false);
Scribe_Values.Look<int>(ref this.verVal, "verVal", 0, false);
Scribe_Values.Look<int>(ref this.pwrVal, "pwrVal", 0, false);
Scribe_Values.Look<int>(ref this.burnTime, "burntime", 200, false);
Scribe_Values.Look<float>(ref this.arcaneDmg, "arcaneDmg", 1, false);
Scribe_Values.Look<float>(ref this.lightPotency, "lightPotency", .5f, false);
}
private int TicksLeft
{
get
{
return this.burnTime - this.age;
}
}
private void Initialize()
{
caster = this.launcher as Pawn;
this.launchPosition = caster.Position;
CompAbilityUserMagic comp = caster.GetComp<CompAbilityUserMagic>();
//pwrVal = TM_Calc.GetMagicSkillLevel(caster, comp.MagicData.MagicPowerSkill_LightLance, "TM_LightLance", "_pwr", true);
//verVal = TM_Calc.GetMagicSkillLevel(caster, comp.MagicData.MagicPowerSkill_LightLance, "TM_LightLance", "_ver", true);
pwrVal = TM_Calc.GetSkillPowerLevel(caster, TorannMagicDefOf.TM_LightLance);
verVal = TM_Calc.GetSkillVersatilityLevel(caster, TorannMagicDefOf.TM_LightLance);
this.arcaneDmg = comp.arcaneDmg;
if (caster.health.hediffSet.HasHediff(TorannMagicDefOf.TM_LightCapacitanceHD))
{
HediffComp_LightCapacitance hd = caster.health.hediffSet.GetFirstHediffOfDef(TorannMagicDefOf.TM_LightCapacitanceHD).TryGetComp<HediffComp_LightCapacitance>();
this.lightPotency = hd.LightPotency;
}
this.radius = Mathf.Clamp(1.8f + (.25f * verVal) * lightPotency, 1f, 3f);
this.angle = (Quaternion.AngleAxis(90, Vector3.up) * TM_Calc.GetVector(caster.Position, base.Position)).ToAngleFlat();
this.CheckSpawnSustainer();
this.burnTime += (pwrVal * 22);
lanceAngle = Vector3Utility.FromAngleFlat(this.angle - 90); //angle of beam
lanceAngleInv = Vector3Utility.FromAngleFlat(this.angle + 90); //opposite angle of beam
drawPosStart = this.launchPosition.ToVector3Shifted() + lanceAngle; //this.parent.DrawPos;
drawPosEnd = base.Position.ToVector3Shifted() + lanceAngleInv;
lanceLength = (drawPosEnd - drawPosStart).magnitude;
lanceVector = drawPosStart + (lanceAngle * lanceLength * 0.5f);
lanceVectorInv = drawPosEnd + (lanceAngleInv * lanceLength * .5f); //draw for double beam
lanceVector.y = Altitudes.AltitudeFor(AltitudeLayer.MetaOverlays); //graphic depth
}
private void CheckSpawnSustainer()
{
if (this.TicksLeft >= 0)
{
LongEventHandler.ExecuteWhenFinished(delegate
{
this.sustainer = SoundDef.Named("OrbitalBeam").TrySpawnSustainer(SoundInfo.InMap(this.selectedTarget, MaintenanceType.PerTick));
});
}
}
protected override void Impact(Thing hitThing)
{
this.Destroy(DestroyMode.Vanish);
if (!this.initialized)
{
Initialize();
this.initialized = true;
}
if (this.sustainer != null)
{
this.sustainer.info.volumeFactor = 1;
this.sustainer.Maintain();
if (this.TicksLeft <= 0)
{
this.sustainer.End();
this.sustainer = null;
}
}
}
public override void Draw()
{
DrawLance(launchPosition);
}
public void DrawLance(IntVec3 launcherPos)
{
float lanceWidth = this.radius; //
if(this.age < (this.burnTime * .165f))
{
lanceWidth *= (float)this.age / 40f;
}
if(this.age > (this.burnTime * .835f))
{
lanceWidth *= (float)(this.burnTime - this.age) / 40f;
}
lanceWidth *= Rand.Range(.9f, 1.1f);
Matrix4x4 matrix = default(Matrix4x4);
matrix.SetTRS(lanceVector, Quaternion.Euler(0f, this.angle, 0f), new Vector3(lanceWidth, 1f, lanceLength)); //drawer for beam
Graphics.DrawMesh(MeshPool.plane10, matrix, Projectile_LightLance.BeamMat, 0, null, 0, Projectile_LightLance.MatPropertyBlock);
Matrix4x4 matrix2 = default(Matrix4x4);
matrix2.SetTRS(drawPosStart - (.5f*lanceAngle*lanceWidth), Quaternion.Euler(0f, this.angle, 0f), new Vector3(lanceWidth, 1f, lanceWidth)); //drawer for beam start
Graphics.DrawMesh(MeshPool.plane10, matrix2, Projectile_LightLance.BeamEndMat, 0, null, 0, Projectile_LightLance.MatPropertyBlock);
drawPosEnd.y = Altitudes.AltitudeFor(AltitudeLayer.MetaOverlays);
Matrix4x4 matrix4 = default(Matrix4x4);
matrix4.SetTRS(drawPosEnd - (.5f*lanceAngleInv*lanceWidth), Quaternion.Euler(0f, this.angle - 180, 0f), new Vector3(lanceWidth, 1f, lanceWidth)); //drawer for beam end
Graphics.DrawMesh(MeshPool.plane10, matrix4, Projectile_LightLance.BeamEndMat, 0, null, 0, Projectile_LightLance.MatPropertyBlock);
}
public override void Tick()
{
base.Tick();
this.age++;
if (this.age < (this.burnTime * .9f))
{
if (Find.TickManager.TicksGame % 5 == 0)
{
TM_MoteMaker.ThrowGenericMote(TorannMagicDefOf.Mote_Heat, this.launchPosition.ToVector3Shifted(), this.Map, Rand.Range(.6f, 1.1f), .4f, .1f, .3f, Rand.Range(-200, 200), Rand.Range(5f, 9f), this.angle + Rand.Range(-15f, 15f), Rand.Range(0, 360));
}
}
}
public override void Destroy(DestroyMode mode = DestroyMode.Vanish)
{
bool flag = this.age <= this.burnTime;
if (!flag)
{
base.Destroy(mode);
}
}
}
}
| 43.607735 | 265 | 0.593057 | [
"BSD-3-Clause"
] | Sn1p3rr3c0n/RWoM | RimWorldOfMagic/RimWorldOfMagic/Projectile_LightLance.cs | 7,895 | C# |
using PokemonUnity;
//using PokemonUnity.Pokemon;
using PokemonUnity.Inventory;
//using PokemonUnity.Attack;
using PokemonUnity.Battle;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace PokemonUnity.Battle
{
public partial class Battle
{
/// <summary>
/// Success state (used for Battle Arena)
/// </summary>
public class SuccessState
{
/// <summary>
/// Type effectiveness
/// </summary>
public int TypeMod { get; set; }
/// <summary>
/// null - not used, 0 - failed, 1 - succeeded
/// </summary>
/// instead of an int or enum
/// 0 - not used, 1 - failed, 2 - succeeded
public bool? UseState { get; set; }
public bool Protected { get; set; }
public int Skill { get; private set; }
public SuccessState()
{
Clear();
}
public void Clear()
{
TypeMod = 4;
UseState = null;
Protected = false;
Skill = 0;
}
public void UpdateSkill()
{
if (!UseState.Value && !Protected)
Skill -= 2;
else if (UseState.Value)
{
if (TypeMod > 4)
Skill += 2; // "Super effective"
else if (TypeMod >= 1 && TypeMod < 4)
Skill -= 1; // "Not very effective"
else if (TypeMod == 0)
Skill -= 2; // Ineffective
else
Skill += 1;
}
TypeMod = 4;
UseState = false;
Protected = false;
}
}
}
} | 20.641791 | 49 | 0.589299 | [
"BSD-3-Clause"
] | AriesPlaysNation/PokemonUnity | PokemonUnity.Shared/InBattle/Battle/SuccessState.cs | 1,385 | C# |
using Foundation;
using UIKit;
namespace MobileBle.iOS
{
// The UIApplicationDelegate for the application. This class is responsible for launching the
// User Interface of the application, as well as listening (and optionally responding) to
// application events from iOS.
[Register("AppDelegate")]
public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
{
//
// This method is invoked when the application has loaded and is ready to run. In this
// method you should instantiate the window, load the UI into it and then make the window
// visible.
//
// You have 17 seconds to return from this method, or iOS will terminate your application.
//
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
global::Xamarin.Forms.Forms.Init();
LoadApplication(new App());
return base.FinishedLaunching(app, options);
}
}
} | 38.185185 | 98 | 0.669253 | [
"Apache-2.0"
] | WildernessLabs/Meadow.Project.Samples | Source/Hackster/Bluetooth/MobileBle/MobileBle.iOS/AppDelegate.cs | 1,033 | C# |
using System;
using System.Linq;
using System.Threading;
using SFML.System;
namespace Chaser.Game
{
public class GameObject
{
public GameObject(int x, int y, int xpic, int ypic, int width, int height, bool isCollidable)
{
//position
State.X = x;
State.Y = y;
//picture x y
State.Xpic = xpic;
State.Ypic = ypic;
State.Width = width;
State.Height = height;
State.IsCollidable = isCollidable;
Id = Guid.NewGuid();
}
public GameObject()
{
Id = Guid.NewGuid();
}
public Guid Id { get; }
public GameObjectState State { get; set; } = new GameObjectState();
public Timer Timer;
public bool WillNotCollide(int x, int y)
{
var trueCount = 1;
var iterator = GameStateSingleton.Instance.State.Map.TerrainObjects.CreateIterator();
for (var item = iterator.CurrentItem; iterator.Next() != null; iterator.Next())
{
if (State.X + x > item.State.X + item.State.Width
|| State.X + x + State.Width < item.State.X
|| State.Y + y > item.State.Y + item.State.Height
|| State.Y + y + State.Height < item.State.Y) {
trueCount++;
}
}
return trueCount == GameStateSingleton.Instance.State.Map.TerrainObjects.Count;
}
public void Accept(GameObjectVisitor visitor)
{
visitor.VisitGameObject(this);
}
}
}
| 28.631579 | 101 | 0.521446 | [
"MIT"
] | Avokadas/chaser | Chaser.Game/GameObject.cs | 1,634 | C# |
using MiscUtil;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MathExtended.Matrices.Structures.CellsCollection
{
/// <summary>
/// Описывает коллекцию ячеек
/// </summary>
/// <typeparam name="T">Числовой тип</typeparam>
public class BaseCellsCollection<T> : IEnumerator<T> where T : IComparable, IFormattable, IConvertible, IComparable<T>, IEquatable<T>
{
private T[] _cells;
private int _size;
private bool disposedValue;
private int _position;
/// <summary>
/// Индексатор.По индексу возвращает или задает значение ячейки
/// </summary>
/// <param name="index">Индекс элемента</param>
/// <returns>Элемент по индексу</returns>
public virtual T this[int index]
{
get
{
return _cells[index];
}
set
{
_cells[index] = value;
}
}
/// <summary>
/// Массив ячеек
/// </summary>
protected virtual T[] Cells
{
get => _cells;
set
{
_cells = value;
}
}
/// <summary>
/// Размер коллекции
/// </summary>
public int Size
{
get => _cells.Length;
}
/// <summary>
/// Создает коллекцию с указанным размером
/// </summary>
/// <param name="size">Размер коллекции</param>
public BaseCellsCollection(int size)
{
_cells = new T[size];
}
/// <summary>
/// Создает коллекцию ячеек на основе массива
/// </summary>
/// <param name="array">Входной массив</param>
public BaseCellsCollection(T[] array)
{
_cells = array;
_size = array.Length;
}
/// <summary>
/// Применяет действие ко всем элементам
/// </summary>
/// <param name="action">Действие</param>
public virtual void ForEach(Action<T> action)
{
foreach (T cell in _cells)
{
action(cell);
}
}
/// <summary>
/// Находит максимальное число среди ячеек
/// </summary>
/// <returns>Максимальное значение в последовательности ячеек</returns>
public virtual T Max() => _cells.Max();
/// <summary>
/// Находит минимальное число среди ячеек
/// </summary>
/// <returns> Минимальное значение в последовательности ячеек</returns>
public virtual T Min() => _cells.Min();
/// <summary>
/// Проверяет нулевая ли коллекция
/// </summary>
/// <returns> <see langword="true"/> - если все ячейки равны нулю, <see langword="false"/> - если хоть одна ячейка не равна нулю </returns>
public virtual bool IsZero()
{
return _cells.All((cell) => cell == (dynamic)0);
}
#region IEnumerable
/// <summary>
/// Текуший элемент
/// </summary>
public T Current
{
get
{
return _cells[_position];
}
}
object IEnumerator.Current => Current;
/// <summary>
/// Перечислитель
/// </summary>
/// <returns>Перечислитель матрицы</returns>
public IEnumerator<T> GetEnumerator()
{
foreach (var i in _cells)
{
yield return i;
}
}
/// <summary>
/// Перемещает индексатор на одну позицию вперед
/// </summary>
/// <returns>true или false в зависимости ли можно переместить индексатор</returns>
public bool MoveNext()
{
if (_position < this.Size - 1)
{
return true;
}
else
{
return false;
}
}
/// <summary>
/// Перемещает индексатор в начало матрицы
/// </summary>
public void Reset()
{
_position = -1;
}
/// <summary>
/// Высвобождает использованные ресурсы
/// </summary>
/// <param name="disposing"></param>
protected virtual void Dispose(bool disposing)
{
if (!disposedValue)
{
if (disposing)
{
_cells = null;
}
// TODO: освободить неуправляемые ресурсы (неуправляемые объекты) и переопределить метод завершения
// TODO: установить значение NULL для больших полей
disposedValue = true;
}
}
// // TODO: переопределить метод завершения, только если "Dispose(bool disposing)" содержит код для освобождения неуправляемых ресурсов
// ~Matrix()
// {
// // Не изменяйте этот код. Разместите код очистки в методе "Dispose(bool disposing)".
// Dispose(disposing: false);
// }
/// <summary>
/// Освобождает использованные ресурсы
/// </summary>
public void Dispose()
{
// Не изменяйте этот код. Разместите код очистки в методе "Dispose(bool disposing)".
Dispose(disposing: true);
GC.SuppressFinalize(this);
}
#endregion
}
}
| 26.445498 | 147 | 0.49767 | [
"MIT"
] | Lamer0/ExtendentMath | Matrices/Structures/CellsCollections/BaseCellsCollection.cs | 6,611 | C# |
using System.Web;
using System.Web.Optimization;
namespace Exemplo_Web_API_Authentication
{
public class BundleConfig
{
// Para obter mais informações sobre o agrupamento, visite https://go.microsoft.com/fwlink/?LinkId=301862
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js"));
// Use a versão em desenvolvimento do Modernizr para desenvolver e aprender com ela. Após isso, quando você estiver
// pronto para a produção, utilize a ferramenta de build em https://modernizr.com para escolher somente os testes que precisa.
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/modernizr-*"));
bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
"~/Scripts/bootstrap.js"));
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/bootstrap.css",
"~/Content/site.css"));
}
}
}
| 41 | 138 | 0.61324 | [
"MIT"
] | RafaelFoss7/Web-API-Authentication | Exemplo-Web-API-Authentication/App_Start/BundleConfig.cs | 1,157 | C# |
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
namespace FirstTestApp.ViewModels.Account
{
public class VerifyCodeViewModel
{
[Required]
public string Provider { get; set; }
[Required]
public string Code { get; set; }
public string ReturnUrl { get; set; }
[Display(Name = "Remember this browser?")]
public bool RememberBrowser { get; set; }
[Display(Name = "Remember me?")]
public bool RememberMe { get; set; }
}
}
| 23.076923 | 50 | 0.645 | [
"MIT"
] | mikulpatel/AspNet5TestLabs | src/FirstTestApp/ViewModels/Account/VerifyCodeViewModel.cs | 602 | C# |
using Stashbox.Exceptions;
using Stashbox.Registration.Fluent;
using Stashbox.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
namespace Stashbox
{
/// <summary>
/// Represents the extension methods of <see cref="IDependencyCollectionRegistrator"/>.
/// </summary>
public static class CollectionRegistratorExtensions
{
/// <summary>
/// Registers types into the container mapped to an interface type.
/// </summary>
/// <typeparam name="TFrom">The interface type.</typeparam>
/// <param name="registrator">The registrator.</param>
/// <param name="types">Types to register.</param>
/// <param name="selector">The type selector.</param>
/// <param name="configurator">The configurator for the registered types.</param>
/// <returns>The <see cref="IStashboxContainer"/> which on this method was called.</returns>
public static IStashboxContainer RegisterTypesAs<TFrom>(this IDependencyCollectionRegistrator registrator,
IEnumerable<Type> types,
Func<Type, bool> selector = null,
Action<RegistrationConfigurator> configurator = null)
where TFrom : class =>
registrator.RegisterTypesAs(typeof(TFrom),
types,
selector,
configurator);
/// <summary>
/// Registers types into the container mapped to an interface type.
/// </summary>
/// <typeparam name="TFrom">The interface type.</typeparam>
/// <param name="registrator">The registrator.</param>
/// <param name="assembly">Assembly to register.</param>
/// <param name="selector">The type selector.</param>
/// <param name="configurator">The configurator for the registered types.</param>
/// <returns>The <see cref="IStashboxContainer"/> which on this method was called.</returns>
public static IStashboxContainer RegisterTypesAs<TFrom>(this IDependencyCollectionRegistrator registrator,
Assembly assembly,
Func<Type, bool> selector = null,
Action<RegistrationConfigurator> configurator = null)
where TFrom : class =>
registrator.RegisterTypesAs(typeof(TFrom),
assembly.CollectTypes(),
selector,
configurator);
/// <summary>
/// Registers types into the container mapped to an interface type.
/// </summary>
/// <param name="typeFrom">The interface type.</param>
/// <param name="registrator">The registrator.</param>
/// <param name="assembly">Assembly to register.</param>
/// <param name="selector">The type selector.</param>
/// <param name="configurator">The configurator for the registered types.</param>
/// <returns>The <see cref="IStashboxContainer"/> which on this method was called.</returns>
public static IStashboxContainer RegisterTypesAs(this IDependencyCollectionRegistrator registrator,
Type typeFrom,
Assembly assembly,
Func<Type, bool> selector = null,
Action<RegistrationConfigurator> configurator = null) =>
registrator.RegisterTypesAs(typeFrom,
assembly.CollectTypes(),
selector,
configurator);
/// <summary>
/// Registers the publicly visible types from an assembly into the container.
/// </summary>
/// <param name="registrator">The registrator.</param>
/// <param name="assembly">The assembly holding the types to register.</param>
/// <param name="selector">The type selector.</param>
/// <param name="serviceTypeSelector">The service type selector. Used to filter the service types the actual type bound to.</param>
/// <param name="registerSelf">If it's true the types will be registered to their own type too.</param>
/// <param name="configurator">The configurator for the registered types.</param>
/// <returns>The <see cref="IStashboxContainer"/> which on this method was called.</returns>
public static IStashboxContainer RegisterAssembly(this IDependencyCollectionRegistrator registrator,
Assembly assembly,
Func<Type, bool> selector = null,
Func<Type, Type, bool> serviceTypeSelector = null,
bool registerSelf = true,
Action<RegistrationConfigurator> configurator = null) =>
registrator.RegisterTypes(assembly.CollectTypes(),
selector,
serviceTypeSelector,
registerSelf,
configurator);
/// <summary>
/// Registers the publicly visible types from an assembly collection into the container.
/// </summary>
/// <param name="registrator">The registrator.</param>
/// <param name="assemblies">The assemblies holding the types to register.</param>
/// <param name="selector">The type selector.</param>
/// <param name="serviceTypeSelector">The service type selector. Used to filter the service types the actual type bound to.</param>
/// <param name="registerSelf">If it's true the types will be registered to their own type too.</param>
/// <param name="configurator">The configurator for the registered types.</param>
/// <returns>The <see cref="IStashboxContainer"/> which on this method was called.</returns>
public static IStashboxContainer RegisterAssemblies(this IDependencyCollectionRegistrator registrator,
IEnumerable<Assembly> assemblies,
Func<Type, bool> selector = null,
Func<Type, Type, bool> serviceTypeSelector = null,
bool registerSelf = true,
Action<RegistrationConfigurator> configurator = null)
{
Shield.EnsureNotNull(assemblies, nameof(assemblies));
foreach (var assembly in assemblies)
registrator.RegisterAssembly(assembly,
selector,
serviceTypeSelector,
registerSelf,
configurator);
return (IStashboxContainer)registrator;
}
/// <summary>
/// Registers the publicly visible types from an assembly which contains a given type into the container.
/// </summary>
/// <typeparam name="TFrom">The type the assembly contains.</typeparam>
/// <param name="registrator">The registrator.</param>
/// <param name="selector">The type selector.</param>
/// <param name="serviceTypeSelector">The service type selector. Used to filter the service types the actual type bound to.</param>
/// <param name="registerSelf">If it's true the types will be registered to their own type too.</param>
/// <param name="configurator">The configurator for the registered types.</param>
/// <returns>The <see cref="IStashboxContainer"/> which on this method was called.</returns>
public static IStashboxContainer RegisterAssemblyContaining<TFrom>(this IDependencyCollectionRegistrator registrator,
Func<Type, bool> selector = null,
Func<Type, Type, bool> serviceTypeSelector = null,
bool registerSelf = true,
Action<RegistrationConfigurator> configurator = null)
where TFrom : class =>
registrator.RegisterAssemblyContaining(typeof(TFrom),
selector,
serviceTypeSelector,
registerSelf,
configurator);
/// <summary>
/// Registers the publicly visible types from an assembly which contains a given type into the container.
/// </summary>
/// <param name="registrator">The registrator.</param>
/// <param name="typeFrom">The type the assembly contains.</param>
/// <param name="selector">The type selector.</param>
/// <param name="serviceTypeSelector">The service type selector. Used to filter the service types the actual type bound to.</param>
/// <param name="registerSelf">If it's true the types will be registered to their own type too.</param>
/// <param name="configurator">The configurator for the registered types.</param>
/// <returns>The <see cref="IStashboxContainer"/> which on this method was called.</returns>
public static IStashboxContainer RegisterAssemblyContaining(this IDependencyCollectionRegistrator registrator,
Type typeFrom,
Func<Type, bool> selector = null,
Func<Type, Type, bool> serviceTypeSelector = null,
bool registerSelf = true,
Action<RegistrationConfigurator> configurator = null) =>
registrator.RegisterAssembly(typeFrom.GetTypeInfo().Assembly,
selector,
serviceTypeSelector,
registerSelf,
configurator);
/// <summary>
/// Searches the given assemblies for <see cref="ICompositionRoot"/> implementations and invokes their <see cref="ICompositionRoot.Compose"/> method.
/// </summary>
/// <param name="registrator">The registrator.</param>
/// <param name="assemblies">The assemblies to scan.</param>
/// <param name="selector">The type selector.</param>
/// <returns>The <see cref="IStashboxContainer"/> which on this method was called.</returns>
public static IStashboxContainer ComposeAssemblies(this IDependencyCollectionRegistrator registrator,
IEnumerable<Assembly> assemblies,
Func<Type, bool> selector = null)
{
Shield.EnsureNotNull(assemblies, nameof(assemblies));
foreach (var assembly in assemblies)
registrator.ComposeAssembly(assembly, selector);
return (IStashboxContainer)registrator;
}
/// <summary>
/// Composes services by calling the <see cref="ICompositionRoot.Compose"/> method of the given type parameter.
/// </summary>
/// <typeparam name="TCompositionRoot">The type of an <see cref="ICompositionRoot"/> implementation.</typeparam>
/// <param name="registrator">The registrator.</param>
/// <param name="compositionRootArguments">Optional composition root constructor arguments.</param>
/// <returns>The <see cref="IStashboxContainer"/> which on this method was called.</returns>
public static IStashboxContainer ComposeBy<TCompositionRoot>(this IDependencyCollectionRegistrator registrator,
params object[] compositionRootArguments)
where TCompositionRoot : class, ICompositionRoot =>
registrator.ComposeBy(typeof(TCompositionRoot), compositionRootArguments);
/// <summary>
/// Searches the given assembly for <see cref="ICompositionRoot"/> implementations and invokes their <see cref="ICompositionRoot.Compose"/> method.
/// </summary>
/// <param name="registrator">The registrator.</param>
/// <param name="assembly">The assembly to scan.</param>
/// <param name="selector">The type selector.</param>
/// <returns>The <see cref="IStashboxContainer"/> which on this method was called.</returns>
public static IStashboxContainer ComposeAssembly(this IDependencyCollectionRegistrator registrator,
Assembly assembly,
Func<Type, bool> selector = null)
{
Shield.EnsureNotNull(assembly, nameof(assembly));
var types = selector == null ? assembly.CollectTypes() : assembly.CollectTypes().Where(selector);
var compositionRootTypes = types.Where(type => type.IsResolvableType() && type.IsCompositionRoot());
if (!compositionRootTypes.Any())
throw new CompositionRootNotFoundException(assembly);
foreach (var compositionRootType in compositionRootTypes)
registrator.ComposeBy(compositionRootType);
return (IStashboxContainer)registrator;
}
}
}
| 53.99115 | 157 | 0.641698 | [
"MIT"
] | mgth/stashbox | src/Registration/Extensions/CollectionRegistratorExtensions.cs | 12,204 | C# |
#if CREOBIT_BACKEND_APPSTORE && CREOBIT_BACKEND_UNITY && (UNITY_STANDALONE_OSX || UNITY_IOS)
using UnityEngine.Purchasing;
namespace Creobit.Backend.Store
{
public interface IAppStoreStore : IUnityStore
{
#region IAppStoreStore
IAppleExtensions AppleExtensions
{
get;
}
#endregion
}
}
#endif
| 18.947368 | 93 | 0.661111 | [
"MIT"
] | Creobit-Ltd/Creobit.Backend | AppStore/Scripts/Store/IAppStoreStore.cs | 362 | C# |
/*
* Copyright 2010-2014 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 codepipeline-2015-07-09.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.CodePipeline.Model
{
/// <summary>
/// The stage has failed in a later run of the pipeline and the pipelineExecutionId associated
/// with the request is out of date.
/// </summary>
#if !NETSTANDARD
[Serializable]
#endif
public partial class NotLatestPipelineExecutionException : AmazonCodePipelineException
{
/// <summary>
/// Constructs a new NotLatestPipelineExecutionException with the specified error
/// message.
/// </summary>
/// <param name="message">
/// Describes the error encountered.
/// </param>
public NotLatestPipelineExecutionException(string message)
: base(message) {}
/// <summary>
/// Construct instance of NotLatestPipelineExecutionException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
public NotLatestPipelineExecutionException(string message, Exception innerException)
: base(message, innerException) {}
/// <summary>
/// Construct instance of NotLatestPipelineExecutionException
/// </summary>
/// <param name="innerException"></param>
public NotLatestPipelineExecutionException(Exception innerException)
: base(innerException) {}
/// <summary>
/// Construct instance of NotLatestPipelineExecutionException
/// </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 NotLatestPipelineExecutionException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, innerException, errorType, errorCode, requestId, statusCode) {}
/// <summary>
/// Construct instance of NotLatestPipelineExecutionException
/// </summary>
/// <param name="message"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public NotLatestPipelineExecutionException(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 NotLatestPipelineExecutionException 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 NotLatestPipelineExecutionException(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
}
} | 48.584 | 178 | 0.688786 | [
"Apache-2.0"
] | DetlefGolze/aws-sdk-net | sdk/src/Services/CodePipeline/Generated/Model/NotLatestPipelineExecutionException.cs | 6,073 | C# |
namespace server.Exception
{
using System;
public class NotFoundException : Exception
{
}
} | 13.444444 | 46 | 0.595041 | [
"MIT"
] | supermitsuba/NotesJS | server/Exception/NotFoundException.cs | 121 | C# |
using Bridge;
namespace Bridge.Html5
{
/// <summary>
/// The word-wrap CSS property is used to specify whether or not the browser may break lines within words in order to prevent overflow (in other words, force wrapping) when an otherwise unbreakable string is too long to fit in its containing box.
/// </summary>
[Ignore]
[Enum(Emit.StringNameLowerCase)]
[Name("String")]
public enum OverflowWrap
{
/// <summary>
///
/// </summary>
Inherit,
/// <summary>
/// Indicates that lines may only break at normal word break points.
/// </summary>
Normal,
/// <summary>
/// Indicates that normally unbreakable words may be broken at arbitrary points if there are no otherwise acceptable break points in the line.
/// </summary>
[Name("break-word")]
BreakWord
}
}
| 30 | 250 | 0.613333 | [
"Apache-2.0"
] | corefan/Bridge | Html5/CSS/OverflowWrap.cs | 902 | C# |
using ParentLoadSoftDelete.Business;
namespace ParentLoadSoftDelete.Business.ERLevel
{
public partial class E05Level111ReChild
{
#region Pseudo Event Handlers
//partial void OnCreate(DataPortalHookArgs args)
//{
// throw new System.Exception("The method or operation is not implemented.");
//}
//partial void OnDeletePre(DataPortalHookArgs args)
//{
// throw new System.Exception("The method or operation is not implemented.");
//}
//partial void OnDeletePost(DataPortalHookArgs args)
//{
// throw new System.Exception("The method or operation is not implemented.");
//}
//partial void OnFetchPre(DataPortalHookArgs args)
//{
// throw new System.Exception("The method or operation is not implemented.");
//}
//partial void OnFetchPost(DataPortalHookArgs args)
//{
// throw new System.Exception("The method or operation is not implemented.");
//}
//partial void OnFetchRead(DataPortalHookArgs args)
//{
// throw new System.Exception("The method or operation is not implemented.");
//}
//partial void OnUpdatePre(DataPortalHookArgs args)
//{
// throw new System.Exception("The method or operation is not implemented.");
//}
//partial void OnUpdatePost(DataPortalHookArgs args)
//{
// throw new System.Exception("The method or operation is not implemented.");
//}
//partial void OnInsertPre(DataPortalHookArgs args)
//{
// throw new System.Exception("The method or operation is not implemented.");
//}
//partial void OnInsertPost(DataPortalHookArgs args)
//{
// throw new System.Exception("The method or operation is not implemented.");
//}
#endregion
}
}
| 31.375 | 89 | 0.585657 | [
"MIT"
] | CslaGenFork/CslaGenFork | tags/DeepLoad sample v.1.0.0/ParentLoadSoftDelete.Business/ERLevel/E05Level111ReChild.cs | 2,008 | C# |
using System;
namespace GameWarriors.DependencyInjection.Extensions
{
public static class ServiceProviderExtension
{
public static T GetService<T>(this IServiceProvider serviceProvider) where T : class
{
// Debug.Log(serviceProvider);
return serviceProvider.GetService(typeof(T)) as T;
}
}
} | 25.142857 | 92 | 0.670455 | [
"MIT"
] | Game-Warriors/DependencyInjection-Unity3d | Runtime/Extension/ServiceProviderExtension.cs | 352 | C# |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.