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 |
|---|---|---|---|---|---|---|---|---|
#if HAS_SPAN
#nullable enable
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
namespace NBitcoin.Secp256k1.Musig
{
#if SECP256K1_LIB
public
#endif
class MusigPrivNonce : IDisposable
{
readonly static RandomNumberGenerator rand = new RNGCryptoServiceProvider();
/// <summary>
/// This function derives a secret nonce that will be required for signing and
/// creates a private nonce whose public part intended to be sent to other signers.
/// </summary>
/// <param name="context">The context</param>
/// <param name="sessionId32">A unique session_id32. It is a "number used once". If empty, it will be randomly generated.</param>
/// <param name="signingKey">Provide the message to be signed to increase misuse-resistance. If you do provide a signingKey, sessionId32 can instead be a counter (that must never repeat!). However, it is recommended to always choose session_id32 uniformly at random. Can be null.</param>
/// <param name="msg32">Provide the message to be signed to increase misuse-resistance. Can be empty.</param>
/// <param name="combinedKey">Provide the message to be signed to increase misuse-resistance. Can be null.</param>
/// <param name="extraInput32">Provide the message to be signed to increase misuse-resistance. The extra_input32 argument can be used to provide additional data that does not repeat in normal scenarios, such as the current time. Can be empty.</param>
/// <returns>A private nonce whose public part intended to be sent to other signers</returns>
public static MusigPrivNonce GenerateMusigNonce(
Context? context,
ReadOnlySpan<byte> sessionId32,
ECPrivKey? signingKey,
ReadOnlySpan<byte> msg32,
ECXOnlyPubKey? combinedKey,
ReadOnlySpan<byte> extraInput32)
{
if (!(sessionId32.Length is 32) && !(sessionId32.Length is 0))
throw new ArgumentException(nameof(sessionId32), "sessionId32 must be 32 bytes or 0 bytes");
if (sessionId32.Length is 0)
{
var bytes = new byte[32];
sessionId32 = bytes.AsSpan();
rand.GetBytes(bytes);
}
if (!(msg32.Length is 32) && !(msg32.Length is 0))
throw new ArgumentException(nameof(msg32), "msg32 must be 32 bytes or 0 bytes");
if (!(extraInput32.Length is 32) && !(extraInput32.Length is 0))
throw new ArgumentException(nameof(extraInput32), "extraInput32 must be 32 bytes or 0 bytes");
Span<byte> key32 = stackalloc byte[32];
if (signingKey is null)
{
key32 = key32.Slice(0, 0);
}
else
{
signingKey.WriteToSpan(key32);
}
Span<byte> combined_pk = stackalloc byte[32];
if (combinedKey is null)
{
combined_pk = combined_pk.Slice(0, 0);
}
else
{
combinedKey.WriteToSpan(combined_pk);
}
var k = new Scalar[2];
secp256k1_nonce_function_musig(k, sessionId32, key32, msg32, combined_pk, extraInput32);
return new MusigPrivNonce(new ECPrivKey(k[0], context, true), new ECPrivKey(k[1], context, true));
}
static void secp256k1_nonce_function_musig(Span<Scalar> k, ReadOnlySpan<byte> session_id, ReadOnlySpan<byte> key32, ReadOnlySpan<byte> msg32, ReadOnlySpan<byte> combined_pk, ReadOnlySpan<byte> extra_input32)
{
using SHA256 sha = new SHA256();
Span<byte> seed = stackalloc byte[32];
Span<byte> i = stackalloc byte[1];
/* TODO: this doesn't have the same sidechannel resistance as the BIP340
* nonce function because the seckey feeds directly into SHA. */
sha.InitializeTagged("MuSig/nonce");
sha.Write(session_id.Slice(0, 32));
Span<byte> marker = stackalloc byte[1];
if (key32.Length is 32)
{
marker[0] = 1;
sha.Write(marker);
sha.Write(key32);
}
else
{
marker[0] = 0;
sha.Write(marker);
}
if (combined_pk.Length is 32)
{
marker[0] = 1;
sha.Write(marker);
sha.Write(combined_pk);
}
else
{
marker[0] = 0;
sha.Write(marker);
}
if (msg32.Length is 32)
{
marker[0] = 1;
sha.Write(marker);
sha.Write(msg32);
}
else
{
marker[0] = 0;
sha.Write(marker);
}
if (extra_input32.Length is 32)
{
marker[0] = 1;
sha.Write(marker);
sha.Write(extra_input32);
}
else
{
marker[0] = 0;
sha.Write(marker);
}
sha.GetHash(seed);
Span<byte> buf = stackalloc byte[32];
for (i[0] = 0; i[0] < 2; i[0]++)
{
sha.Initialize();
sha.Write(seed);
sha.Write(i);
sha.GetHash(buf);
k[i[0]] = new Scalar(buf);
}
}
private readonly ECPrivKey k1;
private readonly ECPrivKey k2;
public ECPrivKey K1 => k1;
public ECPrivKey K2 => k2;
bool _IsUsed;
public bool IsUsed
{
get
{
return _IsUsed;
}
internal set
{
_IsUsed = value;
}
}
MusigPrivNonce(ECPrivKey k1, ECPrivKey k2)
{
this.k1 = k1;
this.k2 = k2;
}
public void Dispose()
{
k1.Dispose();
k2.Dispose();
}
public MusigPubNonce CreatePubNonce()
{
return new MusigPubNonce(k1.CreatePubKey(), k2.CreatePubKey());
}
}
}
#endif
| 26.137755 | 289 | 0.668163 | [
"MIT"
] | MetacoSA/NBitcoin | NBitcoin/Secp256k1/Musig/MusigPrivNonce.cs | 5,125 | C# |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Общие сведения об этой сборке предоставляются следующим набором
// набора атрибутов. Измените значения этих атрибутов, чтобы изменить сведения,
// связанные со сборкой.
[assembly: AssemblyTitle("KeyboardCube")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("KeyboardCube")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми
// для компонентов COM. Если необходимо обратиться к типу в этой сборке через
// COM, задайте атрибуту ComVisible значение TRUE для этого типа.
[assembly: ComVisible(false)]
// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM
[assembly: Guid("58d8c96c-ef74-4769-ae36-4c4dac82f37a")]
// Сведения о версии сборки состоят из следующих четырех значений:
//
// Основной номер версии
// Дополнительный номер версии
// Номер сборки
// Редакция
//
// Можно задать все значения или принять номер сборки и номер редакции по умолчанию.
// используя "*", как показано ниже:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
| 38.567568 | 99 | 0.76384 | [
"MIT"
] | KartaviK/keyboard-cube | KeyboardCube/Properties/AssemblyInfo.cs | 2,007 | C# |
using System.Collections.Generic;
using Dfc.CourseDirectory.Core.DataStore.Sql.Models;
using Dfc.CourseDirectory.FindAnApprenticeshipApi.Helper;
namespace Dfc.CourseDirectory.FindAnApprenticeshipApi.Models
{
public class ApprenticeshipLocationSameAddress : EqualityComparer<ApprenticeshipLocation>
{
public override bool Equals(ApprenticeshipLocation alpha, ApprenticeshipLocation beta)
{
if (alpha == null && beta == null)
return true;
else if (alpha == null || beta == null)
return false;
return alpha.ToAddressHash() == beta.ToAddressHash();
}
public override int GetHashCode(ApprenticeshipLocation app)
{
var stringToHash = app.ToAddressHash();
return stringToHash;
}
}
}
| 32 | 94 | 0.657452 | [
"MIT"
] | SkillsFundingAgency/dfc-coursedirectory | src/Dfc.CourseDirectory.FindAnApprenticeshipApi/Models/ApprenticeshipLocation.cs | 834 | C# |
using FluentAssertions;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using System.Data;
using System.Reflection;
namespace Enclave.FastPacket.Generator.Tests.Helpers;
internal static class CompilationVerifier
{
public static Task Verify(string source)
{
var compilation = Create(source);
var generator = new PacketParserGenerator();
GeneratorDriver driver = CSharpGeneratorDriver.Create(generator);
// Once through for the generated code diagnostics, where we update the compilation.
driver = driver.RunGeneratorsAndUpdateCompilation(compilation, out var newCompilation, out var newDiagnostics);
return Verifier.Verify(driver)
.UseDirectory(Path.Combine(AttributeReader.GetProjectDirectory(), "Snapshots"));
}
private static Compilation Create(string source)
=> CSharpCompilation.Create("compilation",
new[] { CSharpSyntaxTree.ParseText(source) },
new[] {
MetadataReference.CreateFromFile(typeof(Binder).GetTypeInfo().Assembly.Location),
},
new CSharpCompilationOptions(OutputKind.ConsoleApplication));
}
| 35.235294 | 119 | 0.707012 | [
"MPL-2.0"
] | enclave-networks/Enclave.FastPacket | tests/Enclave.FastPacket.Generator.Tests/Helpers/CompilationVerifier.cs | 1,200 | C# |
// Copyright (c) 2011-2020 Roland Pheasant. All rights reserved.
// Roland Pheasant licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
// ReSharper disable CheckNamespace
namespace DynamicData;
/// <summary>
/// A grouped change set.
/// </summary>
/// <typeparam name="TObject">The source object type.</typeparam>
/// <typeparam name="TKey">The type of the key.</typeparam>s
/// <typeparam name="TGroupKey">The value on which the stream has been grouped.</typeparam>
public interface IGroupChangeSet<TObject, TKey, TGroupKey> : IChangeSet<IGroup<TObject, TKey, TGroupKey>, TGroupKey>
where TKey : notnull
where TGroupKey : notnull
{
}
| 37.894737 | 116 | 0.738889 | [
"MIT"
] | pdegenhardt/DynamicData | src/DynamicData/Cache/IGroupChangeSet.cs | 722 | C# |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("circledeneme")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("circledeneme")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("36a32e12-5b0b-4875-bebc-2f71b897cfdd")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
| 37.621622 | 84 | 0.747845 | [
"Apache-2.0"
] | BrOlaf45/csharp-projects | repos/Repos/circledeneme/Properties/AssemblyInfo.cs | 1,395 | C# |
using System.Threading.Tasks;
using Discord;
using Discord.WebSocket;
using System;
using Discord.Commands;
using NadekoBot.Extensions;
using System.Linq;
using NadekoBot.Common.Attributes;
using NadekoBot.Common.ModuleBehaviors;
using NadekoBot.Core.Services;
using NadekoBot.Core.Services.Impl;
using NadekoBot.Common;
using NLog;
using CommandLine;
using CommandLine.Text;
namespace NadekoBot.Modules.Help.Services
{
public class HelpService : ILateExecutor, INService
{
private readonly IBotConfigProvider _bc;
private readonly CommandHandler _ch;
private readonly NadekoStrings _strings;
private readonly Logger _log;
public HelpService(IBotConfigProvider bc, CommandHandler ch, NadekoStrings strings)
{
_bc = bc;
_ch = ch;
_strings = strings;
_log = LogManager.GetCurrentClassLogger();
}
public Task LateExecute(DiscordSocketClient client, IGuild guild, IUserMessage msg)
{
try
{
if (guild == null)
{
if (CREmbed.TryParse(_bc.BotConfig.DMHelpString, out var embed))
return msg.Channel.EmbedAsync(embed.ToEmbed(), embed.PlainText?.SanitizeMentions() ?? "");
return msg.Channel.SendMessageAsync(_bc.BotConfig.DMHelpString);
}
}
catch (Exception ex)
{
_log.Warn(ex);
}
return Task.CompletedTask;
}
public EmbedBuilder GetCommandHelp(CommandInfo com, IGuild guild)
{
var prefix = _ch.GetPrefix(guild);
var str = string.Format("**`{0}`**", prefix + com.Aliases.First());
var alias = com.Aliases.Skip(1).FirstOrDefault();
if (alias != null)
str += string.Format(" **/ `{0}`**", prefix + alias);
var em = new EmbedBuilder()
.AddField(fb => fb.WithName(str).WithValue($"{com.RealSummary(prefix)} {GetCommandRequirements(com, guild)}").WithIsInline(true))
.AddField(fb => fb.WithName(GetText("usage", guild)).WithValue(com.RealRemarks(prefix)).WithIsInline(false))
.WithFooter(efb => efb.WithText(GetText("module", guild, com.Module.GetTopLevelModule().Name)))
.WithColor(NadekoBot.OkColor);
var opt = ((NadekoOptions)com.Attributes.FirstOrDefault(x => x is NadekoOptions))?.OptionType;
if (opt != null)
{
var hs = GetCommandOptionHelp(opt);
if(!string.IsNullOrWhiteSpace(hs))
em.AddField(GetText("options", guild), hs, false);
}
return em;
}
public string GetCommandOptionHelp(Type opt)
{
var strs = opt.GetProperties()
.Select(x => x.GetCustomAttributes(true).FirstOrDefault(a => a is OptionAttribute))
.Where(x => x != null)
.Cast<OptionAttribute>()
.Select(x =>
{
var toReturn = $"--{x.LongName}";
if (!string.IsNullOrWhiteSpace(x.ShortName))
toReturn += $" (-{x.ShortName})";
toReturn += $" {x.HelpText}";
return toReturn;
});
return string.Join("\n", strs);
}
public string GetCommandRequirements(CommandInfo cmd, IGuild guild) =>
string.Join(" ", cmd.Preconditions
.Where(ca => ca is OwnerOnlyAttribute || ca is RequireUserPermissionAttribute)
.Select(ca =>
{
if (ca is OwnerOnlyAttribute)
return Format.Bold(GetText("bot_owner_only", guild));
var cau = (RequireUserPermissionAttribute)ca;
if (cau.GuildPermission != null)
return Format.Bold(GetText("server_permission", guild, cau.GuildPermission))
.Replace("Guild", "Server");
return Format.Bold(GetText("channel_permission", guild, cau.ChannelPermission))
.Replace("Guild", "Server");
}));
private string GetText(string text, IGuild guild, params object[] replacements) =>
_strings.GetText(text, guild?.Id, "Help".ToLowerInvariant(), replacements);
}
}
| 38.74359 | 145 | 0.553055 | [
"MIT"
] | ingochris/NadekoBot | NadekoBot.Core/Modules/Help/Services/HelpService.cs | 4,535 | C# |
// Copyright © 2012-2020 VLINGO LABS. All rights reserved.
//
// This Source Code Form is subject to the terms of the
// Mozilla Public License, v. 2.0. If a copy of the MPL
// was not distributed with this file, You can obtain
// one at https://mozilla.org/MPL/2.0/.
using System.Collections.Generic;
namespace Vlingo.Cluster.Model.Attribute
{
public class AttributesClient : IAttributesProtocol
{
private readonly IAttributesAgent _agent;
private readonly AttributeSetRepository _repository;
private static volatile object _syncRoot = new object();
public static AttributesClient With(IAttributesAgent agent)
{
lock (_syncRoot)
{
return new AttributesClient(agent, new AttributeSetRepository());
}
}
public void Add<T>(string attributeSetName, string attributeName, T value) => _agent.Add(attributeSetName, attributeName, value);
public void Replace<T>(string attributeSetName, string attributeName, T value) => _agent.Replace(attributeSetName, attributeName, value);
public void Remove(string attributeSetName, string attributeName) => _agent.Remove(attributeSetName, attributeName);
public void RemoveAll(string attributeSetName) => _agent.RemoveAll(attributeSetName);
public IEnumerable<Attribute> AllOf(string attributeSetName)
{
var all = new List<Attribute>();
var set = _repository.AttributeSetOf(attributeSetName);
if (set.IsDefined)
{
foreach (var tracked in set.All)
{
if (tracked.IsPresent)
{
all.Add(tracked.Attribute!);
}
}
}
return all;
}
public Attribute<T> Attribute<T>(string attributeSetName, string? attributeName)
{
var set = _repository.AttributeSetOf(attributeSetName);
if (set.IsDefined)
{
var tracked = set.AttributeNamed(attributeName);
if (tracked.IsPresent)
{
return (Attribute<T>) tracked.Attribute!;
}
}
return Model.Attribute.Attribute<T>.Undefined;
}
public override string ToString() => $"AttributesClient[agent={_agent} repository={_repository}]";
internal void SyncWith(AttributeSet set)
{
_repository.SyncWith(set.Copy(set));
}
internal void SyncWithout(AttributeSet set)
{
_repository.Remove(set.Name!);
}
public IEnumerable<AttributeSet> All => _repository.All;
private AttributesClient(IAttributesAgent agent, AttributeSetRepository repository) {
_agent = agent;
_repository = repository;
}
}
} | 34.395349 | 145 | 0.595335 | [
"MPL-2.0",
"MPL-2.0-no-copyleft-exception"
] | Luteceo/vlingo-all | vlingo-net-cluster/src/Vlingo.Cluster/Model/Attribute/AttributesClient.cs | 2,959 | C# |
// *** WARNING: this file was generated by the Pulumi SDK Generator. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
namespace Pulumi.AzureNextGen.Compute.V20191201.Inputs
{
/// <summary>
/// Specifies information about the operating system disk used by the virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
/// </summary>
public sealed class OSDiskArgs : Pulumi.ResourceArgs
{
/// <summary>
/// Specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None** for Standard storage. **ReadOnly** for Premium storage.
/// </summary>
[Input("caching")]
public Input<string>? Caching { get; set; }
/// <summary>
/// Specifies how the virtual machine should be created.<br><br> Possible values are:<br><br> **Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.<br><br> **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described.
/// </summary>
[Input("createOption", required: true)]
public Input<string> CreateOption { get; set; } = null!;
/// <summary>
/// Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine.
/// </summary>
[Input("diffDiskSettings")]
public Input<Inputs.DiffDiskSettingsArgs>? DiffDiskSettings { get; set; }
/// <summary>
/// Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB
/// </summary>
[Input("diskSizeGB")]
public Input<int>? DiskSizeGB { get; set; }
/// <summary>
/// Specifies the encryption settings for the OS Disk. <br><br> Minimum api-version: 2015-06-15
/// </summary>
[Input("encryptionSettings")]
public Input<Inputs.DiskEncryptionSettingsArgs>? EncryptionSettings { get; set; }
/// <summary>
/// The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.
/// </summary>
[Input("image")]
public Input<Inputs.VirtualHardDiskArgs>? Image { get; set; }
/// <summary>
/// The managed disk parameters.
/// </summary>
[Input("managedDisk")]
public Input<Inputs.ManagedDiskParametersArgs>? ManagedDisk { get; set; }
/// <summary>
/// The disk name.
/// </summary>
[Input("name")]
public Input<string>? Name { get; set; }
/// <summary>
/// This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux**
/// </summary>
[Input("osType")]
public Input<string>? OsType { get; set; }
/// <summary>
/// The virtual hard disk.
/// </summary>
[Input("vhd")]
public Input<Inputs.VirtualHardDiskArgs>? Vhd { get; set; }
/// <summary>
/// Specifies whether writeAccelerator should be enabled or disabled on the disk.
/// </summary>
[Input("writeAcceleratorEnabled")]
public Input<bool>? WriteAcceleratorEnabled { get; set; }
public OSDiskArgs()
{
}
}
}
| 49.078652 | 533 | 0.641026 | [
"Apache-2.0"
] | test-wiz-sec/pulumi-azure-nextgen | sdk/dotnet/Compute/V20191201/Inputs/OSDiskArgs.cs | 4,368 | C# |
#region File Information
//
// File: "ExporterLayer.cs"
// Purpose: "Describes a layer which is capable of being exported"
// Author: "Geoplex"
//
#endregion
#region (c) Copyright 2011 Geoplex
//
// THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
// EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
// WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
//
// IN NO EVENT SHALL GEOPLEX BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
// INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER
// RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF THE
// POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN
// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
//
#endregion
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.SOESupport;
namespace GPX.Server.Extension
{
public class ExportLayerInfo
{
public string Name { get; set; }
public int ID { get; set; }
public ExportLayerInfo(IMapLayerInfo mapLayerInfo)
{
this.Name = mapLayerInfo.Name;
this.ID = mapLayerInfo.ID;
}
public JsonObject ToJsonObject()
{
JsonObject jo = new JsonObject();
jo.AddString("name", Name);
jo.AddLong("id", ID);
return jo;
}
}
}
| 27.32 | 78 | 0.665447 | [
"BSD-3-Clause"
] | geoplex/arcgis-exporter-extension | GPX.Server.Extension/ExportLayer.cs | 1,368 | C# |
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Reflection;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Orleans.CodeGeneration;
using Orleans.Configuration;
using Orleans.Metadata;
using Orleans.Runtime;
using Orleans.Runtime.Versions;
using Orleans.Serialization.Configuration;
using Orleans.Serialization.TypeSystem;
namespace Orleans.GrainReferences
{
/// <summary>
/// The central point for creating <see cref="GrainReference"/> instances.
/// </summary>
public sealed class GrainReferenceActivator
{
private readonly object _lockObj = new object();
private readonly IServiceProvider _serviceProvider;
private readonly IGrainReferenceActivatorProvider[] _providers;
private Dictionary<(GrainType, GrainInterfaceType), Entry> _activators = new Dictionary<(GrainType, GrainInterfaceType), Entry>();
public GrainReferenceActivator(
IServiceProvider serviceProvider,
IEnumerable<IGrainReferenceActivatorProvider> providers)
{
_serviceProvider = serviceProvider;
_providers = providers.ToArray();
}
public GrainReference CreateReference(GrainId grainId, GrainInterfaceType interfaceType)
{
if (!_activators.TryGetValue((grainId.Type, interfaceType), out var entry))
{
entry = CreateActivator(grainId.Type, interfaceType);
}
var result = entry.Activator.CreateReference(grainId);
return result;
}
private Entry CreateActivator(GrainType grainType, GrainInterfaceType interfaceType)
{
lock (_lockObj)
{
if (!_activators.TryGetValue((grainType, interfaceType), out var entry))
{
IGrainReferenceActivator activator = null;
foreach (var provider in _providers)
{
if (provider.TryGet(grainType, interfaceType, out activator))
{
break;
}
}
if (activator is null)
{
throw new InvalidOperationException($"Unable to find an {nameof(IGrainReferenceActivatorProvider)} for grain type {grainType}");
}
entry = new Entry(activator);
_activators = new Dictionary<(GrainType, GrainInterfaceType), Entry>(_activators) { [(grainType, interfaceType)] = entry };
}
return entry;
}
}
private readonly struct Entry
{
public Entry(IGrainReferenceActivator activator)
{
this.Activator = activator;
}
public IGrainReferenceActivator Activator { get; }
}
}
internal class UntypedGrainReferenceActivatorProvider : IGrainReferenceActivatorProvider
{
private readonly GrainVersionManifest _versionManifest;
private readonly IServiceProvider _serviceProvider;
private IGrainReferenceRuntime _grainReferenceRuntime;
public UntypedGrainReferenceActivatorProvider(GrainVersionManifest manifest, IServiceProvider serviceProvider)
{
_versionManifest = manifest;
_serviceProvider = serviceProvider;
}
public bool TryGet(GrainType grainType, GrainInterfaceType interfaceType, out IGrainReferenceActivator activator)
{
if (!interfaceType.IsDefault)
{
activator = default;
return false;
}
var interfaceVersion = _versionManifest.GetLocalVersion(interfaceType);
var runtime = _grainReferenceRuntime ??= _serviceProvider.GetRequiredService<IGrainReferenceRuntime>();
var shared = new GrainReferenceShared(grainType, interfaceType, interfaceVersion, runtime, InvokeMethodOptions.None, _serviceProvider);
activator = new UntypedGrainReferenceActivator(shared);
return true;
}
private class UntypedGrainReferenceActivator : IGrainReferenceActivator
{
private readonly GrainReferenceShared _shared;
public UntypedGrainReferenceActivator(GrainReferenceShared shared)
{
_shared = shared;
}
public GrainReference CreateReference(GrainId grainId)
{
return GrainReference.FromGrainId(_shared, grainId);
}
}
}
internal class NewRpcProvider
{
private readonly TypeConverter _typeConverter;
private readonly Dictionary<GrainInterfaceType, Type> _mapping;
public NewRpcProvider(
IOptions<TypeManifestOptions> config,
GrainInterfaceTypeResolver resolver,
TypeConverter typeConverter)
{
_typeConverter = typeConverter;
var proxyTypes = config.Value.InterfaceProxies;
_mapping = new Dictionary<GrainInterfaceType, Type>();
foreach (var proxyType in proxyTypes)
{
if (!typeof(IAddressable).IsAssignableFrom(proxyType))
{
continue;
}
var type = proxyType switch
{
{ IsGenericType: true } => proxyType.GetGenericTypeDefinition(),
_ => proxyType
};
var grainInterface = GetMainInterface(type);
var id = resolver.GetGrainInterfaceType(grainInterface);
_mapping[id] = type;
}
static Type GetMainInterface(Type t)
{
var all = t.GetInterfaces();
Type result = null;
foreach (var candidate in all)
{
if (result is null)
{
result = candidate;
}
else
{
if (result.IsAssignableFrom(candidate))
{
result = candidate;
}
}
}
return result switch
{
{ IsGenericType: true } => result.GetGenericTypeDefinition(),
_ => result
};
}
}
public bool TryGet(GrainInterfaceType interfaceType, out Type result)
{
GrainInterfaceType lookupId;
Type[] args;
if (GenericGrainInterfaceType.TryParse(interfaceType, out var genericId))
{
lookupId = genericId.GetGenericGrainType().Value;
args = genericId.GetArguments(_typeConverter);
}
else
{
lookupId = interfaceType;
args = default;
}
if (!_mapping.TryGetValue(lookupId, out result))
{
return false;
}
if (args is Type[])
{
result = result.MakeGenericType(args);
}
return true;
}
}
internal class GrainReferenceActivatorProvider : IGrainReferenceActivatorProvider
{
private readonly IServiceProvider _serviceProvider;
private readonly GrainPropertiesResolver _propertiesResolver;
private readonly NewRpcProvider _rpcProvider;
private readonly GrainVersionManifest _grainVersionManifest;
private IGrainReferenceRuntime _grainReferenceRuntime;
public GrainReferenceActivatorProvider(
IServiceProvider serviceProvider,
GrainPropertiesResolver propertiesResolver,
NewRpcProvider rpcProvider,
GrainVersionManifest grainVersionManifest)
{
_serviceProvider = serviceProvider;
_propertiesResolver = propertiesResolver;
_rpcProvider = rpcProvider;
_grainVersionManifest = grainVersionManifest;
}
public bool TryGet(GrainType grainType, GrainInterfaceType interfaceType, out IGrainReferenceActivator activator)
{
if (!_rpcProvider.TryGet(interfaceType, out var proxyType))
{
activator = default;
return false;
}
var unordered = false;
var properties = _propertiesResolver.GetGrainProperties(grainType);
if (properties.Properties.TryGetValue(WellKnownGrainTypeProperties.Unordered, out var unorderedString)
&& string.Equals("true", unorderedString, StringComparison.OrdinalIgnoreCase))
{
unordered = true;
}
var interfaceVersion = _grainVersionManifest.GetLocalVersion(interfaceType);
var invokeMethodOptions = unordered ? InvokeMethodOptions.Unordered : InvokeMethodOptions.None;
var runtime = _grainReferenceRuntime ??= _serviceProvider.GetRequiredService<IGrainReferenceRuntime>();
var shared = new GrainReferenceShared(grainType, interfaceType, interfaceVersion, runtime, invokeMethodOptions, _serviceProvider);
activator = new GrainReferenceActivator(proxyType, shared);
return true;
}
private class GrainReferenceActivator : IGrainReferenceActivator
{
private readonly Type _referenceType;
private readonly GrainReferenceShared _shared;
public GrainReferenceActivator(Type referenceType, GrainReferenceShared shared)
{
_referenceType = referenceType;
_shared = shared;
}
public GrainReference CreateReference(GrainId grainId)
{
return (GrainReference)Activator.CreateInstance(
type: _referenceType,
bindingAttr: BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic,
binder: null,
args: new object[] { _shared, grainId.Key },
culture: CultureInfo.InvariantCulture);
}
}
}
public interface IGrainReferenceActivatorProvider
{
bool TryGet(GrainType grainType, GrainInterfaceType interfaceType, out IGrainReferenceActivator activator);
}
public interface IGrainReferenceActivator
{
public GrainReference CreateReference(GrainId grainId);
}
}
| 36.25 | 152 | 0.594501 | [
"MIT"
] | CodingBrushUp/orleans | src/Orleans.Core/GrainReferences/GrainReferenceActivator.cs | 10,730 | C# |
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using YY.DBTools.SQLServer.XEvents.ToClickHouse.SharedBuffer.EventArgs;
using YY.DBTools.SQLServer.XEvents.ToClickHouse.SharedBuffer.Exceptions;
namespace YY.DBTools.SQLServer.XEvents.ToClickHouse.SharedBuffer
{
public class ExtendedEventsExport
{
#region Private Members
private readonly XEventsExportSettings _settings;
private readonly LogBuffers _logBuffers;
private readonly IExtendedEventsOnTargetBuilder _xEventsTargetBuilder;
#endregion
#region Constructors
public ExtendedEventsExport(XEventsExportSettings settings, IExtendedEventsOnTargetBuilder xEventsTargetBuilder)
{
_settings = settings;
_logBuffers = new LogBuffers();
_xEventsTargetBuilder = xEventsTargetBuilder;
foreach (var logSourceSettings in _settings.LogSources)
{
_logBuffers.LogPositions.TryAdd(logSourceSettings,
new ConcurrentDictionary<string, ExtendedEventsPosition>());
var logPositions = xEventsTargetBuilder.GetCurrentLogPositions(settings, logSourceSettings.XEventsLog);
foreach (var logPosition in logPositions)
{
FileInfo logFileInfo = new FileInfo(logPosition.Value.CurrentFileData);
_logBuffers.LogPositions.AddOrUpdate(logSourceSettings,
(settingsKey) =>
{
var newPositions = new ConcurrentDictionary<string, ExtendedEventsPosition>();
newPositions.AddOrUpdate(logFileInfo.Name,
(dirName) => logPosition.Value,
(dirName, oldPosition) => logPosition.Value);
return newPositions;
},
(settingsKey, logBufferItemOld) =>
{
logBufferItemOld.AddOrUpdate(logFileInfo.Name,
(dirName) => logPosition.Value,
(dirName, oldPosition) => logPosition.Value);
return logBufferItemOld;
});
}
}
}
#endregion
#region Public Methods
public async Task StartExport()
{
await StartExport(CancellationToken.None);
}
public async Task StartExport(CancellationToken cancellationToken)
{
List<Task> exportJobs = new List<Task>();
foreach (var logSource in _settings.LogSources)
{
Task logExportTask = Task.Run(() => LogExportJob(logSource, cancellationToken), cancellationToken);
exportJobs.Add(logExportTask);
await Task.Delay(1000, cancellationToken);
}
await Task.Delay(10000, cancellationToken);
exportJobs.Add(Task.Run(() => SendLogFromBuffer(cancellationToken), cancellationToken));
Task.WaitAll(exportJobs.ToArray(), cancellationToken);
}
#endregion
#region Private Methods
private async Task LogExportJob(
XEventsExportSettings.LogSourceSettings settings,
CancellationToken cancellationToken)
{
while (true)
{
if (cancellationToken.IsCancellationRequested)
break;
bool bufferBlocked = (_logBuffers.TotalItemsCount >= _settings.Export.Buffer.MaxBufferSizeItemsCount);
try
{
if (!bufferBlocked)
{
using (XEventExportMaster exporter = new XEventExportMaster(
OnSend, null, OnErrorExportDataToBuffer
))
{
exporter.SetXEventsPath(settings.SourcePath);
var target = new ExtendedEventsOnBuffer(_logBuffers, settings.Portion);
target.SetLogSettings(settings);
exporter.SetTarget(target);
await exporter.StartSendEventsToStorage(cancellationToken);
}
}
if (bufferBlocked)
{
await Task.Delay(100, cancellationToken);
}
else if (_settings.WatchMode.Use)
{
await Task.Delay(_settings.WatchMode.Periodicity, cancellationToken);
}
else
{
break;
}
}
catch (Exception e)
{
RaiseOnError(new OnErrorExportSharedBufferEventArgs(
new ExportSharedBufferException("Log export job failed.", e, settings)));
await Task.Delay(60000, cancellationToken);
}
}
}
private async Task SendLogFromBuffer(CancellationToken cancellationToken)
{
DateTime lastExportDate = DateTime.UtcNow;
while (true)
{
if (cancellationToken.IsCancellationRequested)
break;
bool needExport = false;
long itemsCountForExport = _logBuffers.TotalItemsCount;
if (itemsCountForExport > 0)
{
if (itemsCountForExport >= _settings.Export.Buffer.MaxItemCountSize)
{
needExport = true;
}
else
{
var createTimeLeftMs = (DateTime.UtcNow - lastExportDate).TotalMilliseconds;
if (lastExportDate != DateTime.MinValue &&
createTimeLeftMs >= _settings.Export.Buffer.MaxSaveDurationMs)
{
needExport = true;
}
}
}
if (needExport)
{
if (cancellationToken.IsCancellationRequested)
break;
try
{
var itemsToUpload = _logBuffers.LogBuffer
.Select(i => i.Key)
.OrderBy(i => i.Period)
.ToList();
var dataToUpload = _logBuffers.LogBuffer
.Where(i => itemsToUpload.Contains(i.Key))
.ToDictionary(k => k.Key, v => v.Value);
OnSendFromBuffer(new BeforeExportDataEventArgs()
{
Rows = dataToUpload
.SelectMany(e => e.Value.LogRows)
.Select(e => e.Value)
.ToList()
});
await _xEventsTargetBuilder.SaveRowsData(_settings, dataToUpload);
foreach (var itemToUpload in itemsToUpload)
{
_logBuffers.LogBuffer.TryRemove(itemToUpload, out _);
}
lastExportDate = DateTime.UtcNow;
}
catch (Exception e)
{
RaiseOnError(new OnErrorExportSharedBufferEventArgs(
new ExportSharedBufferException("Send log from buffer failed.", e, null)));
await Task.Delay(60000, cancellationToken);
}
}
await Task.Delay(1000, cancellationToken);
if (!_settings.WatchMode.Use
&& _logBuffers.TotalItemsCount == 0)
{
break;
}
}
}
#endregion
#region Events
public delegate void OnSendLogFromSharedBufferEventArgsHandler(BeforeExportDataEventArgs args);
public delegate void OnErrorExportSharedBufferEventArgsHandler(OnErrorExportSharedBufferEventArgs args);
public event OnSendLogFromSharedBufferEventArgsHandler OnSendLogEvent;
public event OnErrorExportSharedBufferEventArgsHandler OnErrorEvent;
protected void OnSend(BeforeExportDataEventArgs args)
{
bool bufferBlocked = (_logBuffers.TotalItemsCount >= _settings.Export.Buffer.MaxBufferSizeItemsCount);
while (bufferBlocked)
{
Thread.Sleep(1000);
bufferBlocked = (_logBuffers.TotalItemsCount >= _settings.Export.Buffer.MaxBufferSizeItemsCount);
}
}
protected void OnSendFromBuffer(BeforeExportDataEventArgs args)
{
OnSendLogEvent?.Invoke(args);
}
protected void RaiseOnError(OnErrorExportSharedBufferEventArgs args)
{
OnErrorEvent?.Invoke(args);
}
private void OnErrorExportDataToBuffer(OnErrorExportDataEventArgs e)
{
RaiseOnError(new OnErrorExportSharedBufferEventArgs(
new ExportSharedBufferException("Export data to buffer failed.", e.Exception, null)));
}
#endregion
}
}
| 38.385827 | 120 | 0.516923 | [
"MIT"
] | YPermitin/YY.DBTools | Libs/YY.DBTools.SQLServer.XEvents.ToClickHouse/SharedBuffer/ExtendedEventsExport.cs | 9,752 | C# |
/**
* SpikeLite C# IRC Bot
* Copyright (c) 2011 FreeNode ##Csharp Community
*
* This source is licensed under the terms of the MIT license. Please see the
* distributed license.txt for details.
*/
using System;
using System.Collections.Generic;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
using System.ServiceModel.Dispatcher;
using log4net.Ext.Trace;
using SpikeLite.AccessControl;
using SpikeLite.Domain.Model.Authentication;
using System.Linq;
using Spring.Context.Support;
namespace SpikeLite.IPC.WebHost
{
/// <summary>
/// Provides an <see cref="IOperationInvoker"/> that can do some simple authentication for us.
/// </summary>
public class SecuredOperation : Attribute, IOperationInvoker, IOperationBehavior
{
/// <summary>
/// Holds the invoker that we delegate to if authentication is successful.
/// </summary>
private IOperationInvoker _delegatedInvoker;
/// <summary>
/// Holds a collection of required access flags for using the resource.
/// </summary>
private readonly IEnumerable<string> _requiredFlags;
/// <summary>
/// Stores our log4net logger.
/// </summary>
private static readonly TraceLogImpl Logger = (TraceLogImpl)TraceLogManager.GetLogger(typeof(SecuredOperation));
/// <summary>
/// Allows for decoratorative, annotation-based security around service contracts.
/// </summary>
///
/// <param name="flags">An optional set of string literals for flags. May be empty, signifying that no special flags (and only a recognized account) needs to be used.</param>
public SecuredOperation(params string[] flags)
{
_requiredFlags = flags;
}
#region IOperationInvoker
public object Invoke(object instance, object[] inputs, out object[] outputs)
{
// If we've got no user information, throw an exception. We might actually want to tailor this behavior...
var principal = FindUserPrincipalContext();
Exception error = null;
// TODO [Kog 07/25/2011] : Perhaps more granular error logging? Probably need to refactor this anyway, especially once we figure out how to properly pass context.
// TODO [Kog 07/26/2011] : Better error handling.
// Check that we've got a principal that matches.
if (null == principal)
{
Logger.Info("Authentication request rejected - either the credentials given were invalid, or the token was expired.");
error = new Exception("Invalid user context.");
}
// Make sure said principal has the required flags.
if (null != principal && (principal.AccessLevel != AccessLevel.Root && !RequiredFlagsSet(principal)))
{
Logger.InfoFormat("User {0} does not have the required flags to complete operation {1}",
principal.EmailAddress, OperationContext.Current.EndpointDispatcher.EndpointAddress);
error = new Exception("Invalid user context.");
}
// If the user has failed either challange, bail.
if (null != error)
{
throw error;
}
// Call out to our delegate. Let's stuff something into our current context though.
using (new OperationContextScope(OperationContext.Current))
{
// Shove our principal into the current context, so operations can get it later.
OperationContext.Current.IncomingMessageProperties.Add("principal", principal);
// If we've got credentials, invoke our delegated behavior.
return _delegatedInvoker.Invoke(instance, inputs, out outputs);
}
}
public object[] AllocateInputs()
{
return _delegatedInvoker.AllocateInputs();
}
#region Async stuff that's not supported yet.
public IAsyncResult InvokeBegin(object instance, object[] inputs, AsyncCallback callback, object state)
{
throw new NotImplementedException("This operation is not asynchronous.");
}
public object InvokeEnd(object instance, out object[] outputs, IAsyncResult result)
{
throw new NotImplementedException("This operation is not asynchronous.");
}
public bool IsSynchronous
{
// We only support synchronous operations with this attribute.
get { return true; }
}
#endregion
#endregion
#region IOperationBehavior
public void ApplyDispatchBehavior(OperationDescription operationDescription, DispatchOperation dispatchOperation)
{
// We want to intercept normal invocation. The rest of the methods will be called early in the runtime and are of no use.
_delegatedInvoker = dispatchOperation.Invoker;
dispatchOperation.Invoker = this;
}
public void ApplyClientBehavior(OperationDescription operationDescription, ClientOperation clientOperation)
{
// No-op.
}
public void AddBindingParameters(OperationDescription operationDescription, BindingParameterCollection bindingParameters)
{
// No-op.
}
public void Validate(OperationDescription operationDescription)
{
// No-op.
}
#endregion
#region Private Implementation Behavior
/// <summary>
/// Attempts to find a user principal based on information in the message headers.
/// </summary>
///
/// <returns>A <see cref="KnownHost"/> corresponding to the given email address/access token combination, if any. Will return null if no user matches.</returns>
private static KnownHost FindUserPrincipalContext()
{
// Get our application context from Spring.NET.
var ctx = ContextRegistry.GetContext();
var authenticationModule = (IrcAuthenticationModule)ctx.GetObject("IrcAuthenticationModule");
KnownHost user = null;
// TODO [Kog 07/26/2011] : Make these headers configurable.
// Try and grab the auth information out of our message headers.
var emailAddress = OperationContext.Current.IncomingMessageHeaders.GetHeader<string>("String", "net.freenode-csharp.auth.email");
var accessToken = OperationContext.Current.IncomingMessageHeaders.GetHeader<string>("String", "net.freenode-csharp.auth.token");
// If the auth information from the headers isn't empty, let's try and find the user given the information we've got.
if (!string.IsNullOrEmpty(emailAddress) && !string.IsNullOrEmpty(accessToken))
{
// Make sure the user/token combination exists, and that the token within the acceptable TTL.
user = authenticationModule.FindHostByEmailAddress(emailAddress, accessToken, x => x.HasValue && (x.Value.Subtract(DateTime.Now.ToUniversalTime()) > TimeSpan.Zero));
}
return user;
}
/// <summary>
/// A private utility method, ensures that the user has the flags that are required to access this resource.
/// </summary>
///
/// <param name="host">A <see cref="host"/> to check for required flags.</param>
///
/// <returns>True if the user has all the required flags, else false.</returns>
private bool RequiredFlagsSet(KnownHost host)
{
// Make sure that we've even got anything to check...
if (null != host && null != host.AccessFlags)
{
// Make sure that all the required flags are present on the principal.
return _requiredFlags.All(x => host.AccessFlags.Any(y => y.Flag.Equals(x, StringComparison.CurrentCultureIgnoreCase)));
}
return false;
}
#endregion
}
}
| 40.235294 | 182 | 0.631944 | [
"MIT"
] | Freenode-Csharp/DEPRECATED-SpikeLite | SpikeLite.IPC.WebHost/SecuredOperation.cs | 8,210 | C# |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Threading;
namespace Microsoft.AspNetCore.Hosting
{
internal class WebHostLifetime : IDisposable
{
private readonly CancellationTokenSource _cts;
private readonly ManualResetEventSlim _resetEvent;
private readonly string _shutdownMessage;
private bool _disposed;
private bool _exitedGracefully;
public WebHostLifetime(CancellationTokenSource cts, ManualResetEventSlim resetEvent, string shutdownMessage)
{
_cts = cts;
_resetEvent = resetEvent;
_shutdownMessage = shutdownMessage;
AppDomain.CurrentDomain.ProcessExit += ProcessExit;
Console.CancelKeyPress += CancelKeyPress;
}
internal void SetExitedGracefully()
{
_exitedGracefully = true;
}
public void Dispose()
{
if (_disposed)
{
return;
}
_disposed = true;
AppDomain.CurrentDomain.ProcessExit -= ProcessExit;
Console.CancelKeyPress -= CancelKeyPress;
}
private void CancelKeyPress(object? sender, ConsoleCancelEventArgs eventArgs)
{
Shutdown();
// Don't terminate the process immediately, wait for the Main thread to exit gracefully.
eventArgs.Cancel = true;
}
private void ProcessExit(object? sender, EventArgs eventArgs)
{
Shutdown();
if (_exitedGracefully)
{
// On Linux if the shutdown is triggered by SIGTERM then that's signaled with the 143 exit code.
// Suppress that since we shut down gracefully. https://github.com/dotnet/aspnetcore/issues/6526
Environment.ExitCode = 0;
}
}
private void Shutdown()
{
try
{
if (!_cts.IsCancellationRequested)
{
if (!string.IsNullOrEmpty(_shutdownMessage))
{
Console.WriteLine(_shutdownMessage);
}
_cts.Cancel();
}
}
// When hosting with IIS in-process, we detach the Console handle on main thread exit.
// Console.WriteLine may throw here as we are logging to console on ProcessExit.
// We catch and ignore all exceptions here. Do not log to Console in this exception handler.
catch (Exception) {}
// Wait on the given reset event
_resetEvent.Wait();
}
}
}
| 32.682353 | 116 | 0.575594 | [
"MIT"
] | 48355746/AspNetCore | src/Hosting/Hosting/src/Internal/WebHostLifetime.cs | 2,778 | C# |
using System;
using fNbt;
using TrueCraft.Core.Inventory;
using TrueCraft.Core.Networking.Packets;
namespace TrueCraft.Core.Server
{
// TODO: this should be a server-side only interface.
public interface IServerSlot : ISlot
{
/// <summary>
/// Gets whether or not this slot has been "saved" by generating
/// a SetSlot Packet(s) to send to the Player(s).
/// </summary>
bool Dirty { get; }
/// <summary>
/// Clears the Dirty flag.
/// </summary>
void SetClean();
/// <summary>
/// Convenience Property for quickly determining the Index of this Slot within its
/// parent collection of Slots.
/// </summary>
int Index { get; }
/// <summary>
/// Gets a SetSlotPacket for sending the content of this Slot to the Player
/// </summary>
/// <param name="windowID">The window ID to use in the SetSlotPacket</param>
/// <returns>A SetSlotPacket</returns>
/// <remarks>Calling this method resets the Dirty property.</remarks>
SetSlotPacket GetSetSlotPacket(sbyte windowID);
}
}
| 30.473684 | 90 | 0.603627 | [
"MIT"
] | woodvale/TrueCraft | TrueCraft.Core/Server/IServerSlot.cs | 1,158 | C# |
using SimpleWebApiClient.Formatters;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
namespace SimpleWebApiClient
{
public partial class WebApiClient
{
public IFormatter Formatter { get; set; }
private void ConstructorFormatter()
{
Formatter = new JsonFormatter();
}
}
}
| 20.809524 | 49 | 0.663616 | [
"MIT"
] | coolwhispers/SimpleWebApiClient | WebApiClient.Formatter.cs | 439 | 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.Runtime.InteropServices;
using System.Security;
internal partial class Interop
{
internal partial class OleAut32
{
[DllImport(Libraries.OleAut32, CharSet = CharSet.Unicode)]
internal static extern SafeBSTRHandle SysAllocStringLen(IntPtr src, uint len);
[DllImport(Libraries.OleAut32, CharSet = CharSet.Unicode)]
internal static extern IntPtr SysAllocStringLen(string? src, int len);
}
}
| 33.2 | 86 | 0.74247 | [
"MIT"
] | 3F/coreclr | src/System.Private.CoreLib/shared/Interop/Windows/OleAut32/Interop.SysAllocStringLen.cs | 664 | C# |
using System;
using System.Threading.Tasks;
namespace AsyncAwaitBestPractices
{
/// <summary>
/// Extension methods for System.Threading.Tasks.Task and System.Threading.Tasks.ValueTask
/// </summary>
public static class SafeFireAndForgetExtensions
{
static Action<Exception>? _onException;
static bool _shouldAlwaysRethrowException;
/// <summary>
/// Safely execute the ValueTask without waiting for it to complete before moving to the next line of code; commonly known as "Fire And Forget". Inspired by John Thiriet's blog post, "Removing Async Void": https://johnthiriet.com/removing-async-void/.
/// </summary>
/// <param name="task">ValueTask.</param>
/// <param name="continueOnCapturedContext">If set to <c>true</c>, continue on captured context; this will ensure that the Synchronization Context returns to the calling thread. If set to <c>false</c>, continue on a different context; this will allow the Synchronization Context to continue on a different thread</param>
/// <param name="onException">If an exception is thrown in the ValueTask, <c>onException</c> will execute. If onException is null, the exception will be re-thrown</param>
public static void SafeFireAndForget(this ValueTask task, in bool continueOnCapturedContext = false, in Action<Exception>? onException = null) => HandleSafeFireAndForget(task, continueOnCapturedContext, onException);
/// <summary>
/// Safely execute the ValueTask without waiting for it to complete before moving to the next line of code; commonly known as "Fire And Forget". Inspired by John Thiriet's blog post, "Removing Async Void": https://johnthiriet.com/removing-async-void/.
/// </summary>
/// <param name="task">ValueTask.</param>
/// <param name="continueOnCapturedContext">If set to <c>true</c>, continue on captured context; this will ensure that the Synchronization Context returns to the calling thread. If set to <c>false</c>, continue on a different context; this will allow the Synchronization Context to continue on a different thread</param>
/// <param name="onException">If an exception is thrown in the Task, <c>onException</c> will execute. If onException is null, the exception will be re-thrown</param>
/// <typeparam name="TException">Exception type. If an exception is thrown of a different type, it will not be handled</typeparam>
public static void SafeFireAndForget<TException>(this ValueTask task, in bool continueOnCapturedContext = false, in Action<TException>? onException = null) where TException : Exception => HandleSafeFireAndForget(task, continueOnCapturedContext, onException);
/// <summary>
/// Safely execute the Task without waiting for it to complete before moving to the next line of code; commonly known as "Fire And Forget". Inspired by John Thiriet's blog post, "Removing Async Void": https://johnthiriet.com/removing-async-void/.
/// </summary>
/// <param name="task">Task.</param>
/// <param name="continueOnCapturedContext">If set to <c>true</c>, continue on captured context; this will ensure that the Synchronization Context returns to the calling thread. If set to <c>false</c>, continue on a different context; this will allow the Synchronization Context to continue on a different thread</param>
/// <param name="onException">If an exception is thrown in the Task, <c>onException</c> will execute. If onException is null, the exception will be re-thrown</param>
public static void SafeFireAndForget(this Task task, in bool continueOnCapturedContext = false, in Action<Exception>? onException = null) => HandleSafeFireAndForget(task, continueOnCapturedContext, onException);
/// <summary>
/// Safely execute the Task without waiting for it to complete before moving to the next line of code; commonly known as "Fire And Forget". Inspired by John Thiriet's blog post, "Removing Async Void": https://johnthiriet.com/removing-async-void/.
/// </summary>
/// <param name="task">Task.</param>
/// <param name="continueOnCapturedContext">If set to <c>true</c>, continue on captured context; this will ensure that the Synchronization Context returns to the calling thread. If set to <c>false</c>, continue on a different context; this will allow the Synchronization Context to continue on a different thread</param>
/// <param name="onException">If an exception is thrown in the Task, <c>onException</c> will execute. If onException is null, the exception will be re-thrown</param>
/// <typeparam name="TException">Exception type. If an exception is thrown of a different type, it will not be handled</typeparam>
public static void SafeFireAndForget<TException>(this Task task, in bool continueOnCapturedContext = false, in Action<TException>? onException = null) where TException : Exception => HandleSafeFireAndForget(task, continueOnCapturedContext, onException);
/// <summary>
/// Initialize SafeFireAndForget
///
/// Warning: When <c>true</c>, there is no way to catch this exception and it will always result in a crash. Recommended only for debugging purposes.
/// </summary>
/// <param name="shouldAlwaysRethrowException">If set to <c>true</c>, after the exception has been caught and handled, the exception will always be rethrown.</param>
public static void Initialize(in bool shouldAlwaysRethrowException = false) => _shouldAlwaysRethrowException = shouldAlwaysRethrowException;
/// <summary>
/// Set the default action for SafeFireAndForget to handle every exception
/// </summary>
/// <param name="onException">If an exception is thrown in the Task using SafeFireAndForget, <c>onException</c> will execute</param>
public static void SetDefaultExceptionHandling(in Action<Exception> onException)
{
if (onException is null)
throw new ArgumentNullException(nameof(onException), $"{onException} cannot be null");
_onException = onException;
}
/// <summary>
/// Remove the default action for SafeFireAndForget
/// </summary>
public static void RemoveDefaultExceptionHandling() => _onException = null;
#pragma warning disable RECS0165 // Asynchronous methods should return a Task instead of void
static async void HandleSafeFireAndForget<TException>(ValueTask valueTask, bool continueOnCapturedContext, Action<TException>? onException) where TException : Exception
{
try
{
await valueTask.ConfigureAwait(continueOnCapturedContext);
}
catch (TException ex) when (_onException != null || onException != null)
{
HandleException(ex, onException);
if (_shouldAlwaysRethrowException)
throw;
}
}
static async void HandleSafeFireAndForget<TException>(Task task, bool continueOnCapturedContext, Action<TException>? onException) where TException : Exception
{
try
{
await task.ConfigureAwait(continueOnCapturedContext);
}
catch (TException ex) when (_onException != null || onException != null)
{
HandleException(ex, onException);
if (_shouldAlwaysRethrowException)
throw;
}
}
static void HandleException<TException>(in TException exception, Action<TException>? onException) where TException : Exception
{
_onException?.Invoke(exception);
onException?.Invoke(exception);
}
#pragma warning restore RECS0165 // Asynchronous methods should return a Task instead of void
}
}
| 70.035398 | 328 | 0.695982 | [
"MIT"
] | andrekiba/AsyncAwaitBestPractices | Src/AsyncAwaitBestPractices/SafeFireAndForgetExtensions.cs | 7,916 | C# |
namespace Telegram.Bot.Advanced.Models {
public enum UserUpdate {
EveryMessage,
BotCommand,
PrivateMessage
}
} | 20.285714 | 40 | 0.633803 | [
"MIT"
] | fuji97/Telegram.Bot.Advanced | Telegram.Bot.Advanced/Models/UserUpdate.cs | 142 | C# |
using SqlParser.Ast;
using SqlParser.Tokenizing;
namespace SqlParser.SqlServer.Parsing
{
public partial class Parser
{
private SqlDeclareNode ParseDeclare(ITokenizer t)
{
// "DECLARE" <variable> <DataType> ("=" <Expression>)?
// TODO: "DECLARE" <variable> <DataType> ("=" <Expression>)? ("," <variable> <DataType> ("=" <Expression>)?)*
var declare = t.Expect(SqlTokenType.Keyword, "DECLARE");
var v = t.Expect(SqlTokenType.Variable);
// TODO: Improve data type parsing
var dataType = ParseDataType(t);
var declareNode = new SqlDeclareNode
{
Location = declare.Location,
DataType = dataType,
Variable = new SqlVariableNode(v)
};
if (t.NextIs(SqlTokenType.Symbol, "=", true))
declareNode.Initializer = ParseScalarExpression(t);
return declareNode;
}
private SqlDataTypeNode ParseDataType(ITokenizer t)
{
// <Keyword> ("(" ("MAX" | <SizeList>)? ")")?
var next = t.GetNext();
// TODO: Should we add TABLE declaration parsing?
if (next.IsKeyword("TABLE"))
return null;
var dataType = new SqlDataTypeNode
{
Location = next.Location,
DataType = new SqlKeywordNode(next),
};
if (t.Peek().IsSymbol("("))
{
t.GetNext();
var lookahead = t.Peek();
if (lookahead.IsKeyword("MAX"))
dataType.Size = new SqlKeywordNode(t.GetNext());
else if (lookahead.IsType(SqlTokenType.Number))
dataType.Size = ParseList(t, ParseNumber);
else
throw ParsingException.CouldNotParseRule(nameof(ParseDataType), lookahead);
t.Expect(SqlTokenType.Symbol, ")");
}
return dataType;
}
private SqlSetNode ParseSet(ITokenizer t)
{
// "SET" <variable> <assignOp> <Expression>
var setToken = t.Expect(SqlTokenType.Keyword, "SET");
var v = t.Expect(SqlTokenType.Variable);
var op = t.Expect(SqlTokenType.Symbol, "=", "+=", "-=", "*=", "/=", "%=", "&=", "^=", "|=");
var expr = ParseScalarExpression(t);
return new SqlSetNode
{
Location = setToken.Location,
Variable = new SqlVariableNode(v),
Operator = new SqlOperatorNode(op),
Right = expr
};
}
}
}
| 36.337838 | 121 | 0.506136 | [
"Apache-2.0"
] | Whiteknight/SqlParser | Src/SqlParser/SqlServer/Parsing/Parser.Variables.cs | 2,691 | C# |
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using YamlDotNet.Serialization;
namespace KubeClient.Models
{
/// <summary>
/// ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster). Exactly one "target" type should be set.
/// </summary>
public partial class ExternalMetricSourceV2Beta1
{
/// <summary>
/// metricName is the name of the metric in question.
/// </summary>
[YamlMember(Alias = "metricName")]
[JsonProperty("metricName", NullValueHandling = NullValueHandling.Include)]
public string MetricName { get; set; }
/// <summary>
/// targetAverageValue is the target per-pod value of global metric (as a quantity). Mutually exclusive with TargetValue.
/// </summary>
[YamlMember(Alias = "targetAverageValue")]
[JsonProperty("targetAverageValue", NullValueHandling = NullValueHandling.Ignore)]
public string TargetAverageValue { get; set; }
/// <summary>
/// targetValue is the target value of the metric (as a quantity). Mutually exclusive with TargetAverageValue.
/// </summary>
[YamlMember(Alias = "targetValue")]
[JsonProperty("targetValue", NullValueHandling = NullValueHandling.Ignore)]
public string TargetValue { get; set; }
/// <summary>
/// metricSelector is used to identify a specific time series within a given metric.
/// </summary>
[YamlMember(Alias = "metricSelector")]
[JsonProperty("metricSelector", NullValueHandling = NullValueHandling.Ignore)]
public LabelSelectorV1 MetricSelector { get; set; }
}
}
| 43.904762 | 261 | 0.668655 | [
"MIT"
] | PhilippCh/dotnet-kube-client | src/KubeClient/Models/generated/ExternalMetricSourceV2Beta1.cs | 1,844 | C# |
using System;
using UnityModManagerNet;
namespace DVKeylessEntry
{
/// <summary>
/// Mod settings
/// </summary>
public class Settings : UnityModManager.ModSettings, IDrawable
{
/// <summary>
/// Enable/Disable automatic engine start
/// </summary>
[Draw("Automatic start")]
public bool KeylessEntryAutostart = true;
/// <summary>
/// Enable/disable various shutdown conditions
/// </summary>
[Draw("== Automatic shutdown conditions (all checked conditions must be met) ==", Box = true, Collapsible = true)]
public AutomaticShutdownOptions ShutdownOptions = new AutomaticShutdownOptions();
/// <summary>
/// Request settings to save
/// </summary>
/// <param name="modEntry">Mod</param>
public override void Save(UnityModManager.ModEntry modEntry)
{
Save(this, modEntry);
}
/// <summary>
/// Event for settings change
/// </summary>
/// <remarks>This is currently not needed by this mod but it needs to be there</remarks>
public void OnChange()
{
//NOOP
}
}
/// <summary>
/// Collections of Shutdown option settings
/// </summary>
public class AutomaticShutdownOptions
{
/// <summary>
/// Reverser in center position
/// </summary>
/// <remarks>
/// This is exactly 0.0 for the current diesel locos,
/// but for comparibility with other locos in the future, we allow up to 0.1 deviation
/// </remarks>
[Draw("Reverser must be centered")]
public bool ReverserCentered = true;
/// <summary>
/// Independent brakes must be at least 90% applied
/// </summary>
[Draw("Independent brakes must be applied 90% or more")]
public bool IndependentBrakesApplied = true;
/// <summary>
/// Loco can't be moving (allows for 1 Km/h movement)
/// </summary>
[Draw("Locomotive must be stationary")]
public bool MustBeStationary = true;
/// <summary>
/// No cars must be in coupling range
/// </summary>
/// <remarks>
/// The coupling range is defined in <see cref="LocoControllerBase.COUPLING_RANGE"/>
/// It's 0.64 as of this writing
/// </remarks>
[Draw("No Cars in coupling range")]
public bool NoCarsInCouplingRange = true;
/// <summary>
/// No cars can be coupled to the loco
/// </summary>
/// <remarks>
/// I have not tested whether parially coupled cars (coupler OR brakes only) are considered coupled
/// </remarks>
[Draw("No cars coupled")]
public bool NoCarsCoupled = true;
/// <summary>
/// Remote controller can't be connected.
/// Whether the cotroller is turned on or in range doesn't matters.
/// </summary>
[Draw("Remote control is disconnected")]
public bool RemoteControlDisconnected = true;
}
}
| 34.098901 | 122 | 0.574283 | [
"MIT"
] | AyrA/DVKeylessEntry | DVKeylessEntry/Settings.cs | 3,105 | C# |
// Project Orleans Cloud Service SDK ver. 1.0
//
// Copyright (c) .NET Foundation
//
// All rights reserved.
//
// MIT License
//
// 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 System.Reflection;
[assembly: AssemblyCompany("Microsoft Corporation")]
[assembly: AssemblyProduct("Orleans")]
[assembly: AssemblyCopyright("Copyright (c) Microsoft Corporation 2015")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.1.0.0")]
[assembly: AssemblyInformationalVersion("1.1.0.0")] | 45.176471 | 81 | 0.755859 | [
"MIT"
] | rikace/orleans | src/Build/GlobalAssemblyInfo.cs | 1,536 | C# |
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
namespace System.Data.Entity.Core.SchemaObjectModel
{
// This file contains an enum for the errors generated by Metadata Loading (SOM)
//
// There is almost a one-to-one correspondence between these error codes
// and the resource strings - so if you need more insight into what the
// error code means, please see the code that uses the particular enum
// AND the corresponding resource string
//
// error numbers end up being hard coded in test cases; they can be removed, but should not be changed.
// reusing error numbers is probably OK, but not recommended.
//
// The acceptable range for this enum is
// 0000 - 0999
//
// The Range 10,000-15,000 is reserved for tools
//
/// <summary>
/// Summary description for ErrorCode.
/// </summary>
internal enum ErrorCode
{
/// <summary>
/// </summary>
InvalidErrorCodeValue = 0,
// unused 1,
/// <summary>
/// </summary>
SecurityError = 2,
// unused 3,
/// <summary>
/// </summary>
IOException = 4,
/// <summary>
/// </summary>
XmlError = 5,
/// <summary>
/// </summary>
TooManyErrors = 6,
/// <summary>
/// </summary>
MalformedXml = 7,
/// <summary>
/// </summary>
UnexpectedXmlNodeType = 8,
/// <summary>
/// </summary>
UnexpectedXmlAttribute = 9,
/// <summary>
/// </summary>
UnexpectedXmlElement = 10,
/// <summary>
/// </summary>
TextNotAllowed = 11,
/// <summary>
/// </summary>
EmptyFile = 12,
/// <summary>
/// </summary>
XsdError = 13,
/// <summary>
/// </summary>
InvalidAlias = 14,
// unused 15,
/// <summary>
/// </summary>
IntegerExpected = 16,
/// <summary>
/// </summary>
InvalidName = 17,
// unused 18,
/// <summary>
/// </summary>
AlreadyDefined = 19,
/// <summary>
/// </summary>
ElementNotInSchema = 20,
// unused 21,
/// <summary>
/// </summary>
InvalidBaseType = 22,
/// <summary>
/// </summary>
NoConcreteDescendants = 23,
/// <summary>
/// </summary>
CycleInTypeHierarchy = 24,
/// <summary>
/// </summary>
InvalidVersionNumber = 25,
/// <summary>
/// </summary>
InvalidSize = 26,
/// <summary>
/// </summary>
InvalidBoolean = 27,
// unused 28,
/// <summary>
/// </summary>
BadType = 29,
// unused 30,
// unused 31,
/// <summary>
/// </summary>
InvalidVersioningClass = 32,
/// <summary>
/// </summary>
InvalidVersionIntroduced = 33,
/// <summary>
/// </summary>
BadNamespace = 34,
// unused 35,
// unused 36,
// unused 37,
/// <summary>
/// </summary>
UnresolvedReferenceSchema = 38,
// unused 39,
/// <summary>
/// </summary>
NotInNamespace = 40,
/// <summary>
/// </summary>
NotUnnestedType = 41,
/// <summary>
/// </summary>
BadProperty = 42,
/// <summary>
/// </summary>
UndefinedProperty = 43,
/// <summary>
/// </summary>
InvalidPropertyType = 44,
/// <summary>
/// </summary>
InvalidAsNestedType = 45,
/// <summary>
/// </summary>
InvalidChangeUnit = 46,
/// <summary>
/// </summary>
UnauthorizedAccessException = 47,
// unused 48,
// unused 49,
/// <summary>
/// Namespace attribute must be specified.
/// </summary>
MissingNamespaceAttribute = 50,
/// <summary>
/// Precision out of range
/// </summary>
PrecisionOutOfRange = 51,
/// <summary>
/// Scale out of range
/// </summary>
ScaleOutOfRange = 52,
/// <summary>
/// </summary>
DefaultNotAllowed = 53,
/// <summary>
/// </summary>
InvalidDefault = 54,
/// <summary>
/// One of the required facets is missing
/// </summary>
RequiredFacetMissing = 55,
/// <summary>
/// </summary>
BadImageFormatException = 56,
/// <summary>
/// </summary>
MissingSchemaXml = 57,
/// <summary>
/// </summary>
BadPrecisionAndScale = 58,
/// <summary>
/// </summary>
InvalidChangeUnitUsage = 59,
/// <summary>
/// </summary>
NameTooLong = 60,
/// <summary>
/// </summary>
CircularlyDefinedType = 61,
/// <summary>
/// </summary>
InvalidAssociation = 62,
/// <summary>
/// The facet isn't allow by the property type.
/// </summary>
FacetNotAllowedByType = 63,
/// <summary>
/// This facet value is constant and is specified in the schema
/// </summary>
ConstantFacetSpecifiedInSchema = 64,
// unused 65,
// unused 66,
// unused 67,
// unused 68,
// unused 69,
// unused 70,
// unused 71,
// unused 72,
// unused 73,
/// <summary>
/// </summary>
BadNavigationProperty = 74,
/// <summary>
/// </summary>
InvalidKey = 75,
// unused 76,
// unused 77,
// unused 78,
// unused 79,
// unused 80,
// unused 81,
// unused 82,
// unused 83,
// unused 84,
// unused 85,
// unused 86,
// unused 87,
// unused 88,
// unused 89,
// unused 90,
// unused 91,
/// <summary>
/// Multiplicity value was malformed
/// </summary>
InvalidMultiplicity = 92,
// unused 93,
// unused 94,
// unused 95,
/// <summary>
/// The value for the Action attribute is invalid or not allowed in the current context
/// </summary>
InvalidAction = 96,
/// <summary>
/// An error occured processing the On<Operation> elements
/// </summary>
InvalidOperation = 97,
// unused 98,
/// <summary>
/// Ends were given for the Property element of a EntityContainer that is not a RelationshipSet
/// </summary>
InvalidContainerTypeForEnd = 99,
/// <summary>
/// The extent name used in the EntittyContainerType End does not match the name of any of the EntityContainerProperties in the containing EntityContainer
/// </summary>
InvalidEndEntitySet = 100,
/// <summary>
/// An end element was not given, and cannot be inferred because too many EntityContainerEntitySet elements that are good possibilities.
/// </summary>
AmbiguousEntityContainerEnd = 101,
/// <summary>
/// An end element was not given, and cannot be infered because there is no EntityContainerEntitySets that are the correct type to be used as an EntitySet.
/// </summary>
MissingExtentEntityContainerEnd = 102,
// unused 103,
// unused 104,
// unused 105,
/// <summary>
/// Not a valid parameter direction for the parameter in a function
/// </summary>
BadParameterDirection = 106,
/// <summary>
/// Unable to infer an optional schema part, to resolve this, be more explicit
/// </summary>
FailedInference = 107,
// unused = 108,
/// <summary>
/// Invalid facet attribute(s) specified in provider manifest
/// </summary>
InvalidFacetInProviderManifest = 109,
/// <summary>
/// Invalid role value in the relationship constraint
/// </summary>
InvalidRoleInRelationshipConstraint = 110,
/// <summary>
/// Invalid Property in relationship constraint
/// </summary>
InvalidPropertyInRelationshipConstraint = 111,
/// <summary>
/// Type mismatch between ToProperty and FromProperty in the relationship constraint
/// </summary>
TypeMismatchRelationshipConstaint = 112,
/// <summary>
/// Invalid multiplicty in FromRole in the relationship constraint
/// </summary>
InvalidMultiplicityInRoleInRelationshipConstraint = 113,
/// <summary>
/// The number of properties in the FromProperty and ToProperty in the relationship constraint must be identical
/// </summary>
MismatchNumberOfPropertiesInRelationshipConstraint = 114,
/// <summary>
/// No Properties defined in either FromProperty or ToProperty in the relationship constraint
/// </summary>
MissingPropertyInRelationshipConstraint = 115,
/// <summary>
/// Missing constraint in relationship type in ssdl
/// </summary>
MissingConstraintOnRelationshipType = 116,
// unused 117,
// unused 118,
/// <summary>
/// Same role referred in the ToRole and FromRole of a referential constraint
/// </summary>
SameRoleReferredInReferentialConstraint = 119,
/// <summary>
/// Invalid value for attribute ParameterTypeSemantics
/// </summary>
InvalidValueForParameterTypeSemantics = 120,
/// <summary>
/// Invalid type used for a Relationship End Type
/// </summary>
InvalidRelationshipEndType = 121,
/// <summary>
/// Invalid PrimitiveTypeKind
/// </summary>
InvalidPrimitiveTypeKind = 122,
// unused 123,
/// <summary>
/// Invalid TypeConversion DestinationType
/// </summary>
InvalidTypeConversionDestinationType = 124,
/// <summary>
/// Expected a integer value between 0 - 255
/// </summary>
ByteValueExpected = 125,
/// <summary>
/// Invalid Type specified in function
/// </summary>
FunctionWithNonPrimitiveTypeNotSupported = 126,
/// <summary>
/// Precision must not be greater than 28
/// </summary>
PrecisionMoreThanAllowedMax = 127,
/// <summary>
/// Properties that are part of entity key must be of scalar type
/// </summary>
EntityKeyMustBeScalar = 128,
/// <summary>
/// Binary and spatial type properties which are part of entity key are currently not supported
/// </summary>
EntityKeyTypeCurrentlyNotSupported = 129,
/// <summary>
/// The primitive type kind does not have a prefered mapping
/// </summary>
NoPreferredMappingForPrimitiveTypeKind = 130,
/// <summary>
/// More than one PreferredMapping for a PrimitiveTypeKind
/// </summary>
TooManyPreferredMappingsForPrimitiveTypeKind = 131,
/// <summary>
/// End with * multiplicity cannot have operations specified
/// </summary>
EndWithManyMultiplicityCannotHaveOperationsSpecified = 132,
/// <summary>
/// EntitySet type has no keys
/// </summary>
EntitySetTypeHasNoKeys = 133,
/// <summary>
/// InvalidNumberOfParametersForAggregateFunction
/// </summary>
InvalidNumberOfParametersForAggregateFunction = 134,
/// <summary>
/// InvalidParameterTypeForAggregateFunction
/// </summary>
InvalidParameterTypeForAggregateFunction = 135,
/// <summary>
/// Composable functions and function imports must declare a return type.
/// </summary>
ComposableFunctionOrFunctionImportWithoutReturnType = 136,
/// <summary>
/// Non-composable functions must not declare a return type.
/// </summary>
NonComposableFunctionWithReturnType = 137,
/// <summary>
/// Non-composable functions do not permit the aggregate, niladic, or built-in attributes.
/// </summary>
NonComposableFunctionAttributesNotValid = 138,
/// <summary>
/// Composable functions can not include command text attribute.
/// </summary>
ComposableFunctionWithCommandText = 139,
/// <summary>
/// Functions should not declare both a store name and command text (only one or the other
/// can be used).
/// </summary>
FunctionDeclaresCommandTextAndStoreFunctionName = 140,
/// <summary>
/// SystemNamespace
/// </summary>
SystemNamespace = 141,
/// <summary>
/// Empty DefiningQuery text
/// </summary>
EmptyDefiningQuery = 142,
/// <summary>
/// Schema, Table and DefiningQuery are all specified, and are mutualy exlusive
/// </summary>
TableAndSchemaAreMutuallyExclusiveWithDefiningQuery = 143,
// unused 144,
/// <summary>
/// Conurency can't change for any sub types of an EntitySet type.
/// </summary>
ConcurrencyRedefinedOnSubTypeOfEntitySetType = 145,
/// <summary>
/// Function import return type must be either empty, a collection of entities, or a singleton scalar.
/// </summary>
FunctionImportUnsupportedReturnType = 146,
/// <summary>
/// Function import specifies a non-existent entity set.
/// </summary>
FunctionImportUnknownEntitySet = 147,
/// <summary>
/// Function import specifies entity type return but no entity set.
/// </summary>
FunctionImportReturnsEntitiesButDoesNotSpecifyEntitySet = 148,
/// <summary>
/// Function import specifies entity type that does not derive from element type of entity set.
/// </summary>
FunctionImportEntityTypeDoesNotMatchEntitySet = 149,
/// <summary>
/// Function import specifies a binding to an entity set but does not return entities.
/// </summary>
FunctionImportSpecifiesEntitySetButDoesNotReturnEntityType = 150,
/// <summary>
/// InternalError
/// </summary>
InternalError = 152,
/// <summary>
/// Same Entity Set Taking part in the same role of the relationship set in two different relationship sets
/// </summary>
SimilarRelationshipEnd = 153,
/// <summary>
/// Entity key refers to the same property twice
/// </summary>
DuplicatePropertySpecifiedInEntityKey = 154,
/// <summary>
/// Function declares a ReturnType attribute and element
/// </summary>
AmbiguousFunctionReturnType = 156,
/// <summary>
/// Nullable Complex Type not supported in Edm V1
/// </summary>
NullableComplexType = 157,
/// <summary>
/// Only Complex Collections supported in Edm V1.1
/// </summary>
NonComplexCollections = 158,
/// <summary>
/// No Key defined on Entity Type
/// </summary>
KeyMissingOnEntityType = 159,
/// <summary>
/// Invalid namespace specified in using element
/// </summary>
InvalidNamespaceInUsing = 160,
/// <summary>
/// Need not specify system namespace in using
/// </summary>
NeedNotUseSystemNamespaceInUsing = 161,
/// <summary>
/// Cannot use a reserved/system namespace as alias
/// </summary>
CannotUseSystemNamespaceAsAlias = 162,
/// <summary>
/// Invalid qualification specified for type
/// </summary>
InvalidNamespaceName = 163,
/// <summary>
/// Invalid Entity Container Name in extends attribute
/// </summary>
InvalidEntityContainerNameInExtends = 164,
// unused 165,
/// <summary>
/// Must specify namespace or alias of the schema in which this type is defined
/// </summary>
InvalidNamespaceOrAliasSpecified = 166,
/// <summary>
/// Entity Container cannot extend itself
/// </summary>
EntityContainerCannotExtendItself = 167,
/// <summary>
/// Failed to retrieve provider manifest
/// </summary>
FailedToRetrieveProviderManifest = 168,
/// <summary>
/// Mismatched Provider Manifest token values in SSDL artifacts
/// </summary>
ProviderManifestTokenMismatch = 169,
/// <summary>
/// Missing Provider Manifest token value in SSDL artifact(s)
/// </summary>
ProviderManifestTokenNotFound = 170,
/// <summary>
/// Empty CommandText element
/// </summary>
EmptyCommandText = 171,
/// <summary>
/// Inconsistent Provider values in SSDL artifacts
/// </summary>
InconsistentProvider = 172,
/// <summary>
/// Inconsistent Provider Manifest token values in SSDL artifacts
/// </summary>
InconsistentProviderManifestToken = 173,
/// <summary>
/// Duplicated Function overloads
/// </summary>
DuplicatedFunctionoverloads = 174,
/// <summary>
/// InvalidProvider
/// </summary>
InvalidProvider = 175,
/// <summary>
/// FunctionWithNonEdmTypeNotSupported
/// </summary>
FunctionWithNonEdmTypeNotSupported = 176,
/// <summary>
/// ComplexTypeAsReturnTypeAndDefinedEntitySet
/// </summary>
ComplexTypeAsReturnTypeAndDefinedEntitySet = 177,
/// <summary>
/// ComplexTypeAsReturnTypeAndDefinedEntitySet
/// </summary>
ComplexTypeAsReturnTypeAndNestedComplexProperty = 178,
// unused = 179,
/// <summary>
/// A function import can be either composable or side-effecting, but not both.
/// </summary>
FunctionImportComposableAndSideEffectingNotAllowed = 180,
/// <summary>
/// A function import can specify an entity set or an entity set path, but not both.
/// </summary>
FunctionImportEntitySetAndEntitySetPathDeclared = 181,
/// <summary>
/// In model functions facet attribute is allowed only on ScalarTypes
/// </summary>
FacetOnNonScalarType = 182,
/// <summary>
/// Captures several conditions where facets are placed on element where it should not exist.
/// </summary>
IncorrectlyPlacedFacet = 183,
/// <summary>
/// Return type has not been declared
/// </summary>
ReturnTypeNotDeclared = 184,
TypeNotDeclared = 185,
RowTypeWithoutProperty = 186,
ReturnTypeDeclaredAsAttributeAndElement = 187,
TypeDeclaredAsAttributeAndElement = 188,
ReferenceToNonEntityType = 189,
/// <summary>
/// Collection and reference type parameters are not allowed in function imports.
/// </summary>
FunctionImportCollectionAndRefParametersNotAllowed = 190,
IncompatibleSchemaVersion = 191,
/// <summary>
/// The structural annotation cannot use codegen namespaces
/// </summary>
NoCodeGenNamespaceInStructuralAnnotation = 192,
/// <summary>
/// Function and type cannot have the same fully qualified name
/// </summary>
AmbiguousFunctionAndType = 193,
/// <summary>
/// Cannot load different version of schema in the same ItemCollection
/// </summary>
CannotLoadDifferentVersionOfSchemaInTheSameItemCollection = 194,
/// <summary>
/// Expected bool value
/// </summary>
BoolValueExpected = 195,
/// <summary>
/// End without Multiplicity specified
/// </summary>
EndWithoutMultiplicity = 196,
/// <summary>
/// In SSDL, if composable function returns a collection of rows (TVF), all row properties must be of scalar types.
/// </summary>
TVFReturnTypeRowHasNonScalarProperty = 197,
// FunctionUnknownEntityContainer = 198,
// FunctionEntityContainerMustBeSpecified = 199,
// FunctionUnknownEntitySet = 200,
/// <summary>
/// Only nullable parameters are supported in function imports.
/// </summary>
FunctionImportNonNullableParametersNotAllowed = 201,
/// <summary>
/// Defining expression and entity set can not be specified at the same time.
/// </summary>
FunctionWithDefiningExpressionAndEntitySetNotAllowed = 202,
/// <summary>
/// Function specifies return type that does not derive from element type of entity set.
/// </summary>
FunctionEntityTypeScopeDoesNotMatchReturnType = 203,
/// <summary>
/// The specified type cannot be used as the underlying type of Enum type.
/// </summary>
InvalidEnumUnderlyingType = 204,
/// <summary>
/// Duplicate enumeration member.
/// </summary>
DuplicateEnumMember = 205,
/// <summary>
/// The calculated value for an enum member is ouf of Int64 range.
/// </summary>
CalculatedEnumValueOutOfRange = 206,
/// <summary>
/// The enumeration value for an enum member is out of its underlying type range.
/// </summary>
EnumMemberValueOutOfItsUnderylingTypeRange = 207,
/// <summary>
/// The Srid value is out of range.
/// </summary>
InvalidSystemReferenceId = 208,
/// <summary>
/// A CSDL spatial type in a file without the UseSpatialUnionType annotation
/// </summary>
UnexpectedSpatialType = 209,
}
}
| 31.474667 | 168 | 0.533381 | [
"Apache-2.0"
] | TerraVenil/entityframework | src/EntityFramework/Core/SchemaObjectModel/ErrorCode.cs | 23,606 | C# |
#if CSHotFix
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;
using CSHotFix.CLR.TypeSystem;
using CSHotFix.CLR.Method;
using CSHotFix.Runtime.Enviorment;
using CSHotFix.Runtime.Intepreter;
using CSHotFix.Runtime.Stack;
using CSHotFix.Reflection;
using CSHotFix.CLR.Utils;
using System.Linq;
namespace CSHotFix.Runtime.Generated
{
unsafe class UnityEngine_Assertions_Assert_Binding
{
public static void Register(CSHotFix.Runtime.Enviorment.AppDomain app)
{
BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
MethodBase method;
Type[] args;
Type type = typeof(UnityEngine.Assertions.Assert);
args = new Type[]{typeof(System.Boolean)};
method = type.GetMethod("IsTrue", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, IsTrue_0);
args = new Type[]{typeof(System.Boolean), typeof(System.String)};
method = type.GetMethod("IsTrue", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, IsTrue_1);
args = new Type[]{typeof(System.Boolean)};
method = type.GetMethod("IsFalse", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, IsFalse_2);
args = new Type[]{typeof(System.Boolean), typeof(System.String)};
method = type.GetMethod("IsFalse", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, IsFalse_3);
args = new Type[]{typeof(System.Single), typeof(System.Single)};
method = type.GetMethod("AreApproximatelyEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreApproximatelyEqual_4);
args = new Type[]{typeof(System.Single), typeof(System.Single), typeof(System.String)};
method = type.GetMethod("AreApproximatelyEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreApproximatelyEqual_5);
args = new Type[]{typeof(System.Single), typeof(System.Single), typeof(System.Single)};
method = type.GetMethod("AreApproximatelyEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreApproximatelyEqual_6);
args = new Type[]{typeof(System.Single), typeof(System.Single), typeof(System.Single), typeof(System.String)};
method = type.GetMethod("AreApproximatelyEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreApproximatelyEqual_7);
args = new Type[]{typeof(System.Single), typeof(System.Single)};
method = type.GetMethod("AreNotApproximatelyEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreNotApproximatelyEqual_8);
args = new Type[]{typeof(System.Single), typeof(System.Single), typeof(System.String)};
method = type.GetMethod("AreNotApproximatelyEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreNotApproximatelyEqual_9);
args = new Type[]{typeof(System.Single), typeof(System.Single), typeof(System.Single)};
method = type.GetMethod("AreNotApproximatelyEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreNotApproximatelyEqual_10);
args = new Type[]{typeof(System.Single), typeof(System.Single), typeof(System.Single), typeof(System.String)};
method = type.GetMethod("AreNotApproximatelyEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreNotApproximatelyEqual_11);
args = new Type[]{typeof(UnityEngine.Object), typeof(UnityEngine.Object), typeof(System.String)};
method = type.GetMethod("AreEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreEqual_12);
args = new Type[]{typeof(UnityEngine.Object), typeof(UnityEngine.Object), typeof(System.String)};
method = type.GetMethod("AreNotEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreNotEqual_13);
args = new Type[]{typeof(UnityEngine.Object), typeof(System.String)};
method = type.GetMethod("IsNull", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, IsNull_14);
args = new Type[]{typeof(UnityEngine.Object), typeof(System.String)};
method = type.GetMethod("IsNotNull", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, IsNotNull_15);
args = new Type[]{typeof(System.SByte), typeof(System.SByte)};
method = type.GetMethod("AreEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreEqual_16);
args = new Type[]{typeof(System.SByte), typeof(System.SByte), typeof(System.String)};
method = type.GetMethod("AreEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreEqual_17);
args = new Type[]{typeof(System.SByte), typeof(System.SByte)};
method = type.GetMethod("AreNotEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreNotEqual_18);
args = new Type[]{typeof(System.SByte), typeof(System.SByte), typeof(System.String)};
method = type.GetMethod("AreNotEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreNotEqual_19);
args = new Type[]{typeof(System.Byte), typeof(System.Byte)};
method = type.GetMethod("AreEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreEqual_20);
args = new Type[]{typeof(System.Byte), typeof(System.Byte), typeof(System.String)};
method = type.GetMethod("AreEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreEqual_21);
args = new Type[]{typeof(System.Byte), typeof(System.Byte)};
method = type.GetMethod("AreNotEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreNotEqual_22);
args = new Type[]{typeof(System.Byte), typeof(System.Byte), typeof(System.String)};
method = type.GetMethod("AreNotEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreNotEqual_23);
args = new Type[]{typeof(System.Char), typeof(System.Char)};
method = type.GetMethod("AreEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreEqual_24);
args = new Type[]{typeof(System.Char), typeof(System.Char), typeof(System.String)};
method = type.GetMethod("AreEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreEqual_25);
args = new Type[]{typeof(System.Char), typeof(System.Char)};
method = type.GetMethod("AreNotEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreNotEqual_26);
args = new Type[]{typeof(System.Char), typeof(System.Char), typeof(System.String)};
method = type.GetMethod("AreNotEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreNotEqual_27);
args = new Type[]{typeof(System.Int16), typeof(System.Int16)};
method = type.GetMethod("AreEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreEqual_28);
args = new Type[]{typeof(System.Int16), typeof(System.Int16), typeof(System.String)};
method = type.GetMethod("AreEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreEqual_29);
args = new Type[]{typeof(System.Int16), typeof(System.Int16)};
method = type.GetMethod("AreNotEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreNotEqual_30);
args = new Type[]{typeof(System.Int16), typeof(System.Int16), typeof(System.String)};
method = type.GetMethod("AreNotEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreNotEqual_31);
args = new Type[]{typeof(System.UInt16), typeof(System.UInt16)};
method = type.GetMethod("AreEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreEqual_32);
args = new Type[]{typeof(System.UInt16), typeof(System.UInt16), typeof(System.String)};
method = type.GetMethod("AreEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreEqual_33);
args = new Type[]{typeof(System.UInt16), typeof(System.UInt16)};
method = type.GetMethod("AreNotEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreNotEqual_34);
args = new Type[]{typeof(System.UInt16), typeof(System.UInt16), typeof(System.String)};
method = type.GetMethod("AreNotEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreNotEqual_35);
args = new Type[]{typeof(System.Int32), typeof(System.Int32)};
method = type.GetMethod("AreEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreEqual_36);
args = new Type[]{typeof(System.Int32), typeof(System.Int32), typeof(System.String)};
method = type.GetMethod("AreEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreEqual_37);
args = new Type[]{typeof(System.Int32), typeof(System.Int32)};
method = type.GetMethod("AreNotEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreNotEqual_38);
args = new Type[]{typeof(System.Int32), typeof(System.Int32), typeof(System.String)};
method = type.GetMethod("AreNotEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreNotEqual_39);
args = new Type[]{typeof(System.UInt32), typeof(System.UInt32)};
method = type.GetMethod("AreEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreEqual_40);
args = new Type[]{typeof(System.UInt32), typeof(System.UInt32), typeof(System.String)};
method = type.GetMethod("AreEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreEqual_41);
args = new Type[]{typeof(System.UInt32), typeof(System.UInt32)};
method = type.GetMethod("AreNotEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreNotEqual_42);
args = new Type[]{typeof(System.UInt32), typeof(System.UInt32), typeof(System.String)};
method = type.GetMethod("AreNotEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreNotEqual_43);
args = new Type[]{typeof(System.Int64), typeof(System.Int64)};
method = type.GetMethod("AreEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreEqual_44);
args = new Type[]{typeof(System.Int64), typeof(System.Int64), typeof(System.String)};
method = type.GetMethod("AreEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreEqual_45);
args = new Type[]{typeof(System.Int64), typeof(System.Int64)};
method = type.GetMethod("AreNotEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreNotEqual_46);
args = new Type[]{typeof(System.Int64), typeof(System.Int64), typeof(System.String)};
method = type.GetMethod("AreNotEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreNotEqual_47);
args = new Type[]{typeof(System.UInt64), typeof(System.UInt64)};
method = type.GetMethod("AreEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreEqual_48);
args = new Type[]{typeof(System.UInt64), typeof(System.UInt64), typeof(System.String)};
method = type.GetMethod("AreEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreEqual_49);
args = new Type[]{typeof(System.UInt64), typeof(System.UInt64)};
method = type.GetMethod("AreNotEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreNotEqual_50);
args = new Type[]{typeof(System.UInt64), typeof(System.UInt64), typeof(System.String)};
method = type.GetMethod("AreNotEqual", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AreNotEqual_51);
}
static StackObject* IsTrue_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 1);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.Boolean @condition = ptr_of_this_method->Value == 1;
UnityEngine.Assertions.Assert.IsTrue(@condition);
return __ret;
}
static StackObject* IsTrue_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 2);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.String @message = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.Boolean @condition = ptr_of_this_method->Value == 1;
UnityEngine.Assertions.Assert.IsTrue(@condition, @message);
return __ret;
}
static StackObject* IsFalse_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 1);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.Boolean @condition = ptr_of_this_method->Value == 1;
UnityEngine.Assertions.Assert.IsFalse(@condition);
return __ret;
}
static StackObject* IsFalse_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 2);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.String @message = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.Boolean @condition = ptr_of_this_method->Value == 1;
UnityEngine.Assertions.Assert.IsFalse(@condition, @message);
return __ret;
}
static StackObject* AreApproximatelyEqual_4(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 2);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.Single @actual = *(float*)&ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.Single @expected = *(float*)&ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreApproximatelyEqual(@expected, @actual);
return __ret;
}
static StackObject* AreApproximatelyEqual_5(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 3);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.String @message = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.Single @actual = *(float*)&ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
System.Single @expected = *(float*)&ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreApproximatelyEqual(@expected, @actual, @message);
return __ret;
}
static StackObject* AreApproximatelyEqual_6(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 3);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.Single @tolerance = *(float*)&ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.Single @actual = *(float*)&ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
System.Single @expected = *(float*)&ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreApproximatelyEqual(@expected, @actual, @tolerance);
return __ret;
}
static StackObject* AreApproximatelyEqual_7(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 4);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.String @message = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.Single @tolerance = *(float*)&ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
System.Single @actual = *(float*)&ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 4);
System.Single @expected = *(float*)&ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreApproximatelyEqual(@expected, @actual, @tolerance, @message);
return __ret;
}
static StackObject* AreNotApproximatelyEqual_8(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 2);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.Single @actual = *(float*)&ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.Single @expected = *(float*)&ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreNotApproximatelyEqual(@expected, @actual);
return __ret;
}
static StackObject* AreNotApproximatelyEqual_9(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 3);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.String @message = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.Single @actual = *(float*)&ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
System.Single @expected = *(float*)&ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreNotApproximatelyEqual(@expected, @actual, @message);
return __ret;
}
static StackObject* AreNotApproximatelyEqual_10(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 3);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.Single @tolerance = *(float*)&ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.Single @actual = *(float*)&ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
System.Single @expected = *(float*)&ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreNotApproximatelyEqual(@expected, @actual, @tolerance);
return __ret;
}
static StackObject* AreNotApproximatelyEqual_11(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 4);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.String @message = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.Single @tolerance = *(float*)&ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
System.Single @actual = *(float*)&ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 4);
System.Single @expected = *(float*)&ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreNotApproximatelyEqual(@expected, @actual, @tolerance, @message);
return __ret;
}
static StackObject* AreEqual_12(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 3);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.String @message = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
UnityEngine.Object @actual = (UnityEngine.Object)typeof(UnityEngine.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);
ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
UnityEngine.Object @expected = (UnityEngine.Object)typeof(UnityEngine.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);
UnityEngine.Assertions.Assert.AreEqual(@expected, @actual, @message);
return __ret;
}
static StackObject* AreNotEqual_13(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 3);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.String @message = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
UnityEngine.Object @actual = (UnityEngine.Object)typeof(UnityEngine.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);
ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
UnityEngine.Object @expected = (UnityEngine.Object)typeof(UnityEngine.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);
UnityEngine.Assertions.Assert.AreNotEqual(@expected, @actual, @message);
return __ret;
}
static StackObject* IsNull_14(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 2);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.String @message = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
UnityEngine.Object @value = (UnityEngine.Object)typeof(UnityEngine.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);
UnityEngine.Assertions.Assert.IsNull(@value, @message);
return __ret;
}
static StackObject* IsNotNull_15(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 2);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.String @message = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
UnityEngine.Object @value = (UnityEngine.Object)typeof(UnityEngine.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);
UnityEngine.Assertions.Assert.IsNotNull(@value, @message);
return __ret;
}
static StackObject* AreEqual_16(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 2);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.SByte @actual = (sbyte)ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.SByte @expected = (sbyte)ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreEqual(@expected, @actual);
return __ret;
}
static StackObject* AreEqual_17(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 3);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.String @message = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.SByte @actual = (sbyte)ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
System.SByte @expected = (sbyte)ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreEqual(@expected, @actual, @message);
return __ret;
}
static StackObject* AreNotEqual_18(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 2);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.SByte @actual = (sbyte)ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.SByte @expected = (sbyte)ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreNotEqual(@expected, @actual);
return __ret;
}
static StackObject* AreNotEqual_19(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 3);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.String @message = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.SByte @actual = (sbyte)ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
System.SByte @expected = (sbyte)ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreNotEqual(@expected, @actual, @message);
return __ret;
}
static StackObject* AreEqual_20(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 2);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.Byte @actual = (byte)ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.Byte @expected = (byte)ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreEqual(@expected, @actual);
return __ret;
}
static StackObject* AreEqual_21(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 3);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.String @message = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.Byte @actual = (byte)ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
System.Byte @expected = (byte)ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreEqual(@expected, @actual, @message);
return __ret;
}
static StackObject* AreNotEqual_22(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 2);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.Byte @actual = (byte)ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.Byte @expected = (byte)ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreNotEqual(@expected, @actual);
return __ret;
}
static StackObject* AreNotEqual_23(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 3);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.String @message = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.Byte @actual = (byte)ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
System.Byte @expected = (byte)ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreNotEqual(@expected, @actual, @message);
return __ret;
}
static StackObject* AreEqual_24(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 2);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.Char @actual = (char)ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.Char @expected = (char)ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreEqual(@expected, @actual);
return __ret;
}
static StackObject* AreEqual_25(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 3);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.String @message = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.Char @actual = (char)ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
System.Char @expected = (char)ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreEqual(@expected, @actual, @message);
return __ret;
}
static StackObject* AreNotEqual_26(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 2);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.Char @actual = (char)ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.Char @expected = (char)ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreNotEqual(@expected, @actual);
return __ret;
}
static StackObject* AreNotEqual_27(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 3);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.String @message = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.Char @actual = (char)ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
System.Char @expected = (char)ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreNotEqual(@expected, @actual, @message);
return __ret;
}
static StackObject* AreEqual_28(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 2);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.Int16 @actual = (short)ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.Int16 @expected = (short)ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreEqual(@expected, @actual);
return __ret;
}
static StackObject* AreEqual_29(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 3);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.String @message = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.Int16 @actual = (short)ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
System.Int16 @expected = (short)ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreEqual(@expected, @actual, @message);
return __ret;
}
static StackObject* AreNotEqual_30(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 2);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.Int16 @actual = (short)ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.Int16 @expected = (short)ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreNotEqual(@expected, @actual);
return __ret;
}
static StackObject* AreNotEqual_31(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 3);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.String @message = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.Int16 @actual = (short)ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
System.Int16 @expected = (short)ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreNotEqual(@expected, @actual, @message);
return __ret;
}
static StackObject* AreEqual_32(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 2);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.UInt16 @actual = (ushort)ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.UInt16 @expected = (ushort)ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreEqual(@expected, @actual);
return __ret;
}
static StackObject* AreEqual_33(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 3);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.String @message = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.UInt16 @actual = (ushort)ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
System.UInt16 @expected = (ushort)ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreEqual(@expected, @actual, @message);
return __ret;
}
static StackObject* AreNotEqual_34(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 2);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.UInt16 @actual = (ushort)ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.UInt16 @expected = (ushort)ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreNotEqual(@expected, @actual);
return __ret;
}
static StackObject* AreNotEqual_35(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 3);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.String @message = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.UInt16 @actual = (ushort)ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
System.UInt16 @expected = (ushort)ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreNotEqual(@expected, @actual, @message);
return __ret;
}
static StackObject* AreEqual_36(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 2);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.Int32 @actual = ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.Int32 @expected = ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreEqual(@expected, @actual);
return __ret;
}
static StackObject* AreEqual_37(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 3);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.String @message = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.Int32 @actual = ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
System.Int32 @expected = ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreEqual(@expected, @actual, @message);
return __ret;
}
static StackObject* AreNotEqual_38(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 2);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.Int32 @actual = ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.Int32 @expected = ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreNotEqual(@expected, @actual);
return __ret;
}
static StackObject* AreNotEqual_39(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 3);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.String @message = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.Int32 @actual = ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
System.Int32 @expected = ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreNotEqual(@expected, @actual, @message);
return __ret;
}
static StackObject* AreEqual_40(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 2);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.UInt32 @actual = (uint)ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.UInt32 @expected = (uint)ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreEqual(@expected, @actual);
return __ret;
}
static StackObject* AreEqual_41(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 3);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.String @message = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.UInt32 @actual = (uint)ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
System.UInt32 @expected = (uint)ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreEqual(@expected, @actual, @message);
return __ret;
}
static StackObject* AreNotEqual_42(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 2);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.UInt32 @actual = (uint)ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.UInt32 @expected = (uint)ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreNotEqual(@expected, @actual);
return __ret;
}
static StackObject* AreNotEqual_43(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 3);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.String @message = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.UInt32 @actual = (uint)ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
System.UInt32 @expected = (uint)ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreNotEqual(@expected, @actual, @message);
return __ret;
}
static StackObject* AreEqual_44(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 2);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.Int64 @actual = *(long*)&ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.Int64 @expected = *(long*)&ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreEqual(@expected, @actual);
return __ret;
}
static StackObject* AreEqual_45(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 3);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.String @message = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.Int64 @actual = *(long*)&ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
System.Int64 @expected = *(long*)&ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreEqual(@expected, @actual, @message);
return __ret;
}
static StackObject* AreNotEqual_46(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 2);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.Int64 @actual = *(long*)&ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.Int64 @expected = *(long*)&ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreNotEqual(@expected, @actual);
return __ret;
}
static StackObject* AreNotEqual_47(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 3);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.String @message = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.Int64 @actual = *(long*)&ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
System.Int64 @expected = *(long*)&ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreNotEqual(@expected, @actual, @message);
return __ret;
}
static StackObject* AreEqual_48(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 2);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.UInt64 @actual = *(ulong*)&ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.UInt64 @expected = *(ulong*)&ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreEqual(@expected, @actual);
return __ret;
}
static StackObject* AreEqual_49(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 3);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.String @message = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.UInt64 @actual = *(ulong*)&ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
System.UInt64 @expected = *(ulong*)&ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreEqual(@expected, @actual, @message);
return __ret;
}
static StackObject* AreNotEqual_50(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 2);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.UInt64 @actual = *(ulong*)&ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.UInt64 @expected = *(ulong*)&ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreNotEqual(@expected, @actual);
return __ret;
}
static StackObject* AreNotEqual_51(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 3);
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.String @message = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.UInt64 @actual = *(ulong*)&ptr_of_this_method->Value;
ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
System.UInt64 @expected = *(ulong*)&ptr_of_this_method->Value;
UnityEngine.Assertions.Assert.AreNotEqual(@expected, @actual, @message);
return __ret;
}
}
}
#endif
| 48.232129 | 167 | 0.650502 | [
"MIT"
] | 591094733/cshotfix | CSHotFix_SimpleFramework/Assets/CSHotFixLibaray/Generated/CLRGen1/UnityEngine_Assertions_Assert_Binding.cs | 60,049 | 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.Collections.Generic;
using Aliyun.Acs.Core;
namespace Aliyun.Acs.Mts.Model.V20140618
{
public class UpdateCoverPipelineResponse : AcsResponse
{
private string requestId;
private UpdateCoverPipeline_Pipeline pipeline;
public string RequestId
{
get
{
return requestId;
}
set
{
requestId = value;
}
}
public UpdateCoverPipeline_Pipeline Pipeline
{
get
{
return pipeline;
}
set
{
pipeline = value;
}
}
public class UpdateCoverPipeline_Pipeline
{
private string id;
private string name;
private string state;
private int? priority;
private string role;
private UpdateCoverPipeline_NotifyConfig notifyConfig;
public string Id
{
get
{
return id;
}
set
{
id = value;
}
}
public string Name
{
get
{
return name;
}
set
{
name = value;
}
}
public string State
{
get
{
return state;
}
set
{
state = value;
}
}
public int? Priority
{
get
{
return priority;
}
set
{
priority = value;
}
}
public string Role
{
get
{
return role;
}
set
{
role = value;
}
}
public UpdateCoverPipeline_NotifyConfig NotifyConfig
{
get
{
return notifyConfig;
}
set
{
notifyConfig = value;
}
}
public class UpdateCoverPipeline_NotifyConfig
{
private string topic;
private string queue;
public string Topic
{
get
{
return topic;
}
set
{
topic = value;
}
}
public string Queue
{
get
{
return queue;
}
set
{
queue = value;
}
}
}
}
}
}
| 15.700565 | 63 | 0.56783 | [
"Apache-2.0"
] | AxiosCros/aliyun-openapi-net-sdk | aliyun-net-sdk-mts/Mts/Model/V20140618/UpdateCoverPipelineResponse.cs | 2,779 | C# |
// WARNING:
// This file was generated by the Microsoft DataWarehouse String Resource Tool 4.0.0.0
// from information in sr.strings
// DO NOT MODIFY THIS FILE'S CONTENTS, THEY WILL BE OVERWRITTEN
//
namespace Microsoft.SqlTools.ServiceLayer
{
using System;
using System.Reflection;
using System.Resources;
using System.Globalization;
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class SR
{
protected SR()
{ }
public static CultureInfo Culture
{
get
{
return Keys.Culture;
}
set
{
Keys.Culture = value;
}
}
public static string ConnectionServiceConnectErrorNullParams
{
get
{
return Keys.GetString(Keys.ConnectionServiceConnectErrorNullParams);
}
}
public static string ConnectionServiceListDbErrorNullOwnerUri
{
get
{
return Keys.GetString(Keys.ConnectionServiceListDbErrorNullOwnerUri);
}
}
public static string ConnectionServiceConnStringInvalidAlwaysEncryptedOptionCombination
{
get
{
return Keys.GetString(Keys.ConnectionServiceConnStringInvalidAlwaysEncryptedOptionCombination);
}
}
public static string ConnectionServiceConnectionCanceled
{
get
{
return Keys.GetString(Keys.ConnectionServiceConnectionCanceled);
}
}
public static string ConnectionParamsValidateNullOwnerUri
{
get
{
return Keys.GetString(Keys.ConnectionParamsValidateNullOwnerUri);
}
}
public static string ConnectionParamsValidateNullConnection
{
get
{
return Keys.GetString(Keys.ConnectionParamsValidateNullConnection);
}
}
public static string ConnectionParamsValidateNullServerName
{
get
{
return Keys.GetString(Keys.ConnectionParamsValidateNullServerName);
}
}
public static string AzureSqlDbEdition
{
get
{
return Keys.GetString(Keys.AzureSqlDbEdition);
}
}
public static string AzureSqlDwEdition
{
get
{
return Keys.GetString(Keys.AzureSqlDwEdition);
}
}
public static string AzureSqlStretchEdition
{
get
{
return Keys.GetString(Keys.AzureSqlStretchEdition);
}
}
public static string AzureSqlAnalyticsOnDemandEdition
{
get
{
return Keys.GetString(Keys.AzureSqlAnalyticsOnDemandEdition);
}
}
public static string QueryServiceCancelAlreadyCompleted
{
get
{
return Keys.GetString(Keys.QueryServiceCancelAlreadyCompleted);
}
}
public static string QueryServiceCancelDisposeFailed
{
get
{
return Keys.GetString(Keys.QueryServiceCancelDisposeFailed);
}
}
public static string QueryServiceQueryCancelled
{
get
{
return Keys.GetString(Keys.QueryServiceQueryCancelled);
}
}
public static string QueryServiceSubsetBatchNotCompleted
{
get
{
return Keys.GetString(Keys.QueryServiceSubsetBatchNotCompleted);
}
}
public static string QueryServiceSubsetBatchOutOfRange
{
get
{
return Keys.GetString(Keys.QueryServiceSubsetBatchOutOfRange);
}
}
public static string QueryServiceSubsetResultSetOutOfRange
{
get
{
return Keys.GetString(Keys.QueryServiceSubsetResultSetOutOfRange);
}
}
public static string QueryServiceDataReaderByteCountInvalid
{
get
{
return Keys.GetString(Keys.QueryServiceDataReaderByteCountInvalid);
}
}
public static string QueryServiceDataReaderCharCountInvalid
{
get
{
return Keys.GetString(Keys.QueryServiceDataReaderCharCountInvalid);
}
}
public static string QueryServiceDataReaderXmlCountInvalid
{
get
{
return Keys.GetString(Keys.QueryServiceDataReaderXmlCountInvalid);
}
}
public static string QueryServiceFileWrapperWriteOnly
{
get
{
return Keys.GetString(Keys.QueryServiceFileWrapperWriteOnly);
}
}
public static string QueryServiceFileWrapperNotInitialized
{
get
{
return Keys.GetString(Keys.QueryServiceFileWrapperNotInitialized);
}
}
public static string QueryServiceFileWrapperReadOnly
{
get
{
return Keys.GetString(Keys.QueryServiceFileWrapperReadOnly);
}
}
public static string QueryServiceAffectedOneRow
{
get
{
return Keys.GetString(Keys.QueryServiceAffectedOneRow);
}
}
public static string QueryServiceCompletedSuccessfully
{
get
{
return Keys.GetString(Keys.QueryServiceCompletedSuccessfully);
}
}
public static string QueryServiceColumnNull
{
get
{
return Keys.GetString(Keys.QueryServiceColumnNull);
}
}
public static string QueryServiceCellNull
{
get
{
return Keys.GetString(Keys.QueryServiceCellNull);
}
}
public static string QueryServiceRequestsNoQuery
{
get
{
return Keys.GetString(Keys.QueryServiceRequestsNoQuery);
}
}
public static string QueryServiceQueryInvalidOwnerUri
{
get
{
return Keys.GetString(Keys.QueryServiceQueryInvalidOwnerUri);
}
}
public static string QueryServiceQueryInProgress
{
get
{
return Keys.GetString(Keys.QueryServiceQueryInProgress);
}
}
public static string QueryServiceMessageSenderNotSql
{
get
{
return Keys.GetString(Keys.QueryServiceMessageSenderNotSql);
}
}
public static string QueryServiceResultSetAddNoRows
{
get
{
return Keys.GetString(Keys.QueryServiceResultSetAddNoRows);
}
}
public static string QueryServiceResultSetHasNoResults
{
get
{
return Keys.GetString(Keys.QueryServiceResultSetHasNoResults);
}
}
public static string QueryServiceResultSetTooLarge
{
get
{
return Keys.GetString(Keys.QueryServiceResultSetTooLarge);
}
}
public static string QueryServiceSaveAsResultSetNotComplete
{
get
{
return Keys.GetString(Keys.QueryServiceSaveAsResultSetNotComplete);
}
}
public static string QueryServiceSaveAsMiscStartingError
{
get
{
return Keys.GetString(Keys.QueryServiceSaveAsMiscStartingError);
}
}
public static string QueryServiceSaveAsInProgress
{
get
{
return Keys.GetString(Keys.QueryServiceSaveAsInProgress);
}
}
public static string QueryServiceResultSetNotRead
{
get
{
return Keys.GetString(Keys.QueryServiceResultSetNotRead);
}
}
public static string QueryServiceResultSetStartRowOutOfRange
{
get
{
return Keys.GetString(Keys.QueryServiceResultSetStartRowOutOfRange);
}
}
public static string QueryServiceResultSetRowCountOutOfRange
{
get
{
return Keys.GetString(Keys.QueryServiceResultSetRowCountOutOfRange);
}
}
public static string QueryServiceResultSetNoColumnSchema
{
get
{
return Keys.GetString(Keys.QueryServiceResultSetNoColumnSchema);
}
}
public static string QueryServiceExecutionPlanNotFound
{
get
{
return Keys.GetString(Keys.QueryServiceExecutionPlanNotFound);
}
}
public static string SqlCmdExitOnError
{
get
{
return Keys.GetString(Keys.SqlCmdExitOnError);
}
}
public static string SqlCmdUnsupportedToken
{
get
{
return Keys.GetString(Keys.SqlCmdUnsupportedToken);
}
}
public static string PeekDefinitionNoResultsError
{
get
{
return Keys.GetString(Keys.PeekDefinitionNoResultsError);
}
}
public static string PeekDefinitionDatabaseError
{
get
{
return Keys.GetString(Keys.PeekDefinitionDatabaseError);
}
}
public static string PeekDefinitionNotConnectedError
{
get
{
return Keys.GetString(Keys.PeekDefinitionNotConnectedError);
}
}
public static string PeekDefinitionTimedoutError
{
get
{
return Keys.GetString(Keys.PeekDefinitionTimedoutError);
}
}
public static string PeekDefinitionTypeNotSupportedError
{
get
{
return Keys.GetString(Keys.PeekDefinitionTypeNotSupportedError);
}
}
public static string ErrorEmptyStringReplacement
{
get
{
return Keys.GetString(Keys.ErrorEmptyStringReplacement);
}
}
public static string WorkspaceServicePositionLineOutOfRange
{
get
{
return Keys.GetString(Keys.WorkspaceServicePositionLineOutOfRange);
}
}
public static string EditDataObjectNotFound
{
get
{
return Keys.GetString(Keys.EditDataObjectNotFound);
}
}
public static string EditDataSessionNotFound
{
get
{
return Keys.GetString(Keys.EditDataSessionNotFound);
}
}
public static string EditDataSessionAlreadyExists
{
get
{
return Keys.GetString(Keys.EditDataSessionAlreadyExists);
}
}
public static string EditDataSessionNotInitialized
{
get
{
return Keys.GetString(Keys.EditDataSessionNotInitialized);
}
}
public static string EditDataSessionAlreadyInitialized
{
get
{
return Keys.GetString(Keys.EditDataSessionAlreadyInitialized);
}
}
public static string EditDataSessionAlreadyInitializing
{
get
{
return Keys.GetString(Keys.EditDataSessionAlreadyInitializing);
}
}
public static string EditDataMetadataNotExtended
{
get
{
return Keys.GetString(Keys.EditDataMetadataNotExtended);
}
}
public static string EditDataMetadataObjectNameRequired
{
get
{
return Keys.GetString(Keys.EditDataMetadataObjectNameRequired);
}
}
public static string EditDataMetadataTooManyIdentifiers
{
get
{
return Keys.GetString(Keys.EditDataMetadataTooManyIdentifiers);
}
}
public static string EditDataFilteringNegativeLimit
{
get
{
return Keys.GetString(Keys.EditDataFilteringNegativeLimit);
}
}
public static string EditDataQueryFailed
{
get
{
return Keys.GetString(Keys.EditDataQueryFailed);
}
}
public static string EditDataQueryNotCompleted
{
get
{
return Keys.GetString(Keys.EditDataQueryNotCompleted);
}
}
public static string EditDataQueryImproperResultSets
{
get
{
return Keys.GetString(Keys.EditDataQueryImproperResultSets);
}
}
public static string EditDataFailedAddRow
{
get
{
return Keys.GetString(Keys.EditDataFailedAddRow);
}
}
public static string EditDataRowOutOfRange
{
get
{
return Keys.GetString(Keys.EditDataRowOutOfRange);
}
}
public static string EditDataUpdatePending
{
get
{
return Keys.GetString(Keys.EditDataUpdatePending);
}
}
public static string EditDataUpdateNotPending
{
get
{
return Keys.GetString(Keys.EditDataUpdateNotPending);
}
}
public static string EditDataObjectMetadataNotFound
{
get
{
return Keys.GetString(Keys.EditDataObjectMetadataNotFound);
}
}
public static string EditDataInvalidFormatBinary
{
get
{
return Keys.GetString(Keys.EditDataInvalidFormatBinary);
}
}
public static string EditDataInvalidFormatBoolean
{
get
{
return Keys.GetString(Keys.EditDataInvalidFormatBoolean);
}
}
public static string EditDataDeleteSetCell
{
get
{
return Keys.GetString(Keys.EditDataDeleteSetCell);
}
}
public static string EditDataColumnIdOutOfRange
{
get
{
return Keys.GetString(Keys.EditDataColumnIdOutOfRange);
}
}
public static string EditDataColumnCannotBeEdited
{
get
{
return Keys.GetString(Keys.EditDataColumnCannotBeEdited);
}
}
public static string EditDataColumnNoKeyColumns
{
get
{
return Keys.GetString(Keys.EditDataColumnNoKeyColumns);
}
}
public static string EditDataScriptFilePathNull
{
get
{
return Keys.GetString(Keys.EditDataScriptFilePathNull);
}
}
public static string EditDataCommitInProgress
{
get
{
return Keys.GetString(Keys.EditDataCommitInProgress);
}
}
public static string EditDataComputedColumnPlaceholder
{
get
{
return Keys.GetString(Keys.EditDataComputedColumnPlaceholder);
}
}
public static string EditDataTimeOver24Hrs
{
get
{
return Keys.GetString(Keys.EditDataTimeOver24Hrs);
}
}
public static string EditDataNullNotAllowed
{
get
{
return Keys.GetString(Keys.EditDataNullNotAllowed);
}
}
public static string EditDataMultiTableNotSupported
{
get
{
return Keys.GetString(Keys.EditDataMultiTableNotSupported);
}
}
public static string EditDataAliasesNotSupported
{
get
{
return Keys.GetString(Keys.EditDataAliasesNotSupported);
}
}
public static string EditDataExpressionsNotSupported
{
get
{
return Keys.GetString(Keys.EditDataExpressionsNotSupported);
}
}
public static string EditDataDuplicateColumnsNotSupported
{
get
{
return Keys.GetString(Keys.EditDataDuplicateColumnsNotSupported);
}
}
public static string EE_ExecutionInfo_InitializingLoop
{
get
{
return Keys.GetString(Keys.EE_ExecutionInfo_InitializingLoop);
}
}
public static string EE_BatchExecutionError_Ignoring
{
get
{
return Keys.GetString(Keys.EE_BatchExecutionError_Ignoring);
}
}
public static string EE_ExecutionInfo_FinalizingLoop
{
get
{
return Keys.GetString(Keys.EE_ExecutionInfo_FinalizingLoop);
}
}
public static string BatchParserWrapperExecutionError
{
get
{
return Keys.GetString(Keys.BatchParserWrapperExecutionError);
}
}
public static string TestLocalizationConstant
{
get
{
return Keys.GetString(Keys.TestLocalizationConstant);
}
}
public static string SqlScriptFormatterDecimalMissingPrecision
{
get
{
return Keys.GetString(Keys.SqlScriptFormatterDecimalMissingPrecision);
}
}
public static string SqlScriptFormatterLengthTypeMissingSize
{
get
{
return Keys.GetString(Keys.SqlScriptFormatterLengthTypeMissingSize);
}
}
public static string SqlScriptFormatterScalarTypeMissingScale
{
get
{
return Keys.GetString(Keys.SqlScriptFormatterScalarTypeMissingScale);
}
}
public static string TreeNodeError
{
get
{
return Keys.GetString(Keys.TreeNodeError);
}
}
public static string ServerNodeConnectionError
{
get
{
return Keys.GetString(Keys.ServerNodeConnectionError);
}
}
public static string SchemaHierarchy_Aggregates
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Aggregates);
}
}
public static string SchemaHierarchy_ServerRoles
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_ServerRoles);
}
}
public static string SchemaHierarchy_ApplicationRoles
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_ApplicationRoles);
}
}
public static string SchemaHierarchy_Assemblies
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Assemblies);
}
}
public static string SchemaHierarchy_AssemblyFiles
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_AssemblyFiles);
}
}
public static string SchemaHierarchy_AsymmetricKeys
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_AsymmetricKeys);
}
}
public static string SchemaHierarchy_DatabaseAsymmetricKeys
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_DatabaseAsymmetricKeys);
}
}
public static string SchemaHierarchy_DataCompressionOptions
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_DataCompressionOptions);
}
}
public static string SchemaHierarchy_Certificates
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Certificates);
}
}
public static string SchemaHierarchy_FileTables
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_FileTables);
}
}
public static string SchemaHierarchy_DatabaseCertificates
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_DatabaseCertificates);
}
}
public static string SchemaHierarchy_CheckConstraints
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_CheckConstraints);
}
}
public static string SchemaHierarchy_Columns
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Columns);
}
}
public static string SchemaHierarchy_Constraints
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Constraints);
}
}
public static string SchemaHierarchy_Contracts
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Contracts);
}
}
public static string SchemaHierarchy_Credentials
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Credentials);
}
}
public static string SchemaHierarchy_ErrorMessages
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_ErrorMessages);
}
}
public static string SchemaHierarchy_ServerRoleMembership
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_ServerRoleMembership);
}
}
public static string SchemaHierarchy_DatabaseOptions
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_DatabaseOptions);
}
}
public static string SchemaHierarchy_DatabaseRoles
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_DatabaseRoles);
}
}
public static string SchemaHierarchy_RoleMemberships
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_RoleMemberships);
}
}
public static string SchemaHierarchy_DatabaseTriggers
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_DatabaseTriggers);
}
}
public static string SchemaHierarchy_DefaultConstraints
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_DefaultConstraints);
}
}
public static string SchemaHierarchy_Defaults
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Defaults);
}
}
public static string SchemaHierarchy_Sequences
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Sequences);
}
}
public static string SchemaHierarchy_Endpoints
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Endpoints);
}
}
public static string SchemaHierarchy_EventNotifications
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_EventNotifications);
}
}
public static string SchemaHierarchy_ServerEventNotifications
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_ServerEventNotifications);
}
}
public static string SchemaHierarchy_ExtendedProperties
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_ExtendedProperties);
}
}
public static string SchemaHierarchy_FileGroups
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_FileGroups);
}
}
public static string SchemaHierarchy_ForeignKeys
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_ForeignKeys);
}
}
public static string SchemaHierarchy_FullTextCatalogs
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_FullTextCatalogs);
}
}
public static string SchemaHierarchy_FullTextIndexes
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_FullTextIndexes);
}
}
public static string SchemaHierarchy_Functions
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Functions);
}
}
public static string SchemaHierarchy_Indexes
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Indexes);
}
}
public static string SchemaHierarchy_InlineFunctions
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_InlineFunctions);
}
}
public static string SchemaHierarchy_Keys
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Keys);
}
}
public static string SchemaHierarchy_LinkedServers
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_LinkedServers);
}
}
public static string SchemaHierarchy_LinkedServerLogins
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_LinkedServerLogins);
}
}
public static string SchemaHierarchy_Logins
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Logins);
}
}
public static string SchemaHierarchy_MasterKey
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_MasterKey);
}
}
public static string SchemaHierarchy_MasterKeys
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_MasterKeys);
}
}
public static string SchemaHierarchy_MessageTypes
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_MessageTypes);
}
}
public static string SchemaHierarchy_MultiSelectFunctions
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_MultiSelectFunctions);
}
}
public static string SchemaHierarchy_Parameters
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Parameters);
}
}
public static string SchemaHierarchy_PartitionFunctions
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_PartitionFunctions);
}
}
public static string SchemaHierarchy_PartitionSchemes
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_PartitionSchemes);
}
}
public static string SchemaHierarchy_Permissions
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Permissions);
}
}
public static string SchemaHierarchy_PrimaryKeys
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_PrimaryKeys);
}
}
public static string SchemaHierarchy_Programmability
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Programmability);
}
}
public static string SchemaHierarchy_Queues
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Queues);
}
}
public static string SchemaHierarchy_RemoteServiceBindings
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_RemoteServiceBindings);
}
}
public static string SchemaHierarchy_ReturnedColumns
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_ReturnedColumns);
}
}
public static string SchemaHierarchy_Roles
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Roles);
}
}
public static string SchemaHierarchy_Routes
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Routes);
}
}
public static string SchemaHierarchy_Rules
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Rules);
}
}
public static string SchemaHierarchy_Schemas
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Schemas);
}
}
public static string SchemaHierarchy_Security
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Security);
}
}
public static string SchemaHierarchy_ServerObjects
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_ServerObjects);
}
}
public static string SchemaHierarchy_Management
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Management);
}
}
public static string SchemaHierarchy_ServerTriggers
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_ServerTriggers);
}
}
public static string SchemaHierarchy_ServiceBroker
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_ServiceBroker);
}
}
public static string SchemaHierarchy_Services
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Services);
}
}
public static string SchemaHierarchy_Signatures
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Signatures);
}
}
public static string SchemaHierarchy_LogFiles
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_LogFiles);
}
}
public static string SchemaHierarchy_Statistics
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Statistics);
}
}
public static string SchemaHierarchy_Storage
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Storage);
}
}
public static string SchemaHierarchy_StoredProcedures
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_StoredProcedures);
}
}
public static string SchemaHierarchy_SymmetricKeys
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SymmetricKeys);
}
}
public static string SchemaHierarchy_Synonyms
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Synonyms);
}
}
public static string SchemaHierarchy_Tables
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Tables);
}
}
public static string SchemaHierarchy_Triggers
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Triggers);
}
}
public static string SchemaHierarchy_Types
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Types);
}
}
public static string SchemaHierarchy_UniqueKeys
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_UniqueKeys);
}
}
public static string SchemaHierarchy_UserDefinedDataTypes
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_UserDefinedDataTypes);
}
}
public static string SchemaHierarchy_UserDefinedTypes
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_UserDefinedTypes);
}
}
public static string SchemaHierarchy_Users
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Users);
}
}
public static string SchemaHierarchy_Views
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Views);
}
}
public static string SchemaHierarchy_XmlIndexes
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_XmlIndexes);
}
}
public static string SchemaHierarchy_XMLSchemaCollections
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_XMLSchemaCollections);
}
}
public static string SchemaHierarchy_UserDefinedTableTypes
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_UserDefinedTableTypes);
}
}
public static string SchemaHierarchy_FilegroupFiles
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_FilegroupFiles);
}
}
public static string MissingCaption
{
get
{
return Keys.GetString(Keys.MissingCaption);
}
}
public static string SchemaHierarchy_BrokerPriorities
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_BrokerPriorities);
}
}
public static string SchemaHierarchy_CryptographicProviders
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_CryptographicProviders);
}
}
public static string SchemaHierarchy_DatabaseAuditSpecifications
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_DatabaseAuditSpecifications);
}
}
public static string SchemaHierarchy_DatabaseEncryptionKeys
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_DatabaseEncryptionKeys);
}
}
public static string SchemaHierarchy_EventSessions
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_EventSessions);
}
}
public static string SchemaHierarchy_FullTextStopLists
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_FullTextStopLists);
}
}
public static string SchemaHierarchy_ResourcePools
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_ResourcePools);
}
}
public static string SchemaHierarchy_ServerAudits
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_ServerAudits);
}
}
public static string SchemaHierarchy_ServerAuditSpecifications
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_ServerAuditSpecifications);
}
}
public static string SchemaHierarchy_SpatialIndexes
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SpatialIndexes);
}
}
public static string SchemaHierarchy_WorkloadGroups
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_WorkloadGroups);
}
}
public static string SchemaHierarchy_SqlFiles
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SqlFiles);
}
}
public static string SchemaHierarchy_ServerFunctions
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_ServerFunctions);
}
}
public static string SchemaHierarchy_SqlType
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SqlType);
}
}
public static string SchemaHierarchy_ServerOptions
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_ServerOptions);
}
}
public static string SchemaHierarchy_DatabaseDiagrams
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_DatabaseDiagrams);
}
}
public static string SchemaHierarchy_SystemTables
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SystemTables);
}
}
public static string SchemaHierarchy_Databases
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Databases);
}
}
public static string SchemaHierarchy_SystemContracts
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SystemContracts);
}
}
public static string SchemaHierarchy_SystemDatabases
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SystemDatabases);
}
}
public static string SchemaHierarchy_SystemMessageTypes
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SystemMessageTypes);
}
}
public static string SchemaHierarchy_SystemQueues
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SystemQueues);
}
}
public static string SchemaHierarchy_SystemServices
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SystemServices);
}
}
public static string SchemaHierarchy_SystemStoredProcedures
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SystemStoredProcedures);
}
}
public static string SchemaHierarchy_SystemViews
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SystemViews);
}
}
public static string SchemaHierarchy_DataTierApplications
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_DataTierApplications);
}
}
public static string SchemaHierarchy_ExtendedStoredProcedures
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_ExtendedStoredProcedures);
}
}
public static string SchemaHierarchy_SystemAggregateFunctions
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SystemAggregateFunctions);
}
}
public static string SchemaHierarchy_SystemApproximateNumerics
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SystemApproximateNumerics);
}
}
public static string SchemaHierarchy_SystemBinaryStrings
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SystemBinaryStrings);
}
}
public static string SchemaHierarchy_SystemCharacterStrings
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SystemCharacterStrings);
}
}
public static string SchemaHierarchy_SystemCLRDataTypes
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SystemCLRDataTypes);
}
}
public static string SchemaHierarchy_SystemConfigurationFunctions
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SystemConfigurationFunctions);
}
}
public static string SchemaHierarchy_SystemCursorFunctions
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SystemCursorFunctions);
}
}
public static string SchemaHierarchy_SystemDataTypes
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SystemDataTypes);
}
}
public static string SchemaHierarchy_SystemDateAndTime
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SystemDateAndTime);
}
}
public static string SchemaHierarchy_SystemDateAndTimeFunctions
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SystemDateAndTimeFunctions);
}
}
public static string SchemaHierarchy_SystemExactNumerics
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SystemExactNumerics);
}
}
public static string SchemaHierarchy_SystemFunctions
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SystemFunctions);
}
}
public static string SchemaHierarchy_SystemHierarchyIdFunctions
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SystemHierarchyIdFunctions);
}
}
public static string SchemaHierarchy_SystemMathematicalFunctions
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SystemMathematicalFunctions);
}
}
public static string SchemaHierarchy_SystemMetadataFunctions
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SystemMetadataFunctions);
}
}
public static string SchemaHierarchy_SystemOtherDataTypes
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SystemOtherDataTypes);
}
}
public static string SchemaHierarchy_SystemOtherFunctions
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SystemOtherFunctions);
}
}
public static string SchemaHierarchy_SystemRowsetFunctions
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SystemRowsetFunctions);
}
}
public static string SchemaHierarchy_SystemSecurityFunctions
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SystemSecurityFunctions);
}
}
public static string SchemaHierarchy_SystemSpatialDataTypes
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SystemSpatialDataTypes);
}
}
public static string SchemaHierarchy_SystemStringFunctions
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SystemStringFunctions);
}
}
public static string SchemaHierarchy_SystemSystemStatisticalFunctions
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SystemSystemStatisticalFunctions);
}
}
public static string SchemaHierarchy_SystemTextAndImageFunctions
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SystemTextAndImageFunctions);
}
}
public static string SchemaHierarchy_SystemUnicodeCharacterStrings
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SystemUnicodeCharacterStrings);
}
}
public static string SchemaHierarchy_AggregateFunctions
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_AggregateFunctions);
}
}
public static string SchemaHierarchy_ScalarValuedFunctions
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_ScalarValuedFunctions);
}
}
public static string SchemaHierarchy_TableValuedFunctions
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_TableValuedFunctions);
}
}
public static string SchemaHierarchy_SystemExtendedStoredProcedures
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SystemExtendedStoredProcedures);
}
}
public static string SchemaHierarchy_BuiltInType
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_BuiltInType);
}
}
public static string SchemaHierarchy_BuiltInServerRole
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_BuiltInServerRole);
}
}
public static string SchemaHierarchy_UserWithPassword
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_UserWithPassword);
}
}
public static string SchemaHierarchy_SearchPropertyList
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SearchPropertyList);
}
}
public static string SchemaHierarchy_SecurityPolicies
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SecurityPolicies);
}
}
public static string SchemaHierarchy_SecurityPredicates
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SecurityPredicates);
}
}
public static string SchemaHierarchy_ServerRole
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_ServerRole);
}
}
public static string SchemaHierarchy_SearchPropertyLists
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SearchPropertyLists);
}
}
public static string SchemaHierarchy_ColumnStoreIndexes
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_ColumnStoreIndexes);
}
}
public static string SchemaHierarchy_TableTypeIndexes
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_TableTypeIndexes);
}
}
public static string SchemaHierarchy_Server
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_Server);
}
}
public static string SchemaHierarchy_SelectiveXmlIndexes
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SelectiveXmlIndexes);
}
}
public static string SchemaHierarchy_XmlNamespaces
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_XmlNamespaces);
}
}
public static string SchemaHierarchy_XmlTypedPromotedPaths
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_XmlTypedPromotedPaths);
}
}
public static string SchemaHierarchy_SqlTypedPromotedPaths
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SqlTypedPromotedPaths);
}
}
public static string SchemaHierarchy_DatabaseScopedCredentials
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_DatabaseScopedCredentials);
}
}
public static string SchemaHierarchy_ExternalDataSources
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_ExternalDataSources);
}
}
public static string SchemaHierarchy_ExternalFileFormats
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_ExternalFileFormats);
}
}
public static string SchemaHierarchy_ExternalResources
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_ExternalResources);
}
}
public static string SchemaHierarchy_ExternalTables
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_ExternalTables);
}
}
public static string SchemaHierarchy_AlwaysEncryptedKeys
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_AlwaysEncryptedKeys);
}
}
public static string SchemaHierarchy_ColumnMasterKeys
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_ColumnMasterKeys);
}
}
public static string SchemaHierarchy_ColumnEncryptionKeys
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_ColumnEncryptionKeys);
}
}
public static string SchemaHierarchy_SubroutineParameterLabelFormatString
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SubroutineParameterLabelFormatString);
}
}
public static string SchemaHierarchy_SubroutineParameterNoDefaultLabel
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SubroutineParameterNoDefaultLabel);
}
}
public static string SchemaHierarchy_SubroutineParameterInputLabel
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SubroutineParameterInputLabel);
}
}
public static string SchemaHierarchy_SubroutineParameterInputOutputLabel
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SubroutineParameterInputOutputLabel);
}
}
public static string SchemaHierarchy_SubroutineParameterInputReadOnlyLabel
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SubroutineParameterInputReadOnlyLabel);
}
}
public static string SchemaHierarchy_SubroutineParameterInputOutputReadOnlyLabel
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SubroutineParameterInputOutputReadOnlyLabel);
}
}
public static string SchemaHierarchy_SubroutineParameterDefaultLabel
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_SubroutineParameterDefaultLabel);
}
}
public static string SchemaHierarchy_NullColumn_Label
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_NullColumn_Label);
}
}
public static string SchemaHierarchy_NotNullColumn_Label
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_NotNullColumn_Label);
}
}
public static string SchemaHierarchy_UDDTLabelWithType
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_UDDTLabelWithType);
}
}
public static string SchemaHierarchy_UDDTLabelWithoutType
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_UDDTLabelWithoutType);
}
}
public static string SchemaHierarchy_ComputedColumnLabelWithType
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_ComputedColumnLabelWithType);
}
}
public static string SchemaHierarchy_ComputedColumnLabelWithoutType
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_ComputedColumnLabelWithoutType);
}
}
public static string SchemaHierarchy_ColumnSetLabelWithoutType
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_ColumnSetLabelWithoutType);
}
}
public static string SchemaHierarchy_ColumnSetLabelWithType
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_ColumnSetLabelWithType);
}
}
public static string SchemaHierarchy_ColumnSetLabelWithTypeAndKeyString
{
get
{
return Keys.GetString(Keys.SchemaHierarchy_ColumnSetLabelWithTypeAndKeyString);
}
}
public static string UniqueIndex_LabelPart
{
get
{
return Keys.GetString(Keys.UniqueIndex_LabelPart);
}
}
public static string NonUniqueIndex_LabelPart
{
get
{
return Keys.GetString(Keys.NonUniqueIndex_LabelPart);
}
}
public static string ClusteredIndex_LabelPart
{
get
{
return Keys.GetString(Keys.ClusteredIndex_LabelPart);
}
}
public static string NonClusteredIndex_LabelPart
{
get
{
return Keys.GetString(Keys.NonClusteredIndex_LabelPart);
}
}
public static string History_LabelPart
{
get
{
return Keys.GetString(Keys.History_LabelPart);
}
}
public static string SystemVersioned_LabelPart
{
get
{
return Keys.GetString(Keys.SystemVersioned_LabelPart);
}
}
public static string External_LabelPart
{
get
{
return Keys.GetString(Keys.External_LabelPart);
}
}
public static string FileTable_LabelPart
{
get
{
return Keys.GetString(Keys.FileTable_LabelPart);
}
}
public static string DatabaseNotAccessible
{
get
{
return Keys.GetString(Keys.DatabaseNotAccessible);
}
}
public static string ScriptingParams_ConnectionString_Property_Invalid
{
get
{
return Keys.GetString(Keys.ScriptingParams_ConnectionString_Property_Invalid);
}
}
public static string ScriptingParams_FilePath_Property_Invalid
{
get
{
return Keys.GetString(Keys.ScriptingParams_FilePath_Property_Invalid);
}
}
public static string ScriptingListObjectsCompleteParams_ConnectionString_Property_Invalid
{
get
{
return Keys.GetString(Keys.ScriptingListObjectsCompleteParams_ConnectionString_Property_Invalid);
}
}
public static string StoredProcedureScriptParameterComment
{
get
{
return Keys.GetString(Keys.StoredProcedureScriptParameterComment);
}
}
public static string ScriptingGeneralError
{
get
{
return Keys.GetString(Keys.ScriptingGeneralError);
}
}
public static string ScriptingExecuteNotSupportedError
{
get
{
return Keys.GetString(Keys.ScriptingExecuteNotSupportedError);
}
}
public static string BackupTaskName
{
get
{
return Keys.GetString(Keys.BackupTaskName);
}
}
public static string BackupPathIsFolderError
{
get
{
return Keys.GetString(Keys.BackupPathIsFolderError);
}
}
public static string InvalidBackupPathError
{
get
{
return Keys.GetString(Keys.InvalidBackupPathError);
}
}
public static string TaskInProgress
{
get
{
return Keys.GetString(Keys.TaskInProgress);
}
}
public static string TaskCompleted
{
get
{
return Keys.GetString(Keys.TaskCompleted);
}
}
public static string ConflictWithNoRecovery
{
get
{
return Keys.GetString(Keys.ConflictWithNoRecovery);
}
}
public static string InvalidPathForDatabaseFile
{
get
{
return Keys.GetString(Keys.InvalidPathForDatabaseFile);
}
}
public static string Log
{
get
{
return Keys.GetString(Keys.Log);
}
}
public static string RestorePlanFailed
{
get
{
return Keys.GetString(Keys.RestorePlanFailed);
}
}
public static string RestoreNotSupported
{
get
{
return Keys.GetString(Keys.RestoreNotSupported);
}
}
public static string RestoreTaskName
{
get
{
return Keys.GetString(Keys.RestoreTaskName);
}
}
public static string RestoreCopyOnly
{
get
{
return Keys.GetString(Keys.RestoreCopyOnly);
}
}
public static string RestoreBackupSetComponent
{
get
{
return Keys.GetString(Keys.RestoreBackupSetComponent);
}
}
public static string RestoreBackupSetName
{
get
{
return Keys.GetString(Keys.RestoreBackupSetName);
}
}
public static string RestoreBackupSetType
{
get
{
return Keys.GetString(Keys.RestoreBackupSetType);
}
}
public static string RestoreBackupSetServer
{
get
{
return Keys.GetString(Keys.RestoreBackupSetServer);
}
}
public static string RestoreBackupSetDatabase
{
get
{
return Keys.GetString(Keys.RestoreBackupSetDatabase);
}
}
public static string RestoreBackupSetPosition
{
get
{
return Keys.GetString(Keys.RestoreBackupSetPosition);
}
}
public static string RestoreBackupSetFirstLsn
{
get
{
return Keys.GetString(Keys.RestoreBackupSetFirstLsn);
}
}
public static string RestoreBackupSetLastLsn
{
get
{
return Keys.GetString(Keys.RestoreBackupSetLastLsn);
}
}
public static string RestoreBackupSetCheckpointLsn
{
get
{
return Keys.GetString(Keys.RestoreBackupSetCheckpointLsn);
}
}
public static string RestoreBackupSetFullLsn
{
get
{
return Keys.GetString(Keys.RestoreBackupSetFullLsn);
}
}
public static string RestoreBackupSetStartDate
{
get
{
return Keys.GetString(Keys.RestoreBackupSetStartDate);
}
}
public static string RestoreBackupSetFinishDate
{
get
{
return Keys.GetString(Keys.RestoreBackupSetFinishDate);
}
}
public static string RestoreBackupSetSize
{
get
{
return Keys.GetString(Keys.RestoreBackupSetSize);
}
}
public static string RestoreBackupSetUserName
{
get
{
return Keys.GetString(Keys.RestoreBackupSetUserName);
}
}
public static string RestoreBackupSetExpiration
{
get
{
return Keys.GetString(Keys.RestoreBackupSetExpiration);
}
}
public static string TheLastBackupTaken
{
get
{
return Keys.GetString(Keys.TheLastBackupTaken);
}
}
public static string NoBackupsetsToRestore
{
get
{
return Keys.GetString(Keys.NoBackupsetsToRestore);
}
}
public static string ScriptTaskName
{
get
{
return Keys.GetString(Keys.ScriptTaskName);
}
}
public static string InvalidPathError
{
get
{
return Keys.GetString(Keys.InvalidPathError);
}
}
public static string ProfilerConnectionNotFound
{
get
{
return Keys.GetString(Keys.ProfilerConnectionNotFound);
}
}
public static string AzureSystemDbProfilingError
{
get
{
return Keys.GetString(Keys.AzureSystemDbProfilingError);
}
}
public static string SessionNotFound
{
get
{
return Keys.GetString(Keys.SessionNotFound);
}
}
public static string CategoryLocal
{
get
{
return Keys.GetString(Keys.CategoryLocal);
}
}
public static string CategoryFromMsx
{
get
{
return Keys.GetString(Keys.CategoryFromMsx);
}
}
public static string CategoryMultiServer
{
get
{
return Keys.GetString(Keys.CategoryMultiServer);
}
}
public static string CategoryDBMaint
{
get
{
return Keys.GetString(Keys.CategoryDBMaint);
}
}
public static string CategoryWebAssistant
{
get
{
return Keys.GetString(Keys.CategoryWebAssistant);
}
}
public static string CategoryFullText
{
get
{
return Keys.GetString(Keys.CategoryFullText);
}
}
public static string CategoryReplDistribution
{
get
{
return Keys.GetString(Keys.CategoryReplDistribution);
}
}
public static string CategoryReplDistributionCleanup
{
get
{
return Keys.GetString(Keys.CategoryReplDistributionCleanup);
}
}
public static string CategoryReplHistoryCleanup
{
get
{
return Keys.GetString(Keys.CategoryReplHistoryCleanup);
}
}
public static string CategoryReplLogReader
{
get
{
return Keys.GetString(Keys.CategoryReplLogReader);
}
}
public static string CategoryReplMerge
{
get
{
return Keys.GetString(Keys.CategoryReplMerge);
}
}
public static string CategoryReplSnapShot
{
get
{
return Keys.GetString(Keys.CategoryReplSnapShot);
}
}
public static string CategoryReplCheckup
{
get
{
return Keys.GetString(Keys.CategoryReplCheckup);
}
}
public static string CategoryReplCleanup
{
get
{
return Keys.GetString(Keys.CategoryReplCleanup);
}
}
public static string CategoryReplAlert
{
get
{
return Keys.GetString(Keys.CategoryReplAlert);
}
}
public static string CategoryReplQReader
{
get
{
return Keys.GetString(Keys.CategoryReplQReader);
}
}
public static string CategoryReplication
{
get
{
return Keys.GetString(Keys.CategoryReplication);
}
}
public static string CategoryUncategorized
{
get
{
return Keys.GetString(Keys.CategoryUncategorized);
}
}
public static string CategoryLogShipping
{
get
{
return Keys.GetString(Keys.CategoryLogShipping);
}
}
public static string CategoryDBEngineTuningAdvisor
{
get
{
return Keys.GetString(Keys.CategoryDBEngineTuningAdvisor);
}
}
public static string CategoryDataCollector
{
get
{
return Keys.GetString(Keys.CategoryDataCollector);
}
}
public static string UnexpectedRunType
{
get
{
return Keys.GetString(Keys.UnexpectedRunType);
}
}
public static string CredentialNoLongerExists
{
get
{
return Keys.GetString(Keys.CredentialNoLongerExists);
}
}
public static string TargetServerNotSelected
{
get
{
return Keys.GetString(Keys.TargetServerNotSelected);
}
}
public static string SysadminAccount
{
get
{
return Keys.GetString(Keys.SysadminAccount);
}
}
public static string JobStepNameCannotBeBlank
{
get
{
return Keys.GetString(Keys.JobStepNameCannotBeBlank);
}
}
public static string AlertNameCannotBeBlank
{
get
{
return Keys.GetString(Keys.AlertNameCannotBeBlank);
}
}
public static string CannotCreateNewAlert
{
get
{
return Keys.GetString(Keys.CannotCreateNewAlert);
}
}
public static string CannotAlterAlert
{
get
{
return Keys.GetString(Keys.CannotAlterAlert);
}
}
public static string InvalidScheduleTitle
{
get
{
return Keys.GetString(Keys.InvalidScheduleTitle);
}
}
public static string InvalidWeeklySchedule
{
get
{
return Keys.GetString(Keys.InvalidWeeklySchedule);
}
}
public static string StartDateGreaterThanEndDate
{
get
{
return Keys.GetString(Keys.StartDateGreaterThanEndDate);
}
}
public static string StartTimeGreaterThanEndTime
{
get
{
return Keys.GetString(Keys.StartTimeGreaterThanEndTime);
}
}
public static string EndTimeEqualToStartTime
{
get
{
return Keys.GetString(Keys.EndTimeEqualToStartTime);
}
}
public static string InvalidStartDate
{
get
{
return Keys.GetString(Keys.InvalidStartDate);
}
}
public static string JobServerIsNotAvailable
{
get
{
return Keys.GetString(Keys.JobServerIsNotAvailable);
}
}
public static string NeverBackedUp
{
get
{
return Keys.GetString(Keys.NeverBackedUp);
}
}
public static string Error_InvalidDirectoryName
{
get
{
return Keys.GetString(Keys.Error_InvalidDirectoryName);
}
}
public static string Error_ExistingDirectoryName
{
get
{
return Keys.GetString(Keys.Error_ExistingDirectoryName);
}
}
public static string ExportBacpacTaskName
{
get
{
return Keys.GetString(Keys.ExportBacpacTaskName);
}
}
public static string ImportBacpacTaskName
{
get
{
return Keys.GetString(Keys.ImportBacpacTaskName);
}
}
public static string ExtractDacpacTaskName
{
get
{
return Keys.GetString(Keys.ExtractDacpacTaskName);
}
}
public static string DeployDacpacTaskName
{
get
{
return Keys.GetString(Keys.DeployDacpacTaskName);
}
}
public static string GenerateScriptTaskName
{
get
{
return Keys.GetString(Keys.GenerateScriptTaskName);
}
}
public static string ProjectExtractTaskName
{
get
{
return Keys.GetString(Keys.ProjectExtractTaskName);
}
}
public static string ValidateStreamingJobTaskName
{
get
{
return Keys.GetString(Keys.ValidateStreamingJobTaskName);
}
}
public static string ExtractInvalidVersion
{
get
{
return Keys.GetString(Keys.ExtractInvalidVersion);
}
}
public static string Input
{
get
{
return Keys.GetString(Keys.Input);
}
}
public static string Output
{
get
{
return Keys.GetString(Keys.Output);
}
}
public static string FragmentShouldHaveOnlyOneBatch
{
get
{
return Keys.GetString(Keys.FragmentShouldHaveOnlyOneBatch);
}
}
public static string NoCreateStreamingJobStatementFound
{
get
{
return Keys.GetString(Keys.NoCreateStreamingJobStatementFound);
}
}
public static string PublishChangesTaskName
{
get
{
return Keys.GetString(Keys.PublishChangesTaskName);
}
}
public static string SchemaCompareExcludeIncludeNodeNotFound
{
get
{
return Keys.GetString(Keys.SchemaCompareExcludeIncludeNodeNotFound);
}
}
public static string OpenScmpConnectionBasedModelParsingError
{
get
{
return Keys.GetString(Keys.OpenScmpConnectionBasedModelParsingError);
}
}
public static string SchemaCompareSessionNotFound
{
get
{
return Keys.GetString(Keys.SchemaCompareSessionNotFound);
}
}
public static string SqlAssessmentGenerateScriptTaskName
{
get
{
return Keys.GetString(Keys.SqlAssessmentGenerateScriptTaskName);
}
}
public static string SqlAssessmentQueryInvalidOwnerUri
{
get
{
return Keys.GetString(Keys.SqlAssessmentQueryInvalidOwnerUri);
}
}
public static string SqlAssessmentConnectingError
{
get
{
return Keys.GetString(Keys.SqlAssessmentConnectingError);
}
}
public static string ConnectionServiceListDbErrorNotConnected(string uri)
{
return Keys.GetString(Keys.ConnectionServiceListDbErrorNotConnected, uri);
}
public static string ConnectionServiceDbErrorDefaultNotConnected(string uri)
{
return Keys.GetString(Keys.ConnectionServiceDbErrorDefaultNotConnected, uri);
}
public static string ConnectionServiceConnStringInvalidAuthType(string authType)
{
return Keys.GetString(Keys.ConnectionServiceConnStringInvalidAuthType, authType);
}
public static string ConnectionServiceConnStringInvalidColumnEncryptionSetting(string columnEncryptionSetting)
{
return Keys.GetString(Keys.ConnectionServiceConnStringInvalidColumnEncryptionSetting, columnEncryptionSetting);
}
public static string ConnectionServiceConnStringInvalidEnclaveAttestationProtocol(string enclaveAttestationProtocol)
{
return Keys.GetString(Keys.ConnectionServiceConnStringInvalidEnclaveAttestationProtocol, enclaveAttestationProtocol);
}
public static string ConnectionServiceConnStringInvalidIntent(string intent)
{
return Keys.GetString(Keys.ConnectionServiceConnStringInvalidIntent, intent);
}
public static string ConnectionParamsValidateNullSqlAuth(string component)
{
return Keys.GetString(Keys.ConnectionParamsValidateNullSqlAuth, component);
}
public static string QueryServiceAffectedRows(long rows)
{
return Keys.GetString(Keys.QueryServiceAffectedRows, rows);
}
public static string QueryServiceErrorFormat(int msg, int lvl, int state, int line, string newLine, string message)
{
return Keys.GetString(Keys.QueryServiceErrorFormat, msg, lvl, state, line, newLine, message);
}
public static string QueryServiceQueryFailed(string message)
{
return Keys.GetString(Keys.QueryServiceQueryFailed, message);
}
public static string QueryServiceSaveAsFail(string fileName, string message)
{
return Keys.GetString(Keys.QueryServiceSaveAsFail, fileName, message);
}
public static string ParameterizationDetails(string variableName, string sqlDbType, int size, int precision, int scale, string sqlValue)
{
return Keys.GetString(Keys.ParameterizationDetails, variableName, sqlDbType, size, precision, scale, sqlValue);
}
public static string ErrorMessageHeader(int lineNumber)
{
return Keys.GetString(Keys.ErrorMessageHeader, lineNumber);
}
public static string ErrorMessage(string variableName, string sqlDataType, string literalValue)
{
return Keys.GetString(Keys.ErrorMessage, variableName, sqlDataType, literalValue);
}
public static string DateTimeErrorMessage(string variableName, string sqlDataType, string literalValue)
{
return Keys.GetString(Keys.DateTimeErrorMessage, variableName, sqlDataType, literalValue);
}
public static string BinaryLiteralPrefixMissingError(string variableName, string sqlDataType, string literalValue)
{
return Keys.GetString(Keys.BinaryLiteralPrefixMissingError, variableName, sqlDataType, literalValue);
}
public static string ParsingErrorHeader(int lineNumber, int columnNumber)
{
return Keys.GetString(Keys.ParsingErrorHeader, lineNumber, columnNumber);
}
public static string ScriptTooLarge(int maxChars, int currentChars)
{
return Keys.GetString(Keys.ScriptTooLarge, maxChars, currentChars);
}
public static string SerializationServiceUnsupportedFormat(string formatName)
{
return Keys.GetString(Keys.SerializationServiceUnsupportedFormat, formatName);
}
public static string SerializationServiceRequestInProgress(string filePath)
{
return Keys.GetString(Keys.SerializationServiceRequestInProgress, filePath);
}
public static string SerializationServiceRequestNotFound(string filePath)
{
return Keys.GetString(Keys.SerializationServiceRequestNotFound, filePath);
}
public static string PeekDefinitionAzureError(string errorMessage)
{
return Keys.GetString(Keys.PeekDefinitionAzureError, errorMessage);
}
public static string PeekDefinitionError(string errorMessage)
{
return Keys.GetString(Keys.PeekDefinitionError, errorMessage);
}
public static string WorkspaceServicePositionColumnOutOfRange(int line)
{
return Keys.GetString(Keys.WorkspaceServicePositionColumnOutOfRange, line);
}
public static string WorkspaceServiceBufferPositionOutOfOrder(int sLine, int sCol, int eLine, int eCol)
{
return Keys.GetString(Keys.WorkspaceServiceBufferPositionOutOfOrder, sLine, sCol, eLine, eCol);
}
public static string EditDataUnsupportedObjectType(string typeName)
{
return Keys.GetString(Keys.EditDataUnsupportedObjectType, typeName);
}
public static string EditDataInvalidFormat(string colName, string colType)
{
return Keys.GetString(Keys.EditDataInvalidFormat, colName, colType);
}
public static string EditDataCreateScriptMissingValue(string colName)
{
return Keys.GetString(Keys.EditDataCreateScriptMissingValue, colName);
}
public static string EditDataValueTooLarge(string value, string columnType)
{
return Keys.GetString(Keys.EditDataValueTooLarge, value, columnType);
}
public static string EditDataIncorrectTable(string tableName)
{
return Keys.GetString(Keys.EditDataIncorrectTable, tableName);
}
public static string CreateSessionFailed(String error)
{
return Keys.GetString(Keys.CreateSessionFailed, error);
}
public static string StartSessionFailed(String error)
{
return Keys.GetString(Keys.StartSessionFailed, error);
}
public static string PauseSessionFailed(String error)
{
return Keys.GetString(Keys.PauseSessionFailed, error);
}
public static string StopSessionFailed(String error)
{
return Keys.GetString(Keys.StopSessionFailed, error);
}
public static string SessionAlreadyExists(String sessionName)
{
return Keys.GetString(Keys.SessionAlreadyExists, sessionName);
}
public static string UnknownSizeUnit(string unit)
{
return Keys.GetString(Keys.UnknownSizeUnit, unit);
}
public static string UnknownServerType(string serverTypeName)
{
return Keys.GetString(Keys.UnknownServerType, serverTypeName);
}
public static string SetOwnerFailed(string ownerName)
{
return Keys.GetString(Keys.SetOwnerFailed, ownerName);
}
public static string ProxyAccountNotFound(string proxyName)
{
return Keys.GetString(Keys.ProxyAccountNotFound, proxyName);
}
public static string JobAlreadyExists(string jobName)
{
return Keys.GetString(Keys.JobAlreadyExists, jobName);
}
public static string JobStepNameAlreadyExists(string jobName)
{
return Keys.GetString(Keys.JobStepNameAlreadyExists, jobName);
}
public static string ScheduleNameAlreadyExists(string scheduleName)
{
return Keys.GetString(Keys.ScheduleNameAlreadyExists, scheduleName);
}
public static string StreamNotFoundInModel(string streamType, string missingStreamName)
{
return Keys.GetString(Keys.StreamNotFoundInModel, streamType, missingStreamName);
}
public static string StreamingJobValidationFailed(string jobName)
{
return Keys.GetString(Keys.StreamingJobValidationFailed, jobName);
}
public static string SqlAssessmentUnsuppoertedEdition(int editionCode)
{
return Keys.GetString(Keys.SqlAssessmentUnsuppoertedEdition, editionCode);
}
public static string CouldntFindAzureFunction(string functionName, string fileName)
{
return Keys.GetString(Keys.CouldntFindAzureFunction, functionName, fileName);
}
public static string MoreThanOneAzureFunctionWithName(string functionName, string fileName)
{
return Keys.GetString(Keys.MoreThanOneAzureFunctionWithName, functionName, fileName);
}
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Keys
{
static ResourceManager resourceManager = new ResourceManager("Microsoft.SqlTools.ServiceLayer.Localization.SR", typeof(SR).GetTypeInfo().Assembly);
static CultureInfo _culture = null;
public const string ConnectionServiceConnectErrorNullParams = "ConnectionServiceConnectErrorNullParams";
public const string ConnectionServiceListDbErrorNullOwnerUri = "ConnectionServiceListDbErrorNullOwnerUri";
public const string ConnectionServiceListDbErrorNotConnected = "ConnectionServiceListDbErrorNotConnected";
public const string ConnectionServiceDbErrorDefaultNotConnected = "ConnectionServiceDbErrorDefaultNotConnected";
public const string ConnectionServiceConnStringInvalidAuthType = "ConnectionServiceConnStringInvalidAuthType";
public const string ConnectionServiceConnStringInvalidColumnEncryptionSetting = "ConnectionServiceConnStringInvalidColumnEncryptionSetting";
public const string ConnectionServiceConnStringInvalidEnclaveAttestationProtocol = "ConnectionServiceConnStringInvalidEnclaveAttestationProtocol";
public const string ConnectionServiceConnStringInvalidAlwaysEncryptedOptionCombination = "ConnectionServiceConnStringInvalidAlwaysEncryptedOptionCombination";
public const string ConnectionServiceConnStringInvalidIntent = "ConnectionServiceConnStringInvalidIntent";
public const string ConnectionServiceConnectionCanceled = "ConnectionServiceConnectionCanceled";
public const string ConnectionParamsValidateNullOwnerUri = "ConnectionParamsValidateNullOwnerUri";
public const string ConnectionParamsValidateNullConnection = "ConnectionParamsValidateNullConnection";
public const string ConnectionParamsValidateNullServerName = "ConnectionParamsValidateNullServerName";
public const string ConnectionParamsValidateNullSqlAuth = "ConnectionParamsValidateNullSqlAuth";
public const string AzureSqlDbEdition = "AzureSqlDbEdition";
public const string AzureSqlDwEdition = "AzureSqlDwEdition";
public const string AzureSqlStretchEdition = "AzureSqlStretchEdition";
public const string AzureSqlAnalyticsOnDemandEdition = "AzureSqlAnalyticsOnDemandEdition";
public const string QueryServiceCancelAlreadyCompleted = "QueryServiceCancelAlreadyCompleted";
public const string QueryServiceCancelDisposeFailed = "QueryServiceCancelDisposeFailed";
public const string QueryServiceQueryCancelled = "QueryServiceQueryCancelled";
public const string QueryServiceSubsetBatchNotCompleted = "QueryServiceSubsetBatchNotCompleted";
public const string QueryServiceSubsetBatchOutOfRange = "QueryServiceSubsetBatchOutOfRange";
public const string QueryServiceSubsetResultSetOutOfRange = "QueryServiceSubsetResultSetOutOfRange";
public const string QueryServiceDataReaderByteCountInvalid = "QueryServiceDataReaderByteCountInvalid";
public const string QueryServiceDataReaderCharCountInvalid = "QueryServiceDataReaderCharCountInvalid";
public const string QueryServiceDataReaderXmlCountInvalid = "QueryServiceDataReaderXmlCountInvalid";
public const string QueryServiceFileWrapperWriteOnly = "QueryServiceFileWrapperWriteOnly";
public const string QueryServiceFileWrapperNotInitialized = "QueryServiceFileWrapperNotInitialized";
public const string QueryServiceFileWrapperReadOnly = "QueryServiceFileWrapperReadOnly";
public const string QueryServiceAffectedOneRow = "QueryServiceAffectedOneRow";
public const string QueryServiceAffectedRows = "QueryServiceAffectedRows";
public const string QueryServiceCompletedSuccessfully = "QueryServiceCompletedSuccessfully";
public const string QueryServiceErrorFormat = "QueryServiceErrorFormat";
public const string QueryServiceQueryFailed = "QueryServiceQueryFailed";
public const string QueryServiceColumnNull = "QueryServiceColumnNull";
public const string QueryServiceCellNull = "QueryServiceCellNull";
public const string QueryServiceRequestsNoQuery = "QueryServiceRequestsNoQuery";
public const string QueryServiceQueryInvalidOwnerUri = "QueryServiceQueryInvalidOwnerUri";
public const string QueryServiceQueryInProgress = "QueryServiceQueryInProgress";
public const string QueryServiceMessageSenderNotSql = "QueryServiceMessageSenderNotSql";
public const string QueryServiceResultSetAddNoRows = "QueryServiceResultSetAddNoRows";
public const string QueryServiceResultSetHasNoResults = "QueryServiceResultSetHasNoResults";
public const string QueryServiceResultSetTooLarge = "QueryServiceResultSetTooLarge";
public const string QueryServiceSaveAsResultSetNotComplete = "QueryServiceSaveAsResultSetNotComplete";
public const string QueryServiceSaveAsMiscStartingError = "QueryServiceSaveAsMiscStartingError";
public const string QueryServiceSaveAsInProgress = "QueryServiceSaveAsInProgress";
public const string QueryServiceSaveAsFail = "QueryServiceSaveAsFail";
public const string QueryServiceResultSetNotRead = "QueryServiceResultSetNotRead";
public const string QueryServiceResultSetStartRowOutOfRange = "QueryServiceResultSetStartRowOutOfRange";
public const string QueryServiceResultSetRowCountOutOfRange = "QueryServiceResultSetRowCountOutOfRange";
public const string QueryServiceResultSetNoColumnSchema = "QueryServiceResultSetNoColumnSchema";
public const string QueryServiceExecutionPlanNotFound = "QueryServiceExecutionPlanNotFound";
public const string SqlCmdExitOnError = "SqlCmdExitOnError";
public const string SqlCmdUnsupportedToken = "SqlCmdUnsupportedToken";
public const string ParameterizationDetails = "ParameterizationDetails";
public const string ErrorMessageHeader = "ErrorMessageHeader";
public const string ErrorMessage = "ErrorMessage";
public const string DateTimeErrorMessage = "DateTimeErrorMessage";
public const string BinaryLiteralPrefixMissingError = "BinaryLiteralPrefixMissingError";
public const string ParsingErrorHeader = "ParsingErrorHeader";
public const string ScriptTooLarge = "ScriptTooLarge";
public const string SerializationServiceUnsupportedFormat = "SerializationServiceUnsupportedFormat";
public const string SerializationServiceRequestInProgress = "SerializationServiceRequestInProgress";
public const string SerializationServiceRequestNotFound = "SerializationServiceRequestNotFound";
public const string PeekDefinitionAzureError = "PeekDefinitionAzureError";
public const string PeekDefinitionError = "PeekDefinitionError";
public const string PeekDefinitionNoResultsError = "PeekDefinitionNoResultsError";
public const string PeekDefinitionDatabaseError = "PeekDefinitionDatabaseError";
public const string PeekDefinitionNotConnectedError = "PeekDefinitionNotConnectedError";
public const string PeekDefinitionTimedoutError = "PeekDefinitionTimedoutError";
public const string PeekDefinitionTypeNotSupportedError = "PeekDefinitionTypeNotSupportedError";
public const string ErrorEmptyStringReplacement = "ErrorEmptyStringReplacement";
public const string WorkspaceServicePositionLineOutOfRange = "WorkspaceServicePositionLineOutOfRange";
public const string WorkspaceServicePositionColumnOutOfRange = "WorkspaceServicePositionColumnOutOfRange";
public const string WorkspaceServiceBufferPositionOutOfOrder = "WorkspaceServiceBufferPositionOutOfOrder";
public const string EditDataObjectNotFound = "EditDataObjectNotFound";
public const string EditDataSessionNotFound = "EditDataSessionNotFound";
public const string EditDataSessionAlreadyExists = "EditDataSessionAlreadyExists";
public const string EditDataSessionNotInitialized = "EditDataSessionNotInitialized";
public const string EditDataSessionAlreadyInitialized = "EditDataSessionAlreadyInitialized";
public const string EditDataSessionAlreadyInitializing = "EditDataSessionAlreadyInitializing";
public const string EditDataMetadataNotExtended = "EditDataMetadataNotExtended";
public const string EditDataMetadataObjectNameRequired = "EditDataMetadataObjectNameRequired";
public const string EditDataMetadataTooManyIdentifiers = "EditDataMetadataTooManyIdentifiers";
public const string EditDataFilteringNegativeLimit = "EditDataFilteringNegativeLimit";
public const string EditDataUnsupportedObjectType = "EditDataUnsupportedObjectType";
public const string EditDataQueryFailed = "EditDataQueryFailed";
public const string EditDataQueryNotCompleted = "EditDataQueryNotCompleted";
public const string EditDataQueryImproperResultSets = "EditDataQueryImproperResultSets";
public const string EditDataFailedAddRow = "EditDataFailedAddRow";
public const string EditDataRowOutOfRange = "EditDataRowOutOfRange";
public const string EditDataUpdatePending = "EditDataUpdatePending";
public const string EditDataUpdateNotPending = "EditDataUpdateNotPending";
public const string EditDataObjectMetadataNotFound = "EditDataObjectMetadataNotFound";
public const string EditDataInvalidFormat = "EditDataInvalidFormat";
public const string EditDataInvalidFormatBinary = "EditDataInvalidFormatBinary";
public const string EditDataInvalidFormatBoolean = "EditDataInvalidFormatBoolean";
public const string EditDataCreateScriptMissingValue = "EditDataCreateScriptMissingValue";
public const string EditDataDeleteSetCell = "EditDataDeleteSetCell";
public const string EditDataColumnIdOutOfRange = "EditDataColumnIdOutOfRange";
public const string EditDataColumnCannotBeEdited = "EditDataColumnCannotBeEdited";
public const string EditDataColumnNoKeyColumns = "EditDataColumnNoKeyColumns";
public const string EditDataScriptFilePathNull = "EditDataScriptFilePathNull";
public const string EditDataCommitInProgress = "EditDataCommitInProgress";
public const string EditDataComputedColumnPlaceholder = "EditDataComputedColumnPlaceholder";
public const string EditDataTimeOver24Hrs = "EditDataTimeOver24Hrs";
public const string EditDataNullNotAllowed = "EditDataNullNotAllowed";
public const string EditDataValueTooLarge = "EditDataValueTooLarge";
public const string EditDataMultiTableNotSupported = "EditDataMultiTableNotSupported";
public const string EditDataAliasesNotSupported = "EditDataAliasesNotSupported";
public const string EditDataExpressionsNotSupported = "EditDataExpressionsNotSupported";
public const string EditDataDuplicateColumnsNotSupported = "EditDataDuplicateColumnsNotSupported";
public const string EditDataIncorrectTable = "EditDataIncorrectTable";
public const string EE_ExecutionInfo_InitializingLoop = "EE_ExecutionInfo_InitializingLoop";
public const string EE_BatchExecutionError_Ignoring = "EE_BatchExecutionError_Ignoring";
public const string EE_ExecutionInfo_FinalizingLoop = "EE_ExecutionInfo_FinalizingLoop";
public const string BatchParserWrapperExecutionError = "BatchParserWrapperExecutionError";
public const string TestLocalizationConstant = "TestLocalizationConstant";
public const string SqlScriptFormatterDecimalMissingPrecision = "SqlScriptFormatterDecimalMissingPrecision";
public const string SqlScriptFormatterLengthTypeMissingSize = "SqlScriptFormatterLengthTypeMissingSize";
public const string SqlScriptFormatterScalarTypeMissingScale = "SqlScriptFormatterScalarTypeMissingScale";
public const string TreeNodeError = "TreeNodeError";
public const string ServerNodeConnectionError = "ServerNodeConnectionError";
public const string SchemaHierarchy_Aggregates = "SchemaHierarchy_Aggregates";
public const string SchemaHierarchy_ServerRoles = "SchemaHierarchy_ServerRoles";
public const string SchemaHierarchy_ApplicationRoles = "SchemaHierarchy_ApplicationRoles";
public const string SchemaHierarchy_Assemblies = "SchemaHierarchy_Assemblies";
public const string SchemaHierarchy_AssemblyFiles = "SchemaHierarchy_AssemblyFiles";
public const string SchemaHierarchy_AsymmetricKeys = "SchemaHierarchy_AsymmetricKeys";
public const string SchemaHierarchy_DatabaseAsymmetricKeys = "SchemaHierarchy_DatabaseAsymmetricKeys";
public const string SchemaHierarchy_DataCompressionOptions = "SchemaHierarchy_DataCompressionOptions";
public const string SchemaHierarchy_Certificates = "SchemaHierarchy_Certificates";
public const string SchemaHierarchy_FileTables = "SchemaHierarchy_FileTables";
public const string SchemaHierarchy_DatabaseCertificates = "SchemaHierarchy_DatabaseCertificates";
public const string SchemaHierarchy_CheckConstraints = "SchemaHierarchy_CheckConstraints";
public const string SchemaHierarchy_Columns = "SchemaHierarchy_Columns";
public const string SchemaHierarchy_Constraints = "SchemaHierarchy_Constraints";
public const string SchemaHierarchy_Contracts = "SchemaHierarchy_Contracts";
public const string SchemaHierarchy_Credentials = "SchemaHierarchy_Credentials";
public const string SchemaHierarchy_ErrorMessages = "SchemaHierarchy_ErrorMessages";
public const string SchemaHierarchy_ServerRoleMembership = "SchemaHierarchy_ServerRoleMembership";
public const string SchemaHierarchy_DatabaseOptions = "SchemaHierarchy_DatabaseOptions";
public const string SchemaHierarchy_DatabaseRoles = "SchemaHierarchy_DatabaseRoles";
public const string SchemaHierarchy_RoleMemberships = "SchemaHierarchy_RoleMemberships";
public const string SchemaHierarchy_DatabaseTriggers = "SchemaHierarchy_DatabaseTriggers";
public const string SchemaHierarchy_DefaultConstraints = "SchemaHierarchy_DefaultConstraints";
public const string SchemaHierarchy_Defaults = "SchemaHierarchy_Defaults";
public const string SchemaHierarchy_Sequences = "SchemaHierarchy_Sequences";
public const string SchemaHierarchy_Endpoints = "SchemaHierarchy_Endpoints";
public const string SchemaHierarchy_EventNotifications = "SchemaHierarchy_EventNotifications";
public const string SchemaHierarchy_ServerEventNotifications = "SchemaHierarchy_ServerEventNotifications";
public const string SchemaHierarchy_ExtendedProperties = "SchemaHierarchy_ExtendedProperties";
public const string SchemaHierarchy_FileGroups = "SchemaHierarchy_FileGroups";
public const string SchemaHierarchy_ForeignKeys = "SchemaHierarchy_ForeignKeys";
public const string SchemaHierarchy_FullTextCatalogs = "SchemaHierarchy_FullTextCatalogs";
public const string SchemaHierarchy_FullTextIndexes = "SchemaHierarchy_FullTextIndexes";
public const string SchemaHierarchy_Functions = "SchemaHierarchy_Functions";
public const string SchemaHierarchy_Indexes = "SchemaHierarchy_Indexes";
public const string SchemaHierarchy_InlineFunctions = "SchemaHierarchy_InlineFunctions";
public const string SchemaHierarchy_Keys = "SchemaHierarchy_Keys";
public const string SchemaHierarchy_LinkedServers = "SchemaHierarchy_LinkedServers";
public const string SchemaHierarchy_LinkedServerLogins = "SchemaHierarchy_LinkedServerLogins";
public const string SchemaHierarchy_Logins = "SchemaHierarchy_Logins";
public const string SchemaHierarchy_MasterKey = "SchemaHierarchy_MasterKey";
public const string SchemaHierarchy_MasterKeys = "SchemaHierarchy_MasterKeys";
public const string SchemaHierarchy_MessageTypes = "SchemaHierarchy_MessageTypes";
public const string SchemaHierarchy_MultiSelectFunctions = "SchemaHierarchy_MultiSelectFunctions";
public const string SchemaHierarchy_Parameters = "SchemaHierarchy_Parameters";
public const string SchemaHierarchy_PartitionFunctions = "SchemaHierarchy_PartitionFunctions";
public const string SchemaHierarchy_PartitionSchemes = "SchemaHierarchy_PartitionSchemes";
public const string SchemaHierarchy_Permissions = "SchemaHierarchy_Permissions";
public const string SchemaHierarchy_PrimaryKeys = "SchemaHierarchy_PrimaryKeys";
public const string SchemaHierarchy_Programmability = "SchemaHierarchy_Programmability";
public const string SchemaHierarchy_Queues = "SchemaHierarchy_Queues";
public const string SchemaHierarchy_RemoteServiceBindings = "SchemaHierarchy_RemoteServiceBindings";
public const string SchemaHierarchy_ReturnedColumns = "SchemaHierarchy_ReturnedColumns";
public const string SchemaHierarchy_Roles = "SchemaHierarchy_Roles";
public const string SchemaHierarchy_Routes = "SchemaHierarchy_Routes";
public const string SchemaHierarchy_Rules = "SchemaHierarchy_Rules";
public const string SchemaHierarchy_Schemas = "SchemaHierarchy_Schemas";
public const string SchemaHierarchy_Security = "SchemaHierarchy_Security";
public const string SchemaHierarchy_ServerObjects = "SchemaHierarchy_ServerObjects";
public const string SchemaHierarchy_Management = "SchemaHierarchy_Management";
public const string SchemaHierarchy_ServerTriggers = "SchemaHierarchy_ServerTriggers";
public const string SchemaHierarchy_ServiceBroker = "SchemaHierarchy_ServiceBroker";
public const string SchemaHierarchy_Services = "SchemaHierarchy_Services";
public const string SchemaHierarchy_Signatures = "SchemaHierarchy_Signatures";
public const string SchemaHierarchy_LogFiles = "SchemaHierarchy_LogFiles";
public const string SchemaHierarchy_Statistics = "SchemaHierarchy_Statistics";
public const string SchemaHierarchy_Storage = "SchemaHierarchy_Storage";
public const string SchemaHierarchy_StoredProcedures = "SchemaHierarchy_StoredProcedures";
public const string SchemaHierarchy_SymmetricKeys = "SchemaHierarchy_SymmetricKeys";
public const string SchemaHierarchy_Synonyms = "SchemaHierarchy_Synonyms";
public const string SchemaHierarchy_Tables = "SchemaHierarchy_Tables";
public const string SchemaHierarchy_Triggers = "SchemaHierarchy_Triggers";
public const string SchemaHierarchy_Types = "SchemaHierarchy_Types";
public const string SchemaHierarchy_UniqueKeys = "SchemaHierarchy_UniqueKeys";
public const string SchemaHierarchy_UserDefinedDataTypes = "SchemaHierarchy_UserDefinedDataTypes";
public const string SchemaHierarchy_UserDefinedTypes = "SchemaHierarchy_UserDefinedTypes";
public const string SchemaHierarchy_Users = "SchemaHierarchy_Users";
public const string SchemaHierarchy_Views = "SchemaHierarchy_Views";
public const string SchemaHierarchy_XmlIndexes = "SchemaHierarchy_XmlIndexes";
public const string SchemaHierarchy_XMLSchemaCollections = "SchemaHierarchy_XMLSchemaCollections";
public const string SchemaHierarchy_UserDefinedTableTypes = "SchemaHierarchy_UserDefinedTableTypes";
public const string SchemaHierarchy_FilegroupFiles = "SchemaHierarchy_FilegroupFiles";
public const string MissingCaption = "MissingCaption";
public const string SchemaHierarchy_BrokerPriorities = "SchemaHierarchy_BrokerPriorities";
public const string SchemaHierarchy_CryptographicProviders = "SchemaHierarchy_CryptographicProviders";
public const string SchemaHierarchy_DatabaseAuditSpecifications = "SchemaHierarchy_DatabaseAuditSpecifications";
public const string SchemaHierarchy_DatabaseEncryptionKeys = "SchemaHierarchy_DatabaseEncryptionKeys";
public const string SchemaHierarchy_EventSessions = "SchemaHierarchy_EventSessions";
public const string SchemaHierarchy_FullTextStopLists = "SchemaHierarchy_FullTextStopLists";
public const string SchemaHierarchy_ResourcePools = "SchemaHierarchy_ResourcePools";
public const string SchemaHierarchy_ServerAudits = "SchemaHierarchy_ServerAudits";
public const string SchemaHierarchy_ServerAuditSpecifications = "SchemaHierarchy_ServerAuditSpecifications";
public const string SchemaHierarchy_SpatialIndexes = "SchemaHierarchy_SpatialIndexes";
public const string SchemaHierarchy_WorkloadGroups = "SchemaHierarchy_WorkloadGroups";
public const string SchemaHierarchy_SqlFiles = "SchemaHierarchy_SqlFiles";
public const string SchemaHierarchy_ServerFunctions = "SchemaHierarchy_ServerFunctions";
public const string SchemaHierarchy_SqlType = "SchemaHierarchy_SqlType";
public const string SchemaHierarchy_ServerOptions = "SchemaHierarchy_ServerOptions";
public const string SchemaHierarchy_DatabaseDiagrams = "SchemaHierarchy_DatabaseDiagrams";
public const string SchemaHierarchy_SystemTables = "SchemaHierarchy_SystemTables";
public const string SchemaHierarchy_Databases = "SchemaHierarchy_Databases";
public const string SchemaHierarchy_SystemContracts = "SchemaHierarchy_SystemContracts";
public const string SchemaHierarchy_SystemDatabases = "SchemaHierarchy_SystemDatabases";
public const string SchemaHierarchy_SystemMessageTypes = "SchemaHierarchy_SystemMessageTypes";
public const string SchemaHierarchy_SystemQueues = "SchemaHierarchy_SystemQueues";
public const string SchemaHierarchy_SystemServices = "SchemaHierarchy_SystemServices";
public const string SchemaHierarchy_SystemStoredProcedures = "SchemaHierarchy_SystemStoredProcedures";
public const string SchemaHierarchy_SystemViews = "SchemaHierarchy_SystemViews";
public const string SchemaHierarchy_DataTierApplications = "SchemaHierarchy_DataTierApplications";
public const string SchemaHierarchy_ExtendedStoredProcedures = "SchemaHierarchy_ExtendedStoredProcedures";
public const string SchemaHierarchy_SystemAggregateFunctions = "SchemaHierarchy_SystemAggregateFunctions";
public const string SchemaHierarchy_SystemApproximateNumerics = "SchemaHierarchy_SystemApproximateNumerics";
public const string SchemaHierarchy_SystemBinaryStrings = "SchemaHierarchy_SystemBinaryStrings";
public const string SchemaHierarchy_SystemCharacterStrings = "SchemaHierarchy_SystemCharacterStrings";
public const string SchemaHierarchy_SystemCLRDataTypes = "SchemaHierarchy_SystemCLRDataTypes";
public const string SchemaHierarchy_SystemConfigurationFunctions = "SchemaHierarchy_SystemConfigurationFunctions";
public const string SchemaHierarchy_SystemCursorFunctions = "SchemaHierarchy_SystemCursorFunctions";
public const string SchemaHierarchy_SystemDataTypes = "SchemaHierarchy_SystemDataTypes";
public const string SchemaHierarchy_SystemDateAndTime = "SchemaHierarchy_SystemDateAndTime";
public const string SchemaHierarchy_SystemDateAndTimeFunctions = "SchemaHierarchy_SystemDateAndTimeFunctions";
public const string SchemaHierarchy_SystemExactNumerics = "SchemaHierarchy_SystemExactNumerics";
public const string SchemaHierarchy_SystemFunctions = "SchemaHierarchy_SystemFunctions";
public const string SchemaHierarchy_SystemHierarchyIdFunctions = "SchemaHierarchy_SystemHierarchyIdFunctions";
public const string SchemaHierarchy_SystemMathematicalFunctions = "SchemaHierarchy_SystemMathematicalFunctions";
public const string SchemaHierarchy_SystemMetadataFunctions = "SchemaHierarchy_SystemMetadataFunctions";
public const string SchemaHierarchy_SystemOtherDataTypes = "SchemaHierarchy_SystemOtherDataTypes";
public const string SchemaHierarchy_SystemOtherFunctions = "SchemaHierarchy_SystemOtherFunctions";
public const string SchemaHierarchy_SystemRowsetFunctions = "SchemaHierarchy_SystemRowsetFunctions";
public const string SchemaHierarchy_SystemSecurityFunctions = "SchemaHierarchy_SystemSecurityFunctions";
public const string SchemaHierarchy_SystemSpatialDataTypes = "SchemaHierarchy_SystemSpatialDataTypes";
public const string SchemaHierarchy_SystemStringFunctions = "SchemaHierarchy_SystemStringFunctions";
public const string SchemaHierarchy_SystemSystemStatisticalFunctions = "SchemaHierarchy_SystemSystemStatisticalFunctions";
public const string SchemaHierarchy_SystemTextAndImageFunctions = "SchemaHierarchy_SystemTextAndImageFunctions";
public const string SchemaHierarchy_SystemUnicodeCharacterStrings = "SchemaHierarchy_SystemUnicodeCharacterStrings";
public const string SchemaHierarchy_AggregateFunctions = "SchemaHierarchy_AggregateFunctions";
public const string SchemaHierarchy_ScalarValuedFunctions = "SchemaHierarchy_ScalarValuedFunctions";
public const string SchemaHierarchy_TableValuedFunctions = "SchemaHierarchy_TableValuedFunctions";
public const string SchemaHierarchy_SystemExtendedStoredProcedures = "SchemaHierarchy_SystemExtendedStoredProcedures";
public const string SchemaHierarchy_BuiltInType = "SchemaHierarchy_BuiltInType";
public const string SchemaHierarchy_BuiltInServerRole = "SchemaHierarchy_BuiltInServerRole";
public const string SchemaHierarchy_UserWithPassword = "SchemaHierarchy_UserWithPassword";
public const string SchemaHierarchy_SearchPropertyList = "SchemaHierarchy_SearchPropertyList";
public const string SchemaHierarchy_SecurityPolicies = "SchemaHierarchy_SecurityPolicies";
public const string SchemaHierarchy_SecurityPredicates = "SchemaHierarchy_SecurityPredicates";
public const string SchemaHierarchy_ServerRole = "SchemaHierarchy_ServerRole";
public const string SchemaHierarchy_SearchPropertyLists = "SchemaHierarchy_SearchPropertyLists";
public const string SchemaHierarchy_ColumnStoreIndexes = "SchemaHierarchy_ColumnStoreIndexes";
public const string SchemaHierarchy_TableTypeIndexes = "SchemaHierarchy_TableTypeIndexes";
public const string SchemaHierarchy_Server = "SchemaHierarchy_Server";
public const string SchemaHierarchy_SelectiveXmlIndexes = "SchemaHierarchy_SelectiveXmlIndexes";
public const string SchemaHierarchy_XmlNamespaces = "SchemaHierarchy_XmlNamespaces";
public const string SchemaHierarchy_XmlTypedPromotedPaths = "SchemaHierarchy_XmlTypedPromotedPaths";
public const string SchemaHierarchy_SqlTypedPromotedPaths = "SchemaHierarchy_SqlTypedPromotedPaths";
public const string SchemaHierarchy_DatabaseScopedCredentials = "SchemaHierarchy_DatabaseScopedCredentials";
public const string SchemaHierarchy_ExternalDataSources = "SchemaHierarchy_ExternalDataSources";
public const string SchemaHierarchy_ExternalFileFormats = "SchemaHierarchy_ExternalFileFormats";
public const string SchemaHierarchy_ExternalResources = "SchemaHierarchy_ExternalResources";
public const string SchemaHierarchy_ExternalTables = "SchemaHierarchy_ExternalTables";
public const string SchemaHierarchy_AlwaysEncryptedKeys = "SchemaHierarchy_AlwaysEncryptedKeys";
public const string SchemaHierarchy_ColumnMasterKeys = "SchemaHierarchy_ColumnMasterKeys";
public const string SchemaHierarchy_ColumnEncryptionKeys = "SchemaHierarchy_ColumnEncryptionKeys";
public const string SchemaHierarchy_SubroutineParameterLabelFormatString = "SchemaHierarchy_SubroutineParameterLabelFormatString";
public const string SchemaHierarchy_SubroutineParameterNoDefaultLabel = "SchemaHierarchy_SubroutineParameterNoDefaultLabel";
public const string SchemaHierarchy_SubroutineParameterInputLabel = "SchemaHierarchy_SubroutineParameterInputLabel";
public const string SchemaHierarchy_SubroutineParameterInputOutputLabel = "SchemaHierarchy_SubroutineParameterInputOutputLabel";
public const string SchemaHierarchy_SubroutineParameterInputReadOnlyLabel = "SchemaHierarchy_SubroutineParameterInputReadOnlyLabel";
public const string SchemaHierarchy_SubroutineParameterInputOutputReadOnlyLabel = "SchemaHierarchy_SubroutineParameterInputOutputReadOnlyLabel";
public const string SchemaHierarchy_SubroutineParameterDefaultLabel = "SchemaHierarchy_SubroutineParameterDefaultLabel";
public const string SchemaHierarchy_NullColumn_Label = "SchemaHierarchy_NullColumn_Label";
public const string SchemaHierarchy_NotNullColumn_Label = "SchemaHierarchy_NotNullColumn_Label";
public const string SchemaHierarchy_UDDTLabelWithType = "SchemaHierarchy_UDDTLabelWithType";
public const string SchemaHierarchy_UDDTLabelWithoutType = "SchemaHierarchy_UDDTLabelWithoutType";
public const string SchemaHierarchy_ComputedColumnLabelWithType = "SchemaHierarchy_ComputedColumnLabelWithType";
public const string SchemaHierarchy_ComputedColumnLabelWithoutType = "SchemaHierarchy_ComputedColumnLabelWithoutType";
public const string SchemaHierarchy_ColumnSetLabelWithoutType = "SchemaHierarchy_ColumnSetLabelWithoutType";
public const string SchemaHierarchy_ColumnSetLabelWithType = "SchemaHierarchy_ColumnSetLabelWithType";
public const string SchemaHierarchy_ColumnSetLabelWithTypeAndKeyString = "SchemaHierarchy_ColumnSetLabelWithTypeAndKeyString";
public const string UniqueIndex_LabelPart = "UniqueIndex_LabelPart";
public const string NonUniqueIndex_LabelPart = "NonUniqueIndex_LabelPart";
public const string ClusteredIndex_LabelPart = "ClusteredIndex_LabelPart";
public const string NonClusteredIndex_LabelPart = "NonClusteredIndex_LabelPart";
public const string History_LabelPart = "History_LabelPart";
public const string SystemVersioned_LabelPart = "SystemVersioned_LabelPart";
public const string External_LabelPart = "External_LabelPart";
public const string FileTable_LabelPart = "FileTable_LabelPart";
public const string DatabaseNotAccessible = "DatabaseNotAccessible";
public const string ScriptingParams_ConnectionString_Property_Invalid = "ScriptingParams_ConnectionString_Property_Invalid";
public const string ScriptingParams_FilePath_Property_Invalid = "ScriptingParams_FilePath_Property_Invalid";
public const string ScriptingListObjectsCompleteParams_ConnectionString_Property_Invalid = "ScriptingListObjectsCompleteParams_ConnectionString_Property_Invalid";
public const string StoredProcedureScriptParameterComment = "StoredProcedureScriptParameterComment";
public const string ScriptingGeneralError = "ScriptingGeneralError";
public const string ScriptingExecuteNotSupportedError = "ScriptingExecuteNotSupportedError";
public const string BackupTaskName = "BackupTaskName";
public const string BackupPathIsFolderError = "BackupPathIsFolderError";
public const string InvalidBackupPathError = "InvalidBackupPathError";
public const string TaskInProgress = "TaskInProgress";
public const string TaskCompleted = "TaskCompleted";
public const string ConflictWithNoRecovery = "ConflictWithNoRecovery";
public const string InvalidPathForDatabaseFile = "InvalidPathForDatabaseFile";
public const string Log = "Log";
public const string RestorePlanFailed = "RestorePlanFailed";
public const string RestoreNotSupported = "RestoreNotSupported";
public const string RestoreTaskName = "RestoreTaskName";
public const string RestoreCopyOnly = "RestoreCopyOnly";
public const string RestoreBackupSetComponent = "RestoreBackupSetComponent";
public const string RestoreBackupSetName = "RestoreBackupSetName";
public const string RestoreBackupSetType = "RestoreBackupSetType";
public const string RestoreBackupSetServer = "RestoreBackupSetServer";
public const string RestoreBackupSetDatabase = "RestoreBackupSetDatabase";
public const string RestoreBackupSetPosition = "RestoreBackupSetPosition";
public const string RestoreBackupSetFirstLsn = "RestoreBackupSetFirstLsn";
public const string RestoreBackupSetLastLsn = "RestoreBackupSetLastLsn";
public const string RestoreBackupSetCheckpointLsn = "RestoreBackupSetCheckpointLsn";
public const string RestoreBackupSetFullLsn = "RestoreBackupSetFullLsn";
public const string RestoreBackupSetStartDate = "RestoreBackupSetStartDate";
public const string RestoreBackupSetFinishDate = "RestoreBackupSetFinishDate";
public const string RestoreBackupSetSize = "RestoreBackupSetSize";
public const string RestoreBackupSetUserName = "RestoreBackupSetUserName";
public const string RestoreBackupSetExpiration = "RestoreBackupSetExpiration";
public const string TheLastBackupTaken = "TheLastBackupTaken";
public const string NoBackupsetsToRestore = "NoBackupsetsToRestore";
public const string ScriptTaskName = "ScriptTaskName";
public const string InvalidPathError = "InvalidPathError";
public const string ProfilerConnectionNotFound = "ProfilerConnectionNotFound";
public const string AzureSystemDbProfilingError = "AzureSystemDbProfilingError";
public const string CreateSessionFailed = "CreateSessionFailed";
public const string StartSessionFailed = "StartSessionFailed";
public const string PauseSessionFailed = "PauseSessionFailed";
public const string StopSessionFailed = "StopSessionFailed";
public const string SessionNotFound = "SessionNotFound";
public const string SessionAlreadyExists = "SessionAlreadyExists";
public const string CategoryLocal = "CategoryLocal";
public const string CategoryFromMsx = "CategoryFromMsx";
public const string CategoryMultiServer = "CategoryMultiServer";
public const string CategoryDBMaint = "CategoryDBMaint";
public const string CategoryWebAssistant = "CategoryWebAssistant";
public const string CategoryFullText = "CategoryFullText";
public const string CategoryReplDistribution = "CategoryReplDistribution";
public const string CategoryReplDistributionCleanup = "CategoryReplDistributionCleanup";
public const string CategoryReplHistoryCleanup = "CategoryReplHistoryCleanup";
public const string CategoryReplLogReader = "CategoryReplLogReader";
public const string CategoryReplMerge = "CategoryReplMerge";
public const string CategoryReplSnapShot = "CategoryReplSnapShot";
public const string CategoryReplCheckup = "CategoryReplCheckup";
public const string CategoryReplCleanup = "CategoryReplCleanup";
public const string CategoryReplAlert = "CategoryReplAlert";
public const string CategoryReplQReader = "CategoryReplQReader";
public const string CategoryReplication = "CategoryReplication";
public const string CategoryUncategorized = "CategoryUncategorized";
public const string CategoryLogShipping = "CategoryLogShipping";
public const string CategoryDBEngineTuningAdvisor = "CategoryDBEngineTuningAdvisor";
public const string CategoryDataCollector = "CategoryDataCollector";
public const string UnknownSizeUnit = "UnknownSizeUnit";
public const string UnexpectedRunType = "UnexpectedRunType";
public const string CredentialNoLongerExists = "CredentialNoLongerExists";
public const string UnknownServerType = "UnknownServerType";
public const string SetOwnerFailed = "SetOwnerFailed";
public const string TargetServerNotSelected = "TargetServerNotSelected";
public const string ProxyAccountNotFound = "ProxyAccountNotFound";
public const string SysadminAccount = "SysadminAccount";
public const string JobAlreadyExists = "JobAlreadyExists";
public const string JobStepNameCannotBeBlank = "JobStepNameCannotBeBlank";
public const string JobStepNameAlreadyExists = "JobStepNameAlreadyExists";
public const string AlertNameCannotBeBlank = "AlertNameCannotBeBlank";
public const string CannotCreateNewAlert = "CannotCreateNewAlert";
public const string CannotAlterAlert = "CannotAlterAlert";
public const string InvalidScheduleTitle = "InvalidScheduleTitle";
public const string InvalidWeeklySchedule = "InvalidWeeklySchedule";
public const string StartDateGreaterThanEndDate = "StartDateGreaterThanEndDate";
public const string StartTimeGreaterThanEndTime = "StartTimeGreaterThanEndTime";
public const string EndTimeEqualToStartTime = "EndTimeEqualToStartTime";
public const string InvalidStartDate = "InvalidStartDate";
public const string ScheduleNameAlreadyExists = "ScheduleNameAlreadyExists";
public const string JobServerIsNotAvailable = "JobServerIsNotAvailable";
public const string NeverBackedUp = "NeverBackedUp";
public const string Error_InvalidDirectoryName = "Error_InvalidDirectoryName";
public const string Error_ExistingDirectoryName = "Error_ExistingDirectoryName";
public const string ExportBacpacTaskName = "ExportBacpacTaskName";
public const string ImportBacpacTaskName = "ImportBacpacTaskName";
public const string ExtractDacpacTaskName = "ExtractDacpacTaskName";
public const string DeployDacpacTaskName = "DeployDacpacTaskName";
public const string GenerateScriptTaskName = "GenerateScriptTaskName";
public const string ProjectExtractTaskName = "ProjectExtractTaskName";
public const string ValidateStreamingJobTaskName = "ValidateStreamingJobTaskName";
public const string ExtractInvalidVersion = "ExtractInvalidVersion";
public const string StreamNotFoundInModel = "StreamNotFoundInModel";
public const string Input = "Input";
public const string Output = "Output";
public const string StreamingJobValidationFailed = "StreamingJobValidationFailed";
public const string FragmentShouldHaveOnlyOneBatch = "FragmentShouldHaveOnlyOneBatch";
public const string NoCreateStreamingJobStatementFound = "NoCreateStreamingJobStatementFound";
public const string PublishChangesTaskName = "PublishChangesTaskName";
public const string SchemaCompareExcludeIncludeNodeNotFound = "SchemaCompareExcludeIncludeNodeNotFound";
public const string OpenScmpConnectionBasedModelParsingError = "OpenScmpConnectionBasedModelParsingError";
public const string SchemaCompareSessionNotFound = "SchemaCompareSessionNotFound";
public const string SqlAssessmentGenerateScriptTaskName = "SqlAssessmentGenerateScriptTaskName";
public const string SqlAssessmentQueryInvalidOwnerUri = "SqlAssessmentQueryInvalidOwnerUri";
public const string SqlAssessmentConnectingError = "SqlAssessmentConnectingError";
public const string SqlAssessmentUnsuppoertedEdition = "SqlAssessmentUnsuppoertedEdition";
public const string CouldntFindAzureFunction = "CouldntFindAzureFunction";
public const string MoreThanOneAzureFunctionWithName = "MoreThanOneAzureFunctionWithName";
private Keys()
{ }
public static CultureInfo Culture
{
get
{
return _culture;
}
set
{
_culture = value;
}
}
public static string GetString(string key)
{
return resourceManager.GetString(key, _culture);
}
public static string GetString(string key, object arg0)
{
return string.Format(global::System.Globalization.CultureInfo.CurrentCulture, resourceManager.GetString(key, _culture), arg0);
}
public static string GetString(string key, object arg0, object arg1)
{
return string.Format(global::System.Globalization.CultureInfo.CurrentCulture, resourceManager.GetString(key, _culture), arg0, arg1);
}
public static string GetString(string key, object arg0, object arg1, object arg2)
{
return string.Format(global::System.Globalization.CultureInfo.CurrentCulture, resourceManager.GetString(key, _culture), arg0, arg1, arg2);
}
public static string GetString(string key, object arg0, object arg1, object arg2, object arg3)
{
return string.Format(global::System.Globalization.CultureInfo.CurrentCulture, resourceManager.GetString(key, _culture), arg0, arg1, arg2, arg3);
}
public static string GetString(string key, object arg0, object arg1, object arg2, object arg3, object arg4, object arg5)
{
return string.Format(global::System.Globalization.CultureInfo.CurrentCulture, resourceManager.GetString(key, _culture), arg0, arg1, arg2, arg3, arg4, arg5);
}
}
}
}
| 28.882861 | 175 | 0.584611 | [
"MIT"
] | JPaja/sqltoolsservice | src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs | 133,641 | C# |
using Mono.Linker.Tests.Cases.Expectations.Assertions;
using Mono.Linker.Tests.Cases.Expectations.Metadata;
using Mono.Linker.Tests.Cases.Inheritance.Interfaces.Dependencies;
namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.OnReferenceType
{
[SetupCompileBefore ("linked.dll", new[] { typeof (InterfaceTypeInOtherUsedOnlyByCopiedAssemblyExplicit_Link) })]
[SetupCompileBefore ("save.dll", new[] { typeof (InterfaceTypeInOtherUsedOnlyByCopiedAssemblyExplicit_Copy) }, new[] { "linked.dll" })]
[SetupLinkerAction ("save", "save")]
[SetupLinkerArgument ("-a", "save")]
[KeptMemberInAssembly ("linked.dll", typeof (InterfaceTypeInOtherUsedOnlyByCopiedAssemblyExplicit_Link.IFoo), "Method()")]
[KeptMemberInAssembly ("save.dll", typeof (InterfaceTypeInOtherUsedOnlyByCopiedAssemblyExplicit_Copy.A), "Mono.Linker.Tests.Cases.Inheritance.Interfaces.Dependencies.InterfaceTypeInOtherUsedOnlyByCopiedAssemblyExplicit_Link.IFoo.Method()")]
[KeptInterfaceOnTypeInAssembly ("save.dll", typeof (InterfaceTypeInOtherUsedOnlyByCopiedAssemblyExplicit_Copy.A), "linked.dll", typeof (InterfaceTypeInOtherUsedOnlyByCopiedAssemblyExplicit_Link.IFoo))]
public class InterfaceTypeInOtherUsedOnlyBySavedAssemblyExplicit
{
public static void Main ()
{
InterfaceTypeInOtherUsedOnlyByCopiedAssemblyExplicit_Copy.ToKeepReferenceAtCompileTime ();
}
}
} | 58.869565 | 241 | 0.824225 | [
"MIT"
] | Youssef1313/linker | test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/InterfaceTypeInOtherUsedOnlyBySavedAssemblyExplicit.cs | 1,354 | C# |
#region WatiN Copyright (C) 2006-2011 Jeroen van Menen
//Copyright 2006-2011 Jeroen van Menen
//
// 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.
#endregion Copyright
namespace WatiN.Core.Native
{
using System.Collections.Generic;
using System.Drawing;
/// <summary>
/// Behaviour common to all types of browser documents.
/// </summary>
public interface INativeDocument
{
/// <summary>
/// Gets the collection of all elements in the document.
/// </summary>
INativeElementCollection AllElements { get; }
/// <summary>
/// Gets the containing frame element, or null if none.
/// </summary>
INativeElement ContainingFrameElement { get; }
/// <summary>
/// Gets the body element for the current docuemnt.
/// </summary>
/// <value>The body element.</value>
INativeElement Body { get; }
/// <summary>
/// Gets the URL for the current document.
/// </summary>
/// <value>The URL for the current document.</value>
string Url { get; }
/// <summary>
/// Gets the title of the current docuemnt.
/// </summary>
/// <value>The title of the current document.</value>
string Title { get; }
/// <summary>
/// Gets the active element.
/// </summary>
/// <value>The active element.</value>
INativeElement ActiveElement { get; }
/// <summary>
/// Gets the name of the java script variable.
/// </summary>
/// <value>The name of the java script variable.</value>
string JavaScriptVariableName { get; }
/// <summary>
/// Gets the list of frames.
/// </summary>
/// <value>The list of frames of the current document.</value>
IList<INativeDocument> Frames { get; }
/// <summary>
/// Runs the script.
/// </summary>
/// <param name="scriptCode">
/// The script code to run.
/// </param>
/// <param name="language">
/// The language the script was written in.
/// </param>
void RunScript(string scriptCode, string language);
/// <summary>
/// Gets the value for the corresponding <paramref name="propertyName"/>.
/// </summary>
/// <param name="propertyName">
/// Name of the property.
/// </param>
/// <returns>
/// The value for the corresponding <paramref name="propertyName"/>.
/// </returns>
string GetPropertyValue(string propertyName);
/// <summary>
/// Gets the bounds of all matching text substrings within the document.
/// </summary>
/// <param name="text">
/// The text to find
/// </param>
/// <returns>
/// The text bounds in screen coordinates
/// </returns>
IEnumerable<Rectangle> GetTextBounds(string text);
/// <summary>
/// Determines whether the text inside the HTML Body element contains the given <paramref name="text" />.
/// </summary>
/// <param name="text">The text.</param>
/// <returns>
/// <c>true</c> if the specified text is contained in Html; otherwise, <c>false</c>.
/// </returns>
bool ContainsText(string text);
}
} | 34.418803 | 114 | 0.558977 | [
"Apache-2.0"
] | Bruno-N-Fernandes/WatiN | src/Core/Native/INativeDocument.cs | 4,027 | C# |
using System;
namespace FullInspector {
/// <summary>
/// Allows an IPropertyEditor to be used as an attribute property editor.
/// </summary>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)]
public sealed class CustomAttributePropertyEditorAttribute : Attribute {
/// <summary>
/// The attribute type that activates this property editor.
/// </summary>
public Type AttributeActivator;
/// <summary>
/// If true, then this attribute property editor will replace other property editors beneath
/// it.
/// </summary>
public bool ReplaceOthers;
/// <summary>
/// Construct a new attribute instance.
/// </summary>
/// <param name="attributeActivator">The attribute type that activates this property
/// editor.</param>
public CustomAttributePropertyEditorAttribute(Type attributeActivator)
: this(attributeActivator, true) {
}
/// <summary>
/// Construct a new attribute instance.
/// </summary>
/// <param name="attributeActivator">The attribute type that activates this property
/// editor.</param>
/// <param name="replaceOthers">If true, then this attribute property editor will replace
/// other property editors beneath it.</param>
public CustomAttributePropertyEditorAttribute(Type attributeActivator, bool replaceOthers) {
AttributeActivator = attributeActivator;
ReplaceOthers = replaceOthers;
}
}
} | 38.756098 | 100 | 0.639396 | [
"MIT"
] | bakiya-sefer/bakiya-sefer | Assets/FullInspector2/Core/Editor/CustomAttributePropertyEditorAttribute.cs | 1,591 | C# |
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.EntityFrameworkCore.TestModels.InheritanceRelationships
{
public class CollectionOnDerived
{
public int Id { get; set; }
public string Name { get; set; }
public int? ParentId { get; set; }
public DerivedInheritanceRelationshipEntity Parent { get; set; }
}
}
| 32.733333 | 111 | 0.702648 | [
"Apache-2.0"
] | 1iveowl/efcore | test/EFCore.Specification.Tests/TestModels/InheritanceRelationships/CollectionOnDerived.cs | 491 | C# |
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34209
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ExcelWorkbook1.Properties {
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ExcelWorkbook1.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}
| 42.079365 | 180 | 0.6043 | [
"MIT"
] | smangelschots/DotErp | DataLayer Tutorial 1/ExcelWorkbook1/ExcelWorkbook1/Properties/Resources.Designer.cs | 2,653 | C# |
//
// System.IO.NotifyFilters.cs
//
// Author:
// Tim Coleman (tim@timcoleman.com)
//
// Copyright (C) Tim Coleman, 2002
// Copyright (C) 2006 Novell, Inc (http://www.novell.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.
//
namespace System.IO {
[Flags]
#if ONLY_1_1
[Serializable]
#endif
public enum NotifyFilters {
Attributes = 4,
CreationTime = 64,
DirectoryName = 2,
FileName = 1,
LastAccess = 32,
LastWrite = 16,
Security = 256,
Size = 8
}
}
| 32.12766 | 73 | 0.730464 | [
"MIT"
] | zlxy/Genesis-3D | Engine/extlibs/IosLibs/mono-2.6.7/mcs/class/System/System.IO/NotifyFilters.cs | 1,510 | C# |
using System;
using NHibernate.UserTypes;
using NHibernate.SqlTypes;
using System.Data;
using NHibernate;
#if NHIBERNATE5
using System.Data.Common;
using NHibernate.Engine;
#endif
namespace CSF.NHibernate
{
/// <summary>
/// An NHibernate <see cref="IUserType"/> which stores a <see cref="Guid"/> as binary
/// data, in RFC-4122 format.
/// </summary>
public class Rfc4122BinaryGuidType : IUserType
{
const int GuidByteCount = 16;
static readonly SqlType[] Types = { new SqlType(DbType.Binary) };
/// <summary>
/// Gets a collection of the SQL column types used to store the value.
/// </summary>
/// <value>The sql types.</value>
public SqlType[] SqlTypes => Types;
/// <summary>
/// Gets the returned object type.
/// </summary>
/// <value>The type of the returned.</value>
public Type ReturnedType => typeof(Guid);
/// <summary>
/// Determines whether two instances of this type are equal or not, for the purposes of persistence.
/// </summary>
/// <param name="x">The first object.</param>
/// <param name="y">The second object.</param>
public new bool Equals(object x, object y) => Object.Equals(x, y);
/// <summary>
/// Get a hashcode for the instance, consistent with persistence "equality"
/// </summary>
/// <returns>The hash code.</returns>
/// <param name="x">The object.</param>
public int GetHashCode(object x) => x.GetHashCode();
#if NHIBERNATE4
/// <summary>
/// Retrieve an instance of the mapped class from a ADO resultset.
/// </summary>
/// <param name="rs">An ADO data-reader object</param>
/// <param name="names">An array of the column names from which to get data</param>
/// <param name="owner">The containing entity</param>
/// <returns>A <see cref="Guid"/>, or a null reference.</returns>
/// <exception cref="HibernateException"></exception>
public object NullSafeGet(IDataReader rs, string[] names, object owner)
#elif NHIBERNATE5
/// <summary>
/// Retrieve an instance of the mapped class from a ADO resultset.
/// </summary>
/// <param name="rs">An ADO data-reader object</param>
/// <param name="names">An array of the column names from which to get data</param>
/// <param name="owner">The containing entity</param>
/// <param name="session">A session implementor</param>
/// <returns>A <see cref="Guid"/>, or a null reference.</returns>
/// <exception cref="HibernateException"></exception>
public object NullSafeGet(DbDataReader rs, string[] names, ISessionImplementor session, object owner)
#endif
{
#if NHIBERNATE4
var bytes = (byte[])NHibernateUtil.Binary.NullSafeGet(rs, names[0]);
#elif NHIBERNATE5
var bytes = (byte[]) NHibernateUtil.Binary.NullSafeGet(rs, names[0], session);
#endif
if (bytes?.Length != GuidByteCount) return null;
return bytes.ToRFC4122Guid();
}
#if NHIBERNATE4
/// <summary>
/// Write an instance of the mapped class to a prepared statement.
/// </summary>
/// <param name="cmd">An ADO database command object</param>
/// <param name="value">The object to write</param>
/// <param name="index">The zero-based index of the column (used for multi-column writes)</param>
/// <exception cref="HibernateException"></exception>
public void NullSafeSet(IDbCommand cmd, object value, int index)
#elif NHIBERNATE5
/// <summary>
/// Write an instance of the mapped class to a prepared statement.
/// </summary>
/// <param name="cmd">An ADO database command object</param>
/// <param name="value">The object to write</param>
/// <param name="index">The zero-based index of the column (used for multi-column writes)</param>
/// <param name="session">A session implementor</param>
/// <exception cref="HibernateException"></exception>
public void NullSafeSet(DbCommand cmd, object value, int index, ISessionImplementor session)
#endif
{
if (!(value is Guid guid))
{
#if NHIBERNATE4
NHibernateUtil.Binary.NullSafeSet(cmd, null, index);
#elif NHIBERNATE5
NHibernateUtil.Binary.NullSafeSet(cmd, null, index, session);
#endif
return;
}
var bytes = guid.ToRFC4122ByteArray();
#if NHIBERNATE4
NHibernateUtil.Binary.NullSafeSet(cmd, bytes, index);
#elif NHIBERNATE5
NHibernateUtil.Binary.NullSafeSet(cmd, bytes, index, session);
#endif
}
/// <summary>
/// Return a deep copy of the persistent state, stopping at entities and at collections.
/// </summary>
/// <param name="value">generally a collection element or entity field</param>
/// <returns>a copy</returns>
public object DeepCopy(object value)
{
return value;
}
/// <summary>
/// Are objects of this type mutable?
/// </summary>
/// <value><c>true</c> if this instance is mutable; otherwise, <c>false</c>.</value>
public bool IsMutable => false;
/// <summary>
/// Replace the specified original, target and owner.
/// </summary>
/// <param name="original">Original.</param>
/// <param name="target">Target.</param>
/// <param name="owner">Owner.</param>
public object Replace(object original, object target, object owner) => original;
/// <summary>
/// Reconstruct an object from the cacheable representation. At the very least this
/// method should perform a deep copy if the type is mutable. (optional operation)
/// </summary>
/// <param name="cached">the object to be cached</param>
/// <param name="owner">the owner of the cached object</param>
/// <returns>a reconstructed object from the cachable representation</returns>
public object Assemble(object cached, object owner) => cached;
/// <summary>
/// Transform the object into its cacheable representation. At the very least this
/// method should perform a deep copy if the type is mutable. That may not be enough
/// for some implementations, however; for example, associations must be cached as
/// identifier values. (optional operation)
/// </summary>
/// <param name="value">the object to be cached</param>
/// <returns>a cacheable representation of the object</returns>
public object Disassemble(object value) => value;
}
}
| 41.363636 | 109 | 0.612308 | [
"MIT"
] | csf-dev/CSF.Data.NHibernate | CommonSrc/Rfc4122BinaryGuidType.cs | 6,827 | C# |
using System;
using IdentityBugLog.Areas.Identity.Data;
using IdentityBugLog.Data;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Identity.UI;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
[assembly: HostingStartup(typeof(IdentityBugLog.Areas.Identity.IdentityHostingStartup))]
namespace IdentityBugLog.Areas.Identity
{
public class IdentityHostingStartup : IHostingStartup
{
public void Configure(IWebHostBuilder builder)
{
builder.ConfigureServices((context, services) => {
services.AddDbContext<UserIdentityContext>(options =>
options.UseSqlServer(
context.Configuration.GetConnectionString("UserIdentityContextConnection")));
services.AddDefaultIdentity<UserIdentity>(options => {
options.SignIn.RequireConfirmedAccount = true;
options.Password.RequiredLength = 8;
options.User.RequireUniqueEmail = true;
options.User.AllowedUserNameCharacters = "abcçdefghiıjklmnoöpqrsştuüvwxyzABCÇDEFGHIİJKLMNOÖPQRSŞTUÜVWXYZ0123456789";
})
.AddRoles<IdentityRole>()
.AddEntityFrameworkStores<UserIdentityContext>();
services.AddDistributedMemoryCache();
});
}
}
} | 43.083333 | 140 | 0.648614 | [
"MIT"
] | Meeyzt/IdentityBugLog | IdentityBugLog/Areas/Identity/IdentityHostingStartup.cs | 1,563 | C# |
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using UnityEngine;
[XmlRoot("GameSaveData")]
public class GameSaveData
{
[XmlAttribute("storeName")]
public string StoreName;
[XmlElement("storeColor")]
public ColorSave StoreColor;
[XmlAttribute("money")]
public float Money;
[XmlAttribute("popularity")]
public float Popularity;
[XmlAttribute("daysBillsWerePaid")]
public int TimesBillsWerePaid;
[XmlAttribute("daysPlayed")]
public int DaysPlayed;
[XmlAttribute("day")]
public int Day;
[XmlAttribute("season")]
public StoreManager.Season Season;
[XmlAttribute("year")]
public int Year;
[XmlAttribute("timeHours")]
public int StoreTimeHours;
[XmlAttribute("timeMinutes")]
public int StoreTimeMinutes;
[XmlArray("Inventory"), XmlArrayItem("StockItem")]
public List<StockItem> InventoryItems = new List<StockItem>();
[XmlArray("StoreObjects"), XmlArrayItem("StoreObject")]
public List<StoreObjectSave> StoreObjectSaves = new List<StoreObjectSave>();
[XmlElement("EconomyData")]
public EconomyData EconomyDataSave;
[XmlArray("Upgrades"), XmlArrayItem("Upgrade")]
public List<StoreManager.StoreUpgrade> StoreUpgrades = new List<StoreManager.StoreUpgrade>();
public class StoreObjectSave
{
[XmlAttribute("positionX")]
public float PositionX;
[XmlAttribute("positionY")]
public float PositionY;
[XmlAttribute("positionZ")]
public float PositionZ;
[XmlAttribute("rotationX")]
public float RotationX;
[XmlAttribute("rotationY")]
public float RotationY;
[XmlAttribute("rotationZ")]
public float RotationZ;
[XmlAttribute("type")]
public PlaceableObject.ObjectType ObjectType;
[XmlAttribute("parentTile")]
public string NameOFloorTileParent;
[XmlElement("item")]
public StockItem ContainedStockItem;
}
public class ColorSave
{
[XmlAttribute("R")]
public float R;
[XmlAttribute("G")]
public float G;
[XmlAttribute("B")]
public float B;
[XmlAttribute("A")]
public float A;
public ColorSave()
{
}
public ColorSave(float r, float b, float g, float a)
{
R = r;
B = b;
G = g;
A = a;
}
public Color GetColor()
{
return new Color(R, G, B, A);
}
}
public class EconomyData
{
[XmlAttribute("1")]
public StockItem.StockCategory TopCategory;
[XmlAttribute("2")]
public StockItem.StockCategory SecondCategory;
[XmlAttribute("3")]
public StockItem.StockCategory ThirdCategory;
[XmlAttribute("LastChange")]
public int DaysSinceLastChange;
[XmlAttribute("Weather")]
public EconomyManager.Weather Weather;
public EconomyData()
{ }
public EconomyData(StockItem.StockCategory topCategory, StockItem.StockCategory secondCategory, StockItem.StockCategory thirdCategory,
int daysSinceLastChange, EconomyManager.Weather weather)
{
TopCategory = topCategory;
SecondCategory = secondCategory;
ThirdCategory = thirdCategory;
DaysSinceLastChange = daysSinceLastChange;
Weather = weather;
}
}
public void GetAllData()
{
//Store
StoreName = StoreManager.StoreName;
StoreColor = new ColorSave
{
R = StoreManager.StoreColor.r,
G = StoreManager.StoreColor.g,
B = StoreManager.StoreColor.b,
A = StoreManager.StoreColor.a
};
Money = StoreManager.Singleton.Money;
DaysPlayed = StoreManager.Singleton.TotalDaysPlayed;
Popularity = StoreManager.Singleton.StorePopularity;
TimesBillsWerePaid = StoreManager.Singleton.TimesBillsWerePaid;
Day = StoreManager.Singleton.Day;
Year = StoreManager.Singleton.Year;
Season = StoreManager.Singleton.CurrentSeason;
StoreTimeHours = StoreManager.Singleton.StoreTime.Hours;
StoreTimeMinutes = StoreManager.Singleton.StoreTime.Minutes;
InventoryItems.Clear();
InventoryItems.AddRange(StoreManager.Singleton.Inventory.ToArray());
//Store Objects
StoreObjectSaves.Clear();
foreach (var so in StoreObjectManager.Singleton.StoreObjects)
{
StoreObjectSave newSo = new StoreObjectSave();
newSo.PositionX = so.transform.position.x;
newSo.PositionY = so.transform.position.y;
newSo.PositionZ = so.transform.position.z;
newSo.RotationX = so.transform.rotation.eulerAngles.x;
newSo.RotationY = so.transform.rotation.eulerAngles.y;
newSo.RotationZ = so.transform.rotation.eulerAngles.z;
newSo.NameOFloorTileParent = so.transform.parent.name;
newSo.ContainedStockItem = so.GetComponent<ItemStockContainer>().InventoryItem;
StoreObjectSaves.Add(newSo);
}
//Economy
EconomyDataSave = new EconomyData(EconomyManager.Singleton.TopCategory, EconomyManager.Singleton.SecondCategory, EconomyManager.Singleton.ThirdCategory, EconomyManager.Singleton.DaysSinceLastChange, EconomyManager.Singleton.CurrentWeather);
//Upgrades
StoreUpgrades.Clear();
foreach (var upgrade in StoreManager.Singleton.ActiveUpgrades)
{
StoreUpgrades.Add(upgrade);
}
}
public void ApplyDataToGame()
{
//Store
StoreManager.StoreName = StoreName;
StoreManager.StoreColor = StoreColor.GetColor();
StoreManager.Singleton.WallMaterial.color = StoreManager.StoreColor;
StoreManager.Singleton.Money = Money;
StoreManager.Singleton.TotalDaysPlayed = DaysPlayed;
StoreManager.Singleton.StorePopularity = Popularity;
StoreManager.Singleton.TimesBillsWerePaid = TimesBillsWerePaid;
StoreManager.Singleton.Day = Day;
StoreManager.Singleton.Year = Year;
StoreManager.Singleton.CurrentSeason = Season;
StoreManager.Singleton.StoreTime = new TimeSpan(StoreTimeHours, StoreTimeMinutes, 0);
StoreManager.Singleton.Inventory.Clear();
StoreManager.Singleton.Inventory.AddRange(InventoryItems.ToArray());
//Store Objects
foreach (var storeObject in StoreObjectManager.Singleton.StoreObjects)
{
storeObject.transform.parent.GetComponent<FloorTile>().CanPlaceObjectHere = true;
GameObject.Destroy(storeObject);
}
StoreObjectManager.Singleton.StoreObjects.Clear();
foreach (var slot in UIManager.Singleton.ItemSlots)
{
GameObject.Destroy(slot);
}
UIManager.Singleton.ItemSlots.Clear();
foreach (var so in StoreObjectSaves)
{
StoreObjectManager.Singleton.PlaceObject(so.ObjectType, new Vector3(so.PositionX, so.PositionY, so.PositionZ), Quaternion.Euler(so.RotationX, so.RotationY, so.RotationZ), so.ContainedStockItem, so.NameOFloorTileParent);
}
//Economy
EconomyManager.Singleton.TopCategory = EconomyDataSave.TopCategory;
EconomyManager.Singleton.SecondCategory = EconomyDataSave.SecondCategory;
EconomyManager.Singleton.ThirdCategory = EconomyDataSave.ThirdCategory;
EconomyManager.Singleton.DaysSinceLastChange = EconomyDataSave.DaysSinceLastChange;
EconomyManager.Singleton.CurrentWeather = EconomyDataSave.Weather;
//Upgrades
StoreManager.Singleton.ActiveUpgrades.Clear();
StoreManager.Singleton.ActiveUpgrades.AddRange(StoreUpgrades.ToArray());
}
} | 30.39924 | 248 | 0.652033 | [
"Apache-2.0"
] | BlackDragonBE/store-story | Assets/Scripts/SaveLoad/GameSaveData.cs | 7,997 | C# |
/*Problem 11. Binary search
Write a program that finds the index of given element in a sorted array of integers by using the binary search algorithm
* (find it in Wikipedia).
*/
using System;
class BinarySearch
{
static void Main()
{
Console.WriteLine("Enter a number for N:");
int N = int.Parse(Console.ReadLine());
Console.WriteLine("Enter a number which index we are going to looking for:");
int S = int.Parse(Console.ReadLine());
int[] nums = new int[N];
Console.WriteLine("Enter {0} number(s) to array:", N);
for (int i = 0; i < N; i++)
{
nums[i] = int.Parse(Console.ReadLine());
}
Array.Sort(nums);
Console.WriteLine("Array after sorting: {0}", string.Join(", ", nums));
int index = BinarySearch(nums, S, 0, nums.Length);
if (index != -1) Console.WriteLine("Number {0} found at index: {1}", S, index);
else Console.WriteLine("Number {0} not found!", S);
}
private static int BinarySearch(int[] nums, int value, int start, int end)
{
if (end < start)
{
return -1;
}
else
{
int middleIndex = (start + end) / 2;
if (nums[middleIndex] > value)
{
return BinarySearch(nums, value, start, middleIndex - 1);
}
else if (nums[middleIndex] < value)
{
return BinarySearch(nums, value, middleIndex + 1, end);
}
else
{
return middleIndex;
}
}
}
} | 27.59322 | 121 | 0.52457 | [
"MIT"
] | Vladeff/TelerikAcademy | C#2 Homework/Arrays/11BinarySearch/BinarySearch.cs | 1,632 | C# |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("HackerNews")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("HackerNews")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("44052ada-319d-4f3c-8dd3-fe1734858eb7")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
| 38.621622 | 85 | 0.725682 | [
"MIT"
] | futurix/demo-scraper | HackerNews/HackerNews/Properties/AssemblyInfo.cs | 1,432 | C# |
namespace gov.sandia.sld.common.configuration
{
public class MonitoredDrive : DriveInfo
{
public bool isMonitored { get; set; }
public MonitoredDrive()
{
isMonitored = true;
}
}
}
| 18.307692 | 46 | 0.571429 | [
"MIT"
] | gaybro8777/common | src/ConfigurationLib/MonitoredDrive.cs | 240 | C# |
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.StaticFiles;
using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.Options;
using System;
using System.Collections.Generic;
using System.Text;
namespace AuditLogView
{
public class LogConfigureOptions: IPostConfigureOptions<StaticFileOptions>
{
public LogConfigureOptions(IHostingEnvironment environment)
{
Environment = environment;
}
public IHostingEnvironment Environment { get; }
public void PostConfigure(string name, StaticFileOptions options)
{
name = name ?? throw new ArgumentNullException(nameof(name));
options = options ?? throw new ArgumentNullException(nameof(options));
// Basic initialization in case the options weren't initialized by any other component
options.ContentTypeProvider = options.ContentTypeProvider ?? new FileExtensionContentTypeProvider();
if (options.FileProvider == null && Environment.WebRootFileProvider == null)
{
throw new InvalidOperationException("Missing FileProvider.");
}
options.FileProvider = options.FileProvider ?? Environment.WebRootFileProvider;
// Add our provider
var filesProvider = new ManifestEmbeddedFileProvider(GetType().Assembly, "staticfile");
options.FileProvider = new CompositeFileProvider(options.FileProvider, filesProvider);
}
}
}
| 39.564103 | 112 | 0.701879 | [
"MIT"
] | gnsilence/AntdPro-Vue-id4 | ABP.WebApi/后端/src/AuditLogView/LogConfigureOptions.cs | 1,545 | C# |
using System.ComponentModel;
namespace LinqAn.Google.Metrics
{
/// <summary>
/// Quantity of the related product.
/// </summary>
[Description("Quantity of the related product.")]
public class RelatedProductQuantity: Metric<int>
{
/// <summary>
/// Instantiates a <seealso cref="RelatedProductQuantity" />.
/// </summary>
public RelatedProductQuantity(): base("Related Product Quantity",false,"ga:relatedProductQuantity")
{
}
}
}
| 21.714286 | 101 | 0.695175 | [
"MIT"
] | kenshinthebattosai/DotNetAnalytics.Google | src/LinqAn.Google/Metrics/RelatedProductQuantity.cs | 456 | C# |
using System;
using System.Reflection;
namespace Spencer.NET
{
public interface IConstructorInfoListGenerator
{
ConstructorInfo[] GenerateList(Type @class);
}
} | 18.2 | 52 | 0.71978 | [
"MIT"
] | kacperfaber/Spencer.NET | Spencer.NET/Interfaces/IConstructorInfoListGenerator.cs | 184 | C# |
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
namespace Pulumi.Aws.WafV2.Inputs
{
public sealed class RuleGroupRuleStatementAndStatementStatementNotStatementStatementByteMatchStatementFieldToMatchSingleHeaderGetArgs : Pulumi.ResourceArgs
{
/// <summary>
/// The name of the query header to inspect. This setting must be provided as lower case characters.
/// </summary>
[Input("name", required: true)]
public Input<string> Name { get; set; } = null!;
public RuleGroupRuleStatementAndStatementStatementNotStatementStatementByteMatchStatementFieldToMatchSingleHeaderGetArgs()
{
}
}
}
| 35.730769 | 159 | 0.728741 | [
"ECL-2.0",
"Apache-2.0"
] | Otanikotani/pulumi-aws | sdk/dotnet/WafV2/Inputs/RuleGroupRuleStatementAndStatementStatementNotStatementStatementByteMatchStatementFieldToMatchSingleHeaderGetArgs.cs | 929 | C# |
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
namespace Pulumi.Aws.WafV2.Inputs
{
public sealed class WebAclRuleStatementManagedRuleGroupStatementScopeDownStatementOrStatementStatementAndStatementStatementSqliMatchStatementTextTransformationGetArgs : Pulumi.ResourceArgs
{
/// <summary>
/// Relative processing order for multiple transformations that are defined for a rule statement. AWS WAF processes all transformations, from lowest priority to highest, before inspecting the transformed content.
/// </summary>
[Input("priority", required: true)]
public Input<int> Priority { get; set; } = null!;
/// <summary>
/// Transformation to apply, please refer to the Text Transformation [documentation](https://docs.aws.amazon.com/waf/latest/APIReference/API_TextTransformation.html) for more details.
/// </summary>
[Input("type", required: true)]
public Input<string> Type { get; set; } = null!;
public WebAclRuleStatementManagedRuleGroupStatementScopeDownStatementOrStatementStatementAndStatementStatementSqliMatchStatementTextTransformationGetArgs()
{
}
}
}
| 45.21875 | 220 | 0.734623 | [
"ECL-2.0",
"Apache-2.0"
] | chivandikwa/pulumi-aws | sdk/dotnet/WafV2/Inputs/WebAclRuleStatementManagedRuleGroupStatementScopeDownStatementOrStatementStatementAndStatementStatementSqliMatchStatementTextTransformationGetArgs.cs | 1,447 | C# |
namespace Sequin.Owin.Integration.Fakes
{
using System.Threading.Tasks;
public class MultiHandlerCommandHandler1 : IHandler<MultiHandlerCommand>
{
public Task Handle(MultiHandlerCommand command)
{
throw new System.NotImplementedException();
}
}
public class MultiHandlerCommandHandler2 : IHandler<MultiHandlerCommand>
{
public Task Handle(MultiHandlerCommand command)
{
throw new System.NotImplementedException();
}
}
}
| 24.904762 | 76 | 0.665392 | [
"MIT"
] | jasonmitchell/owin.commandhandling | src/Sequin.Owin.Integration/Fakes/MultiHandlerCommandHandler.cs | 525 | C# |
using System;
using NetRuntimeSystem = System;
using System.ComponentModel;
using NetOffice.Attributes;
namespace NetOffice.ExcelApi
{
/// <summary>
/// IRectangle
/// </summary>
[SyntaxBypass]
public class IRectangle_ : COMObject
{
#region Ctor
/// <param name="factory">current used factory core</param>
/// <param name="parentObject">object there has created the proxy</param>
/// <param name="proxyShare">proxy share instead if com proxy</param>
public IRectangle_(Core factory, ICOMObject parentObject, COMProxyShare proxyShare) : base(factory, parentObject, proxyShare)
{
}
///<param name="factory">current used factory core</param>
///<param name="parentObject">object there has created the proxy</param>
///<param name="comProxy">inner wrapped COM proxy</param>
public IRectangle_(Core factory, ICOMObject parentObject, object comProxy) : base(factory, parentObject, comProxy)
{
}
/// <param name="parentObject">object there has created the proxy</param>
/// <param name="comProxy">inner wrapped COM proxy</param>
[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
public IRectangle_(ICOMObject parentObject, object comProxy) : base(parentObject, comProxy)
{
}
/// <param name="parentObject">object there has created the proxy</param>
/// <param name="comProxy">inner wrapped COM proxy</param>
/// <param name="comProxyType">Type of inner wrapped COM proxy"</param>
[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
public IRectangle_(ICOMObject parentObject, object comProxy, NetRuntimeSystem.Type comProxyType) : base(parentObject, comProxy, comProxyType)
{
}
///<param name="factory">current used factory core</param>
///<param name="parentObject">object there has created the proxy</param>
///<param name="comProxy">inner wrapped COM proxy</param>
///<param name="comProxyType">Type of inner wrapped COM proxy"</param>
[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
public IRectangle_(Core factory, ICOMObject parentObject, object comProxy, NetRuntimeSystem.Type comProxyType) : base(factory, parentObject, comProxy, comProxyType)
{
}
/// <param name="replacedObject">object to replaced. replacedObject are not usable after this action</param>
[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
public IRectangle_(ICOMObject replacedObject) : base(replacedObject)
{
}
/// <summary>
/// Hidden stub .ctor
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
public IRectangle_() : base()
{
}
/// <param name="progId">registered progID</param>
[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
public IRectangle_(string progId) : base(progId)
{
}
#endregion
#region Properties
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get
/// </summary>
/// <param name="start">optional object start</param>
/// <param name="length">optional object length</param>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
public NetOffice.ExcelApi.Characters get_Characters(object start, object length)
{
return Factory.ExecuteKnownReferencePropertyGet<NetOffice.ExcelApi.Characters>(this, "Characters", NetOffice.ExcelApi.Characters.LateBindingApiWrapperType, start, length);
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Alias for get_Characters
/// </summary>
/// <param name="start">optional object start</param>
/// <param name="length">optional object length</param>
[SupportByVersion("Excel", 9,10,11,12,14,15,16), Redirect("get_Characters")]
public NetOffice.ExcelApi.Characters Characters(object start, object length)
{
return get_Characters(start, length);
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get
/// </summary>
/// <param name="start">optional object start</param>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
public NetOffice.ExcelApi.Characters get_Characters(object start)
{
return Factory.ExecuteKnownReferencePropertyGet<NetOffice.ExcelApi.Characters>(this, "Characters", NetOffice.ExcelApi.Characters.LateBindingApiWrapperType, start);
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Alias for get_Characters
/// </summary>
/// <param name="start">optional object start</param>
[SupportByVersion("Excel", 9,10,11,12,14,15,16), Redirect("get_Characters")]
public NetOffice.ExcelApi.Characters Characters(object start)
{
return get_Characters(start);
}
#endregion
#region Methods
#endregion
}
/// <summary>
/// Interface IRectangle
/// SupportByVersion Excel, 9,10,11,12,14,15,16
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
[EntityType(EntityType.IsInterface)]
public class IRectangle : COMObject
{
#pragma warning disable
#region Type Information
/// <summary>
/// Instance Type
/// </summary>
[EditorBrowsable(EditorBrowsableState.Advanced), Browsable(false), Category("NetOffice"), CoreOverridden]
public override Type InstanceType
{
get
{
return LateBindingApiWrapperType;
}
}
private static Type _type;
[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
public static Type LateBindingApiWrapperType
{
get
{
if (null == _type)
_type = typeof(IRectangle);
return _type;
}
}
#endregion
#region Ctor
/// <param name="factory">current used factory core</param>
/// <param name="parentObject">object there has created the proxy</param>
/// <param name="proxyShare">proxy share instead if com proxy</param>
public IRectangle(Core factory, ICOMObject parentObject, COMProxyShare proxyShare) : base(factory, parentObject, proxyShare)
{
}
///<param name="factory">current used factory core</param>
///<param name="parentObject">object there has created the proxy</param>
///<param name="comProxy">inner wrapped COM proxy</param>
public IRectangle(Core factory, ICOMObject parentObject, object comProxy) : base(factory, parentObject, comProxy)
{
}
///<param name="parentObject">object there has created the proxy</param>
///<param name="comProxy">inner wrapped COM proxy</param>
[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
public IRectangle(ICOMObject parentObject, object comProxy) : base(parentObject, comProxy)
{
}
///<param name="factory">current used factory core</param>
///<param name="parentObject">object there has created the proxy</param>
///<param name="comProxy">inner wrapped COM proxy</param>
///<param name="comProxyType">Type of inner wrapped COM proxy"</param>
[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
public IRectangle(Core factory, ICOMObject parentObject, object comProxy, NetRuntimeSystem.Type comProxyType) : base(factory, parentObject, comProxy, comProxyType)
{
}
///<param name="parentObject">object there has created the proxy</param>
///<param name="comProxy">inner wrapped COM proxy</param>
///<param name="comProxyType">Type of inner wrapped COM proxy"</param>
[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
public IRectangle(ICOMObject parentObject, object comProxy, NetRuntimeSystem.Type comProxyType) : base(parentObject, comProxy, comProxyType)
{
}
///<param name="replacedObject">object to replaced. replacedObject are not usable after this action</param>
[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
public IRectangle(ICOMObject replacedObject) : base(replacedObject)
{
}
[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
public IRectangle() : base()
{
}
/// <param name="progId">registered progID</param>
[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
public IRectangle(string progId) : base(progId)
{
}
#endregion
#region Properties
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public NetOffice.ExcelApi.Application Application
{
get
{
return Factory.ExecuteKnownReferencePropertyGet<NetOffice.ExcelApi.Application>(this, "Application", NetOffice.ExcelApi.Application.LateBindingApiWrapperType);
}
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public NetOffice.ExcelApi.Enums.XlCreator Creator
{
get
{
return Factory.ExecuteEnumPropertyGet<NetOffice.ExcelApi.Enums.XlCreator>(this, "Creator");
}
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get
/// Unknown COM Proxy
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16), ProxyResult]
public object Parent
{
get
{
return Factory.ExecuteReferencePropertyGet(this, "Parent");
}
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public NetOffice.ExcelApi.Range BottomRightCell
{
get
{
return Factory.ExecuteKnownReferencePropertyGet<NetOffice.ExcelApi.Range>(this, "BottomRightCell", NetOffice.ExcelApi.Range.LateBindingApiWrapperType);
}
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get/Set
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public bool Enabled
{
get
{
return Factory.ExecuteBoolPropertyGet(this, "Enabled");
}
set
{
Factory.ExecuteValuePropertySet(this, "Enabled", value);
}
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get/Set
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public Double Height
{
get
{
return Factory.ExecuteDoublePropertyGet(this, "Height");
}
set
{
Factory.ExecuteValuePropertySet(this, "Height", value);
}
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public Int32 Index
{
get
{
return Factory.ExecuteInt32PropertyGet(this, "Index");
}
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get/Set
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public Double Left
{
get
{
return Factory.ExecuteDoublePropertyGet(this, "Left");
}
set
{
Factory.ExecuteValuePropertySet(this, "Left", value);
}
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get/Set
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public bool Locked
{
get
{
return Factory.ExecuteBoolPropertyGet(this, "Locked");
}
set
{
Factory.ExecuteValuePropertySet(this, "Locked", value);
}
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get/Set
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public string Name
{
get
{
return Factory.ExecuteStringPropertyGet(this, "Name");
}
set
{
Factory.ExecuteValuePropertySet(this, "Name", value);
}
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get/Set
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
public string OnAction
{
get
{
return Factory.ExecuteStringPropertyGet(this, "OnAction");
}
set
{
Factory.ExecuteValuePropertySet(this, "OnAction", value);
}
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get/Set
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public object Placement
{
get
{
return Factory.ExecuteVariantPropertyGet(this, "Placement");
}
set
{
Factory.ExecuteVariantPropertySet(this, "Placement", value);
}
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get/Set
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public bool PrintObject
{
get
{
return Factory.ExecuteBoolPropertyGet(this, "PrintObject");
}
set
{
Factory.ExecuteValuePropertySet(this, "PrintObject", value);
}
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get/Set
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public Double Top
{
get
{
return Factory.ExecuteDoublePropertyGet(this, "Top");
}
set
{
Factory.ExecuteValuePropertySet(this, "Top", value);
}
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public NetOffice.ExcelApi.Range TopLeftCell
{
get
{
return Factory.ExecuteKnownReferencePropertyGet<NetOffice.ExcelApi.Range>(this, "TopLeftCell", NetOffice.ExcelApi.Range.LateBindingApiWrapperType);
}
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get/Set
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public bool Visible
{
get
{
return Factory.ExecuteBoolPropertyGet(this, "Visible");
}
set
{
Factory.ExecuteValuePropertySet(this, "Visible", value);
}
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get/Set
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public Double Width
{
get
{
return Factory.ExecuteDoublePropertyGet(this, "Width");
}
set
{
Factory.ExecuteValuePropertySet(this, "Width", value);
}
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public Int32 ZOrder
{
get
{
return Factory.ExecuteInt32PropertyGet(this, "ZOrder");
}
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public NetOffice.ExcelApi.ShapeRange ShapeRange
{
get
{
return Factory.ExecuteKnownReferencePropertyGet<NetOffice.ExcelApi.ShapeRange>(this, "ShapeRange", NetOffice.ExcelApi.ShapeRange.LateBindingApiWrapperType);
}
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get/Set
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public bool AddIndent
{
get
{
return Factory.ExecuteBoolPropertyGet(this, "AddIndent");
}
set
{
Factory.ExecuteValuePropertySet(this, "AddIndent", value);
}
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get/Set
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public object AutoScaleFont
{
get
{
return Factory.ExecuteVariantPropertyGet(this, "AutoScaleFont");
}
set
{
Factory.ExecuteVariantPropertySet(this, "AutoScaleFont", value);
}
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get/Set
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public bool AutoSize
{
get
{
return Factory.ExecuteBoolPropertyGet(this, "AutoSize");
}
set
{
Factory.ExecuteValuePropertySet(this, "AutoSize", value);
}
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get/Set
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public string Caption
{
get
{
return Factory.ExecuteStringPropertyGet(this, "Caption");
}
set
{
Factory.ExecuteValuePropertySet(this, "Caption", value);
}
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public NetOffice.ExcelApi.Characters Characters
{
get
{
return Factory.ExecuteKnownReferencePropertyGet<NetOffice.ExcelApi.Characters>(this, "Characters", NetOffice.ExcelApi.Characters.LateBindingApiWrapperType);
}
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public NetOffice.ExcelApi.Font Font
{
get
{
return Factory.ExecuteKnownReferencePropertyGet<NetOffice.ExcelApi.Font>(this, "Font", NetOffice.ExcelApi.Font.LateBindingApiWrapperType);
}
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get/Set
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public string Formula
{
get
{
return Factory.ExecuteStringPropertyGet(this, "Formula");
}
set
{
Factory.ExecuteValuePropertySet(this, "Formula", value);
}
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get/Set
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public object HorizontalAlignment
{
get
{
return Factory.ExecuteVariantPropertyGet(this, "HorizontalAlignment");
}
set
{
Factory.ExecuteVariantPropertySet(this, "HorizontalAlignment", value);
}
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get/Set
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public bool LockedText
{
get
{
return Factory.ExecuteBoolPropertyGet(this, "LockedText");
}
set
{
Factory.ExecuteValuePropertySet(this, "LockedText", value);
}
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get/Set
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public object Orientation
{
get
{
return Factory.ExecuteVariantPropertyGet(this, "Orientation");
}
set
{
Factory.ExecuteVariantPropertySet(this, "Orientation", value);
}
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get/Set
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public string Text
{
get
{
return Factory.ExecuteStringPropertyGet(this, "Text");
}
set
{
Factory.ExecuteValuePropertySet(this, "Text", value);
}
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get/Set
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public object VerticalAlignment
{
get
{
return Factory.ExecuteVariantPropertyGet(this, "VerticalAlignment");
}
set
{
Factory.ExecuteVariantPropertySet(this, "VerticalAlignment", value);
}
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get/Set
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public Int32 ReadingOrder
{
get
{
return Factory.ExecuteInt32PropertyGet(this, "ReadingOrder");
}
set
{
Factory.ExecuteValuePropertySet(this, "ReadingOrder", value);
}
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public NetOffice.ExcelApi.Border Border
{
get
{
return Factory.ExecuteKnownReferencePropertyGet<NetOffice.ExcelApi.Border>(this, "Border", NetOffice.ExcelApi.Border.LateBindingApiWrapperType);
}
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public NetOffice.ExcelApi.Interior Interior
{
get
{
return Factory.ExecuteKnownReferencePropertyGet<NetOffice.ExcelApi.Interior>(this, "Interior", NetOffice.ExcelApi.Interior.LateBindingApiWrapperType);
}
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get/Set
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public bool Shadow
{
get
{
return Factory.ExecuteBoolPropertyGet(this, "Shadow");
}
set
{
Factory.ExecuteValuePropertySet(this, "Shadow", value);
}
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// Get/Set
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public bool RoundedCorners
{
get
{
return Factory.ExecuteBoolPropertyGet(this, "RoundedCorners");
}
set
{
Factory.ExecuteValuePropertySet(this, "RoundedCorners", value);
}
}
#endregion
#region Methods
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public object BringToFront()
{
return Factory.ExecuteVariantMethodGet(this, "BringToFront");
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public object Copy()
{
return Factory.ExecuteVariantMethodGet(this, "Copy");
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// </summary>
/// <param name="appearance">optional NetOffice.ExcelApi.Enums.XlPictureAppearance Appearance = 2</param>
/// <param name="format">optional NetOffice.ExcelApi.Enums.XlCopyPictureFormat Format = -4147</param>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public object CopyPicture(object appearance, object format)
{
return Factory.ExecuteVariantMethodGet(this, "CopyPicture", appearance, format);
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// </summary>
[CustomMethod]
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public object CopyPicture()
{
return Factory.ExecuteVariantMethodGet(this, "CopyPicture");
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// </summary>
/// <param name="appearance">optional NetOffice.ExcelApi.Enums.XlPictureAppearance Appearance = 2</param>
[CustomMethod]
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public object CopyPicture(object appearance)
{
return Factory.ExecuteVariantMethodGet(this, "CopyPicture", appearance);
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public object Cut()
{
return Factory.ExecuteVariantMethodGet(this, "Cut");
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public object Delete()
{
return Factory.ExecuteVariantMethodGet(this, "Delete");
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public object Duplicate()
{
return Factory.ExecuteVariantMethodGet(this, "Duplicate");
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// </summary>
/// <param name="replace">optional object replace</param>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public object Select(object replace)
{
return Factory.ExecuteVariantMethodGet(this, "Select", replace);
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// </summary>
[CustomMethod]
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public object Select()
{
return Factory.ExecuteVariantMethodGet(this, "Select");
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// </summary>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public object SendToBack()
{
return Factory.ExecuteVariantMethodGet(this, "SendToBack");
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// </summary>
/// <param name="customDictionary">optional object customDictionary</param>
/// <param name="ignoreUppercase">optional object ignoreUppercase</param>
/// <param name="alwaysSuggest">optional object alwaysSuggest</param>
/// <param name="spellLang">optional object spellLang</param>
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public object CheckSpelling(object customDictionary, object ignoreUppercase, object alwaysSuggest, object spellLang)
{
return Factory.ExecuteVariantMethodGet(this, "CheckSpelling", customDictionary, ignoreUppercase, alwaysSuggest, spellLang);
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// </summary>
[CustomMethod]
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public object CheckSpelling()
{
return Factory.ExecuteVariantMethodGet(this, "CheckSpelling");
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// </summary>
/// <param name="customDictionary">optional object customDictionary</param>
[CustomMethod]
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public object CheckSpelling(object customDictionary)
{
return Factory.ExecuteVariantMethodGet(this, "CheckSpelling", customDictionary);
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// </summary>
/// <param name="customDictionary">optional object customDictionary</param>
/// <param name="ignoreUppercase">optional object ignoreUppercase</param>
[CustomMethod]
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public object CheckSpelling(object customDictionary, object ignoreUppercase)
{
return Factory.ExecuteVariantMethodGet(this, "CheckSpelling", customDictionary, ignoreUppercase);
}
/// <summary>
/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
/// </summary>
/// <param name="customDictionary">optional object customDictionary</param>
/// <param name="ignoreUppercase">optional object ignoreUppercase</param>
/// <param name="alwaysSuggest">optional object alwaysSuggest</param>
[CustomMethod]
[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
public object CheckSpelling(object customDictionary, object ignoreUppercase, object alwaysSuggest)
{
return Factory.ExecuteVariantMethodGet(this, "CheckSpelling", customDictionary, ignoreUppercase, alwaysSuggest);
}
#endregion
#pragma warning restore
}
}
| 27.229273 | 174 | 0.663008 | [
"MIT"
] | DominikPalo/NetOffice | Source/Excel/Interfaces/IRectangle.cs | 26,605 | C# |
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace PythonAutoPlay.Properties
{
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PythonAutoPlay.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}
| 38.680556 | 180 | 0.60395 | [
"MIT"
] | zzxtz007/TDAutoPlay | PythonAutoPlay/PythonAutoPlay/Properties/Resources.Designer.cs | 2,787 | C# |
using System.Threading.Tasks;
namespace System.Net.Http.Message.Modifiers
{
public record SetAuthorizationBearerMessageModifier : SetAuthorizationValueMessageModifier {
public SetAuthorizationBearerMessageModifier(string? Value, bool? Enabled = default) : base(Value, Enabled) {
}
protected override Task ModifyEnabledAsync(HttpRequestMessage Message) {
Message.SetAuthorizationBearer(Value);
return Task.CompletedTask;
}
}
}
| 25.5 | 117 | 0.7 | [
"MIT"
] | MediatedCommunications/Extensions | System.Net.Http.Extensions/System/Net/Http/Message/Modifiers/Authorization/SetAuthorizationBearerMessageModifier.cs | 512 | 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.Collections.ObjectModel;
using System.Diagnostics;
using System.Globalization;
using System.Runtime.ExceptionServices;
using System.Runtime.Serialization;
using System.Security;
using System.Text;
using System.Threading;
namespace System
{
/// <summary>Represents one or more errors that occur during application execution.</summary>
/// <remarks>
/// <see cref="AggregateException"/> is used to consolidate multiple failures into a single, throwable
/// exception object.
/// </remarks>
[Serializable]
[DebuggerDisplay("Count = {InnerExceptionCount}")]
[System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class AggregateException : Exception
{
private ReadOnlyCollection<Exception> m_innerExceptions; // Complete set of exceptions. Do not rename (binary serialization)
/// <summary>
/// Initializes a new instance of the <see cref="AggregateException"/> class.
/// </summary>
public AggregateException()
: base(SR.AggregateException_ctor_DefaultMessage)
{
m_innerExceptions = new ReadOnlyCollection<Exception>(Array.Empty<Exception>());
}
/// <summary>
/// Initializes a new instance of the <see cref="AggregateException"/> class with
/// a specified error message.
/// </summary>
/// <param name="message">The error message that explains the reason for the exception.</param>
public AggregateException(string? message)
: base(message)
{
m_innerExceptions = new ReadOnlyCollection<Exception>(Array.Empty<Exception>());
}
/// <summary>
/// Initializes a new instance of the <see cref="AggregateException"/> class with a specified error
/// message and a reference to the inner exception that is the cause of this exception.
/// </summary>
/// <param name="message">The error message that explains the reason for the exception.</param>
/// <param name="innerException">The exception that is the cause of the current exception.</param>
/// <exception cref="System.ArgumentNullException">The <paramref name="innerException"/> argument
/// is null.</exception>
public AggregateException(string? message, Exception innerException)
: base(message, innerException)
{
if (innerException == null)
{
throw new ArgumentNullException(nameof(innerException));
}
m_innerExceptions = new ReadOnlyCollection<Exception>(new Exception[] { innerException });
}
/// <summary>
/// Initializes a new instance of the <see cref="AggregateException"/> class with
/// references to the inner exceptions that are the cause of this exception.
/// </summary>
/// <param name="innerExceptions">The exceptions that are the cause of the current exception.</param>
/// <exception cref="System.ArgumentNullException">The <paramref name="innerExceptions"/> argument
/// is null.</exception>
/// <exception cref="System.ArgumentException">An element of <paramref name="innerExceptions"/> is
/// null.</exception>
public AggregateException(IEnumerable<Exception> innerExceptions) :
this(SR.AggregateException_ctor_DefaultMessage, innerExceptions)
{
}
/// <summary>
/// Initializes a new instance of the <see cref="AggregateException"/> class with
/// references to the inner exceptions that are the cause of this exception.
/// </summary>
/// <param name="innerExceptions">The exceptions that are the cause of the current exception.</param>
/// <exception cref="System.ArgumentNullException">The <paramref name="innerExceptions"/> argument
/// is null.</exception>
/// <exception cref="System.ArgumentException">An element of <paramref name="innerExceptions"/> is
/// null.</exception>
public AggregateException(params Exception[] innerExceptions) :
this(SR.AggregateException_ctor_DefaultMessage, innerExceptions)
{
}
/// <summary>
/// Initializes a new instance of the <see cref="AggregateException"/> class with a specified error
/// message and references to the inner exceptions that are the cause of this exception.
/// </summary>
/// <param name="message">The error message that explains the reason for the exception.</param>
/// <param name="innerExceptions">The exceptions that are the cause of the current exception.</param>
/// <exception cref="System.ArgumentNullException">The <paramref name="innerExceptions"/> argument
/// is null.</exception>
/// <exception cref="System.ArgumentException">An element of <paramref name="innerExceptions"/> is
/// null.</exception>
public AggregateException(string? message, IEnumerable<Exception> innerExceptions)
// If it's already an IList, pass that along (a defensive copy will be made in the delegated ctor). If it's null, just pass along
// null typed correctly. Otherwise, create an IList from the enumerable and pass that along.
: this(message, innerExceptions as IList<Exception> ?? (innerExceptions == null ? (List<Exception>)null! : new List<Exception>(innerExceptions)))
{
}
/// <summary>
/// Initializes a new instance of the <see cref="AggregateException"/> class with a specified error
/// message and references to the inner exceptions that are the cause of this exception.
/// </summary>
/// <param name="message">The error message that explains the reason for the exception.</param>
/// <param name="innerExceptions">The exceptions that are the cause of the current exception.</param>
/// <exception cref="System.ArgumentNullException">The <paramref name="innerExceptions"/> argument
/// is null.</exception>
/// <exception cref="System.ArgumentException">An element of <paramref name="innerExceptions"/> is
/// null.</exception>
public AggregateException(string? message, params Exception[] innerExceptions) :
this(message, (IList<Exception>)innerExceptions)
{
}
/// <summary>
/// Allocates a new aggregate exception with the specified message and list of inner exceptions.
/// </summary>
/// <param name="message">The error message that explains the reason for the exception.</param>
/// <param name="innerExceptions">The exceptions that are the cause of the current exception.</param>
/// <exception cref="System.ArgumentNullException">The <paramref name="innerExceptions"/> argument
/// is null.</exception>
/// <exception cref="System.ArgumentException">An element of <paramref name="innerExceptions"/> is
/// null.</exception>
private AggregateException(string? message, IList<Exception> innerExceptions)
: base(message, innerExceptions != null && innerExceptions.Count > 0 ? innerExceptions[0] : null)
{
if (innerExceptions == null)
{
throw new ArgumentNullException(nameof(innerExceptions));
}
// Copy exceptions to our internal array and validate them. We must copy them,
// because we're going to put them into a ReadOnlyCollection which simply reuses
// the list passed in to it. We don't want callers subsequently mutating.
Exception[] exceptionsCopy = new Exception[innerExceptions.Count];
for (int i = 0; i < exceptionsCopy.Length; i++)
{
exceptionsCopy[i] = innerExceptions[i];
if (exceptionsCopy[i] == null)
{
throw new ArgumentException(SR.AggregateException_ctor_InnerExceptionNull);
}
}
m_innerExceptions = new ReadOnlyCollection<Exception>(exceptionsCopy);
}
/// <summary>
/// Initializes a new instance of the <see cref="AggregateException"/> class with
/// references to the inner exception dispatch info objects that represent the cause of this exception.
/// </summary>
/// <param name="innerExceptionInfos">
/// Information about the exceptions that are the cause of the current exception.
/// </param>
/// <exception cref="System.ArgumentNullException">The <paramref name="innerExceptionInfos"/> argument
/// is null.</exception>
/// <exception cref="System.ArgumentException">An element of <paramref name="innerExceptionInfos"/> is
/// null.</exception>
internal AggregateException(IEnumerable<ExceptionDispatchInfo> innerExceptionInfos) :
this(SR.AggregateException_ctor_DefaultMessage, innerExceptionInfos)
{
}
/// <summary>
/// Initializes a new instance of the <see cref="AggregateException"/> class with a specified error
/// message and references to the inner exception dispatch info objects that represent the cause of
/// this exception.
/// </summary>
/// <param name="message">The error message that explains the reason for the exception.</param>
/// <param name="innerExceptionInfos">
/// Information about the exceptions that are the cause of the current exception.
/// </param>
/// <exception cref="System.ArgumentNullException">The <paramref name="innerExceptionInfos"/> argument
/// is null.</exception>
/// <exception cref="System.ArgumentException">An element of <paramref name="innerExceptionInfos"/> is
/// null.</exception>
internal AggregateException(string message, IEnumerable<ExceptionDispatchInfo> innerExceptionInfos)
// If it's already an IList, pass that along (a defensive copy will be made in the delegated ctor). If it's null, just pass along
// null typed correctly. Otherwise, create an IList from the enumerable and pass that along.
: this(message, innerExceptionInfos as IList<ExceptionDispatchInfo> ??
(innerExceptionInfos == null ?
(List<ExceptionDispatchInfo>)null! :
new List<ExceptionDispatchInfo>(innerExceptionInfos)))
{
}
/// <summary>
/// Allocates a new aggregate exception with the specified message and list of inner
/// exception dispatch info objects.
/// </summary>
/// <param name="message">The error message that explains the reason for the exception.</param>
/// <param name="innerExceptionInfos">
/// Information about the exceptions that are the cause of the current exception.
/// </param>
/// <exception cref="System.ArgumentNullException">The <paramref name="innerExceptionInfos"/> argument
/// is null.</exception>
/// <exception cref="System.ArgumentException">An element of <paramref name="innerExceptionInfos"/> is
/// null.</exception>
private AggregateException(string message, IList<ExceptionDispatchInfo> innerExceptionInfos)
: base(message, innerExceptionInfos != null && innerExceptionInfos.Count > 0 && innerExceptionInfos[0] != null ?
innerExceptionInfos[0].SourceException : null)
{
if (innerExceptionInfos == null)
{
throw new ArgumentNullException(nameof(innerExceptionInfos));
}
// Copy exceptions to our internal array and validate them. We must copy them,
// because we're going to put them into a ReadOnlyCollection which simply reuses
// the list passed in to it. We don't want callers subsequently mutating.
Exception[] exceptionsCopy = new Exception[innerExceptionInfos.Count];
for (int i = 0; i < exceptionsCopy.Length; i++)
{
var edi = innerExceptionInfos[i];
if (edi != null) exceptionsCopy[i] = edi.SourceException;
if (exceptionsCopy[i] == null)
{
throw new ArgumentException(SR.AggregateException_ctor_InnerExceptionNull);
}
}
m_innerExceptions = new ReadOnlyCollection<Exception>(exceptionsCopy);
}
/// <summary>
/// Initializes a new instance of the <see cref="AggregateException"/> 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>
/// <exception cref="System.ArgumentNullException">The <paramref name="info"/> argument is null.</exception>
/// <exception cref="System.Runtime.Serialization.SerializationException">The exception could not be deserialized correctly.</exception>
protected AggregateException(SerializationInfo info, StreamingContext context) :
base(info, context)
{
if (info == null)
{
throw new ArgumentNullException(nameof(info));
}
Exception[]? innerExceptions = info.GetValue("InnerExceptions", typeof(Exception[])) as Exception[];
if (innerExceptions == null)
{
throw new SerializationException(SR.AggregateException_DeserializationFailure);
}
m_innerExceptions = new ReadOnlyCollection<Exception>(innerExceptions);
}
/// <summary>
/// Sets the <see cref="System.Runtime.Serialization.SerializationInfo"/> with information about
/// the exception.
/// </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>
/// <exception cref="System.ArgumentNullException">The <paramref name="info"/> argument is null.</exception>
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
Exception[] innerExceptions = new Exception[m_innerExceptions.Count];
m_innerExceptions.CopyTo(innerExceptions, 0);
info.AddValue("InnerExceptions", innerExceptions, typeof(Exception[]));
}
/// <summary>
/// Returns the <see cref="System.AggregateException"/> that is the root cause of this exception.
/// </summary>
public override Exception GetBaseException()
{
// Returns the first inner AggregateException that contains more or less than one inner exception
// Recursively traverse the inner exceptions as long as the inner exception of type AggregateException and has only one inner exception
Exception? back = this;
AggregateException? backAsAggregate = this;
while (backAsAggregate != null && backAsAggregate.InnerExceptions.Count == 1)
{
back = back!.InnerException;
backAsAggregate = back as AggregateException;
}
return back!;
}
/// <summary>
/// Gets a read-only collection of the <see cref="System.Exception"/> instances that caused the
/// current exception.
/// </summary>
public ReadOnlyCollection<Exception> InnerExceptions
{
get { return m_innerExceptions; }
}
/// <summary>
/// Invokes a handler on each <see cref="System.Exception"/> contained by this <see
/// cref="AggregateException"/>.
/// </summary>
/// <param name="predicate">The predicate to execute for each exception. The predicate accepts as an
/// argument the <see cref="System.Exception"/> to be processed and returns a Boolean to indicate
/// whether the exception was handled.</param>
/// <remarks>
/// Each invocation of the <paramref name="predicate"/> returns true or false to indicate whether the
/// <see cref="System.Exception"/> was handled. After all invocations, if any exceptions went
/// unhandled, all unhandled exceptions will be put into a new <see cref="AggregateException"/>
/// which will be thrown. Otherwise, the <see cref="Handle"/> method simply returns. If any
/// invocations of the <paramref name="predicate"/> throws an exception, it will halt the processing
/// of any more exceptions and immediately propagate the thrown exception as-is.
/// </remarks>
/// <exception cref="AggregateException">An exception contained by this <see
/// cref="AggregateException"/> was not handled.</exception>
/// <exception cref="System.ArgumentNullException">The <paramref name="predicate"/> argument is
/// null.</exception>
public void Handle(Func<Exception, bool> predicate)
{
if (predicate == null)
{
throw new ArgumentNullException(nameof(predicate));
}
List<Exception>? unhandledExceptions = null;
for (int i = 0; i < m_innerExceptions.Count; i++)
{
// If the exception was not handled, lazily allocate a list of unhandled
// exceptions (to be rethrown later) and add it.
if (!predicate(m_innerExceptions[i]))
{
if (unhandledExceptions == null)
{
unhandledExceptions = new List<Exception>();
}
unhandledExceptions.Add(m_innerExceptions[i]);
}
}
// If there are unhandled exceptions remaining, throw them.
if (unhandledExceptions != null)
{
throw new AggregateException(Message, unhandledExceptions);
}
}
/// <summary>
/// Flattens the inner instances of <see cref="AggregateException"/> by expanding its contained <see cref="Exception"/> instances
/// into a new <see cref="AggregateException"/>
/// </summary>
/// <returns>A new, flattened <see cref="AggregateException"/>.</returns>
/// <remarks>
/// If any inner exceptions are themselves instances of
/// <see cref="AggregateException"/>, this method will recursively flatten all of them. The
/// inner exceptions returned in the new <see cref="AggregateException"/>
/// will be the union of all of the inner exceptions from exception tree rooted at the provided
/// <see cref="AggregateException"/> instance.
/// </remarks>
public AggregateException Flatten()
{
// Initialize a collection to contain the flattened exceptions.
List<Exception> flattenedExceptions = new List<Exception>();
// Create a list to remember all aggregates to be flattened, this will be accessed like a FIFO queue
List<AggregateException> exceptionsToFlatten = new List<AggregateException>();
exceptionsToFlatten.Add(this);
int nDequeueIndex = 0;
// Continue removing and recursively flattening exceptions, until there are no more.
while (exceptionsToFlatten.Count > nDequeueIndex)
{
// dequeue one from exceptionsToFlatten
IList<Exception> currentInnerExceptions = exceptionsToFlatten[nDequeueIndex++].InnerExceptions;
for (int i = 0; i < currentInnerExceptions.Count; i++)
{
Exception currentInnerException = currentInnerExceptions[i];
if (currentInnerException == null)
{
continue;
}
// If this exception is an aggregate, keep it around for later. Otherwise,
// simply add it to the list of flattened exceptions to be returned.
if (currentInnerException is AggregateException currentInnerAsAggregate)
{
exceptionsToFlatten.Add(currentInnerAsAggregate);
}
else
{
flattenedExceptions.Add(currentInnerException);
}
}
}
return new AggregateException(Message, flattenedExceptions);
}
/// <summary>Gets a message that describes the exception.</summary>
public override string Message
{
get
{
if (m_innerExceptions.Count == 0)
{
return base.Message;
}
StringBuilder sb = StringBuilderCache.Acquire();
sb.Append(base.Message);
sb.Append(' ');
for (int i = 0; i < m_innerExceptions.Count; i++)
{
sb.Append('(');
sb.Append(m_innerExceptions[i].Message);
sb.Append(") ");
}
sb.Length -= 1;
return StringBuilderCache.GetStringAndRelease(sb);
}
}
/// <summary>
/// Creates and returns a string representation of the current <see cref="AggregateException"/>.
/// </summary>
/// <returns>A string representation of the current exception.</returns>
public override string ToString()
{
StringBuilder text = new StringBuilder();
text.Append(base.ToString());
for (int i = 0; i < m_innerExceptions.Count; i++)
{
if (m_innerExceptions[i] == InnerException)
continue; // Already logged in base.ToString()
text.Append(Environment.NewLine).Append(InnerExceptionPrefix);
text.AppendFormat(CultureInfo.InvariantCulture, SR.AggregateException_InnerException, i);
text.Append(m_innerExceptions[i].ToString());
text.Append("<---");
text.AppendLine();
}
return text.ToString();
}
/// <summary>
/// This helper property is used by the DebuggerDisplay.
///
/// Note that we don't want to remove this property and change the debugger display to {InnerExceptions.Count}
/// because DebuggerDisplay should be a single property access or parameterless method call, so that the debugger
/// can use a fast path without using the expression evaluator.
///
/// See https://docs.microsoft.com/en-us/visualstudio/debugger/using-the-debuggerdisplay-attribute
/// </summary>
private int InnerExceptionCount
{
get
{
return InnerExceptions.Count;
}
}
}
}
| 49.472165 | 157 | 0.619238 | [
"MIT"
] | garyhuntddn/corefx | src/Common/src/CoreLib/System/AggregateException.cs | 23,994 | C# |
using qASIC.InputManagement;
namespace qASIC.Toggling
{
public class TogglerRemappable : Toggler
{
public string keyName;
private void Update()
{
if (InputManager.GetInputDown(keyName))
KeyToggle();
}
}
} | 18.133333 | 51 | 0.588235 | [
"MIT"
] | Outgrass-Studios/LudumDare49 | Assets/qASIC/Toggler/TogglerRemappable.cs | 272 | C# |
namespace <%= name %>.ViewModels
{
public class RoleViewModel
{
public string Name { get; set; }
public int Id { get; set; }
}
}
| 17.444444 | 40 | 0.547771 | [
"MIT"
] | folkelib/generator-folke | generators/app/templates/ViewModels/RoleViewModel.cs | 157 | C# |
using System;
namespace Swashbuckle.AspNetCore.SwaggerGen
{
public class SchemaGeneratorException : Exception
{
public SchemaGeneratorException(string message) : base(message)
{ }
public SchemaGeneratorException(string message, Exception innerException) : base(message, innerException)
{ }
}
} | 26.153846 | 113 | 0.705882 | [
"MIT"
] | Agisthemantobeat/Swashbuckle.AspNetCore | src/Swashbuckle.AspNetCore.SwaggerGen/SchemaGenerator/SchemaGeneratorException.cs | 342 | C# |
using System;
using System.Linq;
using System.Threading.Tasks;
using PnP.Core.Services;
namespace PnP.Core.Model.SharePoint
{
internal partial class PushNotificationSubscriberCollection
{
}
}
| 17.083333 | 63 | 0.770732 | [
"MIT"
] | Ashikpaul/pnpcore | src/generated/SP/Internal/PushNotificationSubscriberCollection.cs | 205 | C# |
using System;
namespace OpenEventSourcing.EntityFrameworkCore.Entities
{
public class ProjectionState
{
public string Name { get; set; }
public long Position { get; set; }
public DateTimeOffset CreatedDate { get; set; }
public DateTimeOffset? LastModifiedDate { get; set; }
}
}
| 24.923077 | 61 | 0.66358 | [
"MIT"
] | danielcirket/OpenEventSourcing | src/OpenEventSourcing.EntityFrameworkCore/Entities/ProjectionState.cs | 326 | C# |
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
// Ported from um/winnt.h in the Windows SDK for Windows 10.0.19041.0
// Original source is Copyright © Microsoft. All rights reserved.
namespace TerraFX.Interop
{
public partial struct TOKEN_MANDATORY_POLICY
{
[NativeTypeName("DWORD")]
public uint Policy;
}
}
| 31.214286 | 145 | 0.7254 | [
"MIT"
] | Ethereal77/terrafx.interop.windows | sources/Interop/Windows/um/winnt/TOKEN_MANDATORY_POLICY.cs | 439 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Verse;
using UnityEngine;
using RimWorld;
namespace TorannMagic
{
[StaticConstructorOnStartup]
internal class Gizmo_StatusBar : Gizmo
{
private static readonly Texture2D FullTex = SolidColorMaterials.NewSolidColorTexture(new Color(0.32f, 0.4f, 0.0f));
private static readonly Texture2D EmptyShieldBarTex = SolidColorMaterials.NewSolidColorTexture(Color.clear);
public Pawn pawn;
public Enchantment.CompEnchantedItem itemComp;
public override float GetWidth(float maxWidth)
{
return 75f;
}
public override GizmoResult GizmoOnGUI(Vector2 topLeft, float maxWidth, GizmoRenderParms parms)
{
if (!pawn.DestroyedOrNull() && !pawn.Dead && itemComp != null)
{
Rect overRect = new Rect(topLeft.x + 2, topLeft.y, this.GetWidth(75), 75); //overall rect size (shell)
if (parms.highLight)
{
QuickSearchWidget.DrawStrongHighlight(overRect.ExpandedBy(12f));
}
Find.WindowStack.ImmediateWindow(984798, overRect, WindowLayer.GameUI, delegate
{
int barHeight = ((75 - 5));
Rect rect = overRect.AtZero().ContractedBy(6f); //inner, smaller rect
rect.height = barHeight;
Rect rect2 = rect; //label rect, starts at top
Text.Font = GameFont.Tiny;
float fillPercent = 0;
float yShift = 0f;
Text.Anchor = TextAnchor.MiddleCenter;
if (itemComp.NecroticEnergy != 0)
{
rect2.y += yShift;
try
{
fillPercent = itemComp.NecroticEnergy / 100f;
Widgets.FillableBar(rect2, fillPercent, Gizmo_StatusBar.FullTex, Gizmo_StatusBar.EmptyShieldBarTex, false);
Widgets.Label(rect2, "" + (itemComp.NecroticEnergy.ToString("F0")) + " / " + 100f.ToString("F0"));
}
catch
{
fillPercent = 0f;
Widgets.FillableBar(rect2, fillPercent, Gizmo_StatusBar.FullTex, Gizmo_StatusBar.EmptyShieldBarTex, false);
Widgets.Label(rect2, "");
}
yShift += (barHeight) + 5f;
}
Text.Font = GameFont.Small;
Text.Anchor = TextAnchor.UpperLeft;
}, true, false, 1f);
}
else
{
Rect overRect = new Rect(topLeft.x + 2, topLeft.y, this.GetWidth(100), 75); //overall rect size (shell)
float barHeight;
float initialShift = 0;
Find.WindowStack.ImmediateWindow(984798, overRect, WindowLayer.GameUI, delegate
{
barHeight = ((75 - 5) / 1);
Rect rect = overRect.AtZero().ContractedBy(6f); //inner, smaller rect
rect.height = barHeight;
Rect rect2 = rect; //label rect, starts at top
Text.Font = GameFont.Tiny;
float fillPercent = 0;
float yShift = initialShift;
Text.Anchor = TextAnchor.MiddleCenter;
rect2.y += yShift;
fillPercent = 0f;
Widgets.FillableBar(rect2, fillPercent, Gizmo_StatusBar.FullTex, Gizmo_StatusBar.EmptyShieldBarTex, false);
Widgets.Label(rect2, "" );
yShift += (barHeight) + 5f;
}, true, false, 1f);
}
return new GizmoResult(GizmoState.Clear);
}
}
}
| 44.542553 | 139 | 0.488655 | [
"BSD-3-Clause"
] | Phenrei/RWoM | RimWorldOfMagic/RimWorldOfMagic/Gizmo_StatusBar.cs | 4,189 | C# |
// Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
using CommandLine;
namespace Roslynator.CommandLine
{
public abstract class AbstractGenerateDocCommandLineOptions : MSBuildCommandLineOptions
{
[Option(
shortName: 'h',
longName: "heading",
Required = true,
HelpText = "Defines a heading of the root documentation file.",
MetaValue = "<ROOT_FILE_HEADING>")]
public string Heading { get; set; }
[Option(
shortName: 'o',
longName: "output",
Required = true,
HelpText = "Defines a path for the output directory.",
MetaValue = "<OUTPUT_DIRECTORY>")]
public string Output { get; set; }
[Option(
longName: ParameterNames.Depth,
HelpText = "Defines a depth of a documentation. Allowed values are member, type or namespace. Default value is member.",
MetaValue = "<DEPTH>")]
public string Depth { get; set; }
[Option(
longName: "ignored-names",
HelpText = "Defines a list of metadata names that should be excluded from a documentation. Namespace of type names can be specified.",
MetaValue = "<FULLY_QUALIFIED_METADATA_NAME>")]
public IEnumerable<string> IgnoredNames { get; set; }
[Option(
longName: "no-mark-obsolete",
HelpText = "Indicates whether obsolete types and members should not be marked as '[deprecated]'.")]
public bool NoMarkObsolete { get; set; }
[Option(
longName: "no-precedence-for-system",
HelpText = "Indicates whether symbols contained in 'System' namespace should be ordered as any other symbols and not before other symbols.")]
public bool NoPrecedenceForSystem { get; set; }
[Option(
longName: "scroll-to-content",
HelpText = "Indicates whether a link should lead to the top of the documentation content.")]
public bool ScrollToContent { get; set; }
[Option(
longName: ParameterNames.Visibility,
Default = nameof(Roslynator.Visibility.Public),
HelpText = "Defines a visibility of a type or a member. Allowed values are public, internal or private. Default value is public.",
MetaValue = "<VISIBILITY>")]
public string Visibility { get; set; }
}
}
| 42.098361 | 160 | 0.626168 | [
"Apache-2.0"
] | RickeyEstes/Roslynator | src/CommandLine/Options/AbstractGenerateDocCommandLineOptions.cs | 2,570 | C# |
// Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory;
using static Roslynator.CSharp.CSharpFactory;
namespace Roslynator.CSharp.Refactorings
{
internal static class ReverseReversedForLoopRefactoring
{
public static bool CanRefactor(ForStatementSyntax forStatement)
{
ExpressionSyntax value = forStatement
.Declaration?
.Variables
.SingleOrDefault(shouldThrow: false)?
.Initializer?
.Value;
if (value?.Kind() != SyntaxKind.SubtractExpression)
return false;
if (((BinaryExpressionSyntax)value).Right?.IsNumericLiteralExpression("1") != true)
return false;
ExpressionSyntax condition = forStatement.Condition;
if (condition?.Kind() != SyntaxKind.GreaterThanOrEqualExpression)
return false;
if (((BinaryExpressionSyntax)condition).Right?.IsNumericLiteralExpression("0") != true)
return false;
return forStatement.Incrementors.SingleOrDefault(shouldThrow: false)?.Kind() == SyntaxKind.PostDecrementExpression;
}
public static Task<Document> RefactorAsync(
Document document,
ForStatementSyntax forStatement,
CancellationToken cancellationToken = default)
{
VariableDeclarationSyntax declaration = forStatement.Declaration;
var incrementor = (PostfixUnaryExpressionSyntax)forStatement.Incrementors[0];
var initializerValue = (BinaryExpressionSyntax)declaration.Variables[0].Initializer.Value;
VariableDeclarationSyntax newDeclaration = declaration.ReplaceNode(
initializerValue,
NumericLiteralExpression(0));
BinaryExpressionSyntax newCondition = ((BinaryExpressionSyntax)forStatement.Condition)
.WithOperatorToken(Token(SyntaxKind.LessThanToken))
.WithRight(initializerValue.Left);
SeparatedSyntaxList<ExpressionSyntax> newIncrementors = forStatement.Incrementors.Replace(
incrementor,
incrementor.WithOperatorToken(Token(SyntaxKind.PlusPlusToken)));
ForStatementSyntax newForStatement = forStatement
.WithDeclaration(newDeclaration)
.WithCondition(newCondition)
.WithIncrementors(newIncrementors);
return document.ReplaceNodeAsync(forStatement, newForStatement, cancellationToken);
}
}
}
| 39.643836 | 160 | 0.673808 | [
"Apache-2.0"
] | AdrianWilczynski/Roslynator | src/Refactorings/CSharp/Refactorings/ReverseReversedForLoopRefactoring.cs | 2,896 | C# |
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Diagnostics;
using System.Threading.Tasks;
using DigitalPlatform;
using DigitalPlatform.CommonControl;
using DigitalPlatform.IO;
using DigitalPlatform.Text;
using DigitalPlatform.LibraryClient;
using DigitalPlatform.LibraryClient.localhost;
using DigitalPlatform.RFID;
using DigitalPlatform.Core;
namespace dp2Circulation
{
/// <summary>
/// 一个出纳任务
/// </summary>
internal class ChargingTask
{
public string ID = ""; // 任务 ID。这是在任务之间唯一的一个字符串,用于查询和定位任务
public string ReaderBarcode = "";
public string ItemBarcode = "";
public string Action = ""; // load_reader_info borrow return lost renew
public string Parameters = ""; // 附加的参数。simulate_reservation_arrive 等
public string State = ""; // 空 / begin / finish / error
public string Color = ""; // 颜色
public string ErrorInfo = ""; // 出错信息
public string ReaderName = ""; // 读者姓名
public string ItemSummary = ""; // 册的书目摘要
public string ReaderXml = ""; // 读者记录 XML
public string ReaderBarcodeRfidType = "";
// 册条码号是否为 rfid 类型。值为 "pii" "uid" 和 "" 之一
// 如果是 "pii" 或 "uid",则完成借书和还书操作最后一步要修改 RFID 标签的 EAS 标指
public string ItemBarcodeEasType = "";
const int IMAGEINDEX_WAITING = 0;
const int IMAGEINDEX_FINISH = 1;
const int IMAGEINDEX_ERROR = 2;
const int IMAGEINDEX_INFORMATION = 3;
public void RefreshPatronCardDisplay(DpRow row)
{
if (row.Count < 3)
return;
DpCell cell = row[2];
if (this.Action == "load_reader_info")
cell.OwnerDraw = true;
cell.Relayout();
}
// parameters:
// strSpeakStyle 状态/状态+内容
public string GetSpeakContent(DpRow row, string strSpeakStyle)
{
if (this.State == "finish" || this.State == "error")
{
string strText = "";
if (this.Color == "red")
strText = "错误: ";
else if (this.Color == "yellow")
strText = "提示: ";
else
return "";
if (strSpeakStyle == "状态")
return strText;
// 状态+内容
return strText + this.ErrorInfo;
}
return "";
}
public void RefreshDisplay(DpRow row)
{
// 初始化列
if (row.Count == 0)
{
// 色条
DpCell cell = new DpCell();
row.Add(cell);
// 状态
cell = new DpCell();
cell.ImageIndex = -1;
row.Add(cell);
// 内容
cell = new DpCell();
row.Add(cell);
}
bool bStateText = false;
// 状态
// row[0].Text = this.State;
DpCell state_cell = row[1];
if (this.State == "begin")
{
if (bStateText == true)
state_cell.Text = "请求中";
state_cell.ImageIndex = IMAGEINDEX_WAITING;
}
else if (this.State == "error")
{
if (bStateText == true)
state_cell.Text = "出错";
state_cell.ImageIndex = IMAGEINDEX_ERROR;
}
else if (this.State == "finish")
{
if (bStateText == true)
state_cell.Text = "完成";
state_cell.ImageIndex = IMAGEINDEX_FINISH;
}
else
{
if (bStateText == true)
state_cell.Text = "未处理";
state_cell.ImageIndex = -1;
}
string strText = "";
// 内容
if (this.Action == "load_reader_info")
strText = "装载读者信息 " + this.ReaderBarcode;
else if (this.Action == "borrow")
{
strText = GetOperText("借");
}
else if (this.Action == "return")
{
strText = GetOperText("还");
}
else if (this.Action == "verify_return")
{
strText = GetOperText("(验证)还");
}
else if (this.Action == "lost")
{
strText = GetOperText("丢失");
}
else if (this.Action == "verify_lost")
{
strText = GetOperText("(验证)丢失");
}
else if (this.Action == "renew")
{
strText = GetOperText("续借");
}
else if (this.Action == "verify_renew")
{
strText = GetOperText("(验证)续借");
}
else if (this.Action == "inventory")
{
strText = GetOperText("盘点");
}
else if (this.Action == "transfer")
{
strText = GetOperText("调拨");
}
else if (this.Action == "read")
{
strText = GetOperText("读过");
}
else if (this.Action == "boxing")
{
strText = GetOperText("配书");
}
if (string.IsNullOrEmpty(this.ErrorInfo) == false)
strText += "\r\n===\r\n" + this.ErrorInfo;
row[2].Text = strText;
// 缺省为透明色,即使用 row 的前景背景色 2015/10/18
////row.BackColor = SystemColors.Window;
////row.ForeColor = SystemColors.WindowText;
DpCell color_cell = row[0];
// row.BackColor = System.Drawing.Color.Transparent;
if (this.Color == "red")
{
color_cell.BackColor = System.Drawing.Color.Red;
// row.ForeColor = System.Drawing.Color.White;
}
else if (this.Color == "green")
{
color_cell.BackColor = System.Drawing.Color.Green;
// row.ForeColor = System.Drawing.Color.White;
}
else if (this.Color == "yellow")
{
row.BackColor = System.Drawing.Color.Yellow;
color_cell.BackColor = System.Drawing.Color.Transparent;
// row.ForeColor = System.Drawing.Color.Black;
}
else if (this.Color == "light")
{
color_cell.BackColor = System.Drawing.Color.LightGray;
}
else if (this.Color == "purple")
{
color_cell.BackColor = System.Drawing.Color.Purple;
}
else if (this.Color == "black")
{
color_cell.BackColor = System.Drawing.Color.Purple;
#if NO
row.BackColor = System.Drawing.Color.Black;
row.ForeColor = System.Drawing.Color.LightGray;
#endif
}
else
{
// color_cell.BackColor = System.Drawing.Color.Transparent;
color_cell.BackColor = System.Drawing.Color.White;
}
}
string GetOperText(string strOperName)
{
string strSummary = "";
if (string.IsNullOrEmpty(this.ItemSummary) == false)
strSummary = "\r\n---\r\n" + this.ItemSummary;
if (strOperName == "调拨")
{
string direction = StringUtil.GetParameterByPrefix(this.Parameters, "direction");
if (string.IsNullOrEmpty(direction))
direction = this.Parameters.Replace("location:", "-->");
return $"{strOperName} {this.ItemBarcode} {direction} {strSummary}";
}
else if (string.IsNullOrEmpty(this.ReaderBarcode) == false
&& strOperName != "盘点")
return this.ReaderBarcode + " " + this.ReaderName + " " + strOperName + " " + this.ItemBarcode + strSummary;
else
return strOperName + " " + this.ItemBarcode + strSummary;
}
// 任务是否完成
// error finish 都是完成状态
public bool Compeleted
{
get
{
if (this.State == "error" || this.State == "finish")
return true;
return false;
}
}
}
/// <summary>
/// 出纳任务列表
/// </summary>
internal class TaskList : ThreadBase
{
public QuickChargingForm Container = null;
List<ChargingTask> _tasks = new List<ChargingTask>();
string _strCurrentReaderBarcode = "";
public string CurrentReaderBarcode
{
get
{
return this._strCurrentReaderBarcode;
}
set
{
this._strCurrentReaderBarcode = value;
if (this.Container != null)
this.Container.CurrentReaderBarcodeChanged(this.CurrentReaderBarcode); // 通知 读者记录已经成功装载
}
}
#if OLD_CHARGING_CHANNEL
/// <summary>
/// 通讯通道
/// </summary>
public LibraryChannel Channel = null;
public DigitalPlatform.Stop stop = null;
#endif
ReaderWriterLockSlim m_lock = new ReaderWriterLockSlim();
static int m_nLockTimeout = 5000; // 5000=5秒
public override void StopThread(bool bForce)
{
// this.Clear();
base.StopThread(bForce);
}
// 工作线程每一轮循环的实质性工作
public override void Worker()
{
int nOldCount = 0;
List<ChargingTask> tasks = new List<ChargingTask>();
List<ChargingTask> remove_tasks = new List<ChargingTask>();
if (this.m_lock.TryEnterReadLock(m_nLockTimeout) == false)
throw new LockException("锁定尝试中超时");
try
{
nOldCount = this._tasks.Count;
foreach (ChargingTask task in this._tasks)
{
if (task.State == "")
{
tasks.Add(task);
}
#if NO
if (task.State == "finish"
&& task.Action == "load_reader_info"
&& task.ReaderBarcode != this.CurrentReaderBarcode)
remove_tasks.Add(task);
#endif
}
}
finally
{
this.m_lock.ExitReadLock();
}
if (tasks.Count > 0)
{
#if OLD_CHARGING_CHANNEL
stop.OnStop += new StopEventHandler(this.DoStop);
stop.Initial("进行一轮任务处理...");
stop.BeginLoop();
#endif
try
{
foreach (ChargingTask task in tasks)
{
if (this.Stopped == true)
{
this.Container.SetColorList(); // 促使“任务已经暂停”显示出来
return;
}
#if OLD_CHARGING_CHANNEL
if (stop != null && stop.State != 0)
{
this.Stopped = true;
this.Container.SetColorList(); // 促使“任务已经暂停”显示出来
return;
}
#endif
// bool bStop = false;
// 执行任务
if (task.Action == "load_reader_info")
{
LoadReaderInfo(task);
}
else if (task.Action == "borrow"
|| task.Action == "renew"
|| task.Action == "verify_renew")
{
Borrow(task);
}
else if (task.Action == "return"
|| task.Action == "verify_return"
|| task.Action == "lost"
|| task.Action == "verify_lost"
|| task.Action == "inventory"
|| task.Action == "read"
|| task.Action == "boxing"
|| task.Action == "transfer")
{
Return(task);
}
#if OLD_CHARGING_CHANNEL
stop.SetMessage("");
#endif
}
}
finally
{
#if OLD_CHARGING_CHANNEL
stop.EndLoop();
stop.OnStop -= new StopEventHandler(this.DoStop);
stop.Initial("");
#endif
}
}
//bool bChanged = false;
if (remove_tasks.Count > 0)
{
if (this.m_lock.TryEnterWriteLock(m_nLockTimeout) == false)
throw new LockException("锁定尝试中超时");
try
{
//if (this._tasks.Count != nOldCount)
// bChanged = true;
foreach (ChargingTask task in remove_tasks)
{
RemoveTask(task, false);
}
}
finally
{
this.m_lock.ExitWriteLock();
}
}
/*
if (bChanged == true)
this.Activate();
* */
}
// 获得可以发送给服务器的证条码号字符串
// 去掉前面的 ~
static string GetRequestPatronBarcode(string strText)
{
if (string.IsNullOrEmpty(strText) == true)
return "";
if (strText[0] == '~')
return strText.Substring(1);
return strText;
}
// 将字符串中的宏 %datadir% 替换为实际的值
string ReplaceMacro(string strText)
{
strText = strText.Replace("%mappeddir%", PathUtil.MergePath(Program.MainForm.DataDir, "servermapped"));
return strText.Replace("%datadir%", Program.MainForm.DataDir);
}
#if OLD_CHARGING_CHANNEL
internal void DoStop(object sender, StopEventArgs e)
{
if (this.Channel != null)
this.Channel.Abort();
}
#else
internal void DoStop(object sender, StopEventArgs e)
{
if (this.Container != null)
this.Container.DoStop(sender, e);
}
#endif
LibraryChannel GetChannel()
{
return this.Container.GetChannel();
}
void ReturnChannel(LibraryChannel channel)
{
this.Container.ReturnChannel(channel);
}
// 装载读者信息
// return:
// false 正常
// true 需要停止后继的需要通道的操作
void LoadReaderInfo(ChargingTask task)
{
task.State = "begin";
task.Color = "purple"; // "light";
this.Container.DisplayTask("refresh", task);
this.Container.SetColorList();
#if OLD_CHARGING_CHANNEL
stop.SetMessage("装入读者信息 " + task.ReaderBarcode + "...");
#endif
string strError = "";
if (this.Container.IsCardMode == true)
this.Container.SetReaderCardString("");
else
this.Container.SetReaderHtmlString("(空)");
string strStyle = this.Container.PatronRenderFormat;
if (this.Container.SpeakPatronName == true)
strStyle += ",summary";
{
strStyle += ",xml";
if (StringUtil.CompareVersion(Program.MainForm.ServerVersion, "2.25") >= 0)
strStyle += ":noborrowhistory";
}
#if NO
if (this.VoiceName == true)
strStyle += ",summary";
#endif
#if OLD_CHARGING_CHANNEL
stop.SetMessage("正在装入读者记录 " + task.ReaderBarcode + " ...");
#endif
string[] results = null;
byte[] baTimestamp = null;
string strRecPath = "";
long lRet = 0;
{
LibraryChannel channel = this.GetChannel();
try
{
#if OLD_CHARGING_CHANNEL
lRet = this.Channel.GetReaderInfo(
stop,
GetRequestPatronBarcode(task.ReaderBarcode),
strStyle, // this.RenderFormat, // "html",
out results,
out strRecPath,
out baTimestamp,
out strError);
#else
lRet = channel.GetReaderInfo(
null,
GetRequestPatronBarcode(task.ReaderBarcode),
strStyle, // this.RenderFormat, // "html",
out results,
out strRecPath,
out baTimestamp,
out strError);
#endif
}
finally
{
this.ReturnChannel(channel);
}
}
task.ErrorInfo = strError;
if (lRet == 0)
{
if (StringUtil.IsIdcardNumber(task.ReaderBarcode) == true)
task.ErrorInfo = ("证条码号(或身份证号)为 '" + task.ReaderBarcode + "' 的读者记录没有找到 ...");
else
task.ErrorInfo = ("证条码号为 '" + task.ReaderBarcode + "' 的读者记录没有找到 ...");
goto ERROR1; // not found
}
if (lRet == -1)
goto ERROR1;
if (results == null || results.Length == 0)
{
strError = "返回的results不正常。";
goto ERROR1;
}
string strResult = "";
strResult = results[0];
string strReaderXml = results[results.Length - 1];
if (lRet > 1)
{
// return:
// -1 error
// 0 放弃
// 1 成功
int nRet = this.Container.SelectOnePatron(lRet,
strRecPath,
out string strBarcode,
out strResult,
out strError);
if (nRet == -1)
{
task.ErrorInfo = strError;
goto ERROR1;
}
if (nRet == 0)
{
strError = "放弃装入读者记录";
task.ErrorInfo = strError;
goto ERROR1;
}
if (task.ReaderBarcode != strBarcode)
{
task.ReaderBarcode = strBarcode;
// TODO: 此时 task.ReaderXml 需要另行获得
strReaderXml = "";
strStyle = "xml";
if (StringUtil.CompareVersion(Program.MainForm.ServerVersion, "2.25") >= 0)
strStyle += ":noborrowhistory";
results = null;
{
LibraryChannel channel = this.GetChannel();
try
{
#if OLD_CHARGING_CHANNEL
lRet = this.Channel.GetReaderInfo(
stop,
strBarcode,
strStyle, // this.RenderFormat, // "html",
out results,
out strRecPath,
out baTimestamp,
out strError);
#else
lRet = channel.GetReaderInfo(
null,
strBarcode,
strStyle, // this.RenderFormat, // "html",
out results,
out strRecPath,
out baTimestamp,
out strError);
#endif
}
finally
{
this.ReturnChannel(channel);
}
}
if (lRet == 1 && results != null && results.Length >= 1)
strReaderXml = results[0];
}
}
else
{
// 检查用户输入的 barcode 是否和读者记录里面的 barcode 吻合
}
task.ReaderXml = strReaderXml;
if (string.IsNullOrEmpty(strReaderXml) == false)
{
task.ReaderName = Global.GetReaderSummary(strReaderXml);
}
if (this.Container.IsCardMode == true)
this.Container.SetReaderCardString(strReaderXml);
else
this.Container.SetReaderHtmlString(ReplaceMacro(strResult));
// 如果切换了读者
// if (this.CurrentReaderBarcode != task.ReaderBarcode)
{
// 删除除了本任务以外的其他任务
// TODO: 需要检查这些任务中是否有尚未完成的
List<ChargingTask> tasks = new List<ChargingTask>();
tasks.AddRange(this._tasks);
tasks.Remove(task);
int nCount = CountNotFinishTasks(tasks);
if (nCount > 0)
{
#if NO
if (this.Container.AskContinue("当前有 " + nCount.ToString()+ " 个任务尚未完成。\r\n\r\n是否清除这些任务并继续?") == DialogResult.Cancel)
{
strError = "装入读者记录的操作被中断";
task.ErrorInfo = strError;
goto ERROR1;
}
#endif
this.Container.DisplayReaderSummary(task, "前面读者有 " + nCount.ToString() + " 个任务尚未完成,或有提示需要进一步处理。\r\n点击此处查看摘要信息");
}
else
this.Container.ClearTaskList(tasks);
// 真正从 _tasks 里面删除
ClearTasks(tasks); // 2019/9/3
}
this.CurrentReaderBarcode = task.ReaderBarcode; // 会自动显示出来
if (this.Container.SpeakPatronName == true && results.Length >= 2)
{
string strName = results[1];
Program.MainForm.Speak(strName);
}
// this.m_strCurrentBarcode = strBarcode;
task.State = "finish";
task.Color = "";
// 兑现显示
this.Container.DisplayTask("refresh", task);
this.Container.SetColorList();
// this.Container.CurrentReaderBarcodeChanged(this.CurrentReaderBarcode); // 通知 读者记录已经成功装载
#if NO
if (stop != null && stop.State != 0)
return true;
return false;
#endif
return;
ERROR1:
task.State = "error";
task.Color = "red";
this.CurrentReaderBarcode = ""; // 及时清除上下文,避免后面错误借到先前的读者名下
if (this.Container.IsCardMode == true)
this.Container.SetReaderCardString(task.ErrorInfo);
else
this.Container.SetReaderTextString(task.ErrorInfo);
// 兑现显示
this.Container.DisplayTask("refresh", task);
this.Container.SetColorList();
this.Stopped = true; // 全部任务停止处理。这是因为装载读者的操作比较重要,是后继操作的前提
#if NO
if (stop != null && stop.State != 0)
return true;
return false;
#endif
return;
#if NO
}
finally
{
stop.EndLoop();
stop.OnStop -= new StopEventHandler(this.DoStop);
stop.Initial("");
}
#endif
}
// 统计若干任务中,有多少个处于未完成的状态。和黄色 红色状态
static int CountNotFinishTasks(List<ChargingTask> tasks)
{
int nCount = 0;
foreach (ChargingTask task in tasks)
{
if (task.State == "begin" || task.Color == "black"
|| task.Color == "yellow" || task.Color == "red")
nCount++;
}
return nCount;
}
string GetPostFix()
{
if (StringUtil.CompareVersion(Program.MainForm.ServerVersion, "2.24") >= 0)
return ":noborrowhistory";
return "";
}
// 借书
void Borrow(ChargingTask task)
{
DateTime start_time = DateTime.Now;
List<DateTime> times = new List<DateTime>();
times.Add(start_time);
task.State = "begin";
task.Color = "purple"; // "light";
this.Container.DisplayTask("refresh", task);
this.Container.SetColorList();
string strOperText = task.ReaderBarcode + " 借 " + task.ItemBarcode;
#if OLD_CHARGING_CHANNEL
stop.SetMessage(strOperText + " ...");
#endif
string strError = "";
string strReaderRecord = "";
string strConfirmItemRecPath = null;
bool bRenew = false;
if (task.Action == "renew" || task.Action == "verify_renew")
bRenew = true;
if (task.Action == "renew")
task.ReaderBarcode = "";
else
{
if (string.IsNullOrEmpty(task.ReaderBarcode) == true)
{
strError = "证条码号为空,无法进行借书操作";
task.ErrorInfo = strError;
goto ERROR1;
}
}
// REDO:
string[] aDupPath = null;
string[] item_records = null;
string[] reader_records = null;
string[] biblio_records = null;
string strOutputReaderBarcode = "";
BorrowInfo borrow_info = null;
// item返回的格式
string strItemReturnFormats = "";
if (Program.MainForm.ChargingNeedReturnItemXml == true)
{
if (String.IsNullOrEmpty(strItemReturnFormats) == false)
strItemReturnFormats += ",";
strItemReturnFormats += "xml" + GetPostFix();
}
// biblio返回的格式
string strBiblioReturnFormats = "";
// 读者返回格式
string strReaderFormatList = "";
bool bName = false; // 是否直接取得读者姓名,而不要获得读者 XML
if (StringUtil.CompareVersion(Program.MainForm.ServerVersion, "2.24") >= 0)
{
strReaderFormatList = this.Container.PatronRenderFormat + ",summary";
bName = true;
}
else
strReaderFormatList = this.Container.PatronRenderFormat + ",xml" + GetPostFix();
string strStyle = "reader";
if (Program.MainForm.ChargingNeedReturnItemXml)
strStyle += ",item";
// 2021/8/25
if (string.IsNullOrEmpty(task.Parameters) == false)
strStyle += "," + task.Parameters;
//if (this.Container.MainForm.TestMode == true)
// strStyle += ",testmode";
times.Add(DateTime.Now);
if (string.IsNullOrEmpty(task.ItemBarcodeEasType) == false
&& string.IsNullOrEmpty(RfidManager.Url)) // this.Container._rfidChannel == null
{
task.ErrorInfo = "尚未连接 RFID 设备,无法进行 RFID 标签物品的流通操作";
goto ERROR1;
}
string additional = this.Container.GetOperTimeParamString();
if (string.IsNullOrEmpty(additional) == false)
strStyle += ",operTime:" + StringUtil.EscapeString(additional, ",:");
long lRet = 0;
LibraryChannel channel = this.GetChannel();
try
{
#if OLD_CHARGING_CHANNEL
lRet = Channel.Borrow(
stop,
bRenew,
task.ReaderBarcode,
task.ItemBarcode,
strConfirmItemRecPath,
false,
null, // this.OneReaderItemBarcodes,
strStyle,
strItemReturnFormats,
out item_records,
strReaderFormatList, // this.Container.PatronRenderFormat + ",xml" + GetPostFix(),
out reader_records,
strBiblioReturnFormats,
out biblio_records,
out aDupPath,
out strOutputReaderBarcode,
out borrow_info,
out strError);
#else
lRet = channel.Borrow(
null,
bRenew,
task.ReaderBarcode,
task.ItemBarcode,
strConfirmItemRecPath,
false,
null, // this.OneReaderItemBarcodes,
strStyle,
strItemReturnFormats,
out item_records,
strReaderFormatList, // this.Container.PatronRenderFormat + ",xml" + GetPostFix(),
out reader_records,
strBiblioReturnFormats,
out biblio_records,
out aDupPath,
out strOutputReaderBarcode,
out borrow_info,
out strError);
#endif
}
finally
{
this.ReturnChannel(channel);
}
task.ErrorInfo = strError;
if (lRet != -1)
{
// 修改 EAS
if (string.IsNullOrEmpty(task.ItemBarcodeEasType) == false)
{
if (SetEAS(task, false, out strError) == false)
{
// TODO: 要 undo 刚才进行的操作
// lRet = -1;
lRet = 1; // 相当于黄色状态 // 红色状态,但填充 ItemSummary
if (string.IsNullOrEmpty(task.ErrorInfo) == false)
task.ErrorInfo += "; ";
task.ErrorInfo += strError;
}
}
}
times.Add(DateTime.Now);
if (reader_records != null && reader_records.Length > 0)
strReaderRecord = reader_records[0];
// 刷新读者信息
if (this.Container.IsCardMode == true)
{
if (String.IsNullOrEmpty(strReaderRecord) == false)
this.Container.SetReaderCardString(strReaderRecord);
}
else
{
if (String.IsNullOrEmpty(strReaderRecord) == false)
this.Container.SetReaderHtmlString(ReplaceMacro(strReaderRecord));
}
string strItemXml = "";
if (Program.MainForm.ChargingNeedReturnItemXml == true
&& item_records != null)
{
Debug.Assert(item_records != null, "");
if (item_records.Length > 0)
{
// xml总是在最后一个
strItemXml = item_records[item_records.Length - 1];
}
}
if (lRet == -1)
goto ERROR1;
DateTime end_time = DateTime.Now;
string strReaderSummary = "";
if (reader_records != null && reader_records.Length > 1)
{
if (bName == false)
strReaderSummary = Global.GetReaderSummary(reader_records[1]);
else
strReaderSummary = reader_records[1];
}
#if NO
string strBiblioSummary = "";
if (biblio_records != null && biblio_records.Length > 1)
strBiblioSummary = biblio_records[1];
#endif
task.ReaderName = strReaderSummary;
// task.ItemSummary = strBiblioSummary;
#if NO
this.Container.AsynFillItemSummary(task.ItemBarcode,
strConfirmItemRecPath,
task);
#endif
this.Container.AddItemSummaryTask(// task.ItemBarcode,
string.IsNullOrEmpty(borrow_info?.ItemBarcode) ? task.ItemBarcode : borrow_info?.ItemBarcode,
strConfirmItemRecPath,
task);
Program.MainForm.OperHistory.BorrowAsync(
this.Container,
bRenew,
strOutputReaderBarcode,
task.ItemBarcode,
strConfirmItemRecPath,
strReaderSummary,
strItemXml,
borrow_info,
start_time,
end_time);
/*
lRet = 1;
task.ErrorInfo = "asdf a asdf asdf as df asdf as f a df asdf a sdf a sdf asd f asdf a sdf as df";
*/
if (lRet == 2)
{
// 2019/8/28
// 红色状态
task.Color = "red";
}
else if (lRet == 1)
{
// 黄色状态
task.Color = "yellow";
}
else
{
// 绿色状态
task.Color = "green";
}
// this.m_strCurrentBarcode = strBarcode;
task.State = "finish";
// 兑现显示
this.Container.DisplayTask("refresh_and_visible", task);
this.Container.SetColorList();
#if NO
if (stop != null && stop.State != 0)
return true;
return false;
#endif
{
BorrowCompleteEventArgs e1 = new BorrowCompleteEventArgs();
e1.Action = task.Action;
e1.ItemBarcode = task.ItemBarcode;
e1.ReaderBarcode = strOutputReaderBarcode;
this.Container.TriggerBorrowComplete(e1);
}
times.Add(DateTime.Now);
LogOperTime("borrow", times, strOperText);
return;
ERROR1:
task.State = "error";
task.Color = "red";
// this.Container.SetReaderRenderString(strError);
// 兑现显示
this.Container.DisplayTask("refresh_and_visible", task);
this.Container.SetColorList();
#if NO
if (stop != null && stop.State != 0)
return true;
return false;
#endif
return;
#if NO
}
finally
{
stop.EndLoop();
stop.OnStop -= new StopEventHandler(this.DoStop);
stop.Initial("");
}
#endif
}
static void Sound(CancellationToken token)
{
while (token.IsCancellationRequested == false)
{
System.Console.Beep(440, 10);
}
}
static int[] tones = new int[] { 523, 659, 783 };
/*
* C4: 261 330 392
C5: 523 659 783
* */
public static void Sound(int tone)
{
Task.Run(() =>
{
if (tone == -1)
{
for (int i = 0; i < 2; i++)
System.Console.Beep(1147, 1000);
}
else
System.Console.Beep(tones[tone], tone == 1 ? 200 : 500);
});
}
static string ToLower(string text)
{
if (text == null)
return "";
return text.ToLower();
}
bool PreSetEAS(ChargingTask task,
bool enable,
out bool old_state,
out string strError)
{
strError = "";
old_state = false;
try
{
string tag_name = ToLower(task.ItemBarcodeEasType) + ":" + task.ItemBarcode;
// 前置情况下,要小心检查原来标签的 EAS,如果没有必要修改就不要修改
uint antenna_id = 0;
string reader_name = "";
{
var get_result = this.Container.GetEAS("*", tag_name);
if (get_result == null)
this.Container.WriteErrorLog("get_result == null");
else
this.Container.WriteErrorLog($"get_result == {get_result.ToString()}");
if (get_result.Value == -1)
{
Sound(-1);
strError = $"获得 RFID 标签 EAS 标志位时出错: {get_result.ErrorInfo}";
return false;
}
old_state = (get_result.Value == 1);
antenna_id = get_result.AntennaID;
reader_name = get_result.ReaderName;
}
// 如果修改前已经是这个值就不修改了
if (old_state == enable)
return true;
{
NormalResult result = null;
// 修改 EAS。带有重试功能 // 2019/9/2
for (int i = 0; i < 2; i++)
{
// return result.Value:
// -1 出错
// 0 没有找到指定的标签
// 1 找到,并成功修改 EAS
result = RfidManager.SetEAS(string.IsNullOrEmpty(reader_name) ? "*" : reader_name,
tag_name,
antenna_id,
enable);
if (result.Value == 1)
break;
}
TagList.ClearTagTable("");
FillTagList();
// testing
// NormalResult result = new NormalResult { Value = -1, ErrorInfo = "testing" };
if (result.Value != 1)
{
Sound(-1);
strError = $"前置修改 RFID 标签 EAS 标志位时出错: {result.ErrorInfo}";
return false;
}
}
Sound(2);
return true;
}
catch (Exception ex)
{
var text = $"前置修改 RFID 标签 EAS 标志位时出现异常: {ExceptionUtil.GetDebugText(ex)}";
this.Container.WriteErrorLog(text);
strError = $"前置修改 RFID 标签 EAS 标志位时出现异常: {ex.Message} (已写入错误日志)";
return false;
}
}
public static void FillTagList()
{
BaseChannel<IRfid> channel = RfidManager.GetChannel();
try
{
TagList.FillTagInfo(channel);
}
finally
{
RfidManager.ReturnChannel(channel);
}
}
bool SetEAS(ChargingTask task,
bool enable,
// bool preprocess,
out string strError)
{
string prefix = "";
strError = "";
try
{
NormalResult result = null;
/*
if (preprocess == true)
{
prefix = "前置";
// 前置情况下,要小心检查原来标签的 EAS,如果没有必要修改就不要修改
result = RfidManager.SetEAS("*",
task.ItemBarcodeEasType.ToLower() + ":" + task.ItemBarcode,
enable);
TagList.ClearTagTable("");
}
else
*/
{
result = this.Container.SetEAS(
task,
"*",
ToLower(task.ItemBarcodeEasType) + ":" + task.ItemBarcode,
enable);
}
// testing
// NormalResult result = new NormalResult { Value = -1, ErrorInfo = "testing" };
if (result.Value != 1)
{
Sound(-1);
strError = $"{prefix}修改 RFID 标签 EAS 标志位时出错: {result.ErrorInfo}";
return false;
}
Sound(2);
return true;
}
catch (Exception ex)
{
strError = $"{prefix}修改 RFID 标签 EAS 标志位时出现异常: {ex.Message}";
return false;
}
}
#if NO
bool SetEAS(ChargingTask task, bool enable, out string strError)
{
strError = "";
try
{
/*
NormalResult result = this.Container._rfidChannel.Object.SetEAS("*",
task.ItemBarcodeEasType.ToLower() + ":" + task.ItemBarcode,
enable);
*/
NormalResult result = RfidManager.SetEAS("*",
task.ItemBarcodeEasType.ToLower() + ":" + task.ItemBarcode,
enable);
TagList.ClearTagTable("");
// testing
// NormalResult result = new NormalResult { Value = -1, ErrorInfo = "testing" };
if (result.Value != 1)
{
Sound(-1);
strError = "修改 RFID 标签 EAS 标志位时出错: " + result.ErrorInfo;
bool eas_fixed = false;
string text = strError;
this.Container.Invoke((Action)(() =>
{
var oldPause = this.Container.PauseRfid;
this.Container.PauseRfid = true;
try
{
// TODO: 对话框打开之后,QuickCharingForm 要暂停接收标签信息
using (RfidToolForm dlg = new RfidToolForm())
{
RfidManager.GetState("clearCache");
dlg.MessageText = text + "\r\n请利用本窗口修正 EAS";
dlg.Mode = "auto_fix_eas_and_close";
dlg.SelectedID = task.ItemBarcodeEasType.ToLower() + ":" + task.ItemBarcode;
dlg.ProtocolFilter = InventoryInfo.ISO15693;
dlg.ShowDialog(this.Container);
eas_fixed = dlg.EasFixed;
// 2019/1/23
// TODO: 似乎也可以让 RfidToolForm 来负责恢复它打开前的 sendkey 状态
// this.Container.OpenRfidCapture(true);
}
}
finally
{
this.Container.PauseRfid = oldPause;
}
}));
if (eas_fixed == true)
return true;
return false;
}
Sound(2);
return true;
}
catch (Exception ex)
{
strError = "修改 RFID 标签 EAS 标志位时出错: " + ex.Message;
return false;
}
}
#endif
// parameters:
// times 时间值数组。依次是 总开始时间, API 开始时间, API 结束时间, 总结束时间
void LogOperTime(string strAPI, List<DateTime> times, string strDesc)
{
Debug.Assert(times.Count == 4, "");
StringBuilder text = new StringBuilder();
TimeSpan total_delta = times[3] - times[0];
TimeSpan api_delta = times[2] - times[1];
if (api_delta.TotalSeconds > 2)
text.Append("*** ");
text.Append("API " + strAPI + " 耗时 " + api_delta.TotalSeconds.ToString() + " 秒 " + strDesc + " (" + times[1].ToLongTimeString() + "-" + times[2].ToLongTimeString() + "); "
+ " 总耗时 " + total_delta.TotalSeconds.ToString() + " 秒(" + times[0].ToLongTimeString() + "-" + times[3].ToLongTimeString() + ") ");
this.Container.WriteErrorLog(text.ToString());
}
// 还书
void Return(ChargingTask task)
{
DateTime start_time = DateTime.Now;
List<DateTime> times = new List<DateTime>();
times.Add(start_time);
task.State = "begin";
task.Color = "purple"; // "light";
this.Container.DisplayTask("refresh", task);
this.Container.SetColorList();
string strOperText = "";
if (task.Action == "inventory")
strOperText = task.ReaderBarcode + " 盘点 " + task.ItemBarcode;
else if (task.Action == "transfer")
strOperText = task.ReaderBarcode + " 移交 " + task.ItemBarcode;
else if (task.Action == "read")
{
if (StringUtil.CompareVersion(Program.MainForm.ServerVersion, "2.68") < 0)
{
task.ErrorInfo = "操作未能进行。“读过”功能要求 dp2library 版本在 2.68 或以上";
goto ERROR1;
}
strOperText = task.ReaderBarcode + " 读过 " + task.ItemBarcode;
}
else if (task.Action == "boxing")
{
if (StringUtil.CompareVersion(Program.MainForm.ServerVersion, "2.92") < 0)
{
task.ErrorInfo = "操作未能进行。“配书”功能要求 dp2library 版本在 2.92 或以上";
goto ERROR1;
}
strOperText = task.ReaderBarcode + " 配书 " + task.ItemBarcode;
}
else
strOperText = task.ReaderBarcode + " 还 " + task.ItemBarcode;
#if OLD_CHARGING_CHANNEL
stop.SetMessage(strOperText + " ...");
#endif
string strError = "";
string strReaderRecord = "";
string strConfirmItemRecPath = null;
string strAction = task.Action;
string strReaderBarcode = task.ReaderBarcode;
if (task.Action == "verify_return")
{
if (string.IsNullOrEmpty(strReaderBarcode) == true)
{
strError = "尚未输入读者证条码号";
task.ErrorInfo = strError;
goto ERROR1;
}
strAction = "return";
}
else if (task.Action == "verify_lost")
{
if (string.IsNullOrEmpty(strReaderBarcode) == true)
{
strError = "尚未输入读者证条码号";
task.ErrorInfo = strError;
goto ERROR1;
}
strAction = "lost";
}
else if (task.Action == "inventory")
{
if (string.IsNullOrEmpty(strReaderBarcode) == true)
{
strError = "尚未设定批次号";
task.ErrorInfo = strError;
goto ERROR1;
}
strAction = "inventory";
}
else if (task.Action == "transfer")
{
// testing
// strReaderBarcode = "test_bachno";
/*
if (string.IsNullOrEmpty(strReaderBarcode) == true)
{
strError = "尚未设定批次号";
task.ErrorInfo = strError;
goto ERROR1;
}
*/
strAction = "transfer";
}
else if (task.Action == "read")
{
if (string.IsNullOrEmpty(strReaderBarcode) == true)
{
strError = "尚未输入读者证条码号";
task.ErrorInfo = strError;
goto ERROR1;
}
strAction = "read";
}
else
{
strReaderBarcode = "";
}
//REDO:
string[] aDupPath = null;
string[] item_records = null;
string[] reader_records = null;
string[] biblio_records = null;
string strOutputReaderBarcode = "";
ReturnInfo return_info = null;
// item返回的格式
string strItemReturnFormats = "";
if (Program.MainForm.ChargingNeedReturnItemXml == true)
{
if (String.IsNullOrEmpty(strItemReturnFormats) == false)
strItemReturnFormats += ",";
strItemReturnFormats += "xml" + GetPostFix();
}
// biblio返回的格式
string strBiblioReturnFormats = "";
// 读者返回格式
string strReaderFormatList = "";
bool bName = false; // 是否直接取得读者姓名,而不要获得读者 XML
if (StringUtil.CompareVersion(Program.MainForm.ServerVersion, "2.24") >= 0)
{
strReaderFormatList = this.Container.PatronRenderFormat + ",summary";
bName = true;
}
else
strReaderFormatList = this.Container.PatronRenderFormat + ",xml" + GetPostFix();
string strStyle = "reader";
if (Program.MainForm.ChargingNeedReturnItemXml)
strStyle += ",item";
if (string.IsNullOrEmpty(task.Parameters) == false)
strStyle += "," + task.Parameters;
// testing
// if (strAction == "transfer")
// strStyle += ",location:新馆藏地";
#if NO
if (strAction == "inventory")
{
strItemReturnFormats = "xml";
strStyle += ",item";
}
#endif
//if (this.Container.MainForm.TestMode == true)
// strStyle += ",testmode";
times.Add(DateTime.Now);
if (string.IsNullOrEmpty(task.ItemBarcodeEasType) == false
&& string.IsNullOrEmpty(RfidManager.Url)) // this.Container._rfidChannel == null
{
task.ErrorInfo = "尚未连接 RFID 设备,无法进行 RFID 标签物品的流通操作";
goto ERROR1;
}
// 还书操作在调用 Return() API 之前预先修改一次 EAS 为 On
bool eas_changed = false;
{
// 修改 EAS
if (string.IsNullOrEmpty(task.ItemBarcodeEasType) == false)
{
if (PreSetEAS(task, true, out bool old_eas, out strError) == false)
{
// task.ErrorInfo = $"{strError}\r\n还书操作没有执行,EAS 不需要修正";
task.ErrorInfo = $"{strError}\r\n还书操作失败"; // EAS 不需要额外修正
goto ERROR1;
}
if (old_eas == false)
eas_changed = true;
}
}
string additional = "";
if (this.Container.TestSync == true)
additional = this.Container.GetOperTimeParamString();
else
{
// 不是测试状态也带有 operTime 子参数
// additional = DateTimeUtil.Rfc1123DateTimeStringEx(DateTime.Now);
// 让服务器自己填写时间 2021/8/26
}
if (string.IsNullOrEmpty(additional) == false)
strStyle += ",operTime:" + StringUtil.EscapeString(additional, ",:");
long lRet = 0;
LibraryChannel channel = this.GetChannel();
try
{
#if OLD_CHARGING_CHANNEL
lRet = Channel.Return(
stop,
strAction,
strReaderBarcode,
task.ItemBarcode,
strConfirmItemRecPath,
false,
strStyle, // this.NoBiblioAndItemInfo == false ? "reader,item,biblio" : "reader",
strItemReturnFormats,
out item_records,
strReaderFormatList, // this.Container.PatronRenderFormat + ",xml" + GetPostFix(), // "html",
out reader_records,
strBiblioReturnFormats,
out biblio_records,
out aDupPath,
out strOutputReaderBarcode,
out return_info,
out strError);
#else
lRet = channel.Return(
null,
strAction,
strReaderBarcode,
task.ItemBarcode,
strConfirmItemRecPath,
false,
strStyle, // "reader,item,biblio", //// this.NoBiblioAndItemInfo == false ? "reader,item,biblio" : "reader",
strItemReturnFormats,
out item_records,
strReaderFormatList, // this.Container.PatronRenderFormat + ",xml" + GetPostFix(), // "html",
out reader_records,
strBiblioReturnFormats,
out biblio_records,
out aDupPath,
out strOutputReaderBarcode,
out return_info,
out strError);
#endif
}
finally
{
this.ReturnChannel(channel);
}
if (lRet != 0)
task.ErrorInfo = strError;
// 2021/9/1
if (return_info != null
&& string.IsNullOrEmpty(return_info.Borrower) == false)
this.CurrentReaderBarcode = return_info?.Borrower;
if (eas_changed == true && lRet == -1)
{
if (channel.ErrorCode == ErrorCode.NotBorrowed)
{
Debug.Assert(eas_changed == true, "");
// 此时正好顺便修正了以前此册的 EAS 问题,所以也不需要回滚了
// TODO: 是否需要提示一下操作者?
if (string.IsNullOrEmpty(task.ErrorInfo) == false)
task.ErrorInfo += "; ";
task.ErrorInfo += $"(前置 EAS 修改顺便把以前遗留的 Off 状态修正为 On)";
}
else
{
// Undo 早先的 EAS 修改
if (SetEAS(task, false, out strError) == false)
{
// lRet = -1;
lRet = 1;
if (string.IsNullOrEmpty(task.ErrorInfo) == false)
task.ErrorInfo += "; ";
task.ErrorInfo += $"回滚 EAS 阶段: {strError}";
}
}
}
#if NO
if (return_info != null)
{
strLocation = StringUtil.GetPureLocation(return_info.Location);
}
#endif
times.Add(DateTime.Now);
if (reader_records != null && reader_records.Length > 0)
strReaderRecord = reader_records[0];
// 刷新读者信息
if (this.Container.IsCardMode == true)
{
if (String.IsNullOrEmpty(strReaderRecord) == false)
this.Container.SetReaderCardString(strReaderRecord);
}
else
{
if (String.IsNullOrEmpty(strReaderRecord) == false)
this.Container.SetReaderHtmlString(ReplaceMacro(strReaderRecord));
}
string strItemXml = "";
if ((Program.MainForm.ChargingNeedReturnItemXml == true
|| strAction == "inventory" || strAction == "transfer")
&& item_records != null)
{
Debug.Assert(item_records != null, "");
if (item_records.Length > 0)
{
// xml总是在最后一个
strItemXml = item_records[item_records.Length - 1];
}
}
// 对 return_info.Location 进行观察,看看是否超过要求的范围
if (lRet != -1
&& strAction == "inventory"
&& Container.FilterLocations != null
&& Container.FilterLocations.Count > 0)
{
#if NO
XmlDocument item_dom = new XmlDocument();
try
{
item_dom.LoadXml(strItemXml);
}
catch(Exception ex)
{
strError = "strItemXml 装入 XMLDOM 时出错: " + ex.Message;
goto ERROR1;
}
string strLocation = DomUtil.GetElementText(item_dom.DocumentElement, "location");
#endif
string strLocation = return_info?.Location;
strLocation = StringUtil.GetPureLocation(strLocation);
if (Container.FilterLocations.IndexOf(strLocation) == -1)
{
lRet = 1;
if (string.IsNullOrEmpty(task.ErrorInfo) == false)
task.ErrorInfo += "; ";
task.ErrorInfo += "册记录中的馆藏地 '" + strLocation + "' 不在当前盘点要求的范围 '" + StringUtil.MakePathList(Container.FilterLocations) + "'。请及时处理";
}
}
// 修改 Parameters,增加用于显示的调拨方向
if (lRet != -1
&& strAction == "transfer")
task.Parameters += ",direction:" + return_info?.Location;
if (lRet == -1)
goto ERROR1;
string strReaderSummary = "";
if (reader_records != null && reader_records.Length > 1)
{
if (bName == false)
strReaderSummary = Global.GetReaderSummary(reader_records[1]);
else
strReaderSummary = reader_records[1];
}
#if NO
string strBiblioSummary = "";
if (biblio_records != null && biblio_records.Length > 1)
strBiblioSummary = biblio_records[1];
#endif
task.ReaderName = strReaderSummary;
// task.ItemSummary = strBiblioSummary;
#if NO
this.Container.AsynFillItemSummary(task.ItemBarcode,
strConfirmItemRecPath,
task);
#endif
this.Container.AddItemSummaryTask( // task.ItemBarcode,
string.IsNullOrEmpty(return_info?.ItemBarcode) ? task.ItemBarcode : return_info?.ItemBarcode,
strConfirmItemRecPath,
task);
if (string.IsNullOrEmpty(task.ReaderBarcode) == true)
task.ReaderBarcode = strOutputReaderBarcode;
DateTime end_time = DateTime.Now;
Program.MainForm.OperHistory.ReturnAsync(
this.Container,
strAction, // task.Action == "lost" || task.Action == "verify_lost",
strOutputReaderBarcode, // this.textBox_readerBarcode.Text,
task.ItemBarcode,
strConfirmItemRecPath,
strReaderSummary,
strItemXml,
return_info,
start_time,
end_time);
if (lRet == 2)
{
// 2019/8/28
// 红色状态
task.Color = "red";
}
else if (lRet == 1)
{
// 黄色状态
task.Color = "yellow";
}
else
{
// 绿色状态
task.Color = "green";
}
// this.m_strCurrentBarcode = strBarcode;
task.State = "finish";
// 兑现显示
this.Container.DisplayTask("refresh_and_visible", task);
this.Container.SetColorList();
#if NO
if (stop != null && stop.State != 0)
return true;
return false;
#endif
{
BorrowCompleteEventArgs e1 = new BorrowCompleteEventArgs();
e1.Action = task.Action;
e1.ItemBarcode = task.ItemBarcode;
e1.ReaderBarcode = strOutputReaderBarcode;
this.Container.TriggerBorrowComplete(e1);
}
times.Add(DateTime.Now);
LogOperTime("return", times, strOperText);
return;
ERROR1:
task.State = "error";
task.Color = "red";
// this.Container.SetReaderRenderString(strError);
// 兑现显示
this.Container.DisplayTask("refresh_and_visible", task);
this.Container.SetColorList();
#if NO
if (stop != null && stop.State != 0)
return true;
return false;
#endif
return;
#if NO
}
finally
{
stop.EndLoop();
stop.OnStop -= new StopEventHandler(this.DoStop);
stop.Initial("");
}
#endif
}
public void Close(bool bForce = true)
{
#if OLD_CHARGING_CHANNEL
if (stop != null)
stop.DoStop();
#endif
this.StopThread(bForce);
}
public void Clear()
{
if (this.m_lock.TryEnterWriteLock(m_nLockTimeout) == false) // m_nLockTimeout
throw new LockException("锁定尝试中超时");
try
{
this._tasks.Clear();
}
finally
{
this.m_lock.ExitWriteLock();
}
}
// 清除指定的那些任务
public void ClearTasks(List<ChargingTask> tasks)
{
if (this.m_lock.TryEnterWriteLock(m_nLockTimeout) == false) // m_nLockTimeout
throw new LockException("锁定尝试中超时");
try
{
foreach (ChargingTask task in tasks)
{
this._tasks.Remove(task);
}
}
finally
{
this.m_lock.ExitWriteLock();
}
}
public int Count
{
get
{
if (this.m_lock.TryEnterReadLock(m_nLockTimeout) == false)
throw new LockException("锁定尝试中超时");
try
{
return _tasks.Count;
}
finally
{
this.m_lock.ExitReadLock();
}
}
}
public ChargingTask FindTaskByItemBarcode(string itemBarcode)
{
if (this.m_lock.TryEnterReadLock(m_nLockTimeout) == false) // m_nLockTimeout
throw new LockException("锁定尝试中超时");
try
{
for (int i = _tasks.Count - 1; i >= 0; i--)
{
var task = _tasks[i];
if (task.Action == "load_reader_info")
continue;
if (itemBarcode == task.ItemBarcode)
return task;
}
return null;
}
finally
{
this.m_lock.ExitReadLock();
}
}
#if NO
public bool Stopped
{
get
{
return m_bStopThread;
}
}
void StopThread(bool bForce)
{
// 如果以前在做,立即停止
if (stop != null)
stop.DoStop();
m_bStopThread = true;
this.eventClose.Set();
if (bForce == true)
{
if (this._thread != null)
{
if (!this._thread.Join(2000))
this._thread.Abort();
this._thread = null;
}
}
}
public void BeginThread()
{
// 如果以前在做,立即停止
StopThread(true);
this.eventActive.Set();
this.eventClose.Reset();
this._thread = new Thread(new ThreadStart(this.ThreadMain));
this._thread.Start();
}
void ThreadMain()
{
m_bStopThread = false;
try
{
WaitHandle[] events = new WaitHandle[2];
events[0] = eventClose;
events[1] = eventActive;
while (m_bStopThread == false)
{
int index = 0;
try
{
index = WaitHandle.WaitAny(events, PerTime, false);
}
catch (System.Threading.ThreadAbortException /*ex*/)
{
break;
}
if (index == WaitHandle.WaitTimeout)
{
// 超时
eventActive.Reset();
Worker();
eventActive.Reset();
}
else if (index == 0)
{
break;
}
else
{
// 得到激活信号
eventActive.Reset();
Worker();
eventActive.Reset(); // 2013/11/23 只让堵住的时候发挥作用
}
}
return;
}
finally
{
m_bStopThread = true;
_thread = null;
}
}
public void Activate()
{
eventActive.Set();
}
#endif
// 加入一个任务到列表中
public void AddTask(ChargingTask task)
{
task.Color = "black"; // 表示等待处理
if (this.m_lock.TryEnterWriteLock(500) == false) // m_nLockTimeout
throw new LockException("锁定尝试中超时");
try
{
this._tasks.Add(task);
}
finally
{
this.m_lock.ExitWriteLock();
}
// 触发任务开始执行
this.Activate();
// 兑现显示
this.Container.DisplayTask("add", task);
this.Container.SetColorList();
}
public void RemoveTask(ChargingTask task, bool bLock = true)
{
if (bLock == true)
{
if (this.m_lock.TryEnterWriteLock(m_nLockTimeout) == false)
throw new LockException("锁定尝试中超时");
}
try
{
this._tasks.Remove(task);
}
finally
{
if (bLock == true)
this.m_lock.ExitWriteLock();
}
// 兑现显示
this.Container.DisplayTask("remove", task);
this.Container.SetColorList();
}
}
}
| 31.974585 | 184 | 0.44624 | [
"Apache-2.0"
] | DigitalPlatform/dp2 | dp2Circulation/Charging/ChargingTask.cs | 68,606 | C# |
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
namespace Pulumi.Oci.ApiGateway.Outputs
{
[OutputType]
public sealed class DeploymentSpecificationRequestPoliciesAuthenticationPublicKeys
{
/// <summary>
/// (Updatable) Defines whether or not to uphold SSL verification.
/// </summary>
public readonly bool? IsSslVerifyDisabled;
/// <summary>
/// (Updatable) The set of static public keys.
/// </summary>
public readonly ImmutableArray<Outputs.DeploymentSpecificationRequestPoliciesAuthenticationPublicKeysKey> Keys;
/// <summary>
/// (Updatable) The duration for which the JWKS should be cached before it is fetched again.
/// </summary>
public readonly int? MaxCacheDurationInHours;
/// <summary>
/// (Updatable) Type of the Response Cache Store Policy.
/// </summary>
public readonly string Type;
/// <summary>
/// (Updatable) The uri from which to retrieve the key. It must be accessible without authentication.
/// </summary>
public readonly string? Uri;
[OutputConstructor]
private DeploymentSpecificationRequestPoliciesAuthenticationPublicKeys(
bool? isSslVerifyDisabled,
ImmutableArray<Outputs.DeploymentSpecificationRequestPoliciesAuthenticationPublicKeysKey> keys,
int? maxCacheDurationInHours,
string type,
string? uri)
{
IsSslVerifyDisabled = isSslVerifyDisabled;
Keys = keys;
MaxCacheDurationInHours = maxCacheDurationInHours;
Type = type;
Uri = uri;
}
}
}
| 34.54386 | 119 | 0.652616 | [
"ECL-2.0",
"Apache-2.0"
] | EladGabay/pulumi-oci | sdk/dotnet/ApiGateway/Outputs/DeploymentSpecificationRequestPoliciesAuthenticationPublicKeys.cs | 1,969 | C# |
using System.ComponentModel.DataAnnotations;
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
namespace BE.CQRS.Data.MongoDb.Denormalizations
{
[BsonIgnoreExtraElements]
public sealed class MongoDomainObjectVersion
{
[BsonId] public ObjectId Id { get; set; }
[Required] public string DomainObjectType { get; set; }
[Required] public long Version { get; set; }
}
} | 26.375 | 63 | 0.71564 | [
"MIT"
] | BoasE/BE.CQRS | src/Data/BE.CQRS.Data.MongoDb/Denormalizations/MongoDomainObjectVersion.cs | 422 | C# |
using Microsoft.WindowsAPICodePack.Dialogs;
using System;
using System.Windows;
namespace CommonDialog.WindowsAPICodePack
{
public abstract class CommonFileDialogExecuter<TCommonFileDialogSettings, TCommonDialogSettings>
: Core.ICommonDialogExecuter, Core.ICommonDialogPrecedence
where TCommonDialogSettings : Core.ICommonDialogSettings
where TCommonFileDialogSettings : ICommonFileDialogSettings
{
public bool IsPrecedence(Core.ICommonDialogSettings Settings) => Settings is TCommonFileDialogSettings;
public bool UseDialog(Core.ICommonDialogSettings Settings) => Settings is TCommonDialogSettings;
public bool? ShowDialog(Core.ICommonDialogSettings Settings) => Settings switch
{
TCommonFileDialogSettings s => ShowDialog(s),
TCommonDialogSettings s => ShowDialog(Wrap(s)),
_ => throw new ArgumentException(nameof(Settings) + " is no matches."),
};
protected abstract TCommonFileDialogSettings Wrap(TCommonDialogSettings Settings);
public bool? ShowDialog(TCommonFileDialogSettings Settings)
{
using var Dialog = Create(Settings);
Settings.Result = Execute(Dialog, Settings);
return GetResult(Settings);
}
public abstract CommonFileDialog Create(TCommonFileDialogSettings Settings);
public CommonFileDialogResult Execute(CommonFileDialog Dialog, TCommonFileDialogSettings Settings) => Settings switch
{
{ Window: Window Window } => Dialog.ShowDialog(Window),
{ Window: null, OwnerWindowHandle: IntPtr OwnerWindowHandle } when OwnerWindowHandle != IntPtr.Zero => Dialog.ShowDialog(OwnerWindowHandle),
_ => Dialog.ShowDialog(),
};
public bool? GetResult(TCommonFileDialogSettings Settings) => Settings switch
{
{ Result: CommonFileDialogResult.Ok } => true,
{ Result: CommonFileDialogResult.Cancel } => false,
_ => null,
};
}
}
| 49.380952 | 153 | 0.685149 | [
"MIT"
] | juner/CommonDialog | src/CommonDialog.WindowsAPICodePack/CommonFileDialogExecuter.cs | 2,076 | C# |
namespace InterfaceSegregationIdentityAfter
{
using System.Collections.Generic;
using InterfaceSegregationIdentityAfter.Contracts;
public class AccountManager : IManager
{
public void ChangePassword(string oldPass, string newPass)
{
// change password
}
}
}
| 21.133333 | 66 | 0.678233 | [
"MIT"
] | ciprian-stingu/c-sharp-hw-day5 | SOLID and Other Principles/4. Interface Segregation/2.2. Identity - After/AccountManager.cs | 319 | C# |
//Copyright (C) 2006 Richard J. Northedge
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//This file is based on the DiscourseElement.java source file found in the
//original java implementation of OpenNLP. That source file contains the following header:
//Copyright (C) 2003 Thomas Morton
//
//This library is free software; you can redistribute it and/or
//modify it under the terms of the GNU Lesser General Public
//License as published by the Free Software Foundation; either
//version 2.1 of the License, or (at your option) any later version.
//
//This library is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//GNU Lesser General Public License for more details.
//
//You should have received a copy of the GNU Lesser General Public
//License along with this program; if not, write to the Free Software
//Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
using System;
using System.Text;
using System.Collections.Generic;
namespace OpenNLP.Tools.Coreference
{
/// <summary>
/// Represents an item in which can be put into the discourse model. Object which are
/// to be placed in the discourse model should extend this class.
/// </summary>
/// <seealso cref="OpenNLP.Tools.Coreference.DiscourseModel">
/// </seealso>
public abstract class DiscourseElement
{
private List<Mention.MentionContext> mExtents;
private int mElementId = -1;
private Mention.MentionContext mLastExtent;
/// <summary>
/// An iterator over the mentions which iteratates through them based on which were most recently mentioned.
/// </summary>
public virtual IEnumerable<Mention.MentionContext> RecentMentions
{
get
{
for (int currentMention = mExtents.Count - 1; currentMention >= 0; currentMention--)
{
yield return mExtents[currentMention];
}
}
}
/// <summary>
/// An iterator over the mentions which iteratates through them based on their occurance in the document.
/// </summary>
public virtual IEnumerable<Mention.MentionContext> Mentions
{
get
{
for (int currentMention = 0; currentMention < mExtents.Count; currentMention++)
{
yield return mExtents[currentMention];
}
}
}
/// <summary>
/// The number of mentions in this element.
/// </summary>
public virtual int MentionCount
{
get
{
return mExtents.Count;
}
}
/// <summary>
/// The last mention for this element. For appositives this will be the
/// first part of the appositive.
/// </summary>
public virtual Mention.MentionContext LastExtent
{
get
{
return mLastExtent;
}
}
/// <summary>
/// The id associated with this element.
/// </summary>
public virtual int Id
{
get
{
return mElementId;
}
set
{
mElementId = value;
}
}
/// <summary>
/// Creates a new discourse element which contains the specified mention.
/// </summary>
/// <param name="mention">
/// The mention which begins this discourse element.
/// </param>
protected DiscourseElement(Mention.MentionContext mention)
{
mExtents = new List<Mention.MentionContext>(1);
mLastExtent = mention;
mExtents.Add(mention);
}
/// <summary>
/// Adds the specified mention to this discourse element.
/// </summary>
/// <param name="mention">
/// The mention to be added.
/// </param>
public virtual void AddMention(Mention.MentionContext mention)
{
mExtents.Add(mention);
mLastExtent = mention;
}
public override string ToString()
{
StringBuilder buffer = new StringBuilder();
buffer.Append("[ ").Append(mExtents[0].ToText()); //.append("<").append(ex.getHeadText()).append(">");
for (int currentExtent = 1; currentExtent < mExtents.Count; currentExtent++)
{
buffer.Append(", ").Append(mExtents[currentExtent].ToText());
}
buffer.Append(" ]");
return buffer.ToString();
}
}
} | 32.522293 | 116 | 0.644144 | [
"MIT"
] | AlexPoint/OpenNlp | OpenNLP/Tools/Coreference/DiscourseElement.cs | 5,106 | 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 transfer-2018-11-05.normal.json service model.
*/
using System;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using Amazon.Runtime;
using Amazon.Transfer.Model;
namespace Amazon.Transfer
{
/// <summary>
/// Interface for accessing Transfer
///
/// AWS Transfer Family is a fully managed service that enables the transfer of files
/// over the File Transfer Protocol (FTP), File Transfer Protocol over SSL (FTPS), or
/// Secure Shell (SSH) File Transfer Protocol (SFTP) directly into and out of Amazon Simple
/// Storage Service (Amazon S3). AWS helps you seamlessly migrate your file transfer workflows
/// to AWS Transfer Family by integrating with existing authentication systems, and providing
/// DNS routing with Amazon Route 53 so nothing changes for your customers and partners,
/// or their applications. With your data in Amazon S3, you can use it with AWS services
/// for processing, analytics, machine learning, and archiving. Getting started with AWS
/// Transfer Family is easy since there is no infrastructure to buy and set up.
/// </summary>
public partial interface IAmazonTransfer : IAmazonService, IDisposable
{
#if AWS_ASYNC_ENUMERABLES_API
/// <summary>
/// Paginators for the service
/// </summary>
ITransferPaginatorFactory Paginators { get; }
#endif
#region CreateServer
/// <summary>
/// Instantiates an autoscaling virtual server based on the selected file transfer protocol
/// in AWS. When you make updates to your file transfer protocol-enabled server or when
/// you work with users, use the service-generated <code>ServerId</code> property that
/// is assigned to the newly created server.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateServer 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 CreateServer service method, as returned by Transfer.</returns>
/// <exception cref="Amazon.Transfer.Model.AccessDeniedException">
/// You do not have sufficient access to perform this action.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.InternalServiceErrorException">
/// This exception is thrown when an error occurs in the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.InvalidRequestException">
/// This exception is thrown when the client submits a malformed request.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ResourceExistsException">
/// The requested resource does not exist.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ServiceUnavailableException">
/// The request has failed because the AWS Transfer Family service is not available.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ThrottlingException">
/// The request was denied due to request throttling.
///
///
/// <para>
/// HTTP Status Code: 400
/// </para>
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/CreateServer">REST API Reference for CreateServer Operation</seealso>
Task<CreateServerResponse> CreateServerAsync(CreateServerRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region CreateUser
/// <summary>
/// Creates a user and associates them with an existing file transfer protocol-enabled
/// server. You can only create and associate users with servers that have the <code>IdentityProviderType</code>
/// set to <code>SERVICE_MANAGED</code>. Using parameters for <code>CreateUser</code>,
/// you can specify the user name, set the home directory, store the user's public key,
/// and assign the user's AWS Identity and Access Management (IAM) role. You can also
/// optionally add a scope-down policy, and assign metadata with tags that can be used
/// to group and search for users.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateUser 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 CreateUser service method, as returned by Transfer.</returns>
/// <exception cref="Amazon.Transfer.Model.InternalServiceErrorException">
/// This exception is thrown when an error occurs in the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.InvalidRequestException">
/// This exception is thrown when the client submits a malformed request.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ResourceExistsException">
/// The requested resource does not exist.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ResourceNotFoundException">
/// This exception is thrown when a resource is not found by the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ServiceUnavailableException">
/// The request has failed because the AWS Transfer Family service is not available.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/CreateUser">REST API Reference for CreateUser Operation</seealso>
Task<CreateUserResponse> CreateUserAsync(CreateUserRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DeleteServer
/// <summary>
/// Deletes the file transfer protocol-enabled server that you specify.
///
///
/// <para>
/// No response returns from this operation.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteServer 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 DeleteServer service method, as returned by Transfer.</returns>
/// <exception cref="Amazon.Transfer.Model.AccessDeniedException">
/// You do not have sufficient access to perform this action.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.InternalServiceErrorException">
/// This exception is thrown when an error occurs in the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.InvalidRequestException">
/// This exception is thrown when the client submits a malformed request.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ResourceNotFoundException">
/// This exception is thrown when a resource is not found by the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ServiceUnavailableException">
/// The request has failed because the AWS Transfer Family service is not available.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteServer">REST API Reference for DeleteServer Operation</seealso>
Task<DeleteServerResponse> DeleteServerAsync(DeleteServerRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DeleteSshPublicKey
/// <summary>
/// Deletes a user's Secure Shell (SSH) public key.
///
///
/// <para>
/// No response is returned from this operation.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteSshPublicKey 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 DeleteSshPublicKey service method, as returned by Transfer.</returns>
/// <exception cref="Amazon.Transfer.Model.InternalServiceErrorException">
/// This exception is thrown when an error occurs in the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.InvalidRequestException">
/// This exception is thrown when the client submits a malformed request.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ResourceNotFoundException">
/// This exception is thrown when a resource is not found by the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ServiceUnavailableException">
/// The request has failed because the AWS Transfer Family service is not available.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ThrottlingException">
/// The request was denied due to request throttling.
///
///
/// <para>
/// HTTP Status Code: 400
/// </para>
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteSshPublicKey">REST API Reference for DeleteSshPublicKey Operation</seealso>
Task<DeleteSshPublicKeyResponse> DeleteSshPublicKeyAsync(DeleteSshPublicKeyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DeleteUser
/// <summary>
/// Deletes the user belonging to a file transfer protocol-enabled server you specify.
///
///
/// <para>
/// No response returns from this operation.
/// </para>
/// <note>
/// <para>
/// When you delete a user from a server, the user's information is lost.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteUser 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 DeleteUser service method, as returned by Transfer.</returns>
/// <exception cref="Amazon.Transfer.Model.InternalServiceErrorException">
/// This exception is thrown when an error occurs in the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.InvalidRequestException">
/// This exception is thrown when the client submits a malformed request.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ResourceNotFoundException">
/// This exception is thrown when a resource is not found by the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ServiceUnavailableException">
/// The request has failed because the AWS Transfer Family service is not available.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteUser">REST API Reference for DeleteUser Operation</seealso>
Task<DeleteUserResponse> DeleteUserAsync(DeleteUserRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DescribeSecurityPolicy
/// <summary>
/// Describes the security policy that is attached to your file transfer protocol-enabled
/// server. The response contains a description of the security policy's properties. For
/// more information about security policies, see <a href="https://docs.aws.amazon.com/transfer/latest/userguide/security-policies.html">Working
/// with security policies</a>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeSecurityPolicy 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 DescribeSecurityPolicy service method, as returned by Transfer.</returns>
/// <exception cref="Amazon.Transfer.Model.InternalServiceErrorException">
/// This exception is thrown when an error occurs in the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.InvalidRequestException">
/// This exception is thrown when the client submits a malformed request.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ResourceNotFoundException">
/// This exception is thrown when a resource is not found by the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ServiceUnavailableException">
/// The request has failed because the AWS Transfer Family service is not available.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DescribeSecurityPolicy">REST API Reference for DescribeSecurityPolicy Operation</seealso>
Task<DescribeSecurityPolicyResponse> DescribeSecurityPolicyAsync(DescribeSecurityPolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DescribeServer
/// <summary>
/// Describes a file transfer protocol-enabled server that you specify by passing the
/// <code>ServerId</code> parameter.
///
///
/// <para>
/// The response contains a description of a server's properties. When you set <code>EndpointType</code>
/// to VPC, the response will contain the <code>EndpointDetails</code>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeServer 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 DescribeServer service method, as returned by Transfer.</returns>
/// <exception cref="Amazon.Transfer.Model.InternalServiceErrorException">
/// This exception is thrown when an error occurs in the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.InvalidRequestException">
/// This exception is thrown when the client submits a malformed request.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ResourceNotFoundException">
/// This exception is thrown when a resource is not found by the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ServiceUnavailableException">
/// The request has failed because the AWS Transfer Family service is not available.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DescribeServer">REST API Reference for DescribeServer Operation</seealso>
Task<DescribeServerResponse> DescribeServerAsync(DescribeServerRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DescribeUser
/// <summary>
/// Describes the user assigned to the specific file transfer protocol-enabled server,
/// as identified by its <code>ServerId</code> property.
///
///
/// <para>
/// The response from this call returns the properties of the user associated with the
/// <code>ServerId</code> value that was specified.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeUser 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 DescribeUser service method, as returned by Transfer.</returns>
/// <exception cref="Amazon.Transfer.Model.InternalServiceErrorException">
/// This exception is thrown when an error occurs in the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.InvalidRequestException">
/// This exception is thrown when the client submits a malformed request.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ResourceNotFoundException">
/// This exception is thrown when a resource is not found by the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ServiceUnavailableException">
/// The request has failed because the AWS Transfer Family service is not available.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DescribeUser">REST API Reference for DescribeUser Operation</seealso>
Task<DescribeUserResponse> DescribeUserAsync(DescribeUserRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region ImportSshPublicKey
/// <summary>
/// Adds a Secure Shell (SSH) public key to a user account identified by a <code>UserName</code>
/// value assigned to the specific file transfer protocol-enabled server, identified by
/// <code>ServerId</code>.
///
///
/// <para>
/// The response returns the <code>UserName</code> value, the <code>ServerId</code> value,
/// and the name of the <code>SshPublicKeyId</code>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ImportSshPublicKey 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 ImportSshPublicKey service method, as returned by Transfer.</returns>
/// <exception cref="Amazon.Transfer.Model.InternalServiceErrorException">
/// This exception is thrown when an error occurs in the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.InvalidRequestException">
/// This exception is thrown when the client submits a malformed request.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ResourceExistsException">
/// The requested resource does not exist.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ResourceNotFoundException">
/// This exception is thrown when a resource is not found by the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ServiceUnavailableException">
/// The request has failed because the AWS Transfer Family service is not available.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ThrottlingException">
/// The request was denied due to request throttling.
///
///
/// <para>
/// HTTP Status Code: 400
/// </para>
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ImportSshPublicKey">REST API Reference for ImportSshPublicKey Operation</seealso>
Task<ImportSshPublicKeyResponse> ImportSshPublicKeyAsync(ImportSshPublicKeyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region ListSecurityPolicies
/// <summary>
/// Lists the security policies that are attached to your file transfer protocol-enabled
/// servers.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListSecurityPolicies 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 ListSecurityPolicies service method, as returned by Transfer.</returns>
/// <exception cref="Amazon.Transfer.Model.InternalServiceErrorException">
/// This exception is thrown when an error occurs in the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.InvalidNextTokenException">
/// The <code>NextToken</code> parameter that was passed is invalid.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.InvalidRequestException">
/// This exception is thrown when the client submits a malformed request.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ServiceUnavailableException">
/// The request has failed because the AWS Transfer Family service is not available.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListSecurityPolicies">REST API Reference for ListSecurityPolicies Operation</seealso>
Task<ListSecurityPoliciesResponse> ListSecurityPoliciesAsync(ListSecurityPoliciesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region ListServers
/// <summary>
/// Lists the file transfer protocol-enabled servers that are associated with your AWS
/// account.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListServers 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 ListServers service method, as returned by Transfer.</returns>
/// <exception cref="Amazon.Transfer.Model.InternalServiceErrorException">
/// This exception is thrown when an error occurs in the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.InvalidNextTokenException">
/// The <code>NextToken</code> parameter that was passed is invalid.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.InvalidRequestException">
/// This exception is thrown when the client submits a malformed request.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ServiceUnavailableException">
/// The request has failed because the AWS Transfer Family service is not available.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListServers">REST API Reference for ListServers Operation</seealso>
Task<ListServersResponse> ListServersAsync(ListServersRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region ListTagsForResource
/// <summary>
/// Lists all of the tags associated with the Amazon Resource Number (ARN) you specify.
/// The resource can be a user, server, or role.
/// </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 Transfer.</returns>
/// <exception cref="Amazon.Transfer.Model.InternalServiceErrorException">
/// This exception is thrown when an error occurs in the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.InvalidNextTokenException">
/// The <code>NextToken</code> parameter that was passed is invalid.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.InvalidRequestException">
/// This exception is thrown when the client submits a malformed request.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ServiceUnavailableException">
/// The request has failed because the AWS Transfer Family service is not available.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListTagsForResource">REST API Reference for ListTagsForResource Operation</seealso>
Task<ListTagsForResourceResponse> ListTagsForResourceAsync(ListTagsForResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region ListUsers
/// <summary>
/// Lists the users for a file transfer protocol-enabled server that you specify by passing
/// the <code>ServerId</code> parameter.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListUsers 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 ListUsers service method, as returned by Transfer.</returns>
/// <exception cref="Amazon.Transfer.Model.InternalServiceErrorException">
/// This exception is thrown when an error occurs in the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.InvalidNextTokenException">
/// The <code>NextToken</code> parameter that was passed is invalid.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.InvalidRequestException">
/// This exception is thrown when the client submits a malformed request.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ResourceNotFoundException">
/// This exception is thrown when a resource is not found by the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ServiceUnavailableException">
/// The request has failed because the AWS Transfer Family service is not available.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListUsers">REST API Reference for ListUsers Operation</seealso>
Task<ListUsersResponse> ListUsersAsync(ListUsersRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region StartServer
/// <summary>
/// Changes the state of a file transfer protocol-enabled server from <code>OFFLINE</code>
/// to <code>ONLINE</code>. It has no impact on a server that is already <code>ONLINE</code>.
/// An <code>ONLINE</code> server can accept and process file transfer jobs.
///
///
/// <para>
/// The state of <code>STARTING</code> indicates that the server is in an intermediate
/// state, either not fully able to respond, or not fully online. The values of <code>START_FAILED</code>
/// can indicate an error condition.
/// </para>
///
/// <para>
/// No response is returned from this call.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartServer 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 StartServer service method, as returned by Transfer.</returns>
/// <exception cref="Amazon.Transfer.Model.InternalServiceErrorException">
/// This exception is thrown when an error occurs in the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.InvalidRequestException">
/// This exception is thrown when the client submits a malformed request.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ResourceNotFoundException">
/// This exception is thrown when a resource is not found by the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ServiceUnavailableException">
/// The request has failed because the AWS Transfer Family service is not available.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ThrottlingException">
/// The request was denied due to request throttling.
///
///
/// <para>
/// HTTP Status Code: 400
/// </para>
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/StartServer">REST API Reference for StartServer Operation</seealso>
Task<StartServerResponse> StartServerAsync(StartServerRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region StopServer
/// <summary>
/// Changes the state of a file transfer protocol-enabled server from <code>ONLINE</code>
/// to <code>OFFLINE</code>. An <code>OFFLINE</code> server cannot accept and process
/// file transfer jobs. Information tied to your server, such as server and user properties,
/// are not affected by stopping your server.
///
/// <note>
/// <para>
/// Stopping the server will not reduce or impact your file transfer protocol endpoint
/// billing; you must delete the server to stop being billed.
/// </para>
/// </note>
/// <para>
/// The state of <code>STOPPING</code> indicates that the server is in an intermediate
/// state, either not fully able to respond, or not fully offline. The values of <code>STOP_FAILED</code>
/// can indicate an error condition.
/// </para>
///
/// <para>
/// No response is returned from this call.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopServer 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 StopServer service method, as returned by Transfer.</returns>
/// <exception cref="Amazon.Transfer.Model.InternalServiceErrorException">
/// This exception is thrown when an error occurs in the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.InvalidRequestException">
/// This exception is thrown when the client submits a malformed request.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ResourceNotFoundException">
/// This exception is thrown when a resource is not found by the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ServiceUnavailableException">
/// The request has failed because the AWS Transfer Family service is not available.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ThrottlingException">
/// The request was denied due to request throttling.
///
///
/// <para>
/// HTTP Status Code: 400
/// </para>
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/StopServer">REST API Reference for StopServer Operation</seealso>
Task<StopServerResponse> StopServerAsync(StopServerRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region TagResource
/// <summary>
/// Attaches a key-value pair to a resource, as identified by its Amazon Resource Name
/// (ARN). Resources are users, servers, roles, and other entities.
///
///
/// <para>
/// There is no response returned from this call.
/// </para>
/// </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 Transfer.</returns>
/// <exception cref="Amazon.Transfer.Model.InternalServiceErrorException">
/// This exception is thrown when an error occurs in the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.InvalidRequestException">
/// This exception is thrown when the client submits a malformed request.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ResourceNotFoundException">
/// This exception is thrown when a resource is not found by the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ServiceUnavailableException">
/// The request has failed because the AWS Transfer Family service is not available.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/TagResource">REST API Reference for TagResource Operation</seealso>
Task<TagResourceResponse> TagResourceAsync(TagResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region TestIdentityProvider
/// <summary>
/// If the <code>IdentityProviderType</code> of a file transfer protocol-enabled server
/// is <code>API_Gateway</code>, tests whether your API Gateway is set up successfully.
/// We highly recommend that you call this operation to test your authentication method
/// as soon as you create your server. By doing so, you can troubleshoot issues with the
/// API Gateway integration to ensure that your users can successfully use the service.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the TestIdentityProvider 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 TestIdentityProvider service method, as returned by Transfer.</returns>
/// <exception cref="Amazon.Transfer.Model.InternalServiceErrorException">
/// This exception is thrown when an error occurs in the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.InvalidRequestException">
/// This exception is thrown when the client submits a malformed request.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ResourceNotFoundException">
/// This exception is thrown when a resource is not found by the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ServiceUnavailableException">
/// The request has failed because the AWS Transfer Family service is not available.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/TestIdentityProvider">REST API Reference for TestIdentityProvider Operation</seealso>
Task<TestIdentityProviderResponse> TestIdentityProviderAsync(TestIdentityProviderRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region UntagResource
/// <summary>
/// Detaches a key-value pair from a resource, as identified by its Amazon Resource Name
/// (ARN). Resources are users, servers, roles, and other entities.
///
///
/// <para>
/// No response is returned from this call.
/// </para>
/// </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 Transfer.</returns>
/// <exception cref="Amazon.Transfer.Model.InternalServiceErrorException">
/// This exception is thrown when an error occurs in the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.InvalidRequestException">
/// This exception is thrown when the client submits a malformed request.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ResourceNotFoundException">
/// This exception is thrown when a resource is not found by the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ServiceUnavailableException">
/// The request has failed because the AWS Transfer Family service is not available.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UntagResource">REST API Reference for UntagResource Operation</seealso>
Task<UntagResourceResponse> UntagResourceAsync(UntagResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region UpdateServer
/// <summary>
/// Updates the file transfer protocol-enabled server's properties after that server has
/// been created.
///
///
/// <para>
/// The <code>UpdateServer</code> call returns the <code>ServerId</code> of the server
/// you updated.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateServer 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 UpdateServer service method, as returned by Transfer.</returns>
/// <exception cref="Amazon.Transfer.Model.AccessDeniedException">
/// You do not have sufficient access to perform this action.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ConflictException">
/// This exception is thrown when the <code>UpdatServer</code> is called for a file transfer
/// protocol-enabled server that has VPC as the endpoint type and the server's <code>VpcEndpointID</code>
/// is not in the available state.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.InternalServiceErrorException">
/// This exception is thrown when an error occurs in the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.InvalidRequestException">
/// This exception is thrown when the client submits a malformed request.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ResourceExistsException">
/// The requested resource does not exist.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ResourceNotFoundException">
/// This exception is thrown when a resource is not found by the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ServiceUnavailableException">
/// The request has failed because the AWS Transfer Family service is not available.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ThrottlingException">
/// The request was denied due to request throttling.
///
///
/// <para>
/// HTTP Status Code: 400
/// </para>
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UpdateServer">REST API Reference for UpdateServer Operation</seealso>
Task<UpdateServerResponse> UpdateServerAsync(UpdateServerRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region UpdateUser
/// <summary>
/// Assigns new properties to a user. Parameters you pass modify any or all of the following:
/// the home directory, role, and policy for the <code>UserName</code> and <code>ServerId</code>
/// you specify.
///
///
/// <para>
/// The response returns the <code>ServerId</code> and the <code>UserName</code> for the
/// updated user.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateUser 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 UpdateUser service method, as returned by Transfer.</returns>
/// <exception cref="Amazon.Transfer.Model.InternalServiceErrorException">
/// This exception is thrown when an error occurs in the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.InvalidRequestException">
/// This exception is thrown when the client submits a malformed request.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ResourceNotFoundException">
/// This exception is thrown when a resource is not found by the AWS Transfer Family service.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ServiceUnavailableException">
/// The request has failed because the AWS Transfer Family service is not available.
/// </exception>
/// <exception cref="Amazon.Transfer.Model.ThrottlingException">
/// The request was denied due to request throttling.
///
///
/// <para>
/// HTTP Status Code: 400
/// </para>
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UpdateUser">REST API Reference for UpdateUser Operation</seealso>
Task<UpdateUserResponse> UpdateUserAsync(UpdateUserRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
}
} | 53.77713 | 195 | 0.65602 | [
"Apache-2.0"
] | KenHundley/aws-sdk-net | sdk/src/Services/Transfer/Generated/_netstandard/IAmazonTransfer.cs | 46,087 | C# |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
using System.Text;
using Silk.NET.Core;
using Silk.NET.Core.Native;
using Silk.NET.Core.Attributes;
using Silk.NET.Core.Contexts;
using Silk.NET.Core.Loader;
#pragma warning disable 1591
namespace Silk.NET.Direct3D12
{
[Guid("9d5e227a-4430-4161-88b3-3eca6bb16e19")]
[NativeName("Name", "ID3D12Resource1")]
public unsafe partial struct ID3D12Resource1
{
public static readonly Guid Guid = new("9d5e227a-4430-4161-88b3-3eca6bb16e19");
public static implicit operator ID3D12Resource(ID3D12Resource1 val)
=> Unsafe.As<ID3D12Resource1, ID3D12Resource>(ref val);
public static implicit operator ID3D12Pageable(ID3D12Resource1 val)
=> Unsafe.As<ID3D12Resource1, ID3D12Pageable>(ref val);
public static implicit operator ID3D12DeviceChild(ID3D12Resource1 val)
=> Unsafe.As<ID3D12Resource1, ID3D12DeviceChild>(ref val);
public static implicit operator ID3D12Object(ID3D12Resource1 val)
=> Unsafe.As<ID3D12Resource1, ID3D12Object>(ref val);
public static implicit operator Silk.NET.Core.Native.IUnknown(ID3D12Resource1 val)
=> Unsafe.As<ID3D12Resource1, Silk.NET.Core.Native.IUnknown>(ref val);
public ID3D12Resource1
(
void** lpVtbl = null
) : this()
{
if (lpVtbl is not null)
{
LpVtbl = lpVtbl;
}
}
[NativeName("Type", "")]
[NativeName("Type.Name", "")]
[NativeName("Name", "lpVtbl")]
public void** LpVtbl;
/// <summary>To be documented.</summary>
public readonly unsafe int QueryInterface(Guid* riid, void** ppvObject)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, Guid*, void**, int>)LpVtbl[0])(@this, riid, ppvObject);
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int QueryInterface(Guid* riid, ref void* ppvObject)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
fixed (void** ppvObjectPtr = &ppvObject)
{
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, Guid*, void**, int>)LpVtbl[0])(@this, riid, ppvObjectPtr);
}
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int QueryInterface(ref Guid riid, void** ppvObject)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
fixed (Guid* riidPtr = &riid)
{
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, Guid*, void**, int>)LpVtbl[0])(@this, riidPtr, ppvObject);
}
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int QueryInterface(ref Guid riid, ref void* ppvObject)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
fixed (Guid* riidPtr = &riid)
{
fixed (void** ppvObjectPtr = &ppvObject)
{
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, Guid*, void**, int>)LpVtbl[0])(@this, riidPtr, ppvObjectPtr);
}
}
return ret;
}
/// <summary>To be documented.</summary>
public readonly uint AddRef()
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
uint ret = default;
ret = ((delegate* unmanaged[Stdcall]<ID3D12Resource1*, uint>)LpVtbl[1])(@this);
return ret;
}
/// <summary>To be documented.</summary>
public readonly uint Release()
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
uint ret = default;
ret = ((delegate* unmanaged[Stdcall]<ID3D12Resource1*, uint>)LpVtbl[2])(@this);
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int GetPrivateData(Guid* guid, uint* pDataSize, void* pData)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, Guid*, uint*, void*, int>)LpVtbl[3])(@this, guid, pDataSize, pData);
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int GetPrivateData<T0>(Guid* guid, uint* pDataSize, ref T0 pData) where T0 : unmanaged
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
fixed (void* pDataPtr = &pData)
{
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, Guid*, uint*, void*, int>)LpVtbl[3])(@this, guid, pDataSize, pDataPtr);
}
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int GetPrivateData(Guid* guid, ref uint pDataSize, void* pData)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
fixed (uint* pDataSizePtr = &pDataSize)
{
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, Guid*, uint*, void*, int>)LpVtbl[3])(@this, guid, pDataSizePtr, pData);
}
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int GetPrivateData<T0>(Guid* guid, ref uint pDataSize, ref T0 pData) where T0 : unmanaged
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
fixed (uint* pDataSizePtr = &pDataSize)
{
fixed (void* pDataPtr = &pData)
{
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, Guid*, uint*, void*, int>)LpVtbl[3])(@this, guid, pDataSizePtr, pDataPtr);
}
}
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int GetPrivateData(ref Guid guid, uint* pDataSize, void* pData)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
fixed (Guid* guidPtr = &guid)
{
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, Guid*, uint*, void*, int>)LpVtbl[3])(@this, guidPtr, pDataSize, pData);
}
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int GetPrivateData<T0>(ref Guid guid, uint* pDataSize, ref T0 pData) where T0 : unmanaged
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
fixed (Guid* guidPtr = &guid)
{
fixed (void* pDataPtr = &pData)
{
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, Guid*, uint*, void*, int>)LpVtbl[3])(@this, guidPtr, pDataSize, pDataPtr);
}
}
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int GetPrivateData(ref Guid guid, ref uint pDataSize, void* pData)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
fixed (Guid* guidPtr = &guid)
{
fixed (uint* pDataSizePtr = &pDataSize)
{
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, Guid*, uint*, void*, int>)LpVtbl[3])(@this, guidPtr, pDataSizePtr, pData);
}
}
return ret;
}
/// <summary>To be documented.</summary>
public readonly int GetPrivateData<T0>(ref Guid guid, ref uint pDataSize, ref T0 pData) where T0 : unmanaged
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
fixed (Guid* guidPtr = &guid)
{
fixed (uint* pDataSizePtr = &pDataSize)
{
fixed (void* pDataPtr = &pData)
{
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, Guid*, uint*, void*, int>)LpVtbl[3])(@this, guidPtr, pDataSizePtr, pDataPtr);
}
}
}
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int SetPrivateData(Guid* guid, uint DataSize, void* pData)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, Guid*, uint, void*, int>)LpVtbl[4])(@this, guid, DataSize, pData);
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int SetPrivateData<T0>(Guid* guid, uint DataSize, ref T0 pData) where T0 : unmanaged
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
fixed (void* pDataPtr = &pData)
{
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, Guid*, uint, void*, int>)LpVtbl[4])(@this, guid, DataSize, pDataPtr);
}
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int SetPrivateData(ref Guid guid, uint DataSize, void* pData)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
fixed (Guid* guidPtr = &guid)
{
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, Guid*, uint, void*, int>)LpVtbl[4])(@this, guidPtr, DataSize, pData);
}
return ret;
}
/// <summary>To be documented.</summary>
public readonly int SetPrivateData<T0>(ref Guid guid, uint DataSize, ref T0 pData) where T0 : unmanaged
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
fixed (Guid* guidPtr = &guid)
{
fixed (void* pDataPtr = &pData)
{
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, Guid*, uint, void*, int>)LpVtbl[4])(@this, guidPtr, DataSize, pDataPtr);
}
}
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int SetPrivateDataInterface(Guid* guid, [Flow(FlowDirection.In)] Silk.NET.Core.Native.IUnknown* pData)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, Guid*, Silk.NET.Core.Native.IUnknown*, int>)LpVtbl[5])(@this, guid, pData);
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int SetPrivateDataInterface(Guid* guid, [Flow(FlowDirection.In)] in Silk.NET.Core.Native.IUnknown pData)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
fixed (Silk.NET.Core.Native.IUnknown* pDataPtr = &pData)
{
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, Guid*, Silk.NET.Core.Native.IUnknown*, int>)LpVtbl[5])(@this, guid, pDataPtr);
}
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int SetPrivateDataInterface(ref Guid guid, [Flow(FlowDirection.In)] Silk.NET.Core.Native.IUnknown* pData)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
fixed (Guid* guidPtr = &guid)
{
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, Guid*, Silk.NET.Core.Native.IUnknown*, int>)LpVtbl[5])(@this, guidPtr, pData);
}
return ret;
}
/// <summary>To be documented.</summary>
public readonly int SetPrivateDataInterface(ref Guid guid, [Flow(FlowDirection.In)] in Silk.NET.Core.Native.IUnknown pData)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
fixed (Guid* guidPtr = &guid)
{
fixed (Silk.NET.Core.Native.IUnknown* pDataPtr = &pData)
{
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, Guid*, Silk.NET.Core.Native.IUnknown*, int>)LpVtbl[5])(@this, guidPtr, pDataPtr);
}
}
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int SetName(char* Name)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, char*, int>)LpVtbl[6])(@this, Name);
return ret;
}
/// <summary>To be documented.</summary>
public readonly int SetName(ref char Name)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
fixed (char* NamePtr = &Name)
{
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, char*, int>)LpVtbl[6])(@this, NamePtr);
}
return ret;
}
/// <summary>To be documented.</summary>
public readonly int SetName([UnmanagedType(Silk.NET.Core.Native.UnmanagedType.LPWStr)] string Name)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
var NamePtr = (byte*) SilkMarshal.StringToPtr(Name, NativeStringEncoding.LPWStr);
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, byte*, int>)LpVtbl[6])(@this, NamePtr);
SilkMarshal.Free((nint)NamePtr);
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int GetDevice(Guid* riid, void** ppvDevice)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, Guid*, void**, int>)LpVtbl[7])(@this, riid, ppvDevice);
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int GetDevice(Guid* riid, ref void* ppvDevice)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
fixed (void** ppvDevicePtr = &ppvDevice)
{
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, Guid*, void**, int>)LpVtbl[7])(@this, riid, ppvDevicePtr);
}
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int GetDevice(ref Guid riid, void** ppvDevice)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
fixed (Guid* riidPtr = &riid)
{
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, Guid*, void**, int>)LpVtbl[7])(@this, riidPtr, ppvDevice);
}
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int GetDevice(ref Guid riid, ref void* ppvDevice)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
fixed (Guid* riidPtr = &riid)
{
fixed (void** ppvDevicePtr = &ppvDevice)
{
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, Guid*, void**, int>)LpVtbl[7])(@this, riidPtr, ppvDevicePtr);
}
}
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int Map(uint Subresource, Range* pReadRange, void** ppData)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, uint, Range*, void**, int>)LpVtbl[8])(@this, Subresource, pReadRange, ppData);
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int Map(uint Subresource, Range* pReadRange, ref void* ppData)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
fixed (void** ppDataPtr = &ppData)
{
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, uint, Range*, void**, int>)LpVtbl[8])(@this, Subresource, pReadRange, ppDataPtr);
}
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int Map(uint Subresource, ref Range pReadRange, void** ppData)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
fixed (Range* pReadRangePtr = &pReadRange)
{
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, uint, Range*, void**, int>)LpVtbl[8])(@this, Subresource, pReadRangePtr, ppData);
}
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int Map(uint Subresource, ref Range pReadRange, ref void* ppData)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
fixed (Range* pReadRangePtr = &pReadRange)
{
fixed (void** ppDataPtr = &ppData)
{
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, uint, Range*, void**, int>)LpVtbl[8])(@this, Subresource, pReadRangePtr, ppDataPtr);
}
}
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe void Unmap(uint Subresource, Range* pWrittenRange)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
((delegate* unmanaged[Cdecl]<ID3D12Resource1*, uint, Range*, void>)LpVtbl[9])(@this, Subresource, pWrittenRange);
}
/// <summary>To be documented.</summary>
public readonly void Unmap(uint Subresource, ref Range pWrittenRange)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
fixed (Range* pWrittenRangePtr = &pWrittenRange)
{
((delegate* unmanaged[Cdecl]<ID3D12Resource1*, uint, Range*, void>)LpVtbl[9])(@this, Subresource, pWrittenRangePtr);
}
}
/// <summary>To be documented.</summary>
public readonly ResourceDesc GetDesc()
{
ResourceDesc silkDotNetReturnFixupResult;
var pSilkDotNetReturnFixupResult = &silkDotNetReturnFixupResult;
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
ResourceDesc* ret = default;
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, ResourceDesc*, ResourceDesc*>)LpVtbl[10])(@this, pSilkDotNetReturnFixupResult);
return *ret;
}
/// <summary>To be documented.</summary>
public readonly ulong GetGPUVirtualAddress()
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
ulong ret = default;
ret = ((delegate* unmanaged[Stdcall]<ID3D12Resource1*, ulong>)LpVtbl[11])(@this);
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int WriteToSubresource(uint DstSubresource, Box* pDstBox, void* pSrcData, uint SrcRowPitch, uint SrcDepthPitch)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, uint, Box*, void*, uint, uint, int>)LpVtbl[12])(@this, DstSubresource, pDstBox, pSrcData, SrcRowPitch, SrcDepthPitch);
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int WriteToSubresource<T0>(uint DstSubresource, Box* pDstBox, ref T0 pSrcData, uint SrcRowPitch, uint SrcDepthPitch) where T0 : unmanaged
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
fixed (void* pSrcDataPtr = &pSrcData)
{
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, uint, Box*, void*, uint, uint, int>)LpVtbl[12])(@this, DstSubresource, pDstBox, pSrcDataPtr, SrcRowPitch, SrcDepthPitch);
}
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int WriteToSubresource(uint DstSubresource, ref Box pDstBox, void* pSrcData, uint SrcRowPitch, uint SrcDepthPitch)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
fixed (Box* pDstBoxPtr = &pDstBox)
{
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, uint, Box*, void*, uint, uint, int>)LpVtbl[12])(@this, DstSubresource, pDstBoxPtr, pSrcData, SrcRowPitch, SrcDepthPitch);
}
return ret;
}
/// <summary>To be documented.</summary>
public readonly int WriteToSubresource<T0>(uint DstSubresource, ref Box pDstBox, ref T0 pSrcData, uint SrcRowPitch, uint SrcDepthPitch) where T0 : unmanaged
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
fixed (Box* pDstBoxPtr = &pDstBox)
{
fixed (void* pSrcDataPtr = &pSrcData)
{
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, uint, Box*, void*, uint, uint, int>)LpVtbl[12])(@this, DstSubresource, pDstBoxPtr, pSrcDataPtr, SrcRowPitch, SrcDepthPitch);
}
}
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int ReadFromSubresource(void* pDstData, uint DstRowPitch, uint DstDepthPitch, uint SrcSubresource, Box* pSrcBox)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, void*, uint, uint, uint, Box*, int>)LpVtbl[13])(@this, pDstData, DstRowPitch, DstDepthPitch, SrcSubresource, pSrcBox);
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int ReadFromSubresource(void* pDstData, uint DstRowPitch, uint DstDepthPitch, uint SrcSubresource, ref Box pSrcBox)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
fixed (Box* pSrcBoxPtr = &pSrcBox)
{
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, void*, uint, uint, uint, Box*, int>)LpVtbl[13])(@this, pDstData, DstRowPitch, DstDepthPitch, SrcSubresource, pSrcBoxPtr);
}
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int ReadFromSubresource<T0>(ref T0 pDstData, uint DstRowPitch, uint DstDepthPitch, uint SrcSubresource, Box* pSrcBox) where T0 : unmanaged
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
fixed (void* pDstDataPtr = &pDstData)
{
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, void*, uint, uint, uint, Box*, int>)LpVtbl[13])(@this, pDstDataPtr, DstRowPitch, DstDepthPitch, SrcSubresource, pSrcBox);
}
return ret;
}
/// <summary>To be documented.</summary>
public readonly int ReadFromSubresource<T0>(ref T0 pDstData, uint DstRowPitch, uint DstDepthPitch, uint SrcSubresource, ref Box pSrcBox) where T0 : unmanaged
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
fixed (void* pDstDataPtr = &pDstData)
{
fixed (Box* pSrcBoxPtr = &pSrcBox)
{
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, void*, uint, uint, uint, Box*, int>)LpVtbl[13])(@this, pDstDataPtr, DstRowPitch, DstDepthPitch, SrcSubresource, pSrcBoxPtr);
}
}
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int GetHeapProperties(HeapProperties* pHeapProperties, HeapFlags* pHeapFlags)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, HeapProperties*, HeapFlags*, int>)LpVtbl[14])(@this, pHeapProperties, pHeapFlags);
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int GetHeapProperties(HeapProperties* pHeapProperties, ref HeapFlags pHeapFlags)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
fixed (HeapFlags* pHeapFlagsPtr = &pHeapFlags)
{
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, HeapProperties*, HeapFlags*, int>)LpVtbl[14])(@this, pHeapProperties, pHeapFlagsPtr);
}
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int GetHeapProperties(ref HeapProperties pHeapProperties, HeapFlags* pHeapFlags)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
fixed (HeapProperties* pHeapPropertiesPtr = &pHeapProperties)
{
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, HeapProperties*, HeapFlags*, int>)LpVtbl[14])(@this, pHeapPropertiesPtr, pHeapFlags);
}
return ret;
}
/// <summary>To be documented.</summary>
public readonly int GetHeapProperties(ref HeapProperties pHeapProperties, ref HeapFlags pHeapFlags)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
fixed (HeapProperties* pHeapPropertiesPtr = &pHeapProperties)
{
fixed (HeapFlags* pHeapFlagsPtr = &pHeapFlags)
{
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, HeapProperties*, HeapFlags*, int>)LpVtbl[14])(@this, pHeapPropertiesPtr, pHeapFlagsPtr);
}
}
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int GetProtectedResourceSession(Guid* riid, void** ppProtectedSession)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, Guid*, void**, int>)LpVtbl[15])(@this, riid, ppProtectedSession);
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int GetProtectedResourceSession(Guid* riid, ref void* ppProtectedSession)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
fixed (void** ppProtectedSessionPtr = &ppProtectedSession)
{
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, Guid*, void**, int>)LpVtbl[15])(@this, riid, ppProtectedSessionPtr);
}
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int GetProtectedResourceSession(ref Guid riid, void** ppProtectedSession)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
fixed (Guid* riidPtr = &riid)
{
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, Guid*, void**, int>)LpVtbl[15])(@this, riidPtr, ppProtectedSession);
}
return ret;
}
/// <summary>To be documented.</summary>
public readonly unsafe int GetProtectedResourceSession(ref Guid riid, ref void* ppProtectedSession)
{
var @this = (ID3D12Resource1*) Unsafe.AsPointer(ref Unsafe.AsRef(in this));
int ret = default;
fixed (Guid* riidPtr = &riid)
{
fixed (void** ppProtectedSessionPtr = &ppProtectedSession)
{
ret = ((delegate* unmanaged[Cdecl]<ID3D12Resource1*, Guid*, void**, int>)LpVtbl[15])(@this, riidPtr, ppProtectedSessionPtr);
}
}
return ret;
}
}
}
| 44.50073 | 197 | 0.573861 | [
"MIT"
] | Zellcore/Silk.NET | src/Microsoft/Silk.NET.Direct3D12/Structs/ID3D12Resource1.gen.cs | 30,483 | C# |
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using Microsoft.Azure.WebJobs.Logging;
using Microsoft.Azure.WebJobs.Script.Diagnostics;
using Microsoft.Azure.WebJobs.Script.Diagnostics.Extensions;
using Microsoft.Azure.WebJobs.Script.Workers.Rpc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace Microsoft.Azure.WebJobs.Script.Configuration
{
public class HostJsonFileConfigurationSource : IConfigurationSource
{
private readonly ILogger _logger;
private readonly IMetricsLogger _metricsLogger;
public HostJsonFileConfigurationSource(ScriptApplicationHostOptions applicationHostOptions, IEnvironment environment, ILoggerFactory loggerFactory, IMetricsLogger metricsLogger)
{
if (loggerFactory == null)
{
throw new ArgumentNullException(nameof(loggerFactory));
}
HostOptions = applicationHostOptions;
Environment = environment;
_metricsLogger = metricsLogger;
_logger = loggerFactory.CreateLogger(LogCategories.Startup);
}
public ScriptApplicationHostOptions HostOptions { get; }
public IEnvironment Environment { get; }
public IConfigurationProvider Build(IConfigurationBuilder builder)
{
return new HostJsonFileConfigurationProvider(this, _logger, _metricsLogger);
}
public class HostJsonFileConfigurationProvider : ConfigurationProvider
{
private static readonly string[] WellKnownHostJsonProperties = new[]
{
"version", "functionTimeout", "functions", "http", "watchDirectories", "queues", "serviceBus",
"eventHub", "singleton", "logging", "aggregator", "healthMonitor", "extensionBundle", "managedDependencies"
};
private readonly HostJsonFileConfigurationSource _configurationSource;
private readonly Stack<string> _path;
private readonly ILogger _logger;
private readonly IMetricsLogger _metricsLogger;
public HostJsonFileConfigurationProvider(HostJsonFileConfigurationSource configurationSource, ILogger logger, IMetricsLogger metricsLogger)
{
_configurationSource = configurationSource;
_path = new Stack<string>();
_logger = logger;
_metricsLogger = metricsLogger;
}
public override void Load()
{
JObject hostJson = LoadHostConfigurationFile();
ProcessObject(hostJson);
}
private void ProcessObject(JObject hostJson)
{
foreach (var property in hostJson.Properties())
{
_path.Push(property.Name);
ProcessProperty(property);
_path.Pop();
}
}
private void ProcessProperty(JProperty property)
{
ProcessToken(property.Value);
}
private void ProcessToken(JToken token)
{
switch (token.Type)
{
case JTokenType.Object:
ProcessObject(token.Value<JObject>());
break;
case JTokenType.Array:
ProcessArray(token.Value<JArray>());
break;
case JTokenType.Integer:
case JTokenType.Float:
case JTokenType.String:
case JTokenType.Boolean:
case JTokenType.Null:
case JTokenType.Date:
case JTokenType.Raw:
case JTokenType.Bytes:
case JTokenType.TimeSpan:
string key = ConfigurationSectionNames.JobHost + ConfigurationPath.KeyDelimiter + ConfigurationPath.Combine(_path.Reverse());
Data[key] = token.Value<JValue>().ToString(CultureInfo.InvariantCulture);
break;
default:
break;
}
}
private void ProcessArray(JArray jArray)
{
for (int i = 0; i < jArray.Count; i++)
{
_path.Push(i.ToString());
ProcessToken(jArray[i]);
_path.Pop();
}
}
/// <summary>
/// Read and apply host.json configuration.
/// </summary>
private JObject LoadHostConfigurationFile()
{
using (_metricsLogger.LatencyEvent(MetricEventNames.LoadHostConfigurationSource))
{
// Before configuration has been fully read, configure a default logger factory
// to ensure we can log any configuration errors. There's no filters at this point,
// but that's okay since we can't build filters until we apply configuration below.
// We'll recreate the loggers after config is read. We initialize the public logger
// to the startup logger until we've read configuration settings and can create the real logger.
// The "startup" logger is used in this class for startup related logs. The public logger is used
// for all other logging after startup.
ScriptApplicationHostOptions options = _configurationSource.HostOptions;
string hostFilePath = Path.Combine(options.ScriptPath, ScriptConstants.HostMetadataFileName);
JObject hostConfigObject = LoadHostConfig(hostFilePath);
InitializeHostConfig(hostFilePath, hostConfigObject);
string sanitizedJson = SanitizeHostJson(hostConfigObject);
_logger.HostConfigApplied();
// Do not log these until after all the configuration is done so the proper filters are applied.
_logger.HostConfigReading(hostFilePath);
_logger.HostConfigRead(sanitizedJson);
return hostConfigObject;
}
}
private void InitializeHostConfig(string hostJsonPath, JObject hostConfigObject)
{
using (_metricsLogger.LatencyEvent(MetricEventNames.InitializeHostConfiguration))
{
// If the object is empty, initialize it to include the version and write the file.
if (!hostConfigObject.HasValues)
{
_logger.HostConfigEmpty();
hostConfigObject = GetDefaultHostConfigObject();
TryWriteHostJson(hostJsonPath, hostConfigObject);
}
if (hostConfigObject["version"]?.Value<string>() != "2.0")
{
throw new HostConfigurationException($"The {ScriptConstants.HostMetadataFileName} file is missing the required 'version' property. See https://aka.ms/functions-hostjson for steps to migrate the configuration file.");
}
}
}
internal JObject LoadHostConfig(string configFilePath)
{
using (_metricsLogger.LatencyEvent(MetricEventNames.LoadHostConfiguration))
{
JObject hostConfigObject;
try
{
string json = File.ReadAllText(configFilePath);
hostConfigObject = JObject.Parse(json);
}
catch (JsonException ex)
{
throw new FormatException($"Unable to parse host configuration file '{configFilePath}'.", ex);
}
catch (Exception ex) when (ex is FileNotFoundException || ex is DirectoryNotFoundException)
{
// if no file exists we default the config
_logger.HostConfigNotFound();
hostConfigObject = GetDefaultHostConfigObject();
TryWriteHostJson(configFilePath, hostConfigObject);
}
return hostConfigObject;
}
}
private JObject GetDefaultHostConfigObject()
{
var hostJsonJObj = JObject.Parse("{'version': '2.0', 'extensionBundle': { 'id': 'Microsoft.Azure.Functions.ExtensionBundle', 'version': '[1.*, 2.0.0)'}}");
if (string.Equals(_configurationSource.Environment.GetEnvironmentVariable(RpcWorkerConstants.FunctionWorkerRuntimeSettingName), "powershell", StringComparison.InvariantCultureIgnoreCase)
&& !_configurationSource.Environment.IsFileSystemReadOnly())
{
hostJsonJObj.Add("managedDependency", JToken.Parse("{'Enabled': true}"));
}
return hostJsonJObj;
}
private void TryWriteHostJson(string filePath, JObject content)
{
if (!_configurationSource.Environment.IsFileSystemReadOnly())
{
try
{
File.WriteAllText(filePath, content.ToString(Formatting.Indented));
}
catch
{
_logger.HostConfigCreationFailed();
}
}
else
{
_logger.HostConfigFileSystemReadOnly();
}
}
internal static string SanitizeHostJson(JObject hostJsonObject)
{
JObject sanitizedObject = new JObject();
foreach (var propName in WellKnownHostJsonProperties)
{
var propValue = hostJsonObject[propName];
if (propValue != null)
{
sanitizedObject[propName] = propValue;
}
}
return sanitizedObject.ToString();
}
}
}
}
| 42.015748 | 240 | 0.555285 | [
"Apache-2.0",
"MIT"
] | azurecloudhunter/azure-functions-host | src/WebJobs.Script/Config/HostJsonFileConfigurationSource.cs | 10,674 | C# |
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.1
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
namespace CostFunction.Properties {
using System;
/// <summary>
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
/// </summary>
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CostFunction.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}
| 46.859375 | 178 | 0.637212 | [
"Apache-2.0"
] | CrypToolProject/CrypTool-2 | CrypPlugins/CostFunction/Properties/Resources.Designer.cs | 3,009 | C# |
using System;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Numerics;
using Nethereum.Hex.HexTypes;
using Nethereum.ABI.FunctionEncoding.Attributes;
using Nethereum.Web3;
using Nethereum.RPC.Eth.DTOs;
using Nethereum.Contracts.CQS;
using Nethereum.Contracts;
using System.Threading;
namespace Nethereum.Commerce.Contracts.EternalStorage.ContractDefinition
{
public partial class EternalStorageDeployment : EternalStorageDeploymentBase
{
public EternalStorageDeployment() : base(BYTECODE) { }
public EternalStorageDeployment(string byteCode) : base(byteCode) { }
}
public class EternalStorageDeploymentBase : ContractDeploymentMessage
{
public static string BYTECODE = "60806040819052600080546001600160a01b03191633178082556001600160a01b0316917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a36110f3806100576000396000f3fe608060405234801561001057600080fd5b50600436106101ce5760003560e01c80638da5cb5b11610104578063d57df4da116100a2578063f2fde38b11610071578063f2fde38b146105cb578063f527d166146105f1578063f586606614610614578063f8f1aefc146106c1576101ce565b8063d57df4da14610530578063dde5b9d51461054d578063e0f5bc2314610570578063e24c2788146105a2576101ce565b8063a209a29c116100de578063a209a29c14610453578063abefab87146104e5578063ac094553146104ed578063c76ea9781461050a576101ce565b80638da5cb5b146104115780638f32d59b1461041957806391f4548014610421576101ce565b80634c77e5ba116101715780635a2bf25a1161014b5780635a2bf25a14610370578063623cd16d1461039c57806367d96412146103c85780636b00e9d8146103eb576101ce565b80634c77e5ba146102f1578063508e3e2f1461032a57806358360cc01461034d576101ce565b806317e7dd22116101ad57806317e7dd221461024d57806325cf512d1461027e5780633eba9ed2146102a15780634345e099146102c6576101ce565b8062f2678e146101d3578063025ec81a14610208578063150e99f914610225575b600080fd5b6101f6600480360360408110156101e957600080fd5b50803590602001356106ea565b60408051918252519081900360200190f35b6101f66004803603602081101561021e57600080fd5b5035610707565b61024b6004803603602081101561023b57600080fd5b50356001600160a01b0316610719565b005b61026a6004803603602081101561026357600080fd5b5035610820565b604080519115158252519081900360200190f35b61024b6004803603604081101561029457600080fd5b5080359060200135610835565b61024b600480360360408110156102b757600080fd5b508035906020013515156108c1565b61024b600480360360608110156102dc57600080fd5b5080359060208101359060400135151561091b565b61030e6004803603602081101561030757600080fd5b5035610981565b604080516001600160a01b039092168252519081900360200190f35b61024b6004803603604081101561034057600080fd5b508035906020013561099c565b61026a6004803603604081101561036357600080fd5b50803590602001356109ed565b61024b6004803603604081101561038657600080fd5b50803590602001356001600160a01b0316610a0d565b6101f6600480360360408110156103b257600080fd5b50803590602001356001600160a01b0316610a74565b6101f6600480360360408110156103de57600080fd5b5080359060200135610a9c565b61026a6004803603602081101561040157600080fd5b50356001600160a01b0316610ab9565b61030e610ace565b61026a610ade565b61024b6004803603606081101561043757600080fd5b50803590602081013590604001356001600160a01b0316610aef565b6104706004803603602081101561046957600080fd5b5035610b61565b6040805160208082528351818301528351919283929083019185019080838360005b838110156104aa578181015183820152602001610492565b50505050905090810190601f1680156104d75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101f6610c02565b6101f66004803603602081101561050357600080fd5b5035610c08565b61024b6004803603602081101561052057600080fd5b50356001600160a01b0316610c1a565b6101f66004803603602081101561054657600080fd5b5035610d24565b61024b6004803603604081101561056357600080fd5b5080359060200135610d36565b61024b6004803603606081101561058657600080fd5b508035906001600160a01b036020820135169060400135610d87565b61024b600480360360608110156105b857600080fd5b5080359060208101359060400135610dec565b61024b600480360360208110156105e157600080fd5b50356001600160a01b0316610e48565b61030e6004803603604081101561060757600080fd5b5080359060200135610eaa565b61024b6004803603604081101561062a57600080fd5b8135919081019060408101602082013564010000000081111561064c57600080fd5b82018360208201111561065e57600080fd5b8035906020019184600183028401116401000000008311171561068057600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610ed0945050505050565b61024b600480360360608110156106d757600080fd5b5080359060208101359060400135610f30565b6000918252600a6020908152604080842092845291905290205490565b60009081526007602052604090205490565b610721610ade565b610772576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b03811660009081526001602052604090205460ff16156107e8576001600160a01b038116600081815260016020526040808220805460ff1916905560028054600019019055517f8ddb5a2efd673581f97000ec107674428dc1ed37e8e7944654e48fb0688114779190a261081d565b6040516001600160a01b038216907f21aa6b3368eceb61c9fc1bdfd2cb6337c87cc1510c1afcc7d5a45371551b43b890600090a25b50565b60009081526008602052604090205460ff1690565b61083d610ace565b6001600160a01b0316336001600160a01b0316148061086b57503360009081526001602052604090205460ff165b156108865760008281526007602052604090208190556108bd565b60405162461bcd60e51b815260040180806020018281038252603e815260200180611080603e913960400191505060405180910390fd5b5050565b6108c9610ace565b6001600160a01b0316336001600160a01b031614806108f757503360009081526001602052604090205460ff165b15610886576000828152600860205260409020805460ff19168215151790556108bd565b610923610ace565b6001600160a01b0316336001600160a01b0316148061095157503360009081526001602052604090205460ff165b15610886576000838152600c602090815260408083208584529091529020805460ff19168215151790555b505050565b6000908152600660205260409020546001600160a01b031690565b6109a4610ace565b6001600160a01b0316336001600160a01b031614806109d257503360009081526001602052604090205460ff165b156108865760008281526004602052604090208190556108bd565b6000918252600c6020908152604080842092845291905290205460ff1690565b610a15610ace565b6001600160a01b0316336001600160a01b03161480610a4357503360009081526001602052604090205460ff165b1561088657600082815260066020526040902080546001600160a01b0319166001600160a01b0383161790556108bd565b6000918252600d602090815260408084206001600160a01b0393909316845291905290205490565b600091825260096020908152604080842092845291905290205490565b60016020526000908152604090205460ff1681565b6000546001600160a01b03165b90565b6000546001600160a01b0316331490565b610af7610ace565b6001600160a01b0316336001600160a01b03161480610b2557503360009081526001602052604090205460ff165b15610886576000838152600b60209081526040808320858452909152902080546001600160a01b0319166001600160a01b03831617905561097c565b60008181526005602090815260409182902080548351601f6002600019610100600186161502019093169290920491820184900484028101840190945280845260609392830182828015610bf65780601f10610bcb57610100808354040283529160200191610bf6565b820191906000526020600020905b815481529060010190602001808311610bd957829003601f168201915b50505050509050919050565b60025481565b60009081526003602052604090205490565b610c22610ade565b610c73576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b03811660009081526001602052604090205460ff1615610ccd576040516001600160a01b038216907ff6831fd5f976003f3acfcf6b2784b2f81e3abb43d161884873a310d6beadf38090600090a261081d565b6001600160a01b0381166000818152600160208190526040808320805460ff19168317905560028054909201909155517f3c4dcdfdb789d0f39b8a520a4f83ab2599db1d2ececebe4db2385f360c0d3ce19190a250565b60009081526004602052604090205490565b610d3e610ace565b6001600160a01b0316336001600160a01b03161480610d6c57503360009081526001602052604090205460ff165b156108865760008281526003602052604090208190556108bd565b610d8f610ace565b6001600160a01b0316336001600160a01b03161480610dbd57503360009081526001602052604090205460ff165b15610886576000838152600d602090815260408083206001600160a01b0386168452909152902081905561097c565b610df4610ace565b6001600160a01b0316336001600160a01b03161480610e2257503360009081526001602052604090205460ff165b15610886576000838152600960209081526040808320858452909152902081905561097c565b610e50610ade565b610ea1576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61081d81610f8c565b6000918252600b602090815260408084209284529190529020546001600160a01b031690565b610ed8610ace565b6001600160a01b0316336001600160a01b03161480610f0657503360009081526001602052604090205460ff165b156108865760008281526005602090815260409091208251610f2a92840190610fe7565b506108bd565b610f38610ace565b6001600160a01b0316336001600160a01b03161480610f6657503360009081526001602052604090205460ff165b15610886576000838152600a60209081526040808320858452909152902081905561097c565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061102857805160ff1916838001178555611055565b82800160010185558215611055579182015b8281111561105557825182559160200191906001019061103a565b50611061929150611065565b5090565b610adb91905b80821115611061576000815560010161106b56fe4f6e6c7920636f6e7472616374206f776e6572206f72206120626f756e642061646472657373206d61792063616c6c20746869732066756e6374696f6e2ea264697066735822122051899720cf628a414be7b74bcdf7ccf4fb21f9a9500e9c04e14576854982637d64736f6c63430006010033";
public EternalStorageDeploymentBase() : base(BYTECODE) { }
public EternalStorageDeploymentBase(string byteCode) : base(byteCode) { }
}
public partial class BoundAddressCountFunction : BoundAddressCountFunctionBase { }
[Function("BoundAddressCount", "int256")]
public class BoundAddressCountFunctionBase : FunctionMessage
{
}
public partial class BoundAddressesFunction : BoundAddressesFunctionBase { }
[Function("BoundAddresses", "bool")]
public class BoundAddressesFunctionBase : FunctionMessage
{
[Parameter("address", "", 1)]
public virtual string ReturnValue1 { get; set; }
}
public partial class BindAddressFunction : BindAddressFunctionBase { }
[Function("bindAddress")]
public class BindAddressFunctionBase : FunctionMessage
{
[Parameter("address", "a", 1)]
public virtual string A { get; set; }
}
public partial class GetAddressValueFunction : GetAddressValueFunctionBase { }
[Function("getAddressValue", "address")]
public class GetAddressValueFunctionBase : FunctionMessage
{
[Parameter("bytes32", "key", 1)]
public virtual byte[] Key { get; set; }
}
public partial class GetBooleanValueFunction : GetBooleanValueFunctionBase { }
[Function("getBooleanValue", "bool")]
public class GetBooleanValueFunctionBase : FunctionMessage
{
[Parameter("bytes32", "key", 1)]
public virtual byte[] Key { get; set; }
}
public partial class GetBytes32ValueFunction : GetBytes32ValueFunctionBase { }
[Function("getBytes32Value", "bytes32")]
public class GetBytes32ValueFunctionBase : FunctionMessage
{
[Parameter("bytes32", "key", 1)]
public virtual byte[] Key { get; set; }
}
public partial class GetInt256ValueFunction : GetInt256ValueFunctionBase { }
[Function("getInt256Value", "int256")]
public class GetInt256ValueFunctionBase : FunctionMessage
{
[Parameter("bytes32", "key", 1)]
public virtual byte[] Key { get; set; }
}
public partial class GetMappingAddressToUint256ValueFunction : GetMappingAddressToUint256ValueFunctionBase { }
[Function("getMappingAddressToUint256Value", "uint256")]
public class GetMappingAddressToUint256ValueFunctionBase : FunctionMessage
{
[Parameter("bytes32", "storageKey", 1)]
public virtual byte[] StorageKey { get; set; }
[Parameter("address", "mappingKey", 2)]
public virtual string MappingKey { get; set; }
}
public partial class GetMappingBytes32ToAddressValueFunction : GetMappingBytes32ToAddressValueFunctionBase { }
[Function("getMappingBytes32ToAddressValue", "address")]
public class GetMappingBytes32ToAddressValueFunctionBase : FunctionMessage
{
[Parameter("bytes32", "storageKey", 1)]
public virtual byte[] StorageKey { get; set; }
[Parameter("bytes32", "mappingKey", 2)]
public virtual byte[] MappingKey { get; set; }
}
public partial class GetMappingBytes32ToBoolValueFunction : GetMappingBytes32ToBoolValueFunctionBase { }
[Function("getMappingBytes32ToBoolValue", "bool")]
public class GetMappingBytes32ToBoolValueFunctionBase : FunctionMessage
{
[Parameter("bytes32", "storageKey", 1)]
public virtual byte[] StorageKey { get; set; }
[Parameter("bytes32", "mappingKey", 2)]
public virtual byte[] MappingKey { get; set; }
}
public partial class GetMappingBytes32ToBytes32ValueFunction : GetMappingBytes32ToBytes32ValueFunctionBase { }
[Function("getMappingBytes32ToBytes32Value", "bytes32")]
public class GetMappingBytes32ToBytes32ValueFunctionBase : FunctionMessage
{
[Parameter("bytes32", "storageKey", 1)]
public virtual byte[] StorageKey { get; set; }
[Parameter("bytes32", "mappingKey", 2)]
public virtual byte[] MappingKey { get; set; }
}
public partial class GetMappingBytes32ToUint256ValueFunction : GetMappingBytes32ToUint256ValueFunctionBase { }
[Function("getMappingBytes32ToUint256Value", "uint256")]
public class GetMappingBytes32ToUint256ValueFunctionBase : FunctionMessage
{
[Parameter("bytes32", "storageKey", 1)]
public virtual byte[] StorageKey { get; set; }
[Parameter("bytes32", "mappingKey", 2)]
public virtual byte[] MappingKey { get; set; }
}
public partial class GetStringValueFunction : GetStringValueFunctionBase { }
[Function("getStringValue", "string")]
public class GetStringValueFunctionBase : FunctionMessage
{
[Parameter("bytes32", "key", 1)]
public virtual byte[] Key { get; set; }
}
public partial class GetUint256ValueFunction : GetUint256ValueFunctionBase { }
[Function("getUint256Value", "uint256")]
public class GetUint256ValueFunctionBase : FunctionMessage
{
[Parameter("bytes32", "key", 1)]
public virtual byte[] Key { get; set; }
}
public partial class IsOwnerFunction : IsOwnerFunctionBase { }
[Function("isOwner", "bool")]
public class IsOwnerFunctionBase : FunctionMessage
{
}
public partial class OwnerFunction : OwnerFunctionBase { }
[Function("owner", "address")]
public class OwnerFunctionBase : FunctionMessage
{
}
public partial class SetAddressValueFunction : SetAddressValueFunctionBase { }
[Function("setAddressValue")]
public class SetAddressValueFunctionBase : FunctionMessage
{
[Parameter("bytes32", "key", 1)]
public virtual byte[] Key { get; set; }
[Parameter("address", "value", 2)]
public virtual string Value { get; set; }
}
public partial class SetBooleanValueFunction : SetBooleanValueFunctionBase { }
[Function("setBooleanValue")]
public class SetBooleanValueFunctionBase : FunctionMessage
{
[Parameter("bytes32", "key", 1)]
public virtual byte[] Key { get; set; }
[Parameter("bool", "value", 2)]
public virtual bool Value { get; set; }
}
public partial class SetBytes32ValueFunction : SetBytes32ValueFunctionBase { }
[Function("setBytes32Value")]
public class SetBytes32ValueFunctionBase : FunctionMessage
{
[Parameter("bytes32", "key", 1)]
public virtual byte[] Key { get; set; }
[Parameter("bytes32", "value", 2)]
public virtual byte[] Value { get; set; }
}
public partial class SetInt256ValueFunction : SetInt256ValueFunctionBase { }
[Function("setInt256Value")]
public class SetInt256ValueFunctionBase : FunctionMessage
{
[Parameter("bytes32", "key", 1)]
public virtual byte[] Key { get; set; }
[Parameter("int256", "value", 2)]
public virtual BigInteger Value { get; set; }
}
public partial class SetMappingAddressToUint256ValueFunction : SetMappingAddressToUint256ValueFunctionBase { }
[Function("setMappingAddressToUint256Value")]
public class SetMappingAddressToUint256ValueFunctionBase : FunctionMessage
{
[Parameter("bytes32", "storageKey", 1)]
public virtual byte[] StorageKey { get; set; }
[Parameter("address", "mappingKey", 2)]
public virtual string MappingKey { get; set; }
[Parameter("uint256", "value", 3)]
public virtual BigInteger Value { get; set; }
}
public partial class SetMappingBytes32ToAddressValueFunction : SetMappingBytes32ToAddressValueFunctionBase { }
[Function("setMappingBytes32ToAddressValue")]
public class SetMappingBytes32ToAddressValueFunctionBase : FunctionMessage
{
[Parameter("bytes32", "storageKey", 1)]
public virtual byte[] StorageKey { get; set; }
[Parameter("bytes32", "mappingKey", 2)]
public virtual byte[] MappingKey { get; set; }
[Parameter("address", "value", 3)]
public virtual string Value { get; set; }
}
public partial class SetMappingBytes32ToBoolValueFunction : SetMappingBytes32ToBoolValueFunctionBase { }
[Function("setMappingBytes32ToBoolValue")]
public class SetMappingBytes32ToBoolValueFunctionBase : FunctionMessage
{
[Parameter("bytes32", "storageKey", 1)]
public virtual byte[] StorageKey { get; set; }
[Parameter("bytes32", "mappingKey", 2)]
public virtual byte[] MappingKey { get; set; }
[Parameter("bool", "value", 3)]
public virtual bool Value { get; set; }
}
public partial class SetMappingBytes32ToBytes32ValueFunction : SetMappingBytes32ToBytes32ValueFunctionBase { }
[Function("setMappingBytes32ToBytes32Value")]
public class SetMappingBytes32ToBytes32ValueFunctionBase : FunctionMessage
{
[Parameter("bytes32", "storageKey", 1)]
public virtual byte[] StorageKey { get; set; }
[Parameter("bytes32", "mappingKey", 2)]
public virtual byte[] MappingKey { get; set; }
[Parameter("bytes32", "value", 3)]
public virtual byte[] Value { get; set; }
}
public partial class SetMappingBytes32ToUint256ValueFunction : SetMappingBytes32ToUint256ValueFunctionBase { }
[Function("setMappingBytes32ToUint256Value")]
public class SetMappingBytes32ToUint256ValueFunctionBase : FunctionMessage
{
[Parameter("bytes32", "storageKey", 1)]
public virtual byte[] StorageKey { get; set; }
[Parameter("bytes32", "mappingKey", 2)]
public virtual byte[] MappingKey { get; set; }
[Parameter("uint256", "value", 3)]
public virtual BigInteger Value { get; set; }
}
public partial class SetStringValueFunction : SetStringValueFunctionBase { }
[Function("setStringValue")]
public class SetStringValueFunctionBase : FunctionMessage
{
[Parameter("bytes32", "key", 1)]
public virtual byte[] Key { get; set; }
[Parameter("string", "value", 2)]
public virtual string Value { get; set; }
}
public partial class SetUint256ValueFunction : SetUint256ValueFunctionBase { }
[Function("setUint256Value")]
public class SetUint256ValueFunctionBase : FunctionMessage
{
[Parameter("bytes32", "key", 1)]
public virtual byte[] Key { get; set; }
[Parameter("uint256", "value", 2)]
public virtual BigInteger Value { get; set; }
}
public partial class TransferOwnershipFunction : TransferOwnershipFunctionBase { }
[Function("transferOwnership")]
public class TransferOwnershipFunctionBase : FunctionMessage
{
[Parameter("address", "newOwner", 1)]
public virtual string NewOwner { get; set; }
}
public partial class UnBindAddressFunction : UnBindAddressFunctionBase { }
[Function("unBindAddress")]
public class UnBindAddressFunctionBase : FunctionMessage
{
[Parameter("address", "a", 1)]
public virtual string A { get; set; }
}
public partial class AddressAlreadyBoundEventDTO : AddressAlreadyBoundEventDTOBase { }
[Event("AddressAlreadyBound")]
public class AddressAlreadyBoundEventDTOBase : IEventDTO
{
[Parameter("address", "a", 1, true )]
public virtual string A { get; set; }
}
public partial class AddressAlreadyUnBoundEventDTO : AddressAlreadyUnBoundEventDTOBase { }
[Event("AddressAlreadyUnBound")]
public class AddressAlreadyUnBoundEventDTOBase : IEventDTO
{
[Parameter("address", "a", 1, true )]
public virtual string A { get; set; }
}
public partial class AddressBoundEventDTO : AddressBoundEventDTOBase { }
[Event("AddressBound")]
public class AddressBoundEventDTOBase : IEventDTO
{
[Parameter("address", "a", 1, true )]
public virtual string A { get; set; }
}
public partial class AddressUnBoundEventDTO : AddressUnBoundEventDTOBase { }
[Event("AddressUnBound")]
public class AddressUnBoundEventDTOBase : IEventDTO
{
[Parameter("address", "a", 1, true )]
public virtual string A { get; set; }
}
public partial class OwnershipTransferredEventDTO : OwnershipTransferredEventDTOBase { }
[Event("OwnershipTransferred")]
public class OwnershipTransferredEventDTOBase : IEventDTO
{
[Parameter("address", "previousOwner", 1, true )]
public virtual string PreviousOwner { get; set; }
[Parameter("address", "newOwner", 2, true )]
public virtual string NewOwner { get; set; }
}
public partial class BoundAddressCountOutputDTO : BoundAddressCountOutputDTOBase { }
[FunctionOutput]
public class BoundAddressCountOutputDTOBase : IFunctionOutputDTO
{
[Parameter("int256", "", 1)]
public virtual BigInteger ReturnValue1 { get; set; }
}
public partial class BoundAddressesOutputDTO : BoundAddressesOutputDTOBase { }
[FunctionOutput]
public class BoundAddressesOutputDTOBase : IFunctionOutputDTO
{
[Parameter("bool", "", 1)]
public virtual bool ReturnValue1 { get; set; }
}
public partial class GetAddressValueOutputDTO : GetAddressValueOutputDTOBase { }
[FunctionOutput]
public class GetAddressValueOutputDTOBase : IFunctionOutputDTO
{
[Parameter("address", "", 1)]
public virtual string ReturnValue1 { get; set; }
}
public partial class GetBooleanValueOutputDTO : GetBooleanValueOutputDTOBase { }
[FunctionOutput]
public class GetBooleanValueOutputDTOBase : IFunctionOutputDTO
{
[Parameter("bool", "", 1)]
public virtual bool ReturnValue1 { get; set; }
}
public partial class GetBytes32ValueOutputDTO : GetBytes32ValueOutputDTOBase { }
[FunctionOutput]
public class GetBytes32ValueOutputDTOBase : IFunctionOutputDTO
{
[Parameter("bytes32", "", 1)]
public virtual byte[] ReturnValue1 { get; set; }
}
public partial class GetInt256ValueOutputDTO : GetInt256ValueOutputDTOBase { }
[FunctionOutput]
public class GetInt256ValueOutputDTOBase : IFunctionOutputDTO
{
[Parameter("int256", "", 1)]
public virtual BigInteger ReturnValue1 { get; set; }
}
public partial class GetMappingAddressToUint256ValueOutputDTO : GetMappingAddressToUint256ValueOutputDTOBase { }
[FunctionOutput]
public class GetMappingAddressToUint256ValueOutputDTOBase : IFunctionOutputDTO
{
[Parameter("uint256", "", 1)]
public virtual BigInteger ReturnValue1 { get; set; }
}
public partial class GetMappingBytes32ToAddressValueOutputDTO : GetMappingBytes32ToAddressValueOutputDTOBase { }
[FunctionOutput]
public class GetMappingBytes32ToAddressValueOutputDTOBase : IFunctionOutputDTO
{
[Parameter("address", "", 1)]
public virtual string ReturnValue1 { get; set; }
}
public partial class GetMappingBytes32ToBoolValueOutputDTO : GetMappingBytes32ToBoolValueOutputDTOBase { }
[FunctionOutput]
public class GetMappingBytes32ToBoolValueOutputDTOBase : IFunctionOutputDTO
{
[Parameter("bool", "", 1)]
public virtual bool ReturnValue1 { get; set; }
}
public partial class GetMappingBytes32ToBytes32ValueOutputDTO : GetMappingBytes32ToBytes32ValueOutputDTOBase { }
[FunctionOutput]
public class GetMappingBytes32ToBytes32ValueOutputDTOBase : IFunctionOutputDTO
{
[Parameter("bytes32", "", 1)]
public virtual byte[] ReturnValue1 { get; set; }
}
public partial class GetMappingBytes32ToUint256ValueOutputDTO : GetMappingBytes32ToUint256ValueOutputDTOBase { }
[FunctionOutput]
public class GetMappingBytes32ToUint256ValueOutputDTOBase : IFunctionOutputDTO
{
[Parameter("uint256", "", 1)]
public virtual BigInteger ReturnValue1 { get; set; }
}
public partial class GetStringValueOutputDTO : GetStringValueOutputDTOBase { }
[FunctionOutput]
public class GetStringValueOutputDTOBase : IFunctionOutputDTO
{
[Parameter("string", "", 1)]
public virtual string ReturnValue1 { get; set; }
}
public partial class GetUint256ValueOutputDTO : GetUint256ValueOutputDTOBase { }
[FunctionOutput]
public class GetUint256ValueOutputDTOBase : IFunctionOutputDTO
{
[Parameter("uint256", "", 1)]
public virtual BigInteger ReturnValue1 { get; set; }
}
public partial class IsOwnerOutputDTO : IsOwnerOutputDTOBase { }
[FunctionOutput]
public class IsOwnerOutputDTOBase : IFunctionOutputDTO
{
[Parameter("bool", "", 1)]
public virtual bool ReturnValue1 { get; set; }
}
public partial class OwnerOutputDTO : OwnerOutputDTOBase { }
[FunctionOutput]
public class OwnerOutputDTOBase : IFunctionOutputDTO
{
[Parameter("address", "", 1)]
public virtual string ReturnValue1 { get; set; }
}
}
| 49.127542 | 8,895 | 0.789864 | [
"Apache-2.0"
] | Dave-Whiffin/Nethereum.eShop | src/contracts/Nethereum.Commerce.Contracts/EternalStorage/ContractDefinition/EternalStorageDefinition.cs | 26,578 | C# |
using System.Globalization;
namespace BattleMuffin.Configuration
{
public interface IClientConfiguration
{
string ClientId { get; }
string ClientSecret { get; }
string Host { get; }
string OauthHost { get; }
CultureInfo Locale { get; }
}
}
| 20.928571 | 41 | 0.62116 | [
"MIT"
] | tehmufifnman/BattleMuffin | src/BattleMuffin/Configuration/IClientConfiguration.cs | 293 | C# |
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using BastelKatalog.Data;
namespace BastelKatalog.Models
{
/// <summary>
/// Position of a category among its sibling categories
/// </summary>
public enum SubCategoryPosition
{
/// <summary>
/// Default
/// </summary>
None,
/// <summary>
/// First category of many
/// </summary>
Start,
/// <summary>
/// Middle category of many
/// </summary>
Middle,
/// <summary>
/// Last category of many or single
/// </summary>
End
}
/// <summary>
/// Wraps a Category object for UI usage
/// </summary>
public class CategoryWrapper : INotifyPropertyChanged
{
#region INotifyPropertyChanged
public event PropertyChangedEventHandler PropertyChanged = default!;
private void NotifyPropertyChanged([CallerMemberName] string caller = "")
=> PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(caller));
#endregion
public Category Category { get; private set; }
public string Name
{
get { return Category.Name; }
set
{
if (Category.Name != value)
{
Category.Name = value;
NotifyPropertyChanged();
}
}
}
private CategoryWrapper? _ParentCategory;
public CategoryWrapper? ParentCategory
{
get { return _ParentCategory; }
set
{
if (_ParentCategory != value)
{
_ParentCategory = value;
if (Category.ParentCategoryId != value?.Category?.Id)
{
Category.ParentCategoryId = value?.Category?.Id;
Category.ParentCategory = value?.Category;
}
NotifyPropertyChanged();
}
}
}
public SubCategoryPosition SubCategoryPosition { get; set; }
public CategoryWrapper(Category category)
{
Category = category;
if (category.ParentCategory != null)
_ParentCategory = new CategoryWrapper(category.ParentCategory);
SubCategoryPosition = SubCategoryPosition.None;
}
}
} | 29.477273 | 84 | 0.51118 | [
"MIT"
] | damidhagor/BastelKatalog | BastelKatalog/BastelKatalog/Models/CategoryWrapper.cs | 2,596 | C# |
// Python Tools for Visual Studio
// Copyright(c) Microsoft Corporation
// All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the License); you may not use
// this file except in compliance with the License. You may obtain a copy of the
// License at http://www.apache.org/licenses/LICENSE-2.0
//
// THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS
// OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY
// IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
// MERCHANTABLITY OR NON-INFRINGEMENT.
//
// See the Apache Version 2.0 License for specific language governing
// permissions and limitations under the License.
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Threading.Tasks;
using Microsoft.VisualStudio.InteractiveWindow;
using Microsoft.VisualStudio.InteractiveWindow.Commands;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Classification;
using Microsoft.VisualStudio.Utilities;
namespace Microsoft.PythonTools.Repl {
[Export(typeof(IInteractiveWindowCommand))]
[InteractiveWindowRole("Debug")]
[ContentType(PythonCoreConstants.ContentType)]
class DebugReplFramesCommand : IInteractiveWindowCommand {
public Task<ExecutionResult> Execute(IInteractiveWindow window, string arguments) {
var eval = window.GetPythonDebugReplEvaluator();
if (eval != null) {
eval.DisplayFrames();
}
return ExecutionResult.Succeeded;
}
public string Description {
get { return Strings.DebugReplFramesCommandDescription; }
}
public string Command {
get { return "where"; }
}
public IEnumerable<ClassificationSpan> ClassifyArguments(ITextSnapshot snapshot, Span argumentsSpan, Span spanToClassify) {
yield break;
}
public string CommandLine {
get {
return "";
}
}
public IEnumerable<string> DetailedDescription {
get {
yield return Description;
}
}
public IEnumerable<KeyValuePair<string, string>> ParametersDescription {
get {
yield break;
}
}
public IEnumerable<string> Names {
get {
yield return Command;
yield return "bt";
yield return "w";
}
}
}
}
| 32.730769 | 131 | 0.653741 | [
"Apache-2.0"
] | 113771169/PTVS | Python/Product/PythonTools/PythonTools/Repl/DebugReplFramesCommand.cs | 2,553 | C# |
using Microsoft.AspNetCore.Mvc;
using Sys.Workflow.Api.Runtime.Shared.Query;
using Sys.Workflow.Cloud.Services.Api.Commands;
using Sys.Workflow.Cloud.Services.Api.Model;
using Sys.Workflow.Cloud.Services.Rest.Api;
using Sys.Workflow.Services.Api.Commands;
using Sys.Workflow.Hateoas;
using Sys.Net.Http;
using System.Net;
using System.Threading.Tasks;
namespace Sys.Workflow.Rest.Client.API
{
/// <inheritdoc />
class TaskAdminClient : ITaskAdminController
{
private readonly IHttpClientProxy httpProxy;
private static readonly string serviceUrl = WorkflowConstants.ADMIN_TASK_ROUTER_V1;
/// <inheritdoc />
public TaskAdminClient(IHttpClientProxy httpProxy)
{
this.httpProxy = httpProxy;
}
public async Task<Resources<TaskModel>> GetAllTasks(TaskQuery query)
{
return await httpProxy.PostAsync<Resources<TaskModel>>($"{serviceUrl}", query).ConfigureAwait(false);
}
public async Task<TaskModel[]> ReassignTaskUser(ReassignTaskUserCmd cmd)
{
return await httpProxy.PostAsync<TaskModel[]>($"{serviceUrl}/reassign", cmd).ConfigureAwait(false);
}
}
}
| 31.578947 | 113 | 0.7025 | [
"Apache-2.0"
] | zhangzihan/nactivity | NActiviti/Sys.Bpm.Rest.Client/API/TaskAdminClient.cs | 1,202 | C# |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
using Microsoft.MixedReality.Toolkit.Physics;
using Microsoft.MixedReality.Toolkit.Utilities;
using Unity.Profiling;
using UnityEngine;
namespace Microsoft.MixedReality.Toolkit.Input
{
[AddComponentMenu("Scripts/MRTK/SDK/SpherePointer")]
public class SpherePointer : BaseControllerPointer, IMixedRealityNearPointer
{
private SceneQueryType raycastMode = SceneQueryType.SphereOverlap;
/// <inheritdoc />
public override SceneQueryType SceneQueryType
{
get => raycastMode;
set => raycastMode = value;
}
[SerializeField]
[Min(0.0f)]
[Tooltip("Amount to pull back the center of the sphere behind the hand for detecting when to turn off far interaction.")]
private float pullbackDistance = 0.0f;
/// <summary>
/// Amount to pull back the center of the sphere behind the hand for detecting when to turn off far interaction.
/// </summary>
public float PullbackDistance
{
get => pullbackDistance;
set
{
pullbackDistance = value;
queryBufferNearObjectRadius.queryMinDistance = pullbackDistance;
}
}
[SerializeField]
[Min(0.0f)]
[Tooltip("Angle range of the forward axis to query in degrees. Angle >= 360 means the entire sphere is queried")]
private float nearObjectSectorAngle = 360.0f;
/// <summary>
/// Angle range of the forward axis to query in degrees. Angle >= 360 means the entire sphere is queried.
/// </summary>
public float NearObjectSectorAngle
{
get => nearObjectSectorAngle;
set
{
nearObjectSectorAngle = value;
queryBufferNearObjectRadius.queryAngle = NearObjectSectorAngle * 0.5f;
}
}
[SerializeField]
[Min(0.0f)]
[Tooltip("Additional distance on top of sphere cast radius when pointer is considered 'near' an object and far interaction will turn off")]
private float nearObjectMargin = 0.2f;
/// <summary>
/// Additional distance on top of<see cref="BaseControllerPointer.SphereCastRadius"/> when pointer is considered 'near' an object and far interaction will turn off.
/// </summary>
/// <remarks>
/// This creates a dead zone in which far interaction is disabled before objects become grabbable.
/// </remarks>
public float NearObjectMargin
{
get => nearObjectMargin;
set
{
nearObjectMargin = value;
queryBufferNearObjectRadius.queryRadius = NearObjectRadius;
}
}
[SerializeField]
[Min(0.0f)]
[Tooltip("Lerp factor between the palm direction and the index finger direction used to build the cone direction.")]
private float nearObjectAxisLerp = 0.9f;
/// <summary>
/// Lerp factor between the palm direction and the index finger direction used to build the cone direction.
/// </summary>
public float NearObjectAxisLerp
{
get => nearObjectAxisLerp;
set => nearObjectAxisLerp = value;
}
/// <summary>
/// Distance at which the pointer is considered "near" an object.
/// </summary>
/// <remarks>
/// Sum of <see cref="BaseControllerPointer.SphereCastRadius"/> and <see cref="NearObjectMargin"/>. Entering the <see cref="NearObjectRadius"/> disables far interaction.
/// </remarks>
public float NearObjectRadius => SphereCastRadius + NearObjectMargin;
[SerializeField]
[Tooltip("The LayerMasks, in prioritized order, that are used to determine the grabbable objects. Remember to also add NearInteractionGrabbable! Only collidables with NearInteractionGrabbable will raise events.")]
private LayerMask[] grabLayerMasks = { UnityEngine.Physics.DefaultRaycastLayers };
/// <summary>
/// The LayerMasks, in prioritized order, that are used to determine the touchable objects.
/// </summary>
/// <remarks>
/// Only [NearInteractionGrabbables](xref:Microsoft.MixedReality.Toolkit.Input.NearInteractionGrabbable) in one of the LayerMasks will raise events.
/// </remarks>
public LayerMask[] GrabLayerMasks => grabLayerMasks;
[SerializeField]
[Tooltip("Specify whether queries for grabbable objects hit triggers.")]
protected QueryTriggerInteraction triggerInteraction = QueryTriggerInteraction.UseGlobal;
/// <summary>
/// Specify whether queries for grabbable objects hit triggers.
/// </summary>
public QueryTriggerInteraction TriggerInteraction => triggerInteraction;
[SerializeField]
[Tooltip("Maximum number of colliders that can be detected in a scene query.")]
[Min(1)]
private int sceneQueryBufferSize = 64;
/// <summary>
/// Maximum number of colliders that can be detected in a scene query.
/// </summary>
public int SceneQueryBufferSize => sceneQueryBufferSize;
[SerializeField]
[Tooltip("Whether to ignore colliders that may be near the pointer, but not actually in the visual FOV. This can prevent accidental grabs, and will allow hand rays to turn on when you may be near a grabbable but cannot see it. Visual FOV is defined by cone centered about display center, radius equal to half display height.")]
private bool ignoreCollidersNotInFOV = true;
/// <summary>
/// Whether to ignore colliders that may be near the pointer, but not actually in the visual FOV.
/// This can prevent accidental grabs, and will allow hand rays to turn on when you may be near
/// a grabbable but cannot see it. Visual FOV is defined by cone centered about display center,
/// radius equal to half display height.
/// </summary>
public bool IgnoreCollidersNotInFOV
{
get => ignoreCollidersNotInFOV;
set => ignoreCollidersNotInFOV = value;
}
private SpherePointerQueryInfo queryBufferNearObjectRadius;
private SpherePointerQueryInfo queryBufferInteractionRadius;
/// <summary>
/// Test if the pointer is near any collider that's both on a grabbable layer mask, and has a NearInteractionGrabbable.
/// Uses SphereCastRadius + NearObjectMargin to determine if near an object.
/// </summary>
/// <returns>True if the pointer is near any collider that's both on a grabbable layer mask, and has a NearInteractionGrabbable.</returns>
public bool IsNearObject => queryBufferNearObjectRadius.ContainsGrabbable;
/// <summary>
/// Test if the pointer is within the grabbable radius of collider that's both on a grabbable layer mask, and has a NearInteractionGrabbable.
/// Uses SphereCastRadius to determine if near an object.
/// Note: if focus on pointer is locked, will always return true.
/// </summary>
/// <returns>True if the pointer is within the grabbable radius of collider that's both on a grabbable layer mask, and has a NearInteractionGrabbable.</returns>
public override bool IsInteractionEnabled => IsFocusLocked || (base.IsInteractionEnabled && queryBufferInteractionRadius.ContainsGrabbable);
private void Awake()
{
queryBufferNearObjectRadius = new SpherePointerQueryInfo(sceneQueryBufferSize, Mathf.Max(NearObjectRadius, SphereCastRadius), NearObjectSectorAngle, PullbackDistance);
queryBufferInteractionRadius = new SpherePointerQueryInfo(sceneQueryBufferSize, SphereCastRadius, 360.0f, 0.0f);
}
private static readonly ProfilerMarker OnPreSceneQueryPerfMarker = new ProfilerMarker("[MRTK] SpherePointer.OnPreSceneQuery");
/// <inheritdoc />
public override void OnPreSceneQuery()
{
using (OnPreSceneQueryPerfMarker.Auto())
{
if (Rays == null)
{
Rays = new RayStep[1];
}
Vector3 pointerPosition;
Vector3 pointerAxis;
if (TryGetNearGraspPoint(out pointerPosition) && TryGetNearGraspAxis(out pointerAxis))
{
Vector3 endPoint = Vector3.forward * SphereCastRadius;
Rays[0].UpdateRayStep(ref pointerPosition, ref endPoint);
PrioritizedLayerMasksOverride = PrioritizedLayerMasksOverride ?? GrabLayerMasks;
for (int i = 0; i < PrioritizedLayerMasksOverride.Length; i++)
{
if (queryBufferNearObjectRadius.TryUpdateQueryBufferForLayerMask(PrioritizedLayerMasksOverride[i], pointerPosition - pointerAxis * PullbackDistance, pointerAxis, triggerInteraction, ignoreCollidersNotInFOV))
{
break;
}
}
for (int i = 0; i < PrioritizedLayerMasksOverride.Length; i++)
{
if (queryBufferInteractionRadius.TryUpdateQueryBufferForLayerMask(PrioritizedLayerMasksOverride[i], pointerPosition, pointerAxis, triggerInteraction, ignoreCollidersNotInFOV))
{
break;
}
}
}
}
}
private static readonly ProfilerMarker TryGetNearGraspPointPerfMarker = new ProfilerMarker("[MRTK] SpherePointer.TryGetNearGraspPoint");
/// <summary>
/// Gets the position of where grasp happens
/// For IMixedRealityHand it's the average of index and thumb.
/// For any other IMixedRealityController, return just the pointer origin
/// </summary>
public bool TryGetNearGraspPoint(out Vector3 result)
{
using (TryGetNearGraspPointPerfMarker.Auto())
{
if (Controller != null)
{
// If controller is of kind IMixedRealityHand, return average of index and thumb
if (Controller is IMixedRealityHand hand)
{
if (hand.TryGetJoint(TrackedHandJoint.IndexTip, out MixedRealityPose index) && index != null)
{
if (hand.TryGetJoint(TrackedHandJoint.ThumbTip, out MixedRealityPose thumb) && thumb != null)
{
result = 0.5f * (index.Position + thumb.Position);
return true;
}
}
}
// If controller isn't an IMixedRealityHand or one of the required joints isn't available, check for position
if (Controller.IsPositionAvailable)
{
result = Position;
return true;
}
}
result = Vector3.zero;
return false;
}
}
private static readonly ProfilerMarker TryGetNearGraspAxisPerfMarker = new ProfilerMarker("[MRTK] ConePointer.TryGetNearGraspAxis");
/// <summary>
/// Gets the axis that the grasp happens
/// For the SpherePointer it's the axis from the palm to the index tip
/// For any other IMixedRealityController, return just the pointer's forward orientation
/// </summary>
public bool TryGetNearGraspAxis(out Vector3 axis)
{
using (TryGetNearGraspAxisPerfMarker.Auto())
{
if (Controller is IMixedRealityHand hand)
{
if (hand.TryGetJoint(TrackedHandJoint.IndexTip, out MixedRealityPose index) && index != null)
{
if (hand.TryGetJoint(TrackedHandJoint.Palm, out MixedRealityPose palm) && palm != null)
{
Vector3 palmToIndex = index.Position - palm.Position;
axis = Vector3.Lerp(palm.Forward, palmToIndex.normalized, NearObjectAxisLerp).normalized;
return true;
}
}
}
axis = transform.forward;
return false;
}
}
private static readonly ProfilerMarker TryGetDistanceToNearestSurfacePerfMarker = new ProfilerMarker("[MRTK] SpherePointer.TryGetDistanceToNearestSurface");
/// <inheritdoc />
public bool TryGetDistanceToNearestSurface(out float distance)
{
using (TryGetDistanceToNearestSurfacePerfMarker.Auto())
{
var focusProvider = CoreServices.InputSystem?.FocusProvider;
if (focusProvider != null)
{
FocusDetails focusDetails;
if (focusProvider.TryGetFocusDetails(this, out focusDetails))
{
distance = focusDetails.RayDistance;
return true;
}
}
distance = 0.0f;
return false;
}
}
private static readonly ProfilerMarker TryGetNormalToNearestSurfacePerfMarker = new ProfilerMarker("[MRTK] SpherePointer.TryGetNormalToNearestSurface");
/// <inheritdoc />
public bool TryGetNormalToNearestSurface(out Vector3 normal)
{
using (TryGetNormalToNearestSurfacePerfMarker.Auto())
{
var focusProvider = CoreServices.InputSystem?.FocusProvider;
if (focusProvider != null)
{
FocusDetails focusDetails;
if (focusProvider.TryGetFocusDetails(this, out focusDetails))
{
normal = focusDetails.Normal;
return true;
}
}
normal = Vector3.forward;
return false;
}
}
/// <summary>
/// Helper class for storing and managing near grabbables close to a point
/// </summary>
private class SpherePointerQueryInfo
{
/// <summary>
/// How many colliders are near the point from the latest call to TryUpdateQueryBufferForLayerMask
/// </summary>
private int numColliders;
/// <summary>
/// Fixed-length array used to story physics queries
/// </summary>
private readonly Collider[] queryBuffer;
/// <summary>
/// Distance for performing queries.
/// </summary>
public float queryRadius;
/// <summary>
/// Minimum required distance from the query center.
/// </summary>
public float queryMinDistance;
/// <summary>
/// Angle in degrees that a point is allowed to be off from the query axis. Angle >= 180 means points can be anywhere in relation to the query axis
/// </summary>
public float queryAngle;
/// <summary>
/// The grabbable near the QueryRadius.
/// </summary>
private NearInteractionGrabbable grabbable;
/// <summary>
/// Constructor for a sphere overlap query
/// </summary>
/// <param name="bufferSize">Size to make the phyiscs query buffer array</param>
/// <param name="radius">Radius of the sphere </param>
/// <param name="angle">Angle range of the forward axis to query in degrees. Angle > 360 means the entire sphere is queried</param>
/// <param name="minDistance">"Minimum required distance to be registered in the query"</param>
public SpherePointerQueryInfo(int bufferSize, float radius, float angle, float minDistance)
{
numColliders = 0;
queryBuffer = new Collider[bufferSize];
queryRadius = radius;
queryMinDistance = minDistance;
queryAngle = angle * 0.5f;
}
private static readonly ProfilerMarker TryUpdateQueryBufferForLayerMaskPerfMarker = new ProfilerMarker("[MRTK] SpherePointerQueryInfo.TryUpdateQueryBufferForLayerMask");
/// <summary>
/// Intended to be called once per frame, this method performs a sphere intersection test against
/// all colliders in the layers defined by layerMask at the given pointer position.
/// All colliders intersecting the sphere at queryRadius and pointerPosition are stored in queryBuffer,
/// and the first grabbable in the list of returned colliders is stored.
/// Also provides an option to ignore colliders that are not visible.
/// </summary>
/// <param name="layerMask">Filter to only perform sphere cast on these layers.</param>
/// <param name="pointerPosition">The position of the pointer to query against.</param>
/// <param name="triggerInteraction">Passed along to the OverlapSphereNonAlloc call.</param>
/// <param name="ignoreCollidersNotInFOV">Whether to ignore colliders that are not visible.</param>
public bool TryUpdateQueryBufferForLayerMask(LayerMask layerMask, Vector3 pointerPosition, Vector3 pointerAxis, QueryTriggerInteraction triggerInteraction, bool ignoreCollidersNotInFOV)
{
using (TryUpdateQueryBufferForLayerMaskPerfMarker.Auto())
{
grabbable = null;
numColliders = UnityEngine.Physics.OverlapSphereNonAlloc(
pointerPosition,
queryRadius,
queryBuffer,
layerMask,
triggerInteraction);
if (numColliders == queryBuffer.Length)
{
Debug.LogWarning($"Maximum number of {numColliders} colliders found in SpherePointer overlap query. Consider increasing the query buffer size in the pointer profile.");
}
Camera mainCam = CameraCache.Main;
for (int i = 0; i < numColliders; i++)
{
Collider collider = queryBuffer[i];
grabbable = collider.GetComponent<NearInteractionGrabbable>();
if (grabbable != null)
{
if (ignoreCollidersNotInFOV)
{
if (!mainCam.IsInFOVCached(collider))
{
// Additional check: is grabbable in the camera frustrum
// We do this so that if grabbable is not visible it is not accidentally grabbed
// Also to not turn off the hand ray if hand is near a grabbable that's not actually visible
grabbable = null;
}
}
}
Vector3 closestPointToCollider = collider.ClosestPoint(pointerPosition);
Vector3 relativeColliderPosition = closestPointToCollider - pointerPosition;
// Check if the collider is within the activation cone
float queryAngleRadians = queryAngle * Mathf.Deg2Rad;
bool inAngle = Vector3.Dot(pointerAxis, relativeColliderPosition.normalized) >= Mathf.Cos(queryAngleRadians) || queryAngle >= 180.0f;
// Check to ensure the object is beyond the minimum distance
bool pastMinDistance = relativeColliderPosition.sqrMagnitude >= queryMinDistance * queryMinDistance;
if (!pastMinDistance || !inAngle)
{
grabbable = null;
continue;
}
if (grabbable != null)
{
return true;
}
}
return false;
}
}
/// <summary>
/// Returns true if any of the objects inside QueryBuffer contain a grabbable
/// </summary>
public bool ContainsGrabbable => grabbable != null;
}
#if UNITY_EDITOR
/// <summary>
/// When in editor, draws an approximation of what is the "Near Object" area
/// </summary>
private void OnDrawGizmos()
{
bool NearObjectCheck = queryBufferNearObjectRadius != null ? IsNearObject : false;
bool IsInteractionEnabledCheck = queryBufferInteractionRadius != null ? IsInteractionEnabled : false;
TryGetNearGraspAxis(out Vector3 sectorForwardAxis);
TryGetNearGraspPoint(out Vector3 point);
Vector3 centralAxis = sectorForwardAxis.normalized;
if (NearObjectSectorAngle >= 360.0f)
{
// Draw the sphere and the inner near interaction deadzone (governed by the pullback distance)
Gizmos.color = (NearObjectCheck ? Color.red : Color.cyan) - Color.black * 0.8f;
Gizmos.DrawSphere(point - centralAxis * PullbackDistance, NearObjectRadius);
Gizmos.color = Color.blue - Color.black * 0.8f;
Gizmos.DrawSphere(point - centralAxis * PullbackDistance, PullbackDistance);
}
else
{
// Draw something approximating the sphere's sector
Gizmos.color = Color.blue;
Gizmos.DrawLine(point, point + centralAxis * (NearObjectRadius - PullbackDistance));
UnityEditor.Handles.color = NearObjectCheck ? Color.red : Color.cyan;
float GizmoAngle = NearObjectSectorAngle * 0.5f * Mathf.Deg2Rad;
UnityEditor.Handles.DrawWireDisc(point,
centralAxis,
PullbackDistance * Mathf.Sin(GizmoAngle));
UnityEditor.Handles.DrawWireDisc(point + sectorForwardAxis.normalized * (NearObjectRadius * Mathf.Cos(GizmoAngle) - PullbackDistance),
centralAxis,
NearObjectRadius * Mathf.Sin(GizmoAngle));
}
// Draw the sphere representing the grabable area
Gizmos.color = Color.green - Color.black * (IsInteractionEnabledCheck ? 0.3f : 0.8f);
Gizmos.DrawSphere(point, SphereCastRadius);
}
#endif
}
}
| 46.397233 | 335 | 0.57797 | [
"MIT"
] | MRW-Eric/MixedRealityToolkit-Unity | Assets/MRTK/SDK/Features/UX/Scripts/Pointers/SpherePointer.cs | 23,479 | C# |
namespace LXGaming.Extractorr.Server.Services.Radarr;
public class RadarrOptions {
public const string Key = "Radarr";
public string? Username { get; set; }
public string? Password { get; set; }
public bool DebugWebhooks { get; set; }
public bool DeleteOnImport { get; set; }
public Dictionary<string, string>? RemotePathMappings { get; set; }
} | 23.5625 | 71 | 0.689655 | [
"Apache-2.0"
] | LXGaming/Extractorr | LXGaming.Extractorr.Server/Services/Radarr/RadarrOptions.cs | 379 | C# |
using CyberCAT.Core.Classes.Mapping;
namespace CyberCAT.Core.Classes.DumpedClasses
{
[RealName("ActionBool")]
public class ActionBool : ScriptableDeviceAction
{
}
}
| 18.2 | 52 | 0.730769 | [
"MIT"
] | Deweh/CyberCAT | CyberCAT.Core/Classes/DumpedClasses/ActionBool.cs | 182 | C# |
using EPiServer.Forms.Core.Models;
using EPiServer.Forms.Core.Validation;
using EPiServer.Forms.Helpers.Internal;
using EPiServer.Forms.Samples.EditView;
using EPiServer.Forms.Samples.Implementation.Elements;
using EPiServer.Framework.Localization;
using EPiServer.ServiceLocation;
using System;
using System.Text.RegularExpressions;
namespace EPiServer.Forms.Samples.Implementation.Validation
{
/// <summary>
/// validate date time string in format YYYY-MM-DDTHH:mmTZD(ISO-8601)
/// </summary>
public class DateTimeValidatorBase : ElementValidatorBase
{
private Injected<LocalizationService> _localizationService;
protected LocalizationService LocalizationService { get { return _localizationService.Service; } }
/// <inheritdoc />
public override bool? Validate(IElementValidatable targetElement)
{
var submittedValue = targetElement.GetSubmittedValue() as string;
if (string.IsNullOrEmpty(submittedValue))
{
return true;
}
DateTime dateTime;
if (DateTime.TryParse(submittedValue, out dateTime))
{
return true;
}
else
{
return false;
}
}
/// <inheritdoc />
/// we don't want to show this specific-validators to Editor. This validators always work programatically for DateTimeElement.
public override bool AvailableInEditView
{
get
{
return false;
}
}
/// <inheritdoc />
public override IValidationModel BuildValidationModel(IElementValidatable targetElement)
{
var model = base.BuildValidationModel(targetElement);
if (model != null)
{
model.Message = this.LocalizationService.GetString("/episerver/forms/validators/elementselfvalidator/unexpectedvalueisnotaccepted");
}
return model;
}
}
public class DateTimeRangeValidator : ElementValidatorBase
{
private Injected<LocalizationService> _localizationService;
protected LocalizationService LocalizationService { get { return _localizationService.Service; } }
/// <inheritdoc />
public override bool? Validate(IElementValidatable targetElement)
{
// DateTime format: YYYY-MM-DDTHH:mmTZD(ISO-8601) "2018-01-01T14:06+07:00|2018-02-02T14:06+07:00"
var submittedValues = (targetElement.GetSubmittedValue() as string[]);
// if the value is null, then let the RequiredValidator do the work
if (submittedValues == null)
{
return true;
}
if (submittedValues.Length < 2)
{
return false;
}
DateTime startDateTime;
DateTime endDateTime;
var isStartDateValid = DateTime.TryParse(submittedValues[0], out startDateTime);
var isEndDateValid = DateTime.TryParse(submittedValues[1], out endDateTime);
if (!isStartDateValid || !isEndDateValid)
{
return false;
}
var datetimeRangeBlock = targetElement as DateTimeRangeElementBlock;
var pickerType = (datetimeRangeBlock != null) ? (DateTimePickerType)datetimeRangeBlock.PickerType : DateTimePickerType.DateTimePicker;
switch (pickerType)
{
case DateTimePickerType.DatePicker:
return endDateTime.Subtract(startDateTime).TotalDays > 0;
}
return endDateTime.Subtract(startDateTime).TotalSeconds > 0;
}
/// <inheritdoc />
/// we don't want to show this specific-validators to Editor. This validators always work programatically for DateTimeRangeElement.
public override bool AvailableInEditView
{
get
{
return false;
}
}
/// <inheritdoc />
public override IValidationModel BuildValidationModel(IElementValidatable targetElement)
{
var model = base.BuildValidationModel(targetElement);
if (model != null)
{
model.Message = this.LocalizationService.GetString("/episerver/forms/validators/episerver.forms.implementation.validation.datetimerangevalidator/message");
}
return model;
}
}
public class DateTimeValidator : DateTimeValidatorBase {}
public class DateValidator : DateTimeValidatorBase {}
public class TimeValidator : DateTimeValidatorBase
{
public override bool? Validate(IElementValidatable targetElement)
{
// DateTime format: YYYY-MM-DDTHH:mmTZD(ISO-8601) "2018-01-01T14:06+07:00"
var submittedValue = targetElement.GetSubmittedValue() as string;
if (string.IsNullOrEmpty(submittedValue))
{
return true;
}
DateTime dateTime;
if (!DateTime.TryParse(submittedValue, out dateTime))
{
return false;
}
return true;
}
}
} | 35.2 | 171 | 0.60947 | [
"Apache-2.0"
] | Gaubeou/EPiServer.Forms.Samples | Implementation/Validation/DateTimeValidator.cs | 5,282 | C# |
/*
* eZmax API Definition (Full)
*
* This API expose all the functionnalities for the eZmax and eZsign applications.
*
* The version of the OpenAPI document: 1.1.7
* Contact: support-api@ezmax.ca
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = eZmaxApi.Client.OpenAPIDateConverter;
namespace eZmaxApi.Model
{
/// <summary>
/// EzsignformfieldgroupCreateObjectV1ResponseAllOf
/// </summary>
[DataContract(Name = "ezsignformfieldgroup_createObject_v1_Response_allOf")]
public partial class EzsignformfieldgroupCreateObjectV1ResponseAllOf : IEquatable<EzsignformfieldgroupCreateObjectV1ResponseAllOf>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="EzsignformfieldgroupCreateObjectV1ResponseAllOf" /> class.
/// </summary>
[JsonConstructorAttribute]
protected EzsignformfieldgroupCreateObjectV1ResponseAllOf() { }
/// <summary>
/// Initializes a new instance of the <see cref="EzsignformfieldgroupCreateObjectV1ResponseAllOf" /> class.
/// </summary>
/// <param name="mPayload">mPayload (required).</param>
public EzsignformfieldgroupCreateObjectV1ResponseAllOf(EzsignformfieldgroupCreateObjectV1ResponseMPayload mPayload = default(EzsignformfieldgroupCreateObjectV1ResponseMPayload))
{
// to ensure "mPayload" is required (not null)
if (mPayload == null)
{
throw new ArgumentNullException("mPayload is a required property for EzsignformfieldgroupCreateObjectV1ResponseAllOf and cannot be null");
}
this.MPayload = mPayload;
}
/// <summary>
/// Gets or Sets MPayload
/// </summary>
[DataMember(Name = "mPayload", IsRequired = true, EmitDefaultValue = false)]
public EzsignformfieldgroupCreateObjectV1ResponseMPayload MPayload { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class EzsignformfieldgroupCreateObjectV1ResponseAllOf {\n");
sb.Append(" MPayload: ").Append(MPayload).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="input">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return this.Equals(input as EzsignformfieldgroupCreateObjectV1ResponseAllOf);
}
/// <summary>
/// Returns true if EzsignformfieldgroupCreateObjectV1ResponseAllOf instances are equal
/// </summary>
/// <param name="input">Instance of EzsignformfieldgroupCreateObjectV1ResponseAllOf to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(EzsignformfieldgroupCreateObjectV1ResponseAllOf input)
{
if (input == null)
{
return false;
}
return
(
this.MPayload == input.MPayload ||
(this.MPayload != null &&
this.MPayload.Equals(input.MPayload))
);
}
/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.MPayload != null)
{
hashCode = (hashCode * 59) + this.MPayload.GetHashCode();
}
return hashCode;
}
}
/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validationContext)
{
yield break;
}
}
}
| 36.7 | 185 | 0.623784 | [
"MIT"
] | ezmaxinc/eZmax-SDK-csharp-netcore | src/eZmaxApi/Model/EzsignformfieldgroupCreateObjectV1ResponseAllOf.cs | 5,138 | C# |
using System;
using System.IO;
using App.Metrics;
using App.Metrics.AspNetCore;
using App.Metrics.Formatters;
using App.Metrics.Formatters.Prometheus;
using Exceptionless.Core;
using Exceptionless.Core.Configuration;
using Exceptionless.Core.Extensions;
using Exceptionless.Insulation.Configuration;
using Exceptionless.Web.Utility;
using Microsoft.ApplicationInsights.Extensibility;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Serilog;
using Serilog.Events;
using Serilog.Sinks.Exceptionless;
namespace Exceptionless.Web {
public class Program {
public static int Main(string[] args) {
try {
CreateWebHostBuilder(args).Build().Run();
return 0;
} catch (Exception ex) {
Log.Fatal(ex, "Host terminated unexpectedly");
return 1;
} finally {
Log.CloseAndFlush();
ExceptionlessClient.Default.ProcessQueue();
}
}
public static IWebHostBuilder CreateWebHostBuilder(string[] args) {
string environment = Environment.GetEnvironmentVariable("AppMode");
if (String.IsNullOrWhiteSpace(environment))
environment = "Production";
string currentDirectory = Directory.GetCurrentDirectory();
var config = new ConfigurationBuilder()
.SetBasePath(currentDirectory)
.AddYamlFile("appsettings.yml", optional: true, reloadOnChange: true)
.AddYamlFile($"appsettings.{environment}.yml", optional: true, reloadOnChange: true)
.AddEnvironmentVariables()
.AddCommandLine(args)
.Build();
var services = new ServiceCollection();
services.AddSingleton<IConfiguration>(config);
services.ConfigureOptions<ConfigureAppOptions>();
services.ConfigureOptions<ConfigureMetricOptions>();
var container = services.BuildServiceProvider();
var options = container.GetRequiredService<IOptions<AppOptions>>().Value;
var loggerConfig = new LoggerConfiguration().ReadFrom.Configuration(config);
if (!String.IsNullOrEmpty(options.ExceptionlessApiKey))
loggerConfig.WriteTo.Sink(new ExceptionlessSink(), LogEventLevel.Verbose);
Log.Logger = loggerConfig.CreateLogger();
var configDictionary = config.ToDictionary();
Log.Information("Bootstrapping {AppMode} mode API ({InformationalVersion}) on {MachineName} using {@Settings} loaded from {Folder}", environment, options.InformationalVersion, Environment.MachineName, configDictionary, currentDirectory);
bool useApplicationInsights = !String.IsNullOrEmpty(options.ApplicationInsightsKey);
var builder = WebHost.CreateDefaultBuilder(args)
.UseEnvironment(environment)
.UseKestrel(c => {
c.AddServerHeader = false;
if (options.MaximumEventPostSize > 0)
c.Limits.MaxRequestBodySize = options.MaximumEventPostSize;
})
.UseSerilog(Log.Logger)
.SuppressStatusMessages(true)
.UseConfiguration(config)
.ConfigureServices(s => {
if (useApplicationInsights) {
s.AddSingleton<ITelemetryInitializer, ExceptionlessTelemetryInitializer>();
s.AddHttpContextAccessor();
s.AddApplicationInsightsTelemetry();
}
})
.UseStartup<Startup>();
if (useApplicationInsights)
builder.UseApplicationInsights(options.ApplicationInsightsKey);
var metricOptions = container.GetRequiredService<IOptions<MetricOptions>>().Value;
if (!String.IsNullOrEmpty(metricOptions.Provider))
ConfigureMetricsReporting(builder, metricOptions);
return builder;
}
private static void ConfigureMetricsReporting(IWebHostBuilder builder, MetricOptions options) {
if (String.Equals(options.Provider, "prometheus")) {
var metrics = AppMetrics.CreateDefaultBuilder()
.OutputMetrics.AsPrometheusPlainText()
.OutputMetrics.AsPrometheusProtobuf()
.Build();
builder.ConfigureMetrics(metrics).UseMetrics(o => {
o.EndpointOptions = endpointsOptions => {
endpointsOptions.MetricsTextEndpointOutputFormatter = metrics.OutputMetricsFormatters.GetType<MetricsPrometheusTextOutputFormatter>();
endpointsOptions.MetricsEndpointOutputFormatter = metrics.OutputMetricsFormatters.GetType<MetricsPrometheusProtobufOutputFormatter>();
};
});
} else if (!String.Equals(options.Provider, "statsd")) {
builder.UseMetrics();
}
}
}
}
| 45.26087 | 249 | 0.633622 | [
"Apache-2.0"
] | caogengmeng/Exceptionless | src/Exceptionless.Web/Program.cs | 5,207 | C# |
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* 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.
*/
namespace TencentCloud.Gaap.V20180529.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class BindListenerRealServersResponse : AbstractModel
{
/// <summary>
/// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
/// </summary>
[JsonProperty("RequestId")]
public string RequestId{ get; set; }
/// <summary>
/// 内部实现,用户禁止调用
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
}
}
}
| 29.863636 | 83 | 0.665906 | [
"Apache-2.0"
] | Darkfaker/tencentcloud-sdk-dotnet | TencentCloud/Gaap/V20180529/Models/BindListenerRealServersResponse.cs | 1,394 | C# |
//------------------------------------------------------------------------------
// <auto-generated>
// Этот код создан программой.
// Исполняемая версия:4.0.30319.42000
//
// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
// повторной генерации кода.
// </auto-generated>
//------------------------------------------------------------------------------
namespace CUM.Properties {
using System;
/// <summary>
/// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д.
/// </summary>
// Этот класс создан автоматически классом StronglyTypedResourceBuilder
// с помощью такого средства, как ResGen или Visual Studio.
// Чтобы добавить или удалить член, измените файл .ResX и снова запустите ResGen
// с параметром /str или перестройте свой проект VS.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Возвращает кэшированный экземпляр ResourceManager, использованный этим классом.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CUM.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Перезаписывает свойство CurrentUICulture текущего потока для всех
/// обращений к ресурсу с помощью этого класса ресурса со строгой типизацией.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}
| 44.421875 | 169 | 0.623989 | [
"MIT"
] | Maslinin/Chocolatey-Manager | Properties/Resources.Designer.cs | 3,354 | C# |
using static NWN.FinalFantasy.Core.NWScript.NWScript;
using Type = NWN.FinalFantasy.Core.NWScript.Enum.Creature.Type;
namespace NWN.FinalFantasy.Service
{
public class Messaging
{
/// <summary>
/// Sends a message to all nearby players within 10 meters.
/// </summary>
/// <param name="sender">The sender of the message.</param>
/// <param name="message">The message to send to all nearby players.</param>
public static void SendMessageNearbyToPlayers(uint sender, string message)
{
const float MaxDistance = 10.0f;
SendMessageToPC(sender, message);
int nth = 1;
var nearby = GetNearestCreature(Type.PlayerCharacter, 1, sender, nth);
while (GetIsObjectValid(nearby) && GetDistanceBetween(sender, nearby) <= MaxDistance)
{
if (sender == nearby) continue;
SendMessageToPC(nearby, message);
nth++;
nearby = GetNearestCreature(Type.PlayerCharacter, 1, sender, nth);
}
}
}
}
| 34.34375 | 97 | 0.599636 | [
"MIT"
] | Martinus-1453/NWN.FinalFantasy | NWN.FinalFantasy/Service/Messaging.cs | 1,101 | C# |
using System;
using System.Linq;
using Android.Graphics;
using Android.Graphics.Drawables;
using AColor = Android.Graphics.Color;
using APath = Android.Graphics.Path;
namespace Xamarin.Forms.Platform.Android
{
internal class BorderDrawable : Drawable
{
public const int DefaultCornerRadius = 2; // Default value for Android material button.
readonly Func<double, float> _convertToPixels;
bool _isDisposed;
Bitmap _normalBitmap;
bool _pressed;
Bitmap _pressedBitmap;
float _paddingLeft;
float _paddingTop;
Color _defaultColor;
readonly bool _drawOutlineWithBackground;
AColor _shadowColor;
float _shadowDx;
float _shadowDy;
float _shadowRadius;
float PaddingLeft
{
get { return (_paddingLeft / 2f) + _shadowDx; }
set { _paddingLeft = value; }
}
float PaddingTop
{
get { return (_paddingTop / 2f) + _shadowDy; }
set { _paddingTop = value; }
}
public BorderDrawable(Func<double, float> convertToPixels, Color defaultColor, bool drawOutlineWithBackground)
{
_convertToPixels = convertToPixels;
_pressed = false;
_defaultColor = defaultColor;
_drawOutlineWithBackground = drawOutlineWithBackground;
}
public IBorderElement BorderElement
{
get;
set;
}
public override bool IsStateful
{
get { return true; }
}
public override int Opacity
{
get { return 0; }
}
public override void Draw(Canvas canvas)
{
//Bounds = new Rect(Bounds.Left, Bounds.Top, Bounds.Right + (int)_convertToPixels(10), Bounds.Bottom + (int)_convertToPixels(10));
int width = Bounds.Width();
int height = Bounds.Height();
if (width <= 0 || height <= 0)
return;
if (_normalBitmap == null ||
_normalBitmap?.IsDisposed() == true ||
_pressedBitmap?.IsDisposed() == true ||
_normalBitmap.Height != height ||
_normalBitmap.Width != width)
Reset();
if (!_drawOutlineWithBackground && BorderElement.BackgroundColor == Color.Default)
return;
Bitmap bitmap = null;
if (GetState().Contains(global::Android.Resource.Attribute.StatePressed))
{
_pressedBitmap = _pressedBitmap ?? CreateBitmap(true, width, height);
bitmap = _pressedBitmap;
}
else
{
_normalBitmap = _normalBitmap ?? CreateBitmap(false, width, height);
bitmap = _normalBitmap;
}
canvas.DrawBitmap(bitmap, 0, 0, new Paint());
}
public BorderDrawable SetShadow(float dy, float dx, AColor color, float radius)
{
_shadowDx = dx;
_shadowDy = dy;
_shadowColor = color;
_shadowRadius = radius;
return this;
}
public BorderDrawable SetPadding(float top, float left)
{
_paddingTop = top;
_paddingLeft = left;
return this;
}
public void Reset()
{
if (_normalBitmap != null)
{
if (!_normalBitmap.IsDisposed())
{
_normalBitmap.Recycle();
_normalBitmap.Dispose();
}
_normalBitmap = null;
}
if (_pressedBitmap != null)
{
if (!_pressedBitmap.IsDisposed())
{
_pressedBitmap.Recycle();
_pressedBitmap.Dispose();
}
_pressedBitmap = null;
}
}
public override void SetAlpha(int alpha)
{
}
public override void SetColorFilter(ColorFilter cf)
{
}
public Color BackgroundColor => BorderElement.BackgroundColor == Color.Default ? _defaultColor : BorderElement.BackgroundColor;
public Color PressedBackgroundColor => BackgroundColor.AddLuminosity(-.12);//<item name="highlight_alpha_material_light" format="float" type="dimen">0.12</item>
protected override void Dispose(bool disposing)
{
if (_isDisposed)
return;
_isDisposed = true;
if (disposing)
Reset();
base.Dispose(disposing);
}
protected override bool OnStateChange(int[] state)
{
bool old = _pressed;
_pressed = state.Contains(global::Android.Resource.Attribute.StatePressed);
if (_pressed != old)
{
InvalidateSelf();
return true;
}
return false;
}
Bitmap CreateBitmap(bool pressed, int width, int height)
{
Bitmap bitmap = Bitmap.CreateBitmap(width, height, Bitmap.Config.Argb8888);
using (var canvas = new Canvas(bitmap))
{
DrawBackground(canvas, width, height, pressed);
if (_drawOutlineWithBackground)
DrawOutline(canvas, width, height);
}
return bitmap;
}
void DrawBackground(Canvas canvas, int width, int height, bool pressed)
{
var paint = new Paint { AntiAlias = true };
var path = new APath();
float borderRadius = ConvertCornerRadiusToPixels();
RectF rect = new RectF(0, 0, width, height);
rect.Inset(PaddingLeft, PaddingTop);
path.AddRoundRect(rect, borderRadius, borderRadius, APath.Direction.Cw);
paint.Color = pressed ? PressedBackgroundColor.ToAndroid() : BackgroundColor.ToAndroid();
paint.SetStyle(Paint.Style.Fill);
paint.SetShadowLayer(_shadowRadius, _shadowDx, _shadowDy, _shadowColor);
if (BorderElement.IsBackgroundSet())
{
Brush background = BorderElement.Background;
paint.UpdateBackground(background, height, width);
}
canvas.DrawPath(path, paint);
}
float ConvertCornerRadiusToPixels()
{
int cornerRadius = DefaultCornerRadius;
if (BorderElement.IsCornerRadiusSet() && BorderElement.CornerRadius != (int)BorderElement.CornerRadiusDefaultValue)
cornerRadius = BorderElement.CornerRadius;
return _convertToPixels(cornerRadius);
}
public RectF GetPaddingBounds(int width, int height)
{
RectF rect = new RectF(0, 0, width, height);
rect.Inset(PaddingLeft, PaddingTop);
return rect;
}
public void DrawCircle(Canvas canvas, int width, int height, Action<Canvas> finishDraw)
{
try
{
var radius = (float)BorderElement.CornerRadius;
if (radius <= 0)
{
finishDraw(canvas);
return;
}
var borderThickness = _convertToPixels(BorderElement.BorderWidth);
using (var path = new APath())
{
float borderWidth = _convertToPixels(BorderElement.BorderWidth);
float inset = borderWidth / 2;
// adjust border radius so outer edge of stroke is same radius as border radius of background
float borderRadius = Math.Max(ConvertCornerRadiusToPixels() - inset, 0);
RectF rect = new RectF(0, 0, width, height);
rect.Inset(PaddingLeft, PaddingTop);
path.AddRoundRect(rect, borderRadius, borderRadius, APath.Direction.Ccw);
canvas.Save();
canvas.ClipPath(path);
finishDraw(canvas);
}
canvas.Restore();
return;
}
catch (Exception ex)
{
Internals.Log.Warning(nameof(BorderDrawable), $"Unable to create circle image: {ex}");
}
finishDraw(canvas);
}
public void DrawOutline(Canvas canvas, int width, int height)
{
if (BorderElement.BorderWidth <= 0)
return;
using (var paint = new Paint { AntiAlias = true })
using (var path = new APath())
{
float borderWidth = _convertToPixels(BorderElement.BorderWidth);
float inset = borderWidth / 2;
// adjust border radius so outer edge of stroke is same radius as border radius of background
float borderRadius = Math.Max(ConvertCornerRadiusToPixels() - inset, 0);
RectF rect = new RectF(0, 0, width, height);
rect.Inset(inset + PaddingLeft, inset + PaddingTop);
path.AddRoundRect(rect, borderRadius, borderRadius, APath.Direction.Cw);
paint.StrokeWidth = borderWidth;
paint.SetStyle(Paint.Style.Stroke);
paint.Color = BorderElement.BorderColor.ToAndroid();
canvas.DrawPath(path, paint);
}
}
}
} | 25.013468 | 162 | 0.69296 | [
"MIT"
] | AlleSchonWeg/Xamarin.Forms | Xamarin.Forms.Platform.Android/Renderers/BorderDrawable.cs | 7,429 | C# |
#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "2C792944718F40ED0C9654A9F08A01A5A8AAB208C8A8650E964262E968DC923B"
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using GuitarThing;
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Automation;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Effects;
using System.Windows.Media.Imaging;
using System.Windows.Media.Media3D;
using System.Windows.Media.TextFormatting;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Shell;
namespace GuitarThing {
/// <summary>
/// MainWindow
/// </summary>
public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
#line 10 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox tbGuitar;
#line default
#line hidden
#line 11 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBlock tblScale;
#line default
#line hidden
#line 12 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Grid grdSettings;
#line default
#line hidden
#line 14 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.ComboBox cmbSign;
#line default
#line hidden
#line 19 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.ComboBox cmbScale;
#line default
#line hidden
#line 24 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.ComboBox cmbTuning;
#line default
#line hidden
#line 33 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.ComboBox cmbMode;
#line default
#line hidden
#line 43 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.ComboBox cmbKey;
#line default
#line hidden
#line 58 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.ComboBox cmbStartFret;
#line default
#line hidden
#line 60 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.ComboBox cmbEndFret;
#line default
#line hidden
#line 63 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.ComboBox cmbIndicator;
#line default
#line hidden
#line 68 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.StackPanel spDisplay;
#line default
#line hidden
#line 72 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.StackPanel spIntervals;
#line default
#line hidden
#line 90 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button btnProgression;
#line default
#line hidden
#line 91 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBlock tblProgression;
#line default
#line hidden
private bool _contentLoaded;
/// <summary>
/// InitializeComponent
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
public void InitializeComponent() {
if (_contentLoaded) {
return;
}
_contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/GuitarThing;component/mainwindow.xaml", System.UriKind.Relative);
#line 1 "..\..\MainWindow.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater);
#line default
#line hidden
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
switch (connectionId)
{
case 1:
this.tbGuitar = ((System.Windows.Controls.TextBox)(target));
return;
case 2:
this.tblScale = ((System.Windows.Controls.TextBlock)(target));
return;
case 3:
this.grdSettings = ((System.Windows.Controls.Grid)(target));
return;
case 4:
this.cmbSign = ((System.Windows.Controls.ComboBox)(target));
return;
case 5:
this.cmbScale = ((System.Windows.Controls.ComboBox)(target));
return;
case 6:
this.cmbTuning = ((System.Windows.Controls.ComboBox)(target));
return;
case 7:
this.cmbMode = ((System.Windows.Controls.ComboBox)(target));
return;
case 8:
this.cmbKey = ((System.Windows.Controls.ComboBox)(target));
return;
case 9:
this.cmbStartFret = ((System.Windows.Controls.ComboBox)(target));
return;
case 10:
this.cmbEndFret = ((System.Windows.Controls.ComboBox)(target));
return;
case 11:
this.cmbIndicator = ((System.Windows.Controls.ComboBox)(target));
return;
case 12:
this.spDisplay = ((System.Windows.Controls.StackPanel)(target));
return;
case 13:
this.spIntervals = ((System.Windows.Controls.StackPanel)(target));
return;
case 14:
this.btnProgression = ((System.Windows.Controls.Button)(target));
return;
case 15:
this.tblProgression = ((System.Windows.Controls.TextBlock)(target));
return;
}
this._contentLoaded = true;
}
}
}
| 38.995902 | 150 | 0.606831 | [
"MIT"
] | Hedge42/guitar-scale-helper | GuitarThing/obj/Debug/MainWindow.g.cs | 9,517 | C# |
using Microsoft.EntityFrameworkCore.Migrations;
using System;
using System.Collections.Generic;
namespace FreeTime.Migrations
{
public partial class Inicio : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Personagens",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("Sqlite:Autoincrement", true),
Ano = table.Column<int>(nullable: false),
Criador = table.Column<string>(nullable: true),
Descricao = table.Column<string>(nullable: true),
ImageUrl = table.Column<string>(nullable: true),
Nome = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Personagens", x => x.Id);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Personagens");
}
}
}
| 33.5 | 71 | 0.528192 | [
"MIT"
] | RondineleG/FreeTime | FreeTime/Migrations/20190706154049_Inicio.cs | 1,208 | C# |
#if NETSTANDARD1_5 || NETCOREAPP1_0
using System;
namespace Xunit
{
// This class wraps DiaSession, and uses DiaSessionWrapperHelper discover when a test is an async test
// (since that requires special handling by DIA).
class DiaSessionWrapper : IDisposable
{
readonly DiaSessionWrapperHelper helper;
readonly DiaSession session;
public DiaSessionWrapper(string assemblyFilename)
{
session = new DiaSession(assemblyFilename);
helper = new DiaSessionWrapperHelper(assemblyFilename);
}
public DiaNavigationData GetNavigationData(string typeName, string methodName)
{
var owningAssemblyFilename = session.AssemblyFileName;
helper.Normalize(ref typeName, ref methodName, ref owningAssemblyFilename);
return session.GetNavigationData(typeName, methodName, owningAssemblyFilename);
}
public void Dispose()
{
session.Dispose();
}
}
}
#endif | 29.257143 | 108 | 0.670898 | [
"Apache-2.0"
] | Jensaarai/xunit | src/xunit.runner.utility/Utility/DiaSessionWrapper_DotNet.cs | 1,026 | C# |
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Castle.MicroKernel.Registration;
using Castle.Windsor.MsDependencyInjection;
using Abp.Dependency;
using ASPNetCoreVue.EntityFrameworkCore;
using ASPNetCoreVue.Identity;
namespace ASPNetCoreVue.Tests.DependencyInjection
{
public static class ServiceCollectionRegistrar
{
public static void Register(IIocManager iocManager)
{
var services = new ServiceCollection();
IdentityRegistrar.Register(services);
services.AddEntityFrameworkInMemoryDatabase();
var serviceProvider = WindsorRegistrationHelper.CreateServiceProvider(iocManager.IocContainer, services);
var builder = new DbContextOptionsBuilder<ASPNetCoreVueDbContext>();
builder.UseInMemoryDatabase(Guid.NewGuid().ToString()).UseInternalServiceProvider(serviceProvider);
iocManager.IocContainer.Register(
Component
.For<DbContextOptions<ASPNetCoreVueDbContext>>()
.Instance(builder.Options)
.LifestyleSingleton()
);
}
}
}
| 33.222222 | 117 | 0.701505 | [
"MIT"
] | thaibm/aspnetcore-vue-boilerplate | aspnet-core/test/ASPNetCoreVue.Tests/DependencyInjection/ServiceCollectionRegistrar.cs | 1,198 | C# |
#region Copyright
/// <copyright>
/// Copyright (c) 2011 Ramunas Geciauskas, http://geciauskas.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.
/// </copyright>
/// <author>Ramunas Geciauskas</author>
/// <summary>Low level Windows keyboard hook class</summary>
#endregion
using System;
using System.Runtime.InteropServices;
using System.Diagnostics;
namespace RamGecTools
{
/// <summary>
/// Class for intercepting low level keyboard hooks
/// </summary>
public class KeyboardHook
{
/// <summary>
/// Virtual Keys
/// </summary>
public enum VKeys
{
// Losely based on http://www.pinvoke.net/default.aspx/Enums/VK.html
LBUTTON = 0x01, // Left mouse button
RBUTTON = 0x02, // Right mouse button
CANCEL = 0x03, // Control-break processing
MBUTTON = 0x04, // Middle mouse button (three-button mouse)
XBUTTON1 = 0x05, // Windows 2000/XP: X1 mouse button
XBUTTON2 = 0x06, // Windows 2000/XP: X2 mouse button
// 0x07 // Undefined
BACK = 0x08, // BACKSPACE key
TAB = 0x09, // TAB key
// 0x0A-0x0B, // Reserved
CLEAR = 0x0C, // CLEAR key
RETURN = 0x0D, // ENTER key
// 0x0E-0x0F, // Undefined
SHIFT = 0x10, // SHIFT key
CONTROL = 0x11, // CTRL key
MENU = 0x12, // ALT key
PAUSE = 0x13, // PAUSE key
CAPITAL = 0x14, // CAPS LOCK key
KANA = 0x15, // Input Method Editor (IME) Kana mode
HANGUL = 0x15, // IME Hangul mode
// 0x16, // Undefined
JUNJA = 0x17, // IME Junja mode
FINAL = 0x18, // IME final mode
HANJA = 0x19, // IME Hanja mode
KANJI = 0x19, // IME Kanji mode
// 0x1A, // Undefined
ESCAPE = 0x1B, // ESC key
CONVERT = 0x1C, // IME convert
NONCONVERT = 0x1D, // IME nonconvert
ACCEPT = 0x1E, // IME accept
MODECHANGE = 0x1F, // IME mode change request
SPACE = 0x20, // SPACEBAR
PRIOR = 0x21, // PAGE UP key
NEXT = 0x22, // PAGE DOWN key
END = 0x23, // END key
HOME = 0x24, // HOME key
LEFT = 0x25, // LEFT ARROW key
UP = 0x26, // UP ARROW key
RIGHT = 0x27, // RIGHT ARROW key
DOWN = 0x28, // DOWN ARROW key
SELECT = 0x29, // SELECT key
PRINT = 0x2A, // PRINT key
EXECUTE = 0x2B, // EXECUTE key
SNAPSHOT = 0x2C, // PRINT SCREEN key
INSERT = 0x2D, // INS key
DELETE = 0x2E, // DEL key
HELP = 0x2F, // HELP key
KEY_0 = 0x30, // 0 key
KEY_1 = 0x31, // 1 key
KEY_2 = 0x32, // 2 key
KEY_3 = 0x33, // 3 key
KEY_4 = 0x34, // 4 key
KEY_5 = 0x35, // 5 key
KEY_6 = 0x36, // 6 key
KEY_7 = 0x37, // 7 key
KEY_8 = 0x38, // 8 key
KEY_9 = 0x39, // 9 key
// 0x3A-0x40, // Undefined
KEY_A = 0x41, // A key
KEY_B = 0x42, // B key
KEY_C = 0x43, // C key
KEY_D = 0x44, // D key
KEY_E = 0x45, // E key
KEY_F = 0x46, // F key
KEY_G = 0x47, // G key
KEY_H = 0x48, // H key
KEY_I = 0x49, // I key
KEY_J = 0x4A, // J key
KEY_K = 0x4B, // K key
KEY_L = 0x4C, // L key
KEY_M = 0x4D, // M key
KEY_N = 0x4E, // N key
KEY_O = 0x4F, // O key
KEY_P = 0x50, // P key
KEY_Q = 0x51, // Q key
KEY_R = 0x52, // R key
KEY_S = 0x53, // S key
KEY_T = 0x54, // T key
KEY_U = 0x55, // U key
KEY_V = 0x56, // V key
KEY_W = 0x57, // W key
KEY_X = 0x58, // X key
KEY_Y = 0x59, // Y key
KEY_Z = 0x5A, // Z key
LWIN = 0x5B, // Left Windows key (Microsoft Natural keyboard)
RWIN = 0x5C, // Right Windows key (Natural keyboard)
APPS = 0x5D, // Applications key (Natural keyboard)
// 0x5E, // Reserved
SLEEP = 0x5F, // Computer Sleep key
NUMPAD0 = 0x60, // Numeric keypad 0 key
NUMPAD1 = 0x61, // Numeric keypad 1 key
NUMPAD2 = 0x62, // Numeric keypad 2 key
NUMPAD3 = 0x63, // Numeric keypad 3 key
NUMPAD4 = 0x64, // Numeric keypad 4 key
NUMPAD5 = 0x65, // Numeric keypad 5 key
NUMPAD6 = 0x66, // Numeric keypad 6 key
NUMPAD7 = 0x67, // Numeric keypad 7 key
NUMPAD8 = 0x68, // Numeric keypad 8 key
NUMPAD9 = 0x69, // Numeric keypad 9 key
MULTIPLY = 0x6A, // Multiply key
ADD = 0x6B, // Add key
SEPARATOR = 0x6C, // Separator key
SUBTRACT = 0x6D, // Subtract key
DECIMAL = 0x6E, // Decimal key
DIVIDE = 0x6F, // Divide key
F1 = 0x70, // F1 key
F2 = 0x71, // F2 key
F3 = 0x72, // F3 key
F4 = 0x73, // F4 key
F5 = 0x74, // F5 key
F6 = 0x75, // F6 key
F7 = 0x76, // F7 key
F8 = 0x77, // F8 key
F9 = 0x78, // F9 key
F10 = 0x79, // F10 key
F11 = 0x7A, // F11 key
F12 = 0x7B, // F12 key
F13 = 0x7C, // F13 key
F14 = 0x7D, // F14 key
F15 = 0x7E, // F15 key
F16 = 0x7F, // F16 key
F17 = 0x80, // F17 key
F18 = 0x81, // F18 key
F19 = 0x82, // F19 key
F20 = 0x83, // F20 key
F21 = 0x84, // F21 key
F22 = 0x85, // F22 key, (PPC only) Key used to lock device.
F23 = 0x86, // F23 key
F24 = 0x87, // F24 key
// 0x88-0X8F, // Unassigned
NUMLOCK = 0x90, // NUM LOCK key
SCROLL = 0x91, // SCROLL LOCK key
// 0x92-0x96, // OEM specific
// 0x97-0x9F, // Unassigned
LSHIFT = 0xA0, // Left SHIFT key
RSHIFT = 0xA1, // Right SHIFT key
LCONTROL = 0xA2, // Left CONTROL key
RCONTROL = 0xA3, // Right CONTROL key
LMENU = 0xA4, // Left MENU key
RMENU = 0xA5, // Right MENU key
BROWSER_BACK = 0xA6, // Windows 2000/XP: Browser Back key
BROWSER_FORWARD = 0xA7, // Windows 2000/XP: Browser Forward key
BROWSER_REFRESH = 0xA8, // Windows 2000/XP: Browser Refresh key
BROWSER_STOP = 0xA9, // Windows 2000/XP: Browser Stop key
BROWSER_SEARCH = 0xAA, // Windows 2000/XP: Browser Search key
BROWSER_FAVORITES = 0xAB, // Windows 2000/XP: Browser Favorites key
BROWSER_HOME = 0xAC, // Windows 2000/XP: Browser Start and Home key
VOLUME_MUTE = 0xAD, // Windows 2000/XP: Volume Mute key
VOLUME_DOWN = 0xAE, // Windows 2000/XP: Volume Down key
VOLUME_UP = 0xAF, // Windows 2000/XP: Volume Up key
MEDIA_NEXT_TRACK = 0xB0,// Windows 2000/XP: Next Track key
MEDIA_PREV_TRACK = 0xB1,// Windows 2000/XP: Previous Track key
MEDIA_STOP = 0xB2, // Windows 2000/XP: Stop Media key
MEDIA_PLAY_PAUSE = 0xB3,// Windows 2000/XP: Play/Pause Media key
LAUNCH_MAIL = 0xB4, // Windows 2000/XP: Start Mail key
LAUNCH_MEDIA_SELECT = 0xB5, // Windows 2000/XP: Select Media key
LAUNCH_APP1 = 0xB6, // Windows 2000/XP: Start Application 1 key
LAUNCH_APP2 = 0xB7, // Windows 2000/XP: Start Application 2 key
// 0xB8-0xB9, // Reserved
OEM_1 = 0xBA, // Used for miscellaneous characters; it can vary by keyboard.
// Windows 2000/XP: For the US standard keyboard, the ';:' key
OEM_PLUS = 0xBB, // Windows 2000/XP: For any country/region, the '+' key
OEM_COMMA = 0xBC, // Windows 2000/XP: For any country/region, the ',' key
OEM_MINUS = 0xBD, // Windows 2000/XP: For any country/region, the '-' key
OEM_PERIOD = 0xBE, // Windows 2000/XP: For any country/region, the '.' key
OEM_2 = 0xBF, // Used for miscellaneous characters; it can vary by keyboard.
// Windows 2000/XP: For the US standard keyboard, the '/?' key
OEM_3 = 0xC0, // Used for miscellaneous characters; it can vary by keyboard.
// Windows 2000/XP: For the US standard keyboard, the '`~' key
// 0xC1-0xD7, // Reserved
// 0xD8-0xDA, // Unassigned
OEM_4 = 0xDB, // Used for miscellaneous characters; it can vary by keyboard.
// Windows 2000/XP: For the US standard keyboard, the '[{' key
OEM_5 = 0xDC, // Used for miscellaneous characters; it can vary by keyboard.
// Windows 2000/XP: For the US standard keyboard, the '\|' key
OEM_6 = 0xDD, // Used for miscellaneous characters; it can vary by keyboard.
// Windows 2000/XP: For the US standard keyboard, the ']}' key
OEM_7 = 0xDE, // Used for miscellaneous characters; it can vary by keyboard.
// Windows 2000/XP: For the US standard keyboard, the 'single-quote/double-quote' key
OEM_8 = 0xDF, // Used for miscellaneous characters; it can vary by keyboard.
// 0xE0, // Reserved
// 0xE1, // OEM specific
OEM_102 = 0xE2, // Windows 2000/XP: Either the angle bracket key or the backslash key on the RT 102-key keyboard
// 0xE3-E4, // OEM specific
PROCESSKEY = 0xE5, // Windows 95/98/Me, Windows NT 4.0, Windows 2000/XP: IME PROCESS key
// 0xE6, // OEM specific
PACKET = 0xE7, // Windows 2000/XP: Used to pass Unicode characters as if they were keystrokes. The VK_PACKET key is the low word of a 32-bit Virtual Key value used for non-keyboard input methods. For more information, see Remark in KEYBDINPUT, SendInput, WM_KEYDOWN, and WM_KEYUP
// 0xE8, // Unassigned
// 0xE9-F5, // OEM specific
ATTN = 0xF6, // Attn key
CRSEL = 0xF7, // CrSel key
EXSEL = 0xF8, // ExSel key
EREOF = 0xF9, // Erase EOF key
PLAY = 0xFA, // Play key
ZOOM = 0xFB, // Zoom key
NONAME = 0xFC, // Reserved
PA1 = 0xFD, // PA1 key
OEM_CLEAR = 0xFE // Clear key
}
/// <summary>
/// Internal callback processing function
/// </summary>
private delegate IntPtr KeyboardHookHandler(int nCode, IntPtr wParam, IntPtr lParam);
private KeyboardHookHandler hookHandler;
/// <summary>
/// Function that will be called when defined events occur
/// </summary>
/// <param name="key">VKeys</param>
public delegate void KeyboardHookCallback(VKeys key);
#region Events
public event KeyboardHookCallback KeyDown;
public event KeyboardHookCallback KeyUp;
#endregion
/// <summary>
/// Hook ID
/// </summary>
private IntPtr hookID = IntPtr.Zero;
/// <summary>
/// Install low level keyboard hook
/// </summary>
public void Install()
{
hookHandler = HookFunc;
hookID = SetHook(hookHandler);
}
/// <summary>
/// Remove low level keyboard hook
/// </summary>
public void Uninstall()
{
UnhookWindowsHookEx(hookID);
}
/// <summary>
/// Registers hook with Windows API
/// </summary>
/// <param name="proc">Callback function</param>
/// <returns>Hook ID</returns>
private IntPtr SetHook(KeyboardHookHandler proc)
{
using (ProcessModule module = Process.GetCurrentProcess().MainModule)
return SetWindowsHookEx(13, proc, GetModuleHandle(module.ModuleName), 0);
}
/// <summary>
/// Default hook call, which analyses pressed keys
/// </summary>
private IntPtr HookFunc(int nCode, IntPtr wParam, IntPtr lParam)
{
if (nCode >= 0)
{
int iwParam = wParam.ToInt32();
if ((iwParam == WM_KEYDOWN || iwParam == WM_SYSKEYDOWN))
if (KeyDown != null)
KeyDown((VKeys)Marshal.ReadInt32(lParam));
if ((iwParam == WM_KEYUP || iwParam == WM_SYSKEYUP))
if (KeyUp != null)
KeyUp((VKeys)Marshal.ReadInt32(lParam));
}
return CallNextHookEx(hookID, nCode, wParam, lParam);
}
/// <summary>
/// Destructor. Unhook current hook
/// </summary>
~KeyboardHook()
{
Uninstall();
}
/// <summary>
/// Low-Level function declarations
/// </summary>
#region WinAPI
private const int WM_KEYDOWN = 0x100;
private const int WM_SYSKEYDOWN = 0x104;
private const int WM_KEYUP = 0x101;
private const int WM_SYSKEYUP = 0x105;
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
private static extern IntPtr SetWindowsHookEx(int idHook, KeyboardHookHandler lpfn, IntPtr hMod, uint dwThreadId);
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool UnhookWindowsHookEx(IntPtr hhk);
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
private static extern IntPtr CallNextHookEx(IntPtr hhk, int nCode, IntPtr wParam, IntPtr lParam);
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
private static extern IntPtr GetModuleHandle(string lpModuleName);
#endregion
}
}
| 47.331412 | 296 | 0.505419 | [
"MIT"
] | naplayer/Nazeka | Nazeka/KeyboardHook.cs | 16,426 | C# |
using System;
using MouseKeyboardActivityMonitor.WinApi;
namespace MouseKeyboardActivityMonitor
{
/// <summary>
/// Base class used to implement mouse or keybord hook listeners.
/// It provides base methods to subscribe and unsubscribe to hooks.
/// Common processing, error handling and cleanup logic.
/// </summary>
public abstract class BaseHookListener : IDisposable
{
private Hooker m_Hooker;
/// <summary>
/// Base constructor of <see cref="BaseHookListener"/>
/// </summary>
/// <param name="hooker">Depending on this parameter the listener hooks either application or global keyboard events.</param>
/// <remarks>
/// Hooks are not active after instantiation. You need to use either <see cref="BaseHookListener.Enabled"/> property or call <see cref="BaseHookListener.Start"/> method.
/// </remarks>
protected BaseHookListener(Hooker hooker)
{
if (hooker == null)
{
throw new ArgumentNullException("hooker");
}
m_Hooker = hooker;
}
/// <summary>
/// Stores the handle to the Keyboard or Mouse hook procedure.
/// </summary>
protected int HookHandle { get; set; }
/// <summary>
/// Keeps the reference to prevent garbage collection of delegate. See: CallbackOnCollectedDelegate http://msdn.microsoft.com/en-us/library/43yky316(v=VS.100).aspx
/// </summary>
protected HookCallback HookCallbackReferenceKeeper { get; set; }
internal bool IsGlobal
{
get
{
return m_Hooker.IsGlobal;
}
}
/// <summary>
/// Override this method to modify logic of firing events.
/// </summary>
protected abstract bool ProcessCallback(int wParam, IntPtr lParam);
/// <summary>
/// A callback function which will be called every time a keyboard or mouse activity detected.
/// <see cref="WinApi.HookCallback"/>
/// </summary>
protected int HookCallback(int nCode, Int32 wParam, IntPtr lParam)
{
if (nCode == 0)
{
bool shouldProcess = ProcessCallback(wParam, lParam);
if (!shouldProcess)
{
return -1;
}
}
return CallNextHook(nCode, wParam, lParam);
}
private int CallNextHook(int nCode, int wParam, IntPtr lParam)
{
return HookNativeMethods.CallNextHookEx(HookHandle, nCode, wParam, lParam);
}
/// <summary>
/// Subscribes to the hook and starts firing events.
/// </summary>
/// <exception cref="System.ComponentModel.Win32Exception"></exception>
public void Start()
{
if (Enabled)
{
throw new InvalidOperationException("Hook listener is already started. Call Stop() method firts or use Enabled property.");
}
HookCallbackReferenceKeeper = new HookCallback(HookCallback);
try
{
HookHandle = m_Hooker.Subscribe(GetHookId(), HookCallbackReferenceKeeper);
}
catch (Exception)
{
HookCallbackReferenceKeeper = null;
HookHandle = 0;
throw;
}
}
/// <summary>
/// Unsubscribes from the hook and stops firing events.
/// </summary>
/// <exception cref="System.ComponentModel.Win32Exception"></exception>
public void Stop()
{
try
{
m_Hooker.Unsubscribe(HookHandle);
}
finally
{
HookCallbackReferenceKeeper = null;
HookHandle = 0;
}
}
/// <summary>
/// Enables you to switch from application hooks to global hooks and vice versa on the fly
/// without unsubscribing from events. Component remains enabled or disabled state after this call as it was before.
/// </summary>
/// <param name="hooker">An AppHooker or GlobalHooker object.</param>
public void Replace(Hooker hooker)
{
bool rememberEnabled = Enabled;
Enabled = false;
m_Hooker = hooker;
Enabled = rememberEnabled;
}
/// <summary>
/// Override to deliver correct id to be used for <see cref="HookNativeMethods.SetWindowsHookEx"/> call.
/// </summary>
/// <returns></returns>
protected abstract int GetHookId();
/// <summary>
/// Gets or Sets the enabled status of the Hook.
/// </summary>
/// <value>
/// True - The Hook is presently installed, activated, and will fire events.
/// <para>
/// False - The Hook is not part of the hook chain, and will not fire events.
/// </para>
/// </value>
public bool Enabled
{
get { return HookHandle != 0; }
set
{
bool mustEnable = value;
if (mustEnable)
{
if (!Enabled)
{
Start();
}
}
else
{
if (Enabled)
{
Stop();
}
}
}
}
/// <summary>
/// Release delegates, unsubscribes from hooks.
/// </summary>
/// <filterpriority>2</filterpriority>
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
/// <summary>
/// Method to be used from Dispose and finalizer.
/// Override this method to release subclass sepcific references.
/// </summary>
protected virtual void Dispose(bool isDisposing)
{
if (isDisposing)
{
Stop();
}
else
{
if (HookHandle != 0)
{
HookNativeMethods.UnhookWindowsHookEx(HookHandle);
}
}
}
/// <summary>
/// Unsubscribes from global hooks skiping error handling.
/// </summary>
~BaseHookListener()
{
Dispose(false);
}
}
} | 31.772947 | 177 | 0.513304 | [
"Apache-2.0"
] | katopz/oskz-vcsharp | MouseKeyboardActivityMonitor/BaseHookListener.cs | 6,577 | C# |
namespace ESanatateUI.UserControls
{
partial class PacientNou
{
/// <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 Component 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.btnView = new System.Windows.Forms.Button();
this.btnClear = new System.Windows.Forms.Button();
this.txtBoxPass = new System.Windows.Forms.TextBox();
this.btnParola = new System.Windows.Forms.Button();
this.txtBoxUser = new System.Windows.Forms.TextBox();
this.btnUser = new System.Windows.Forms.Button();
this.txtBoxTara = new System.Windows.Forms.TextBox();
this.btnTara = new System.Windows.Forms.Button();
this.txtBoxJudet = new System.Windows.Forms.TextBox();
this.btnJudet = new System.Windows.Forms.Button();
this.txtBoxLocalitate = new System.Windows.Forms.TextBox();
this.btnLocalitate = new System.Windows.Forms.Button();
this.txtBoxAdresa = new System.Windows.Forms.TextBox();
this.btnAdresa = new System.Windows.Forms.Button();
this.txtBoxEmail = new System.Windows.Forms.TextBox();
this.btnEmail = new System.Windows.Forms.Button();
this.txtBoxTelefon = new System.Windows.Forms.TextBox();
this.btnTelefon = new System.Windows.Forms.Button();
this.txtBoxNrCI = new System.Windows.Forms.TextBox();
this.btnNrCI = new System.Windows.Forms.Button();
this.btnSalveaza = new System.Windows.Forms.Button();
this.txtBoxSerieCI = new System.Windows.Forms.TextBox();
this.btnSerieCI = new System.Windows.Forms.Button();
this.txtBoxCNP = new System.Windows.Forms.TextBox();
this.btnCNP = new System.Windows.Forms.Button();
this.txtBoxPrenume = new System.Windows.Forms.TextBox();
this.btnPrenume = new System.Windows.Forms.Button();
this.txtBoxNume = new System.Windows.Forms.TextBox();
this.btnNume = new System.Windows.Forms.Button();
this.labelPacientNou = new System.Windows.Forms.Label();
this.panel4 = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel();
this.panel1 = new System.Windows.Forms.Panel();
this.SuspendLayout();
//
// btnView
//
this.btnView.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(85)))), ((int)(((byte)(175)))));
this.btnView.FlatAppearance.BorderSize = 0;
this.btnView.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnView.Font = new System.Drawing.Font("Times New Roman", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.btnView.ForeColor = System.Drawing.Color.White;
this.btnView.Location = new System.Drawing.Point(18, 612);
this.btnView.Name = "btnView";
this.btnView.Size = new System.Drawing.Size(244, 75);
this.btnView.TabIndex = 149;
this.btnView.Text = "Vizualizeaza";
this.btnView.UseVisualStyleBackColor = false;
//
// btnClear
//
this.btnClear.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(85)))), ((int)(((byte)(175)))));
this.btnClear.FlatAppearance.BorderSize = 0;
this.btnClear.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnClear.Font = new System.Drawing.Font("Times New Roman", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.btnClear.ForeColor = System.Drawing.Color.White;
this.btnClear.Location = new System.Drawing.Point(283, 612);
this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(231, 75);
this.btnClear.TabIndex = 148;
this.btnClear.Text = "Sterge";
this.btnClear.UseVisualStyleBackColor = false;
//
// txtBoxPass
//
this.txtBoxPass.Location = new System.Drawing.Point(312, 568);
this.txtBoxPass.Name = "txtBoxPass";
this.txtBoxPass.Size = new System.Drawing.Size(327, 20);
this.txtBoxPass.TabIndex = 147;
//
// btnParola
//
this.btnParola.FlatAppearance.BorderSize = 0;
this.btnParola.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnParola.Font = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.btnParola.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(85)))), ((int)(((byte)(175)))));
this.btnParola.Location = new System.Drawing.Point(151, 561);
this.btnParola.Name = "btnParola";
this.btnParola.Size = new System.Drawing.Size(155, 31);
this.btnParola.TabIndex = 146;
this.btnParola.Text = "Parola";
this.btnParola.UseVisualStyleBackColor = true;
//
// txtBoxUser
//
this.txtBoxUser.Location = new System.Drawing.Point(312, 529);
this.txtBoxUser.Name = "txtBoxUser";
this.txtBoxUser.Size = new System.Drawing.Size(327, 20);
this.txtBoxUser.TabIndex = 145;
//
// btnUser
//
this.btnUser.FlatAppearance.BorderSize = 0;
this.btnUser.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUser.Font = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.btnUser.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(85)))), ((int)(((byte)(175)))));
this.btnUser.Location = new System.Drawing.Point(151, 522);
this.btnUser.Name = "btnUser";
this.btnUser.Size = new System.Drawing.Size(155, 31);
this.btnUser.TabIndex = 144;
this.btnUser.Text = "Utilizator";
this.btnUser.UseVisualStyleBackColor = true;
//
// txtBoxTara
//
this.txtBoxTara.Location = new System.Drawing.Point(312, 492);
this.txtBoxTara.Name = "txtBoxTara";
this.txtBoxTara.Size = new System.Drawing.Size(327, 20);
this.txtBoxTara.TabIndex = 141;
//
// btnTara
//
this.btnTara.FlatAppearance.BorderSize = 0;
this.btnTara.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnTara.Font = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.btnTara.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(85)))), ((int)(((byte)(175)))));
this.btnTara.Location = new System.Drawing.Point(151, 485);
this.btnTara.Name = "btnTara";
this.btnTara.Size = new System.Drawing.Size(155, 31);
this.btnTara.TabIndex = 140;
this.btnTara.Text = "Tara";
this.btnTara.UseVisualStyleBackColor = true;
//
// txtBoxJudet
//
this.txtBoxJudet.Location = new System.Drawing.Point(312, 455);
this.txtBoxJudet.Name = "txtBoxJudet";
this.txtBoxJudet.Size = new System.Drawing.Size(327, 20);
this.txtBoxJudet.TabIndex = 139;
//
// btnJudet
//
this.btnJudet.FlatAppearance.BorderSize = 0;
this.btnJudet.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnJudet.Font = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.btnJudet.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(85)))), ((int)(((byte)(175)))));
this.btnJudet.Location = new System.Drawing.Point(151, 448);
this.btnJudet.Name = "btnJudet";
this.btnJudet.Size = new System.Drawing.Size(155, 31);
this.btnJudet.TabIndex = 138;
this.btnJudet.Text = "Judet";
this.btnJudet.UseVisualStyleBackColor = true;
//
// txtBoxLocalitate
//
this.txtBoxLocalitate.Location = new System.Drawing.Point(312, 375);
this.txtBoxLocalitate.Multiline = true;
this.txtBoxLocalitate.Name = "txtBoxLocalitate";
this.txtBoxLocalitate.Size = new System.Drawing.Size(327, 68);
this.txtBoxLocalitate.TabIndex = 137;
//
// btnLocalitate
//
this.btnLocalitate.FlatAppearance.BorderSize = 0;
this.btnLocalitate.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLocalitate.Font = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.btnLocalitate.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(85)))), ((int)(((byte)(175)))));
this.btnLocalitate.Location = new System.Drawing.Point(151, 376);
this.btnLocalitate.Name = "btnLocalitate";
this.btnLocalitate.Size = new System.Drawing.Size(155, 31);
this.btnLocalitate.TabIndex = 136;
this.btnLocalitate.Text = "Localitate";
this.btnLocalitate.UseVisualStyleBackColor = true;
//
// txtBoxAdresa
//
this.txtBoxAdresa.Location = new System.Drawing.Point(312, 344);
this.txtBoxAdresa.Name = "txtBoxAdresa";
this.txtBoxAdresa.Size = new System.Drawing.Size(327, 20);
this.txtBoxAdresa.TabIndex = 135;
//
// btnAdresa
//
this.btnAdresa.FlatAppearance.BorderSize = 0;
this.btnAdresa.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAdresa.Font = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.btnAdresa.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(85)))), ((int)(((byte)(175)))));
this.btnAdresa.Location = new System.Drawing.Point(151, 337);
this.btnAdresa.Name = "btnAdresa";
this.btnAdresa.Size = new System.Drawing.Size(155, 31);
this.btnAdresa.TabIndex = 134;
this.btnAdresa.Text = "Adresa";
this.btnAdresa.UseVisualStyleBackColor = true;
//
// txtBoxEmail
//
this.txtBoxEmail.Location = new System.Drawing.Point(312, 305);
this.txtBoxEmail.Name = "txtBoxEmail";
this.txtBoxEmail.Size = new System.Drawing.Size(327, 20);
this.txtBoxEmail.TabIndex = 133;
//
// btnEmail
//
this.btnEmail.FlatAppearance.BorderSize = 0;
this.btnEmail.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnEmail.Font = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.btnEmail.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(85)))), ((int)(((byte)(175)))));
this.btnEmail.Location = new System.Drawing.Point(151, 298);
this.btnEmail.Name = "btnEmail";
this.btnEmail.Size = new System.Drawing.Size(155, 31);
this.btnEmail.TabIndex = 132;
this.btnEmail.Text = "Email";
this.btnEmail.UseVisualStyleBackColor = true;
//
// txtBoxTelefon
//
this.txtBoxTelefon.Location = new System.Drawing.Point(312, 266);
this.txtBoxTelefon.Name = "txtBoxTelefon";
this.txtBoxTelefon.Size = new System.Drawing.Size(327, 20);
this.txtBoxTelefon.TabIndex = 131;
//
// btnTelefon
//
this.btnTelefon.FlatAppearance.BorderSize = 0;
this.btnTelefon.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnTelefon.Font = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.btnTelefon.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(85)))), ((int)(((byte)(175)))));
this.btnTelefon.Location = new System.Drawing.Point(151, 259);
this.btnTelefon.Name = "btnTelefon";
this.btnTelefon.Size = new System.Drawing.Size(155, 31);
this.btnTelefon.TabIndex = 130;
this.btnTelefon.Text = "Telefon";
this.btnTelefon.UseVisualStyleBackColor = true;
//
// txtBoxNrCI
//
this.txtBoxNrCI.Location = new System.Drawing.Point(312, 226);
this.txtBoxNrCI.Name = "txtBoxNrCI";
this.txtBoxNrCI.Size = new System.Drawing.Size(327, 20);
this.txtBoxNrCI.TabIndex = 121;
//
// btnNrCI
//
this.btnNrCI.FlatAppearance.BorderSize = 0;
this.btnNrCI.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnNrCI.Font = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.btnNrCI.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(85)))), ((int)(((byte)(175)))));
this.btnNrCI.Location = new System.Drawing.Point(151, 219);
this.btnNrCI.Name = "btnNrCI";
this.btnNrCI.Size = new System.Drawing.Size(155, 31);
this.btnNrCI.TabIndex = 120;
this.btnNrCI.Text = "Numar CI";
this.btnNrCI.UseVisualStyleBackColor = true;
//
// btnSalveaza
//
this.btnSalveaza.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(85)))), ((int)(((byte)(175)))));
this.btnSalveaza.FlatAppearance.BorderSize = 0;
this.btnSalveaza.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSalveaza.Font = new System.Drawing.Font("Times New Roman", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.btnSalveaza.ForeColor = System.Drawing.Color.White;
this.btnSalveaza.Location = new System.Drawing.Point(538, 612);
this.btnSalveaza.Name = "btnSalveaza";
this.btnSalveaza.Size = new System.Drawing.Size(244, 75);
this.btnSalveaza.TabIndex = 119;
this.btnSalveaza.Text = "Salveaza";
this.btnSalveaza.UseVisualStyleBackColor = false;
//
// txtBoxSerieCI
//
this.txtBoxSerieCI.Location = new System.Drawing.Point(312, 188);
this.txtBoxSerieCI.Name = "txtBoxSerieCI";
this.txtBoxSerieCI.Size = new System.Drawing.Size(327, 20);
this.txtBoxSerieCI.TabIndex = 118;
//
// btnSerieCI
//
this.btnSerieCI.FlatAppearance.BorderSize = 0;
this.btnSerieCI.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSerieCI.Font = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.btnSerieCI.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(85)))), ((int)(((byte)(175)))));
this.btnSerieCI.Location = new System.Drawing.Point(151, 181);
this.btnSerieCI.Name = "btnSerieCI";
this.btnSerieCI.Size = new System.Drawing.Size(155, 31);
this.btnSerieCI.TabIndex = 117;
this.btnSerieCI.Text = "Serie CI";
this.btnSerieCI.UseVisualStyleBackColor = true;
//
// txtBoxCNP
//
this.txtBoxCNP.Location = new System.Drawing.Point(312, 149);
this.txtBoxCNP.Name = "txtBoxCNP";
this.txtBoxCNP.Size = new System.Drawing.Size(327, 20);
this.txtBoxCNP.TabIndex = 116;
//
// btnCNP
//
this.btnCNP.FlatAppearance.BorderSize = 0;
this.btnCNP.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCNP.Font = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.btnCNP.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(85)))), ((int)(((byte)(175)))));
this.btnCNP.Location = new System.Drawing.Point(151, 142);
this.btnCNP.Name = "btnCNP";
this.btnCNP.Size = new System.Drawing.Size(155, 31);
this.btnCNP.TabIndex = 115;
this.btnCNP.Text = "CNP";
this.btnCNP.UseVisualStyleBackColor = true;
//
// txtBoxPrenume
//
this.txtBoxPrenume.Location = new System.Drawing.Point(312, 110);
this.txtBoxPrenume.Name = "txtBoxPrenume";
this.txtBoxPrenume.Size = new System.Drawing.Size(327, 20);
this.txtBoxPrenume.TabIndex = 114;
//
// btnPrenume
//
this.btnPrenume.FlatAppearance.BorderSize = 0;
this.btnPrenume.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnPrenume.Font = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.btnPrenume.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(85)))), ((int)(((byte)(175)))));
this.btnPrenume.Location = new System.Drawing.Point(151, 103);
this.btnPrenume.Name = "btnPrenume";
this.btnPrenume.Size = new System.Drawing.Size(155, 31);
this.btnPrenume.TabIndex = 113;
this.btnPrenume.Text = "Prenume";
this.btnPrenume.UseVisualStyleBackColor = true;
//
// txtBoxNume
//
this.txtBoxNume.Location = new System.Drawing.Point(312, 73);
this.txtBoxNume.Name = "txtBoxNume";
this.txtBoxNume.Size = new System.Drawing.Size(327, 20);
this.txtBoxNume.TabIndex = 112;
//
// btnNume
//
this.btnNume.FlatAppearance.BorderSize = 0;
this.btnNume.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnNume.Font = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.btnNume.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(85)))), ((int)(((byte)(175)))));
this.btnNume.Location = new System.Drawing.Point(151, 66);
this.btnNume.Name = "btnNume";
this.btnNume.Size = new System.Drawing.Size(155, 31);
this.btnNume.TabIndex = 111;
this.btnNume.Text = "Nume";
this.btnNume.UseVisualStyleBackColor = true;
//
// labelPacientNou
//
this.labelPacientNou.AutoSize = true;
this.labelPacientNou.Font = new System.Drawing.Font("Times New Roman", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.labelPacientNou.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(85)))), ((int)(((byte)(175)))));
this.labelPacientNou.Location = new System.Drawing.Point(305, 22);
this.labelPacientNou.Name = "labelPacientNou";
this.labelPacientNou.Size = new System.Drawing.Size(200, 40);
this.labelPacientNou.TabIndex = 109;
this.labelPacientNou.Text = "Pacient Nou";
//
// panel4
//
this.panel4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(85)))), ((int)(((byte)(175)))));
this.panel4.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel4.Location = new System.Drawing.Point(10, 690);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(780, 10);
this.panel4.TabIndex = 108;
//
// panel3
//
this.panel3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(85)))), ((int)(((byte)(175)))));
this.panel3.Dock = System.Windows.Forms.DockStyle.Right;
this.panel3.Location = new System.Drawing.Point(790, 10);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(10, 690);
this.panel3.TabIndex = 107;
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(85)))), ((int)(((byte)(175)))));
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
this.panel2.Location = new System.Drawing.Point(10, 0);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(790, 10);
this.panel2.TabIndex = 106;
//
// panel1
//
this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(85)))), ((int)(((byte)(175)))));
this.panel1.Dock = System.Windows.Forms.DockStyle.Left;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(10, 700);
this.panel1.TabIndex = 105;
//
// PacientNou
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.btnView);
this.Controls.Add(this.btnClear);
this.Controls.Add(this.txtBoxPass);
this.Controls.Add(this.btnParola);
this.Controls.Add(this.txtBoxUser);
this.Controls.Add(this.btnUser);
this.Controls.Add(this.txtBoxTara);
this.Controls.Add(this.btnTara);
this.Controls.Add(this.txtBoxJudet);
this.Controls.Add(this.btnJudet);
this.Controls.Add(this.txtBoxLocalitate);
this.Controls.Add(this.btnLocalitate);
this.Controls.Add(this.txtBoxAdresa);
this.Controls.Add(this.btnAdresa);
this.Controls.Add(this.txtBoxEmail);
this.Controls.Add(this.btnEmail);
this.Controls.Add(this.txtBoxTelefon);
this.Controls.Add(this.btnTelefon);
this.Controls.Add(this.txtBoxNrCI);
this.Controls.Add(this.btnNrCI);
this.Controls.Add(this.btnSalveaza);
this.Controls.Add(this.txtBoxSerieCI);
this.Controls.Add(this.btnSerieCI);
this.Controls.Add(this.txtBoxCNP);
this.Controls.Add(this.btnCNP);
this.Controls.Add(this.txtBoxPrenume);
this.Controls.Add(this.btnPrenume);
this.Controls.Add(this.txtBoxNume);
this.Controls.Add(this.btnNume);
this.Controls.Add(this.labelPacientNou);
this.Controls.Add(this.panel4);
this.Controls.Add(this.panel3);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.Name = "PacientNou";
this.Size = new System.Drawing.Size(800, 700);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button btnView;
private System.Windows.Forms.Button btnClear;
private System.Windows.Forms.TextBox txtBoxPass;
private System.Windows.Forms.Button btnParola;
private System.Windows.Forms.TextBox txtBoxUser;
private System.Windows.Forms.Button btnUser;
private System.Windows.Forms.TextBox txtBoxTara;
private System.Windows.Forms.Button btnTara;
private System.Windows.Forms.TextBox txtBoxJudet;
private System.Windows.Forms.Button btnJudet;
private System.Windows.Forms.TextBox txtBoxLocalitate;
private System.Windows.Forms.Button btnLocalitate;
private System.Windows.Forms.TextBox txtBoxAdresa;
private System.Windows.Forms.Button btnAdresa;
private System.Windows.Forms.TextBox txtBoxEmail;
private System.Windows.Forms.Button btnEmail;
private System.Windows.Forms.TextBox txtBoxTelefon;
private System.Windows.Forms.Button btnTelefon;
private System.Windows.Forms.TextBox txtBoxNrCI;
private System.Windows.Forms.Button btnNrCI;
private System.Windows.Forms.Button btnSalveaza;
private System.Windows.Forms.TextBox txtBoxSerieCI;
private System.Windows.Forms.Button btnSerieCI;
private System.Windows.Forms.TextBox txtBoxCNP;
private System.Windows.Forms.Button btnCNP;
private System.Windows.Forms.TextBox txtBoxPrenume;
private System.Windows.Forms.Button btnPrenume;
private System.Windows.Forms.TextBox txtBoxNume;
private System.Windows.Forms.Button btnNume;
private System.Windows.Forms.Label labelPacientNou;
private System.Windows.Forms.Panel panel4;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Panel panel1;
}
}
| 54.354 | 172 | 0.591898 | [
"MIT"
] | newparts/CSharp | ESanatate/ESanatateUI/UserControls/PacientNou.Designer.cs | 27,179 | C# |
using System.Collections.Generic;
using System.Threading;
namespace WebDav
{
/// <summary>
/// Represents parameters for the GET WebDAV method.
/// </summary>
public class GetFileParameters
{
/// <summary>
/// Initializes a new instance of the <see cref="GetFileParameters"/> class.
/// </summary>
public GetFileParameters()
{
Headers = new List<KeyValuePair<string, string>>();
CancellationToken = CancellationToken.None;
}
/// <summary>
/// Gets or sets the collection of http request headers.
/// </summary>
public IReadOnlyCollection<KeyValuePair<string, string>> Headers { get; set; }
/// <summary>
/// Gets or sets the cancellation token.
/// </summary>
public CancellationToken CancellationToken { get; set; }
}
}
| 28.548387 | 86 | 0.59435 | [
"MIT"
] | skazantsev/WebDavClient | src/WebDav.Client/Request/GetFileParameters.cs | 887 | C# |
// Copyright 2017 Esri.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
// language governing permissions and limitations under the License.
using System;
using ArcGISRuntime.Samples.Managers;
using Esri.ArcGISRuntime.Data;
using Esri.ArcGISRuntime.Mapping;
using Xamarin.Forms;
namespace ArcGISRuntime.Samples.FeatureLayerShapefile
{
[ArcGISRuntime.Samples.Shared.Attributes.Sample(
"Feature layer (shapefile)",
"Data",
"This sample demonstrates how to open a shapefile stored on the device and display it as a feature layer with default symbology.",
"The shapefile will be downloaded from an ArcGIS Online portal automatically."
)]
[ArcGISRuntime.Samples.Shared.Attributes.OfflineData("d98b3e5293834c5f852f13c569930caa")]
public partial class FeatureLayerShapefile : ContentPage
{
public FeatureLayerShapefile()
{
InitializeComponent();
// Open a shapefile stored locally and add it to the map as a feature layer
Initialize();
}
private async void Initialize()
{
// Create a new map to display in the map view with a streets basemap
MyMapView.Map = new Map(Basemap.CreateStreets());
// Get the path to the downloaded shapefile
string filepath = GetShapefilePath();
try
{
// Open the shapefile
ShapefileFeatureTable myShapefile = await ShapefileFeatureTable.OpenAsync(filepath);
// Create a feature layer to display the shapefile
FeatureLayer newFeatureLayer = new FeatureLayer(myShapefile);
// Add the feature layer to the map
MyMapView.Map.OperationalLayers.Add(newFeatureLayer);
// Zoom the map to the extent of the shapefile
await MyMapView.SetViewpointGeometryAsync(newFeatureLayer.FullExtent, 50);
}
catch (Exception e)
{
await Application.Current.MainPage.DisplayAlert("Error", e.ToString(), "OK");
}
}
private static string GetShapefilePath()
{
return DataManager.GetDataFolder("d98b3e5293834c5f852f13c569930caa", "Public_Art.shp");
}
}
} | 40.014706 | 138 | 0.663359 | [
"Apache-2.0"
] | kGhime/arcgis-runtime-samples-dotnet | src/Forms/Shared/Samples/Data/FeatureLayerShapefile/FeatureLayerShapefile.xaml.cs | 2,721 | C# |
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.22000.0
// Original source is Copyright © Microsoft. All rights reserved.
using TerraFX.Interop.Windows;
namespace TerraFX.Interop.DirectX;
/// <include file='D3D12_FEATURE_DATA_D3D12_OPTIONS6.xml' path='doc/member[@name="D3D12_FEATURE_DATA_D3D12_OPTIONS6"]/*' />
public partial struct D3D12_FEATURE_DATA_D3D12_OPTIONS6
{
/// <include file='D3D12_FEATURE_DATA_D3D12_OPTIONS6.xml' path='doc/member[@name="D3D12_FEATURE_DATA_D3D12_OPTIONS6.AdditionalShadingRatesSupported"]/*' />
public BOOL AdditionalShadingRatesSupported;
/// <include file='D3D12_FEATURE_DATA_D3D12_OPTIONS6.xml' path='doc/member[@name="D3D12_FEATURE_DATA_D3D12_OPTIONS6.PerPrimitiveShadingRateSupportedWithViewportIndexing"]/*' />
public BOOL PerPrimitiveShadingRateSupportedWithViewportIndexing;
/// <include file='D3D12_FEATURE_DATA_D3D12_OPTIONS6.xml' path='doc/member[@name="D3D12_FEATURE_DATA_D3D12_OPTIONS6.VariableShadingRateTier"]/*' />
public D3D12_VARIABLE_SHADING_RATE_TIER VariableShadingRateTier;
/// <include file='D3D12_FEATURE_DATA_D3D12_OPTIONS6.xml' path='doc/member[@name="D3D12_FEATURE_DATA_D3D12_OPTIONS6.ShadingRateImageTileSize"]/*' />
public uint ShadingRateImageTileSize;
/// <include file='D3D12_FEATURE_DATA_D3D12_OPTIONS6.xml' path='doc/member[@name="D3D12_FEATURE_DATA_D3D12_OPTIONS6.BackgroundProcessingSupported"]/*' />
public BOOL BackgroundProcessingSupported;
}
| 57.892857 | 180 | 0.804442 | [
"MIT"
] | reflectronic/terrafx.interop.windows | sources/Interop/Windows/DirectX/um/d3d12/D3D12_FEATURE_DATA_D3D12_OPTIONS6.cs | 1,623 | C# |
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Trustlink.Network.P2P;
using Trustlink.SmartContract;
using Trustlink.Wallets;
namespace Trustlink.UnitTests
{
[TestClass]
public class UT_Helper
{
[TestMethod]
public void GetHashData()
{
TestVerifiable verifiable = new TestVerifiable();
byte[] res = verifiable.GetHashData();
res.Length.Should().Be(8);
byte[] requiredData = new byte[] { 7, 116, 101, 115, 116, 83, 116, 114 };
for (int i = 0; i < requiredData.Length; i++)
{
res[i].Should().Be(requiredData[i]);
}
}
[TestMethod]
public void Sign()
{
TestVerifiable verifiable = new TestVerifiable();
byte[] res = verifiable.Sign(new KeyPair(TestUtils.GetByteArray(32, 0x42)));
res.Length.Should().Be(64);
}
[TestMethod]
public void ToScriptHash()
{
byte[] testByteArray = TestUtils.GetByteArray(64, 0x42);
UInt160 res = testByteArray.ToScriptHash();
res.Should().Be(UInt160.Parse("2d3b96ae1bcc5a585e075e3b81920210dec16302"));
}
}
}
| 29.162791 | 88 | 0.578947 | [
"MIT"
] | Trustlink-chain/trustlink | trustlink.UnitTests/UT_Helper.cs | 1,254 | C# |
using System;
using System.Threading.Tasks;
using Xamarin.Forms;
// https://developer.xamarin.com/samples/xamarin-forms/userinterface/animation/custom/
namespace Xamarin.Toolkit.Animations.Extensions
{
public static class ColorExtensions
{
public static Task<bool> ColorTo(this VisualElement self, Color fromColor, Color toColor, Action<Color> callback, uint length = 250, Easing easing = null)
{
Func<double, Color> transform = (t) =>
Color.FromRgba(fromColor.R + (t * (toColor.R - fromColor.R)), fromColor.G + (t * (toColor.G - fromColor.G)), fromColor.B + (t * (toColor.B - fromColor.B)), fromColor.A + (t * (toColor.A - fromColor.A)));
return ColorAnimation(self, "ColorTo", transform, callback, length, easing);
}
public static void CancelAnimation(this VisualElement self)
{
self.AbortAnimation("ColorTo");
}
static Task<bool> ColorAnimation(VisualElement element, string name, Func<double, Color> transform, Action<Color> callback, uint length, Easing easing)
{
easing = easing ?? Easing.Linear;
var taskCompletionSource = new TaskCompletionSource<bool>();
element.Animate<Color>(name, transform, callback, 16, length, easing, (v, c) => taskCompletionSource.SetResult(c));
return taskCompletionSource.Task;
}
}
}
| 41.382353 | 215 | 0.657427 | [
"MIT"
] | c0d3l3ss/XamarinCommunityToolkit | Toolkit/Animations/Extensions/ColorExtensions.cs | 1,409 | C# |
using Microsoft.AspNetCore.Mvc;
using QuoteMyGoods.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace QuoteMyGoods.ViewComponents
{
public class BasketCountViewComponent:ViewComponent
{
private IBasketService _basketService;
public BasketCountViewComponent(IBasketService basketService)
{
_basketService = basketService;
}
public async Task<IViewComponentResult> InvokeAsync()
{
ViewBag.Count = _basketService.GetBasketCount();
return View();
}
}
}
| 24.88 | 69 | 0.691318 | [
"MIT"
] | PSCAlex/QuoteMyGoods | src/QuoteMyGoods/ViewComponents/BasketCountViewComponent.cs | 624 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Localization;
using OCore.Environment.Shell;
using OCore.Recipes.Models;
using OCore.Setup.Models;
using OCore.Setup.Services;
namespace OCore.Setup
{
public class SetupController : Controller
{
private readonly ISetupService _setupService;
private readonly ShellSettings _shellSettings;
private const string DefaultRecipe = "Default";
public SetupController(
ISetupService setupService,
ShellSettings shellSettings,
IStringLocalizer<SetupController> t)
{
_setupService = setupService;
_shellSettings = shellSettings;
T = t;
}
public IStringLocalizer T { get; set; }
// GET: /<controller>/
public async Task<ActionResult> Index()
{
var recipes = await _setupService.GetSetupRecipesAsync();
var defaultRecipe = recipes.FirstOrDefault(x => x.Tags.Contains("default")) ?? recipes.FirstOrDefault();
var model = new SetupViewModel
{
//DatabaseProviders = _databaseProviders,
Recipes = recipes,
RecipeName = defaultRecipe?.Name
};
if (!String.IsNullOrEmpty(_shellSettings.ConnectionString))
{
model.ConnectionStringPreset = true;
model.ConnectionString = _shellSettings.ConnectionString;
}
//if (!String.IsNullOrEmpty(_shellSettings.DatabaseProvider))
//{
// model.DatabaseProviderPreset = true;
// model.DatabaseProvider = _shellSettings.DatabaseProvider;
//}
if (!String.IsNullOrEmpty(_shellSettings.TablePrefix))
{
model.TablePrefixPreset = true;
model.TablePrefix = _shellSettings.TablePrefix;
}
return View(model);
}
[HttpPost, ActionName("Index")]
public async Task<ActionResult> IndexPOST(SetupViewModel model)
{
//model.DatabaseProviders = _databaseProviders;
model.Recipes = await _setupService.GetSetupRecipesAsync();
//var selectedProvider = model.DatabaseProviders.FirstOrDefault(x => x.Value == model.DatabaseProvider);
//if (selectedProvider != null && selectedProvider.HasConnectionString && String.IsNullOrWhiteSpace(model.ConnectionString))
//{
// ModelState.AddModelError(nameof(model.ConnectionString), T["The connection string is mandatory for this provider."]);
//}
if (String.IsNullOrEmpty(model.Password))
{
ModelState.AddModelError(nameof(model.Password), T["The password is required."]);
}
if (model.Password != model.PasswordConfirmation)
{
ModelState.AddModelError(nameof(model.PasswordConfirmation), T["The password confirmation doesn't match the password."]);
}
RecipeDescriptor selectedRecipe = null;
if (String.IsNullOrEmpty(model.RecipeName) || (selectedRecipe = model.Recipes.FirstOrDefault(x => x.Name == model.RecipeName)) == null)
{
ModelState.AddModelError(nameof(model.RecipeName), T["Invalid recipe."]);
}
if (!String.IsNullOrEmpty(_shellSettings.ConnectionString))
{
model.ConnectionStringPreset = true;
model.ConnectionString = _shellSettings.ConnectionString;
}
//if (!String.IsNullOrEmpty(_shellSettings.DatabaseProvider))
//{
// model.DatabaseProviderPreset = true;
// model.DatabaseProvider = _shellSettings.DatabaseProvider;
//}
if (!String.IsNullOrEmpty(_shellSettings.TablePrefix))
{
model.TablePrefixPreset = true;
model.TablePrefix = _shellSettings.TablePrefix;
}
if (!ModelState.IsValid)
{
return View(model);
}
var setupContext = new SetupContext
{
SiteName = model.SiteName,
EnabledFeatures = null, // default list,
AdminUsername = model.UserName,
AdminEmail = model.Email,
AdminPassword = model.Password,
Errors = new Dictionary<string, string>(),
Recipe = selectedRecipe
};
//if (!model.DatabaseProviderPreset)
//{
setupContext.DatabaseProvider = "SqlServer";//model.DatabaseProvider;
//}
if (!model.ConnectionStringPreset)
{
setupContext.DatabaseConnectionString = model.ConnectionString;
}
if (!model.TablePrefixPreset)
{
setupContext.DatabaseTablePrefix = model.TablePrefix;
}
var executionId = await _setupService.SetupAsync(setupContext);
// Check if a component in the Setup failed
if (setupContext.Errors.Any())
{
foreach (var error in setupContext.Errors)
{
ModelState.AddModelError(error.Key, error.Value);
}
return View(model);
}
return Redirect("~/");
}
}
}
| 34.54321 | 147 | 0.575768 | [
"BSD-3-Clause"
] | china-live/OCore | src/OCore.Modules/OCore.Setup/Controllers/SetupController.cs | 5,598 | C# |
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Interop;
using System.Windows.Media.Imaging;
namespace SumRecognition
{
public static class SumImageGenerator
{
const int PICTUREWIDTH = 58;
const int PICTUREHEIGHT = 95;
static Image[] digitsImages = new Image[]
{
Image.FromFile(ApplicationInfo.instance.appPath+"\\images\\0.png"),
Image.FromFile(ApplicationInfo.instance.appPath+"\\images\\1.png"),
Image.FromFile(ApplicationInfo.instance.appPath+"\\images\\2.png"),
Image.FromFile(ApplicationInfo.instance.appPath+"\\images\\3.png"),
Image.FromFile(ApplicationInfo.instance.appPath+"\\images\\4.png"),
Image.FromFile(ApplicationInfo.instance.appPath+"\\images\\5.png"),
Image.FromFile(ApplicationInfo.instance.appPath+"\\images\\6.png"),
Image.FromFile(ApplicationInfo.instance.appPath+"\\images\\7.png"),
Image.FromFile(ApplicationInfo.instance.appPath+"\\images\\8.png"),
Image.FromFile(ApplicationInfo.instance.appPath+"\\images\\9.png")
};
public static BitmapImage GetSumImage()
{
int firstNumber, secondNumber, sumNumber;
Random random = new Random();
int numbersLength = random.Next(1, 10);
Bitmap resultImage = new Bitmap((numbersLength + 1) * PICTUREWIDTH, PICTUREHEIGHT * 3);
Graphics image = Graphics.FromImage(resultImage);
int digitIndex = random.Next(1, 9);
firstNumber = digitIndex;
image.Clear(Color.White);
image.DrawImage(digitsImages[digitIndex], new System.Drawing.Point(PICTUREWIDTH, 0));
for (int positionIndex = 2; positionIndex < numbersLength; positionIndex++)
{
digitIndex = random.Next(0, 9);
firstNumber *= 10;
firstNumber += digitIndex;
image.DrawImage(digitsImages[digitIndex], new System.Drawing.Point(PICTUREWIDTH * positionIndex, 0));
}
digitIndex = random.Next(1, 9);
secondNumber = digitIndex;
image.DrawImage(digitsImages[digitIndex], new System.Drawing.Point(PICTUREWIDTH, PICTUREHEIGHT));
for (int positionIndex = 2; positionIndex < numbersLength; positionIndex++)
{
digitIndex = random.Next(0, 9);
secondNumber *= 10;
secondNumber += digitIndex;
image.DrawImage(digitsImages[digitIndex], new System.Drawing.Point(PICTUREWIDTH * positionIndex, PICTUREHEIGHT));
}
sumNumber = secondNumber + firstNumber;
int[] digitArray = GetIntArrayFromNumber(sumNumber);
int position = numbersLength != digitArray.Length ? 1 : 0;
foreach (int digit in digitArray)
{
image.DrawImage(digitsImages[digit], new PointF(PICTUREWIDTH * position, PICTUREHEIGHT * 2));
position++;
}
image.Save();
resultImage.Save(ApplicationInfo.instance.appPath + "\\images\\new.gif", System.Drawing.Imaging.ImageFormat.Gif);
return new BitmapImage(new Uri(ApplicationInfo.instance.appPath + "\\images\\new.gif"));//Bitmap2BitmapImage(resultImage);
}
static int[] GetIntArrayFromNumber(int number)
{
List<int> digits = new List<int>();
while (number > 0)
{
digits.Add(number % 10);
number /= 10;
}
digits.Reverse();
return digits.ToArray();
}
static private BitmapImage Bitmap2BitmapImage(Bitmap bitmap)
{
BitmapSource i = Imaging.CreateBitmapSourceFromHBitmap(
bitmap.GetHbitmap(),
IntPtr.Zero,
Int32Rect.Empty,
BitmapSizeOptions.FromEmptyOptions());
return (BitmapImage)i;
}
}
}
| 42.414141 | 134 | 0.594189 | [
"MIT"
] | mikhaelmurmur/SumRecognition | SumRecognition/SumImageGenerator.cs | 4,201 | C# |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("DonutTest")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("DonutTest")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("3c9a6b88-bed2-4ba8-964c-77ec29bf1846")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
| 37.459459 | 84 | 0.746753 | [
"BSD-3-Clause"
] | 0x01m4rv/donut | DonutTest/Properties/AssemblyInfo.cs | 1,389 | C# |
using System.Linq;
using Secretarium.Helpers;
using NUnit.Framework;
namespace Secretarium.Test
{
[TestFixture]
public class TestAesCtr
{
[Test]
public void TestReverseEndianness()
{
byte[] arr = ByteHelper.GetRandom(32);
byte[] rra = arr.ReverseEndianness();
for (var i = 0; i < 32; i++)
{
Assert.AreEqual(arr[i], rra[31 - i]);
}
arr = ByteHelper.GetRandom(64);
rra = arr.ReverseEndianness();
for (var i = 0; i < 32; i++)
{
Assert.AreEqual(arr[i], rra[31 - i]);
Assert.AreEqual(arr[i + 32], rra[63 - i]);
}
}
[Test]
public void TestIncrementIV()
{
// -0- IncrementBy does not change inputs
var iv = new byte[] { 1 };
var offset = new byte[] { 2 };
var inc = iv.IncrementBy(offset);
Assert.AreNotSame(iv, inc);
Assert.AreNotSame(offset, inc);
Assert.IsTrue(iv.SequenceEqual(new byte[] { 1 }));
Assert.IsTrue(offset.SequenceEqual(new byte[] { 2 }));
Assert.IsTrue(inc.SequenceEqual(new byte[] { 3 }));
// -1a- Offset zeros does nothing on zeros
iv = new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
offset = new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
inc = iv.IncrementBy(offset);
Assert.IsTrue(inc.SequenceEqual(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }));
// -1b- Offset zeros does nothing on non zeros
iv = new byte[] { 10, 0, 10, 0, 10, 0, 10, 0, 10, 0, 255 };
offset = new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
inc = iv.IncrementBy(offset);
Assert.IsTrue(inc.SequenceEqual(new byte[] { 10, 0, 10, 0, 10, 0, 10, 0, 10, 0, 255 }));
// -2a- Offset on zeros
iv = new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
offset = new byte[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
inc = iv.IncrementBy(offset);
Assert.IsTrue(inc.SequenceEqual(new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }));
// -2b- Offset on non zeros
iv = new byte[] { 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 };
offset = new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
inc = iv.IncrementBy(offset);
Assert.IsTrue(inc.SequenceEqual(new byte[] { 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11 }));
// -2c- Offset on 255
iv = new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255 };
offset = new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
inc = iv.IncrementBy(offset);
Assert.IsTrue(inc.SequenceEqual(new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0 }));
// -2d- Offset on complex 255
iv = new byte[] { 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255 };
offset = new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
inc = iv.IncrementBy(offset);
Assert.IsTrue(inc.SequenceEqual(new byte[] { 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 0 }));
// -2e- Offset on full 255
iv = new byte[] { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 };
offset = new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 };
inc = iv.IncrementBy(offset);
Assert.IsTrue(inc.SequenceEqual(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }));
// -2f- Offset on full 255
iv = new byte[] { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 };
offset = new byte[] { 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 1 };
inc = iv.IncrementBy(offset);
Assert.IsTrue(inc.SequenceEqual(new byte[] { 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 0 }));
// -2g- Offset on 255 by 255
iv = new byte[] { 0, 0, 255 };
offset = new byte[] { 0, 0, 255 };
inc = iv.IncrementBy(offset);
Assert.IsTrue(inc.SequenceEqual(new byte[] { 0, 1, 254 }));
// -2h- Offset on 255 by 255
iv = new byte[] { 255, 255, 255 };
offset = new byte[] { 255, 1, 1 };
inc = iv.IncrementBy(offset);
Assert.IsTrue(inc.SequenceEqual(new byte[] { 255, 1, 0 }));
// -2i- Offset with different sizes
iv = new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
inc = iv.IncrementBy(512L.ToBytes());
Assert.IsTrue(inc.SequenceEqual(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0 }));
// -3a- Full no loop
iv = new byte[] { 0, 85, 138, 48, 253, 0, 8, 150, 254, 10, 255 };
offset = new byte[] { 85, 214, 231, 37, 2, 148, 255, 10, 0, 255, 255 };
inc = iv.IncrementBy(offset);
Assert.IsTrue(inc.SequenceEqual(new byte[] { 86, 44, 113, 85, 255, 149, 7, 160, 255, 10, 254 }));
// -3b- Full with loop
iv = new byte[] { 255, 85, 138, 48, 253, 0, 8, 150, 254, 10, 255 };
offset = new byte[] { 125, 214, 231, 37, 2, 148, 255, 10, 0, 255, 255 };
inc = iv.IncrementBy(offset);
Assert.IsTrue(inc.SequenceEqual(new byte[] { 125, 44, 113, 85, 255, 149, 7, 160, 255, 10, 254 }));
}
[Test]
public void TestEncryptDecrypt()
{
byte[] plaintextMessage = "Secretarium is the ultimate shared trusted information system !".ToBytes();
byte[] key = ByteHelper.GetRandom(32);
byte[] ivOffset = new byte[16];
byte[] encrypted = plaintextMessage.AesCtrEncrypt(key, ivOffset);
byte[] decrypted = encrypted.AesCtrDecrypt(key, ivOffset);
Assert.IsTrue(plaintextMessage.SequenceEqual(decrypted));
}
}
}
| 42.583942 | 114 | 0.474803 | [
"MIT"
] | Secretarium/Secretarium.Connector.CSharp | Secretarium.Connector.CSharp.Test/Helpers/TestAesCtr.cs | 5,836 | C# |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.