content
stringlengths
5
1.04M
avg_line_length
float64
1.75
12.9k
max_line_length
int64
2
244k
alphanum_fraction
float64
0
0.98
licenses
list
repository_name
stringlengths
7
92
path
stringlengths
3
249
size
int64
5
1.04M
lang
stringclasses
2 values
using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace BAH.BOS.WebAPI.ServiceStub.Permission.Dto { /// <summary> /// 用户组织输出对象。 /// </summary> [JsonObject] public class UserOrgInfoOutput : BaseDataOutput<long> { }//end class }//end namespace
18.666667
57
0.690476
[ "MIT" ]
Ronaltn/BAH.K3.Solution
Code/BAH.BOS.WebAPI.ServiceStub/Permission/Dto/UserOrgInfoOutput.cs
356
C#
#region License // IPaginated{T}.cs // // Copyright (c) 2012 Xoqal.com // // 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 namespace Xoqal.Web.Mvc.Models { using System.Collections.Generic; /// <summary> /// Represents a paginated data. /// </summary> public interface IPaginated<out T> : IPaginated { /// <summary> /// Gets or sets the data. /// </summary> /// <value> The data. </value> new IEnumerable<T> Data { get; } } }
28.914286
75
0.666996
[ "Apache-2.0" ]
AmirKarimi/Xoqal
Source/Xoqal.Web.Mvc/Models/IPaginated{T}.cs
1,012
C#
namespace GitVersionCore.Tests.Init { using GitVersion; using GitVersion.Configuration.Init; using GitVersion.Configuration.Init.Wizard; using NUnit.Framework; using Shouldly; using TestStack.ConventionTests; using TestStack.ConventionTests.ConventionData; [TestFixture] public class InitScenarios : TestBase { [SetUp] public void Setup() { ShouldlyConfiguration.ShouldMatchApprovedDefaults.LocateTestMethodUsingAttribute<TestAttribute>(); } [Test] [Category("NoMono")] [Description("Won't run on Mono due to source information not being available for ShouldMatchApproved.")] public void CanSetNextVersion() { var testFileSystem = new TestFileSystem(); var testConsole = new TestConsole("3", "2.0.0", "0"); ConfigurationProvider.Init("c:\\proj", testFileSystem, testConsole); testFileSystem.ReadAllText("c:\\proj\\GitVersion.yml").ShouldMatchApproved(); } [Test] public void DefaultResponsesDoNotThrow() { var steps = Types.InAssemblyOf<EditConfigStep>(t => t.IsSubclassOf(typeof(ConfigInitWizardStep)) && t.IsConcreteClass()); Convention.Is(new InitStepsDefaultResponsesDoNotThrow(), steps); } } }
35.410256
134
0.636495
[ "MIT" ]
SeppPenner/GitVersion
src/GitVersionCore.Tests/Init/InitScenarios.cs
1,345
C#
using System; using System.Collections; using System.Collections.Generic; namespace EuNet.Core { public sealed class SendingQueue : IList<ArraySegment<byte>> { private List<ArraySegment<byte>> _globalQueue; private int _currentCount = 0; private int _beginOffset; public SendingQueue() { _globalQueue = new List<ArraySegment<byte>>(); } public ArraySegment<byte> this[int index] { get { return _globalQueue[_beginOffset + index]; } set { throw new NotSupportedException(); } } public int Count { get { return _currentCount - _beginOffset; } } public bool IsReadOnly { get { return true; } } public int TotalSegmentCount { get { var count = _currentCount - _beginOffset; var total = 0; for (int i = _beginOffset; i < count; i++) { var segment = _globalQueue[i]; total += segment.Count; } return total; } } public bool Push(ArraySegment<byte> item) { if (_currentCount >= _globalQueue.Count) { _globalQueue.Add(item); ++_currentCount; return true; } _globalQueue[_currentCount] = item; ++_currentCount; return true; } public void Clear() { _currentCount = 0; _beginOffset = 0; } public void Add(ArraySegment<byte> item) { throw new NotImplementedException(); } public bool Contains(ArraySegment<byte> item) { throw new NotImplementedException(); } public void CopyTo(ArraySegment<byte>[] array, int arrayIndex) { for (var i = 0; i < Count; i++) { array[arrayIndex + i] = this[i]; } } public IEnumerator<ArraySegment<byte>> GetEnumerator() { for (var i = 0; i < (_currentCount - _beginOffset); ++i) { yield return _globalQueue[_beginOffset + i]; } } public int IndexOf(ArraySegment<byte> item) { throw new NotImplementedException(); } public void Insert(int index, ArraySegment<byte> item) { throw new NotImplementedException(); } public bool Remove(ArraySegment<byte> item) { throw new NotImplementedException(); } public void RemoveAt(int index) { throw new NotImplementedException(); } IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); } public void LeftTrim(int trimSize) { var count = _currentCount - _beginOffset; var subTotal = 0; for (int i = _beginOffset; i < count; i++) { var segment = _globalQueue[i]; subTotal += segment.Count; if (subTotal <= trimSize) continue; _beginOffset = i; int rest = subTotal - trimSize; _globalQueue[i] = new ArraySegment<byte>(segment.Array, segment.Offset + segment.Count - rest, rest); break; } } } }
23.559748
117
0.466097
[ "MIT" ]
zestylife/EuNet
src/EuNet.Core/Util/SendingQueue.cs
3,748
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.Linq; using System.Text; using Google.Protobuf; using Microsoft.ML.Data; using Microsoft.ML.Runtime; using static Microsoft.ML.Model.OnnxConverter.OnnxCSharpToProtoWrapper; namespace Microsoft.ML.Model.OnnxConverter { /// <summary> /// Contains methods to create ONNX models in protocol buffer. /// </summary> internal static class OnnxUtils { private static TypeProto MakeType(TypeProto typeProto, TensorProto.Types.DataType dataType, List<long> dims, List<bool> dimsParam) { Contracts.CheckValue(typeProto, nameof(typeProto)); if (typeProto.TensorType == null) typeProto.TensorType = new TypeProto.Types.Tensor(); typeProto.TensorType.ElemType = (int)dataType; if (dims != null) { for (int index = 0; index < dims.Count; index++) { var d = new TensorShapeProto.Types.Dimension(); if (typeProto.TensorType.Shape == null) typeProto.TensorType.Shape = new TensorShapeProto(); if (dimsParam != null && dimsParam.Count > index && dimsParam[index]) d.DimParam = "None"; else d.DimValue = dims[index]; typeProto.TensorType.Shape.Dim.Add(d); } } return typeProto; } private static ValueInfoProto MakeValue(ValueInfoProto value, string name, TensorProto.Types.DataType dataType, List<long> dims, List<bool> dimsParam) { Contracts.CheckValue(value, nameof(value)); Contracts.CheckNonEmpty(name, nameof(name)); value.Name = name; if (value.Type == null) value.Type = new TypeProto(); MakeType(value.Type, dataType, dims, dimsParam); return value; } private static AttributeProto MakeAttribute(string key) { Contracts.CheckNonEmpty(key, nameof(key)); var attribute = new AttributeProto(); attribute.Name = key; return attribute; } private static AttributeProto MakeAttribute(string key, TensorProto.Types.DataType value) { AttributeProto attribute = MakeAttribute(key); attribute.Type = AttributeProto.Types.AttributeType.Int; attribute.I = (int)value; return attribute; } private static AttributeProto MakeAttribute(string key, double value) { AttributeProto attribute = MakeAttribute(key); attribute.Type = AttributeProto.Types.AttributeType.Float; attribute.F = (float)value; return attribute; } private static AttributeProto MakeAttribute(string key, IEnumerable<double> value) { Contracts.CheckValue(value, nameof(value)); AttributeProto attribute = MakeAttribute(key); attribute.Type = AttributeProto.Types.AttributeType.Floats; attribute.Floats.Add(value.Select(x => (float)x)); return attribute; } private static AttributeProto MakeAttribute(string key, IEnumerable<float> value) { Contracts.CheckValue(value, nameof(value)); AttributeProto attribute = MakeAttribute(key); attribute.Type = AttributeProto.Types.AttributeType.Floats; attribute.Floats.Add(value.Select(x => x)); return attribute; } private static AttributeProto MakeAttribute(string key, long value) { AttributeProto attribute = MakeAttribute(key); attribute.Type = AttributeProto.Types.AttributeType.Int; attribute.I = value; return attribute; } private static AttributeProto MakeAttribute(string key, IEnumerable<long> value) { Contracts.CheckValue(value, nameof(value)); AttributeProto attribute = MakeAttribute(key); attribute.Type = AttributeProto.Types.AttributeType.Ints; attribute.Ints.Add(value); return attribute; } private static AttributeProto MakeAttribute(string key, ByteString value) { AttributeProto attribute = MakeAttribute(key); attribute.Type = AttributeProto.Types.AttributeType.String; attribute.S = value; return attribute; } private static AttributeProto MakeAttribute(string key, IEnumerable<ByteString> value) { Contracts.CheckValue(value, nameof(value)); AttributeProto attribute = MakeAttribute(key); attribute.Type = AttributeProto.Types.AttributeType.Strings; attribute.Strings.Add(value); return attribute; } private static AttributeProto MakeAttribute(string key, GraphProto value) { AttributeProto attribute = MakeAttribute(key); attribute.Type = AttributeProto.Types.AttributeType.Graph; attribute.G = value; return attribute; } private static AttributeProto MakeAttribute(string key, IEnumerable<GraphProto> value) { Contracts.CheckValue(value, nameof(value)); AttributeProto attribute = MakeAttribute(key); attribute.Type = AttributeProto.Types.AttributeType.Graphs; attribute.Graphs.Add(value); return attribute; } private static AttributeProto MakeAttribute(string key, bool value) => MakeAttribute(key, value ? 1 : 0); public static NodeProto MakeNode(string opType, IEnumerable<string> inputs, IEnumerable<string> outputs, string name, string domain = null) { Contracts.CheckNonEmpty(opType, nameof(opType)); Contracts.CheckValue(inputs, nameof(inputs)); Contracts.CheckValue(outputs, nameof(outputs)); Contracts.CheckNonEmpty(name, nameof(name)); var node = new NodeProto(); node.OpType = opType; node.Input.Add(inputs); node.Output.Add(outputs); node.Name = name; node.Domain = domain ?? "ai.onnx.ml"; return node; } public static void NodeAddAttributes(NodeProto node, string argName, double value) => node.Attribute.Add(MakeAttribute(argName, value)); public static void NodeAddAttributes(NodeProto node, string argName, IEnumerable<double> value) => node.Attribute.Add(MakeAttribute(argName, value)); public static void NodeAddAttributes(NodeProto node, string argName, IEnumerable<float> value) => node.Attribute.Add(MakeAttribute(argName, value)); public static void NodeAddAttributes(NodeProto node, string argName, IEnumerable<bool> value) => node.Attribute.Add(MakeAttribute(argName, value.Select(v => v ? (long)1 : 0))); public static void NodeAddAttributes(NodeProto node, string argName, long value) => node.Attribute.Add(MakeAttribute(argName, value)); public static void NodeAddAttributes(NodeProto node, string argName, IEnumerable<long> value) => node.Attribute.Add(MakeAttribute(argName, value)); public static void NodeAddAttributes(NodeProto node, string argName, ReadOnlyMemory<char> value) => node.Attribute.Add(MakeAttribute(argName, StringToByteString(value))); public static void NodeAddAttributes(NodeProto node, string argName, string[] value) => node.Attribute.Add(MakeAttribute(argName, StringToByteString(value))); public static void NodeAddAttributes(NodeProto node, string argName, IEnumerable<ReadOnlyMemory<char>> value) => node.Attribute.Add(MakeAttribute(argName, StringToByteString(value))); public static void NodeAddAttributes(NodeProto node, string argName, IEnumerable<string> value) => node.Attribute.Add(MakeAttribute(argName, StringToByteString(value))); public static void NodeAddAttributes(NodeProto node, string argName, string value) => node.Attribute.Add(MakeAttribute(argName, StringToByteString(value))); public static void NodeAddAttributes(NodeProto node, string argName, GraphProto value) => node.Attribute.Add(MakeAttribute(argName, value)); public static void NodeAddAttributes(NodeProto node, string argName, IEnumerable<GraphProto> value) => node.Attribute.Add(MakeAttribute(argName, value)); public static void NodeAddAttributes(NodeProto node, string argName, bool value) => node.Attribute.Add(MakeAttribute(argName, value)); public static void NodeAddAttributes(NodeProto node, string argName, Type value) => node.Attribute.Add(MakeAttribute(argName, ConvertToTensorProtoType(value))); private static TensorProto.Types.DataType ConvertToTensorProtoType(Type rawType) { var dataType = TensorProto.Types.DataType.Undefined; if (rawType == typeof(bool)) dataType = TensorProto.Types.DataType.Bool; else if (rawType == typeof(ReadOnlyMemory<char>)) dataType = TensorProto.Types.DataType.String; else if (rawType == typeof(sbyte)) dataType = TensorProto.Types.DataType.Int8; else if (rawType == typeof(byte)) dataType = TensorProto.Types.DataType.Uint8; else if (rawType == typeof(short)) dataType = TensorProto.Types.DataType.Int16; else if (rawType == typeof(ushort)) dataType = TensorProto.Types.DataType.Uint16; else if (rawType == typeof(int)) dataType = TensorProto.Types.DataType.Int32; else if (rawType == typeof(uint)) dataType = TensorProto.Types.DataType.Uint32; else if (rawType == typeof(long)) dataType = TensorProto.Types.DataType.Int64; else if (rawType == typeof(ulong)) dataType = TensorProto.Types.DataType.Uint64; else if (rawType == typeof(float)) dataType = TensorProto.Types.DataType.Float; else if (rawType == typeof(double)) dataType = TensorProto.Types.DataType.Double; else { string msg = "Unsupported type: " + rawType.ToString(); Contracts.Check(false, msg); } return dataType; } private static ByteString StringToByteString(ReadOnlyMemory<char> str) => ByteString.CopyFrom(Encoding.UTF8.GetBytes(str.ToString())); private static IEnumerable<ByteString> StringToByteString(IEnumerable<ReadOnlyMemory<char>> str) => str.Select(s => ByteString.CopyFrom(Encoding.UTF8.GetBytes(s.ToString()))); private static IEnumerable<ByteString> StringToByteString(IEnumerable<string> str) => str.Select(s => ByteString.CopyFrom(Encoding.UTF8.GetBytes(s))); private static ByteString StringToByteString(string str) => ByteString.CopyFrom(Encoding.UTF8.GetBytes(str)); public sealed class ModelArgs { public readonly string Name; public readonly TensorProto.Types.DataType DataType; public readonly List<long> Dims; public readonly List<bool> DimParams; public ModelArgs(string name, TensorProto.Types.DataType dataType, List<long> dims, List<bool> dimParams) { Name = name; DataType = dataType; Dims = dims; DimParams = dimParams; } } public static ModelProto MakeModel(List<NodeProto> nodes, string producerName, string name, string domain, string producerVersion, long modelVersion, List<ModelArgs> inputs, List<ModelArgs> outputs, List<ModelArgs> intermediateValues, List<TensorProto> initializers) { Contracts.CheckValue(nodes, nameof(nodes)); Contracts.CheckValue(inputs, nameof(inputs)); Contracts.CheckValue(outputs, nameof(outputs)); Contracts.CheckValue(intermediateValues, nameof(intermediateValues)); Contracts.CheckValue(initializers, nameof(initializers)); Contracts.CheckNonEmpty(producerName, nameof(producerName)); Contracts.CheckNonEmpty(name, nameof(name)); Contracts.CheckNonEmpty(domain, nameof(domain)); Contracts.CheckNonEmpty(producerVersion, nameof(producerVersion)); var model = new ModelProto(); model.Domain = domain; model.ProducerName = producerName; model.ProducerVersion = producerVersion; model.IrVersion = (long)OnnxCSharpToProtoWrapper.Version.IrVersion; model.ModelVersion = modelVersion; model.OpsetImport.Add(new OperatorSetIdProto() { Domain = "ai.onnx.ml", Version = 2 }); model.OpsetImport.Add(new OperatorSetIdProto() { Domain = "", Version = 11 }); model.Graph = new GraphProto(); var graph = model.Graph; graph.Node.Add(nodes); graph.Name = name; foreach (var arg in inputs) { var val = new ValueInfoProto(); graph.Input.Add(val); MakeValue(val, arg.Name, arg.DataType, arg.Dims, arg.DimParams); } foreach (var arg in outputs) { var val = new ValueInfoProto(); graph.Output.Add(val); MakeValue(val, arg.Name, arg.DataType, arg.Dims, arg.DimParams); } foreach (var arg in intermediateValues) { var val = new ValueInfoProto(); graph.ValueInfo.Add(val); MakeValue(val, arg.Name, arg.DataType, arg.Dims, arg.DimParams); } graph.Initializer.AddRange(initializers); return model; } public static ModelArgs GetModelArgs(DataViewType type, string colName, List<long> dims = null, List<bool> dimsParams = null) { Contracts.CheckValue(type, nameof(type)); Contracts.CheckNonEmpty(colName, nameof(colName)); Type rawType; if (type is VectorDataViewType vectorType) rawType = vectorType.ItemType.RawType; else rawType = type.RawType; var dataType = ConvertToTensorProtoType(rawType); string name = colName; List<long> dimsLocal = null; List<bool> dimsParamLocal = null; if (dims != null) { dimsLocal = dims; dimsParamLocal = dimsParams; } else { dimsLocal = new List<long>(); int valueCount = type.GetValueCount(); if (valueCount == 0) //Unknown size. { dimsLocal.Add(1); dimsParamLocal = new List<bool>() { false, true }; //false for batch size, true for dims. } else if (valueCount == 1) dimsLocal.Add(1); else if (valueCount > 1) { var vec = (VectorDataViewType)type; for (int i = 0; i < vec.Dimensions.Length; i++) dimsLocal.Add(vec.Dimensions[i]); } } //batch size. dimsLocal?.Insert(0, 1); return new ModelArgs(name, dataType, dimsLocal, dimsParamLocal); } // Make long scalar in ONNX from native C# number public static TensorProto MakeInt64(string name, long value) { var tensor = new TensorProto(); tensor.Name = name; tensor.DataType = (int)TensorProto.Types.DataType.Int64; tensor.Int64Data.Add(value); return tensor; } // Make long vector (i.e., 1-D tensor) with dims=null. Otherwise, dims is used as the shape of the produced tensor. public static TensorProto MakeInt64s(string name, IEnumerable<long> values, IEnumerable<long> dims = null) { var tensor = new TensorProto(); tensor.Name = name; tensor.DataType = (int)TensorProto.Types.DataType.Int64; tensor.Int64Data.AddRange(values); if (dims != null) tensor.Dims.AddRange(dims); else tensor.Dims.Add(values.Count()); return tensor; } // Make double vector (i.e., 1-D tensor) with dims=null. Otherwise, dims is used as the shape of the produced tensor. public static TensorProto MakeDouble(string name, IEnumerable<double> values, IEnumerable<long> dims = null) { var tensor = new TensorProto(); tensor.Name = name; tensor.DataType = (int)TensorProto.Types.DataType.Double; tensor.DoubleData.AddRange(values); if (dims != null) tensor.Dims.AddRange(dims); else tensor.Dims.Add(values.Count()); return tensor; } // Make float scalar in ONNX from native C# number public static TensorProto MakeFloat(string name, float value) { var tensor = new TensorProto(); tensor.Name = name; tensor.DataType = (int)TensorProto.Types.DataType.Float; tensor.FloatData.Add(value); return tensor; } // Make float vector (i.e., 1-D tensor) with dims=null. Otherwise, dims is used as the shape of the produced tensor. public static TensorProto MakeFloats(string name, IEnumerable<float> values, IEnumerable<long> dims = null) { var tensor = new TensorProto(); tensor.Name = name; tensor.DataType = (int)TensorProto.Types.DataType.Float; tensor.FloatData.AddRange(values); if (dims != null) tensor.Dims.AddRange(dims); else tensor.Dims.Add(values.Count()); return tensor; } // Make string scalar in ONNX from native C# number public static TensorProto MakeString(string name, string value) { var tensor = new TensorProto(); tensor.Name = name; tensor.DataType = (int)TensorProto.Types.DataType.String; tensor.StringData.Add(StringToByteString(value)); return tensor; } // Make string vector (i.e., 1-D tensor) with dims=null. Otherwise, dims is used as the shape of the produced tensor. public static TensorProto MakeStrings(string name, IEnumerable<string> values, IEnumerable<long> dims = null) { var tensor = new TensorProto(); tensor.Name = name; tensor.DataType = (int)TensorProto.Types.DataType.String; tensor.StringData.AddRange(StringToByteString(values)); if (dims != null) tensor.Dims.AddRange(dims); else tensor.Dims.Add(values.Count()); return tensor; } } }
42.082979
147
0.602002
[ "MIT" ]
FrancisChung/machinelearning
src/Microsoft.ML.OnnxConverter/OnnxUtils.cs
19,779
C#
using ETLBox.ControlFlow; using NLog.Targets; using System; using System.Collections.Generic; using System.Threading.Tasks; using System.Threading.Tasks.Dataflow; namespace ETLBox.DataFlow { /// <summary> /// A target block that serves as a destination for components that can have multiple inputs. /// </summary> /// <typeparam name="TInput">Type of ingoing data</typeparam> public class ActionJoinTarget<TInput> : DataFlowJoinTarget<TInput> { /// <inheritdoc/> public override ITargetBlock<TInput> TargetBlock => JoinAction; public ActionJoinTarget(DataFlowComponent parent, Action<TInput> action) { Action = action; CreateLinkInInternalFlow(parent); } ActionBlock<TInput> JoinAction; Action<TInput> Action; protected override void InternalInitBufferObjects() { JoinAction = new ActionBlock<TInput>(Action, new ExecutionDataflowBlockOptions() { BoundedCapacity = MaxBufferSize }); } protected override void CleanUpOnSuccess() { } protected override void CleanUpOnFaulted(Exception e) { } } }
29.292683
97
0.65612
[ "MIT" ]
gjvanvuuren/etlbox
ETLBox/src/Definitions/DataFlow/ActionJoinTarget.cs
1,203
C#
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; using System.Globalization; using System.Tests; using Xunit; namespace System.Text.RegularExpressions.Tests { public class RegexGroupTests { public static IEnumerable<object[]> Groups_Basic_TestData() { // (A - B) B is a subset of A(ie B only contains chars that are in A) yield return new object[] { null, "[abcd-[d]]+", "dddaabbccddd", RegexOptions.None, new string[] { "aabbcc" } }; yield return new object[] { null, @"[\d-[357]]+", "33312468955", RegexOptions.None, new string[] { "124689" } }; yield return new object[] { null, @"[\d-[357]]+", "51246897", RegexOptions.None, new string[] { "124689" } }; yield return new object[] { null, @"[\d-[357]]+", "3312468977", RegexOptions.None, new string[] { "124689" } }; yield return new object[] { null, @"[\w-[b-y]]+", "bbbaaaABCD09zzzyyy", RegexOptions.None, new string[] { "aaaABCD09zzz" } }; yield return new object[] { null, @"[\w-[\d]]+", "0AZaz9", RegexOptions.None, new string[] { "AZaz" } }; yield return new object[] { null, @"[\w-[\p{Ll}]]+", "a09AZz", RegexOptions.None, new string[] { "09AZ" } }; yield return new object[] { null, @"[\d-[13579]]+", "1024689", RegexOptions.ECMAScript, new string[] { "02468" } }; yield return new object[] { null, @"[\d-[13579]]+", "\x066102468\x0660", RegexOptions.ECMAScript, new string[] { "02468" } }; yield return new object[] { null, @"[\d-[13579]]+", "\x066102468\x0660", RegexOptions.None, new string[] { "\x066102468\x0660" } }; yield return new object[] { null, @"[\p{Ll}-[ae-z]]+", "aaabbbcccdddeee", RegexOptions.None, new string[] { "bbbcccddd" } }; yield return new object[] { null, @"[\p{Nd}-[2468]]+", "20135798", RegexOptions.None, new string[] { "013579" } }; yield return new object[] { null, @"[\P{Lu}-[ae-z]]+", "aaabbbcccdddeee", RegexOptions.None, new string[] { "bbbcccddd" } }; yield return new object[] { null, @"[\P{Nd}-[\p{Ll}]]+", "az09AZ'[]", RegexOptions.None, new string[] { "AZ'[]" } }; // (A - B) B is a superset of A (ie B contains chars that are in A plus other chars that are not in A) yield return new object[] { null, "[abcd-[def]]+", "fedddaabbccddd", RegexOptions.None, new string[] { "aabbcc" } }; yield return new object[] { null, @"[\d-[357a-z]]+", "az33312468955", RegexOptions.None, new string[] { "124689" } }; yield return new object[] { null, @"[\d-[de357fgA-Z]]+", "AZ51246897", RegexOptions.None, new string[] { "124689" } }; yield return new object[] { null, @"[\d-[357\p{Ll}]]+", "az3312468977", RegexOptions.None, new string[] { "124689" } }; yield return new object[] { null, @"[\w-[b-y\s]]+", " \tbbbaaaABCD09zzzyyy", RegexOptions.None, new string[] { "aaaABCD09zzz" } }; yield return new object[] { null, @"[\w-[\d\p{Po}]]+", "!#0AZaz9", RegexOptions.None, new string[] { "AZaz" } }; yield return new object[] { null, @"[\w-[\p{Ll}\s]]+", "a09AZz", RegexOptions.None, new string[] { "09AZ" } }; yield return new object[] { null, @"[\d-[13579a-zA-Z]]+", "AZ1024689", RegexOptions.ECMAScript, new string[] { "02468" } }; yield return new object[] { null, @"[\d-[13579abcd]]+", "abcd\x066102468\x0660", RegexOptions.ECMAScript, new string[] { "02468" } }; yield return new object[] { null, @"[\d-[13579\s]]+", " \t\x066102468\x0660", RegexOptions.None, new string[] { "\x066102468\x0660" } }; yield return new object[] { null, @"[\w-[b-y\p{Po}]]+", "!#bbbaaaABCD09zzzyyy", RegexOptions.None, new string[] { "aaaABCD09zzz" } }; yield return new object[] { null, @"[\w-[b-y!.,]]+", "!.,bbbaaaABCD09zzzyyy", RegexOptions.None, new string[] { "aaaABCD09zzz" } }; yield return new object[] { null, "[\\w-[b-y\x00-\x0F]]+", "\0bbbaaaABCD09zzzyyy", RegexOptions.None, new string[] { "aaaABCD09zzz" } }; yield return new object[] { null, @"[\p{Ll}-[ae-z0-9]]+", "09aaabbbcccdddeee", RegexOptions.None, new string[] { "bbbcccddd" } }; yield return new object[] { null, @"[\p{Nd}-[2468az]]+", "az20135798", RegexOptions.None, new string[] { "013579" } }; yield return new object[] { null, @"[\P{Lu}-[ae-zA-Z]]+", "AZaaabbbcccdddeee", RegexOptions.None, new string[] { "bbbcccddd" } }; yield return new object[] { null, @"[\P{Nd}-[\p{Ll}0123456789]]+", "09az09AZ'[]", RegexOptions.None, new string[] { "AZ'[]" } }; // (A - B) B only contains chars that are not in A yield return new object[] { null, "[abc-[defg]]+", "dddaabbccddd", RegexOptions.None, new string[] { "aabbcc" } }; yield return new object[] { null, @"[\d-[abc]]+", "abc09abc", RegexOptions.None, new string[] { "09" } }; yield return new object[] { null, @"[\d-[a-zA-Z]]+", "az09AZ", RegexOptions.None, new string[] { "09" } }; yield return new object[] { null, @"[\d-[\p{Ll}]]+", "az09az", RegexOptions.None, new string[] { "09" } }; yield return new object[] { null, @"[\w-[\x00-\x0F]]+", "bbbaaaABYZ09zzzyyy", RegexOptions.None, new string[] { "bbbaaaABYZ09zzzyyy" } }; yield return new object[] { null, @"[\w-[\s]]+", "0AZaz9", RegexOptions.None, new string[] { "0AZaz9" } }; yield return new object[] { null, @"[\w-[\W]]+", "0AZaz9", RegexOptions.None, new string[] { "0AZaz9" } }; yield return new object[] { null, @"[\w-[\p{Po}]]+", "#a09AZz!", RegexOptions.None, new string[] { "a09AZz" } }; yield return new object[] { null, @"[\d-[\D]]+", "azAZ1024689", RegexOptions.ECMAScript, new string[] { "1024689" } }; yield return new object[] { null, @"[\d-[a-zA-Z]]+", "azAZ\x066102468\x0660", RegexOptions.ECMAScript, new string[] { "02468" } }; yield return new object[] { null, @"[\d-[\p{Ll}]]+", "\x066102468\x0660", RegexOptions.None, new string[] { "\x066102468\x0660" } }; yield return new object[] { null, @"[a-zA-Z0-9-[\s]]+", " \tazAZ09", RegexOptions.None, new string[] { "azAZ09" } }; yield return new object[] { null, @"[a-zA-Z0-9-[\W]]+", "bbbaaaABCD09zzzyyy", RegexOptions.None, new string[] { "bbbaaaABCD09zzzyyy" } }; yield return new object[] { null, @"[a-zA-Z0-9-[^a-zA-Z0-9]]+", "bbbaaaABCD09zzzyyy", RegexOptions.None, new string[] { "bbbaaaABCD09zzzyyy" } }; yield return new object[] { null, @"[\p{Ll}-[A-Z]]+", "AZaz09", RegexOptions.None, new string[] { "az" } }; yield return new object[] { null, @"[\p{Nd}-[a-z]]+", "az09", RegexOptions.None, new string[] { "09" } }; yield return new object[] { null, @"[\P{Lu}-[\p{Lu}]]+", "AZazAZ", RegexOptions.None, new string[] { "az" } }; yield return new object[] { null, @"[\P{Lu}-[A-Z]]+", "AZazAZ", RegexOptions.None, new string[] { "az" } }; yield return new object[] { null, @"[\P{Nd}-[\p{Nd}]]+", "azAZ09", RegexOptions.None, new string[] { "azAZ" } }; yield return new object[] { null, @"[\P{Nd}-[2-8]]+", "1234567890azAZ1234567890", RegexOptions.None, new string[] { "azAZ" } }; // Alternating construct yield return new object[] { null, @"([ ]|[\w-[0-9]])+", "09az AZ90", RegexOptions.None, new string[] { "az AZ", "Z" } }; yield return new object[] { null, @"([0-9-[02468]]|[0-9-[13579]])+", "az1234567890za", RegexOptions.None, new string[] { "1234567890", "0" } }; yield return new object[] { null, @"([^0-9-[a-zAE-Z]]|[\w-[a-zAF-Z]])+", "azBCDE1234567890BCDEFza", RegexOptions.None, new string[] { "BCDE1234567890BCDE", "E" } }; yield return new object[] { null, @"([\p{Ll}-[aeiou]]|[^\w-[\s]])+", "aeiobcdxyz!@#aeio", RegexOptions.None, new string[] { "bcdxyz!@#", "#" } }; yield return new object[] { null, @"(?:hello|hi){1,3}", "hello", RegexOptions.None, new string[] { "hello" } }; yield return new object[] { null, @"(hello|hi){1,3}", "hellohihey", RegexOptions.None, new string[] { "hellohi", "hi" } }; yield return new object[] { null, @"(?:hello|hi){1,3}", "hellohihey", RegexOptions.None, new string[] { "hellohi" } }; yield return new object[] { null, @"(?:hello|hi){2,2}", "hellohihey", RegexOptions.None, new string[] { "hellohi" } }; yield return new object[] { null, @"(?:hello|hi){2,2}?", "hellohihihello", RegexOptions.None, new string[] { "hellohi" } }; yield return new object[] { null, @"(?:abc|def|ghi|hij|klm|no){1,4}", "this is a test nonoabcxyz this is only a test", RegexOptions.None, new string[] { "nonoabc" } }; yield return new object[] { null, @"xyz(abc|def)xyz", "abcxyzdefxyzabc", RegexOptions.None, new string[] { "xyzdefxyz", "def" } }; yield return new object[] { null, @"abc|(?:def|ghi)", "ghi", RegexOptions.None, new string[] { "ghi" } }; yield return new object[] { null, @"abc|(def|ghi)", "def", RegexOptions.None, new string[] { "def", "def" } }; // Multiple character classes using character class subtraction yield return new object[] { null, @"98[\d-[9]][\d-[8]][\d-[0]]", "98911 98881 98870 98871", RegexOptions.None, new string[] { "98871" } }; yield return new object[] { null, @"m[\w-[^aeiou]][\w-[^aeiou]]t", "mbbt mect meet", RegexOptions.None, new string[] { "meet" } }; // Negation with character class subtraction yield return new object[] { null, "[abcdef-[^bce]]+", "adfbcefda", RegexOptions.None, new string[] { "bce" } }; yield return new object[] { null, "[^cde-[ag]]+", "agbfxyzga", RegexOptions.None, new string[] { "bfxyz" } }; // Misc The idea here is come up with real world examples of char class subtraction. Things that // would be difficult to define without it yield return new object[] { null, @"[\p{L}-[^\p{Lu}]]+", "09',.abcxyzABCXYZ", RegexOptions.None, new string[] { "ABCXYZ" } }; yield return new object[] { null, @"[\p{IsGreek}-[\P{Lu}]]+", "\u0390\u03FE\u0386\u0388\u03EC\u03EE\u0400", RegexOptions.None, new string[] { "\u03FE\u0386\u0388\u03EC\u03EE" } }; yield return new object[] { null, @"[\p{IsBasicLatin}-[G-L]]+", "GAFMZL", RegexOptions.None, new string[] { "AFMZ" } }; yield return new object[] { null, "[a-zA-Z-[aeiouAEIOU]]+", "aeiouAEIOUbcdfghjklmnpqrstvwxyz", RegexOptions.None, new string[] { "bcdfghjklmnpqrstvwxyz" } }; // The following is an overly complex way of matching an ip address using char class subtraction yield return new object[] { null, @"^ (?<octet>^ ( ( (?<Octet2xx>[\d-[013-9]]) | [\d-[2-9]] ) (?(Octet2xx) ( (?<Octet25x>[\d-[01-46-9]]) | [\d-[5-9]] ) ( (?(Octet25x) [\d-[6-9]] | [\d] ) ) | [\d]{2} ) ) | ([\d][\d]) | [\d] )$" , "255", RegexOptions.IgnorePatternWhitespace, new string[] { "255", "255", "2", "5", "5", "", "255", "2", "5" } }; // Character Class Substraction yield return new object[] { null, @"[abcd\-d-[bc]]+", "bbbaaa---dddccc", RegexOptions.None, new string[] { "aaa---ddd" } }; yield return new object[] { null, @"[^a-f-[\x00-\x60\u007B-\uFFFF]]+", "aaafffgggzzz{{{", RegexOptions.None, new string[] { "gggzzz" } }; yield return new object[] { null, @"[\[\]a-f-[[]]+", "gggaaafff]]][[[", RegexOptions.None, new string[] { "aaafff]]]" } }; yield return new object[] { null, @"[\[\]a-f-[]]]+", "gggaaafff[[[]]]", RegexOptions.None, new string[] { "aaafff[[[" } }; yield return new object[] { null, @"[ab\-\[cd-[-[]]]]", "a]]", RegexOptions.None, new string[] { "a]]" } }; yield return new object[] { null, @"[ab\-\[cd-[-[]]]]", "b]]", RegexOptions.None, new string[] { "b]]" } }; yield return new object[] { null, @"[ab\-\[cd-[-[]]]]", "c]]", RegexOptions.None, new string[] { "c]]" } }; yield return new object[] { null, @"[ab\-\[cd-[-[]]]]", "d]]", RegexOptions.None, new string[] { "d]]" } }; yield return new object[] { null, @"[ab\-\[cd-[[]]]]", "a]]", RegexOptions.None, new string[] { "a]]" } }; yield return new object[] { null, @"[ab\-\[cd-[[]]]]", "b]]", RegexOptions.None, new string[] { "b]]" } }; yield return new object[] { null, @"[ab\-\[cd-[[]]]]", "c]]", RegexOptions.None, new string[] { "c]]" } }; yield return new object[] { null, @"[ab\-\[cd-[[]]]]", "d]]", RegexOptions.None, new string[] { "d]]" } }; yield return new object[] { null, @"[ab\-\[cd-[[]]]]", "-]]", RegexOptions.None, new string[] { "-]]" } }; yield return new object[] { null, @"[a-[c-e]]+", "bbbaaaccc", RegexOptions.None, new string[] { "aaa" } }; yield return new object[] { null, @"[a-[c-e]]+", "```aaaccc", RegexOptions.None, new string[] { "aaa" } }; yield return new object[] { null, @"[a-d\--[bc]]+", "cccaaa--dddbbb", RegexOptions.None, new string[] { "aaa--ddd" } }; // Not Character class substraction yield return new object[] { null, @"[\0- [bc]+", "!!!\0\0\t\t [[[[bbbcccaaa", RegexOptions.None, new string[] { "\0\0\t\t [[[[bbbccc" } }; yield return new object[] { null, "[[abcd]-[bc]]+", "a-b]", RegexOptions.None, new string[] { "a-b]" } }; yield return new object[] { null, "[-[e-g]+", "ddd[[[---eeefffggghhh", RegexOptions.None, new string[] { "[[[---eeefffggg" } }; yield return new object[] { null, "[-e-g]+", "ddd---eeefffggghhh", RegexOptions.None, new string[] { "---eeefffggg" } }; yield return new object[] { null, "[a-e - m-p]+", "---a b c d e m n o p---", RegexOptions.None, new string[] { "a b c d e m n o p" } }; yield return new object[] { null, "[^-[bc]]", "b] c] -] aaaddd]", RegexOptions.None, new string[] { "d]" } }; yield return new object[] { null, "[^-[bc]]", "b] c] -] aaa]ddd]", RegexOptions.None, new string[] { "a]" } }; // Make sure we correctly handle \- yield return new object[] { null, @"[a\-[bc]+", "```bbbaaa---[[[cccddd", RegexOptions.None, new string[] { "bbbaaa---[[[ccc" } }; yield return new object[] { null, @"[a\-[\-\-bc]+", "```bbbaaa---[[[cccddd", RegexOptions.None, new string[] { "bbbaaa---[[[ccc" } }; yield return new object[] { null, @"[a\-\[\-\[\-bc]+", "```bbbaaa---[[[cccddd", RegexOptions.None, new string[] { "bbbaaa---[[[ccc" } }; yield return new object[] { null, @"[abc\--[b]]+", "[[[```bbbaaa---cccddd", RegexOptions.None, new string[] { "aaa---ccc" } }; yield return new object[] { null, @"[abc\-z-[b]]+", "```aaaccc---zzzbbb", RegexOptions.None, new string[] { "aaaccc---zzz" } }; yield return new object[] { null, @"[a-d\-[b]+", "```aaabbbcccddd----[[[[]]]", RegexOptions.None, new string[] { "aaabbbcccddd----[[[[" } }; yield return new object[] { null, @"[abcd\-d\-[bc]+", "bbbaaa---[[[dddccc", RegexOptions.None, new string[] { "bbbaaa---[[[dddccc" } }; // Everything works correctly with option RegexOptions.IgnorePatternWhitespace yield return new object[] { null, "[a - c - [ b ] ]+", "dddaaa ccc [[[[ bbb ]]]", RegexOptions.IgnorePatternWhitespace, new string[] { " ]]]" } }; yield return new object[] { null, "[a - c - [ b ] +", "dddaaa ccc [[[[ bbb ]]]", RegexOptions.IgnorePatternWhitespace, new string[] { "aaa ccc [[[[ bbb " } }; // Unicode Char Classes yield return new object[] { null, @"(\p{Lu}\w*)\s(\p{Lu}\w*)", "Hello World", RegexOptions.None, new string[] { "Hello World", "Hello", "World" } }; yield return new object[] { null, @"(\p{Lu}\p{Ll}*)\s(\p{Lu}\p{Ll}*)", "Hello World", RegexOptions.None, new string[] { "Hello World", "Hello", "World" } }; yield return new object[] { null, @"(\P{Ll}\p{Ll}*)\s(\P{Ll}\p{Ll}*)", "Hello World", RegexOptions.None, new string[] { "Hello World", "Hello", "World" } }; yield return new object[] { null, @"(\P{Lu}+\p{Lu})\s(\P{Lu}+\p{Lu})", "hellO worlD", RegexOptions.None, new string[] { "hellO worlD", "hellO", "worlD" } }; yield return new object[] { null, @"(\p{Lt}\w*)\s(\p{Lt}*\w*)", "\u01C5ello \u01C5orld", RegexOptions.None, new string[] { "\u01C5ello \u01C5orld", "\u01C5ello", "\u01C5orld" } }; yield return new object[] { null, @"(\P{Lt}\w*)\s(\P{Lt}*\w*)", "Hello World", RegexOptions.None, new string[] { "Hello World", "Hello", "World" } }; // Character ranges IgnoreCase yield return new object[] { null, @"[@-D]+", "eE?@ABCDabcdeE", RegexOptions.IgnoreCase, new string[] { "@ABCDabcd" } }; yield return new object[] { null, @"[>-D]+", "eE=>?@ABCDabcdeE", RegexOptions.IgnoreCase, new string[] { ">?@ABCDabcd" } }; yield return new object[] { null, @"[\u0554-\u0557]+", "\u0583\u0553\u0554\u0555\u0556\u0584\u0585\u0586\u0557\u0558", RegexOptions.IgnoreCase, new string[] { "\u0554\u0555\u0556\u0584\u0585\u0586\u0557" } }; yield return new object[] { null, @"[X-\]]+", "wWXYZxyz[\\]^", RegexOptions.IgnoreCase, new string[] { "XYZxyz[\\]" } }; yield return new object[] { null, @"[X-\u0533]+", "\u0551\u0554\u0560AXYZaxyz\u0531\u0532\u0533\u0561\u0562\u0563\u0564", RegexOptions.IgnoreCase, new string[] { "AXYZaxyz\u0531\u0532\u0533\u0561\u0562\u0563" } }; yield return new object[] { null, @"[X-a]+", "wWAXYZaxyz", RegexOptions.IgnoreCase, new string[] { "AXYZaxyz" } }; yield return new object[] { null, @"[X-c]+", "wWABCXYZabcxyz", RegexOptions.IgnoreCase, new string[] { "ABCXYZabcxyz" } }; yield return new object[] { null, @"[X-\u00C0]+", "\u00C1\u00E1\u00C0\u00E0wWABCXYZabcxyz", RegexOptions.IgnoreCase, new string[] { "\u00C0\u00E0wWABCXYZabcxyz" } }; yield return new object[] { null, @"[\u0100\u0102\u0104]+", "\u00FF \u0100\u0102\u0104\u0101\u0103\u0105\u0106", RegexOptions.IgnoreCase, new string[] { "\u0100\u0102\u0104\u0101\u0103\u0105" } }; yield return new object[] { null, @"[B-D\u0130]+", "aAeE\u0129\u0131\u0068 BCDbcD\u0130\u0069\u0070", RegexOptions.IgnoreCase, new string[] { "BCDbcD\u0130\u0069" } }; yield return new object[] { null, @"[\u013B\u013D\u013F]+", "\u013A\u013B\u013D\u013F\u013C\u013E\u0140\u0141", RegexOptions.IgnoreCase, new string[] { "\u013B\u013D\u013F\u013C\u013E\u0140" } }; // Escape Chars yield return new object[] { null, "(Cat)\r(Dog)", "Cat\rDog", RegexOptions.None, new string[] { "Cat\rDog", "Cat", "Dog" } }; yield return new object[] { null, "(Cat)\t(Dog)", "Cat\tDog", RegexOptions.None, new string[] { "Cat\tDog", "Cat", "Dog" } }; yield return new object[] { null, "(Cat)\f(Dog)", "Cat\fDog", RegexOptions.None, new string[] { "Cat\fDog", "Cat", "Dog" } }; // Miscellaneous { witout matching } yield return new object[] { null, @"{5", "hello {5 world", RegexOptions.None, new string[] { "{5" } }; yield return new object[] { null, @"{5,", "hello {5, world", RegexOptions.None, new string[] { "{5," } }; yield return new object[] { null, @"{5,6", "hello {5,6 world", RegexOptions.None, new string[] { "{5,6" } }; // Miscellaneous inline options yield return new object[] { null, @"(?n:(?<cat>cat)(\s+)(?<dog>dog))", "cat dog", RegexOptions.None, new string[] { "cat dog", "cat", "dog" } }; yield return new object[] { null, @"(?n:(cat)(\s+)(dog))", "cat dog", RegexOptions.None, new string[] { "cat dog" } }; yield return new object[] { null, @"(?n:(cat)(?<SpaceChars>\s+)(dog))", "cat dog", RegexOptions.None, new string[] { "cat dog", " " } }; yield return new object[] { null, @"(?x: (?<cat>cat) # Cat statement (\s+) # Whitespace chars (?<dog>dog # Dog statement ))", "cat dog", RegexOptions.None, new string[] { "cat dog", " ", "cat", "dog" } }; yield return new object[] { null, @"(?+i:cat)", "CAT", RegexOptions.None, new string[] { "CAT" } }; // \d, \D, \s, \S, \w, \W, \P, \p inside character range yield return new object[] { null, @"cat([\d]*)dog", "hello123cat230927dog1412d", RegexOptions.None, new string[] { "cat230927dog", "230927" } }; yield return new object[] { null, @"([\D]*)dog", "65498catdog58719", RegexOptions.None, new string[] { "catdog", "cat" } }; yield return new object[] { null, @"cat([\s]*)dog", "wiocat dog3270", RegexOptions.None, new string[] { "cat dog", " " } }; yield return new object[] { null, @"cat([\S]*)", "sfdcatdog 3270", RegexOptions.None, new string[] { "catdog", "dog" } }; yield return new object[] { null, @"cat([\w]*)", "sfdcatdog 3270", RegexOptions.None, new string[] { "catdog", "dog" } }; yield return new object[] { null, @"cat([\W]*)dog", "wiocat dog3270", RegexOptions.None, new string[] { "cat dog", " " } }; yield return new object[] { null, @"([\p{Lu}]\w*)\s([\p{Lu}]\w*)", "Hello World", RegexOptions.None, new string[] { "Hello World", "Hello", "World" } }; yield return new object[] { null, @"([\P{Ll}][\p{Ll}]*)\s([\P{Ll}][\p{Ll}]*)", "Hello World", RegexOptions.None, new string[] { "Hello World", "Hello", "World" } }; // \x, \u, \a, \b, \e, \f, \n, \r, \t, \v, \c, inside character range yield return new object[] { null, @"(cat)([\x41]*)(dog)", "catAAAdog", RegexOptions.None, new string[] { "catAAAdog", "cat", "AAA", "dog" } }; yield return new object[] { null, @"(cat)([\u0041]*)(dog)", "catAAAdog", RegexOptions.None, new string[] { "catAAAdog", "cat", "AAA", "dog" } }; yield return new object[] { null, @"(cat)([\a]*)(dog)", "cat\a\a\adog", RegexOptions.None, new string[] { "cat\a\a\adog", "cat", "\a\a\a", "dog" } }; yield return new object[] { null, @"(cat)([\b]*)(dog)", "cat\b\b\bdog", RegexOptions.None, new string[] { "cat\b\b\bdog", "cat", "\b\b\b", "dog" } }; yield return new object[] { null, @"(cat)([\e]*)(dog)", "cat\u001B\u001B\u001Bdog", RegexOptions.None, new string[] { "cat\u001B\u001B\u001Bdog", "cat", "\u001B\u001B\u001B", "dog" } }; yield return new object[] { null, @"(cat)([\f]*)(dog)", "cat\f\f\fdog", RegexOptions.None, new string[] { "cat\f\f\fdog", "cat", "\f\f\f", "dog" } }; yield return new object[] { null, @"(cat)([\r]*)(dog)", "cat\r\r\rdog", RegexOptions.None, new string[] { "cat\r\r\rdog", "cat", "\r\r\r", "dog" } }; yield return new object[] { null, @"(cat)([\v]*)(dog)", "cat\v\v\vdog", RegexOptions.None, new string[] { "cat\v\v\vdog", "cat", "\v\v\v", "dog" } }; // \d, \D, \s, \S, \w, \W, \P, \p inside character range ([0-5]) with ECMA Option yield return new object[] { null, @"cat([\d]*)dog", "hello123cat230927dog1412d", RegexOptions.ECMAScript, new string[] { "cat230927dog", "230927" } }; yield return new object[] { null, @"([\D]*)dog", "65498catdog58719", RegexOptions.ECMAScript, new string[] { "catdog", "cat" } }; yield return new object[] { null, @"cat([\s]*)dog", "wiocat dog3270", RegexOptions.ECMAScript, new string[] { "cat dog", " " } }; yield return new object[] { null, @"cat([\S]*)", "sfdcatdog 3270", RegexOptions.ECMAScript, new string[] { "catdog", "dog" } }; yield return new object[] { null, @"cat([\w]*)", "sfdcatdog 3270", RegexOptions.ECMAScript, new string[] { "catdog", "dog" } }; yield return new object[] { null, @"cat([\W]*)dog", "wiocat dog3270", RegexOptions.ECMAScript, new string[] { "cat dog", " " } }; yield return new object[] { null, @"([\p{Lu}]\w*)\s([\p{Lu}]\w*)", "Hello World", RegexOptions.ECMAScript, new string[] { "Hello World", "Hello", "World" } }; yield return new object[] { null, @"([\P{Ll}][\p{Ll}]*)\s([\P{Ll}][\p{Ll}]*)", "Hello World", RegexOptions.ECMAScript, new string[] { "Hello World", "Hello", "World" } }; // \d, \D, \s, \S, \w, \W, \P, \p outside character range ([0-5]) with ECMA Option yield return new object[] { null, @"(cat)\d*dog", "hello123cat230927dog1412d", RegexOptions.ECMAScript, new string[] { "cat230927dog", "cat" } }; yield return new object[] { null, @"\D*(dog)", "65498catdog58719", RegexOptions.ECMAScript, new string[] { "catdog", "dog" } }; yield return new object[] { null, @"(cat)\s*(dog)", "wiocat dog3270", RegexOptions.ECMAScript, new string[] { "cat dog", "cat", "dog" } }; yield return new object[] { null, @"(cat)\S*", "sfdcatdog 3270", RegexOptions.ECMAScript, new string[] { "catdog", "cat" } }; yield return new object[] { null, @"(cat)\w*", "sfdcatdog 3270", RegexOptions.ECMAScript, new string[] { "catdog", "cat" } }; yield return new object[] { null, @"(cat)\W*(dog)", "wiocat dog3270", RegexOptions.ECMAScript, new string[] { "cat dog", "cat", "dog" } }; yield return new object[] { null, @"\p{Lu}(\w*)\s\p{Lu}(\w*)", "Hello World", RegexOptions.ECMAScript, new string[] { "Hello World", "ello", "orld" } }; yield return new object[] { null, @"\P{Ll}\p{Ll}*\s\P{Ll}\p{Ll}*", "Hello World", RegexOptions.ECMAScript, new string[] { "Hello World" } }; // Use < in a group yield return new object[] { null, @"cat(?<dog121>dog)", "catcatdogdogcat", RegexOptions.None, new string[] { "catdog", "dog" } }; yield return new object[] { null, @"(?<cat>cat)\s*(?<cat>dog)", "catcat dogdogcat", RegexOptions.None, new string[] { "cat dog", "dog" } }; yield return new object[] { null, @"(?<1>cat)\s*(?<1>dog)", "catcat dogdogcat", RegexOptions.None, new string[] { "cat dog", "dog" } }; yield return new object[] { null, @"(?<2048>cat)\s*(?<2048>dog)", "catcat dogdogcat", RegexOptions.None, new string[] { "cat dog", "dog" } }; yield return new object[] { null, @"(?<cat>cat)\w+(?<dog-cat>dog)", "cat_Hello_World_dog", RegexOptions.None, new string[] { "cat_Hello_World_dog", "", "_Hello_World_" } }; yield return new object[] { null, @"(?<cat>cat)\w+(?<-cat>dog)", "cat_Hello_World_dog", RegexOptions.None, new string[] { "cat_Hello_World_dog", "" } }; yield return new object[] { null, @"(?<cat>cat)\w+(?<cat-cat>dog)", "cat_Hello_World_dog", RegexOptions.None, new string[] { "cat_Hello_World_dog", "_Hello_World_" } }; yield return new object[] { null, @"(?<1>cat)\w+(?<dog-1>dog)", "cat_Hello_World_dog", RegexOptions.None, new string[] { "cat_Hello_World_dog", "", "_Hello_World_" } }; yield return new object[] { null, @"(?<cat>cat)\w+(?<2-cat>dog)", "cat_Hello_World_dog", RegexOptions.None, new string[] { "cat_Hello_World_dog", "", "_Hello_World_" } }; yield return new object[] { null, @"(?<1>cat)\w+(?<2-1>dog)", "cat_Hello_World_dog", RegexOptions.None, new string[] { "cat_Hello_World_dog", "", "_Hello_World_" } }; // Quantifiers yield return new object[] { null, @"(?<cat>cat){", "STARTcat{", RegexOptions.None, new string[] { "cat{", "cat" } }; yield return new object[] { null, @"(?<cat>cat){fdsa", "STARTcat{fdsa", RegexOptions.None, new string[] { "cat{fdsa", "cat" } }; yield return new object[] { null, @"(?<cat>cat){1", "STARTcat{1", RegexOptions.None, new string[] { "cat{1", "cat" } }; yield return new object[] { null, @"(?<cat>cat){1END", "STARTcat{1END", RegexOptions.None, new string[] { "cat{1END", "cat" } }; yield return new object[] { null, @"(?<cat>cat){1,", "STARTcat{1,", RegexOptions.None, new string[] { "cat{1,", "cat" } }; yield return new object[] { null, @"(?<cat>cat){1,END", "STARTcat{1,END", RegexOptions.None, new string[] { "cat{1,END", "cat" } }; yield return new object[] { null, @"(?<cat>cat){1,2", "STARTcat{1,2", RegexOptions.None, new string[] { "cat{1,2", "cat" } }; yield return new object[] { null, @"(?<cat>cat){1,2END", "STARTcat{1,2END", RegexOptions.None, new string[] { "cat{1,2END", "cat" } }; // Use IgnorePatternWhitespace yield return new object[] { null, @"(cat) #cat \s+ #followed by 1 or more whitespace (dog) #followed by dog ", "cat dog", RegexOptions.IgnorePatternWhitespace, new string[] { "cat dog", "cat", "dog" } }; yield return new object[] { null, @"(cat) #cat \s+ #followed by 1 or more whitespace (dog) #followed by dog", "cat dog", RegexOptions.IgnorePatternWhitespace, new string[] { "cat dog", "cat", "dog" } }; yield return new object[] { null, @"(cat) (?#cat) \s+ (?#followed by 1 or more whitespace) (dog) (?#followed by dog)", "cat dog", RegexOptions.IgnorePatternWhitespace, new string[] { "cat dog", "cat", "dog" } }; // Back Reference yield return new object[] { null, @"(?<cat>cat)(?<dog>dog)\k<cat>", "asdfcatdogcatdog", RegexOptions.None, new string[] { "catdogcat", "cat", "dog" } }; yield return new object[] { null, @"(?<cat>cat)\s+(?<dog>dog)\k<cat>", "asdfcat dogcat dog", RegexOptions.None, new string[] { "cat dogcat", "cat", "dog" } }; yield return new object[] { null, @"(?<cat>cat)\s+(?<dog>dog)\k'cat'", "asdfcat dogcat dog", RegexOptions.None, new string[] { "cat dogcat", "cat", "dog" } }; yield return new object[] { null, @"(?<cat>cat)\s+(?<dog>dog)\<cat>", "asdfcat dogcat dog", RegexOptions.None, new string[] { "cat dogcat", "cat", "dog" } }; yield return new object[] { null, @"(?<cat>cat)\s+(?<dog>dog)\'cat'", "asdfcat dogcat dog", RegexOptions.None, new string[] { "cat dogcat", "cat", "dog" } }; yield return new object[] { null, @"(?<cat>cat)\s+(?<dog>dog)\k<1>", "asdfcat dogcat dog", RegexOptions.None, new string[] { "cat dogcat", "cat", "dog" } }; yield return new object[] { null, @"(?<cat>cat)\s+(?<dog>dog)\k'1'", "asdfcat dogcat dog", RegexOptions.None, new string[] { "cat dogcat", "cat", "dog" } }; yield return new object[] { null, @"(?<cat>cat)\s+(?<dog>dog)\<1>", "asdfcat dogcat dog", RegexOptions.None, new string[] { "cat dogcat", "cat", "dog" } }; yield return new object[] { null, @"(?<cat>cat)\s+(?<dog>dog)\'1'", "asdfcat dogcat dog", RegexOptions.None, new string[] { "cat dogcat", "cat", "dog" } }; yield return new object[] { null, @"(?<cat>cat)\s+(?<dog>dog)\1", "asdfcat dogcat dog", RegexOptions.None, new string[] { "cat dogcat", "cat", "dog" } }; yield return new object[] { null, @"(?<cat>cat)\s+(?<dog>dog)\1", "asdfcat dogcat dog", RegexOptions.ECMAScript, new string[] { "cat dogcat", "cat", "dog" } }; yield return new object[] { null, @"(?<cat>cat)\s+(?<dog>dog)\k<dog>", "asdfcat dogdog dog", RegexOptions.None, new string[] { "cat dogdog", "cat", "dog" } }; yield return new object[] { null, @"(?<cat>cat)\s+(?<dog>dog)\2", "asdfcat dogdog dog", RegexOptions.None, new string[] { "cat dogdog", "cat", "dog" } }; yield return new object[] { null, @"(?<cat>cat)\s+(?<dog>dog)\2", "asdfcat dogdog dog", RegexOptions.ECMAScript, new string[] { "cat dogdog", "cat", "dog" } }; // Octal yield return new object[] { null, @"(cat)(\077)", "hellocat?dogworld", RegexOptions.None, new string[] { "cat?", "cat", "?" } }; yield return new object[] { null, @"(cat)(\77)", "hellocat?dogworld", RegexOptions.None, new string[] { "cat?", "cat", "?" } }; yield return new object[] { null, @"(cat)(\176)", "hellocat~dogworld", RegexOptions.None, new string[] { "cat~", "cat", "~" } }; yield return new object[] { null, @"(cat)(\400)", "hellocat\0dogworld", RegexOptions.None, new string[] { "cat\0", "cat", "\0" } }; yield return new object[] { null, @"(cat)(\300)", "hellocat\u00C0dogworld", RegexOptions.None, new string[] { "cat\u00C0", "cat", "\u00C0" } }; yield return new object[] { null, @"(cat)(\477)", "hellocat\u003Fdogworld", RegexOptions.None, new string[] { "cat\u003F", "cat", "\u003F" } }; yield return new object[] { null, @"(cat)(\777)", "hellocat\u00FFdogworld", RegexOptions.None, new string[] { "cat\u00FF", "cat", "\u00FF" } }; yield return new object[] { null, @"(cat)(\7770)", "hellocat\u00FF0dogworld", RegexOptions.None, new string[] { "cat\u00FF0", "cat", "\u00FF0" } }; yield return new object[] { null, @"(cat)(\077)", "hellocat?dogworld", RegexOptions.ECMAScript, new string[] { "cat?", "cat", "?" } }; yield return new object[] { null, @"(cat)(\77)", "hellocat?dogworld", RegexOptions.ECMAScript, new string[] { "cat?", "cat", "?" } }; yield return new object[] { null, @"(cat)(\7)", "hellocat\adogworld", RegexOptions.ECMAScript, new string[] { "cat\a", "cat", "\a" } }; yield return new object[] { null, @"(cat)(\40)", "hellocat dogworld", RegexOptions.ECMAScript, new string[] { "cat ", "cat", " " } }; yield return new object[] { null, @"(cat)(\040)", "hellocat dogworld", RegexOptions.ECMAScript, new string[] { "cat ", "cat", " " } }; yield return new object[] { null, @"(cat)(\176)", "hellocatcat76dogworld", RegexOptions.ECMAScript, new string[] { "catcat76", "cat", "cat76" } }; yield return new object[] { null, @"(cat)(\377)", "hellocat\u00FFdogworld", RegexOptions.ECMAScript, new string[] { "cat\u00FF", "cat", "\u00FF" } }; yield return new object[] { null, @"(cat)(\400)", "hellocat 0Fdogworld", RegexOptions.ECMAScript, new string[] { "cat 0", "cat", " 0" } }; // Decimal yield return new object[] { null, @"(cat)\s+(?<2147483646>dog)", "asdlkcat dogiwod", RegexOptions.None, new string[] { "cat dog", "cat", "dog" } }; yield return new object[] { null, @"(cat)\s+(?<2147483647>dog)", "asdlkcat dogiwod", RegexOptions.None, new string[] { "cat dog", "cat", "dog" } }; // Hex yield return new object[] { null, @"(cat)(\x2a*)(dog)", "asdlkcat***dogiwod", RegexOptions.None, new string[] { "cat***dog", "cat", "***", "dog" } }; yield return new object[] { null, @"(cat)(\x2b*)(dog)", "asdlkcat+++dogiwod", RegexOptions.None, new string[] { "cat+++dog", "cat", "+++", "dog" } }; yield return new object[] { null, @"(cat)(\x2c*)(dog)", "asdlkcat,,,dogiwod", RegexOptions.None, new string[] { "cat,,,dog", "cat", ",,,", "dog" } }; yield return new object[] { null, @"(cat)(\x2d*)(dog)", "asdlkcat---dogiwod", RegexOptions.None, new string[] { "cat---dog", "cat", "---", "dog" } }; yield return new object[] { null, @"(cat)(\x2e*)(dog)", "asdlkcat...dogiwod", RegexOptions.None, new string[] { "cat...dog", "cat", "...", "dog" } }; yield return new object[] { null, @"(cat)(\x2f*)(dog)", "asdlkcat///dogiwod", RegexOptions.None, new string[] { "cat///dog", "cat", "///", "dog" } }; yield return new object[] { null, @"(cat)(\x2A*)(dog)", "asdlkcat***dogiwod", RegexOptions.None, new string[] { "cat***dog", "cat", "***", "dog" } }; yield return new object[] { null, @"(cat)(\x2B*)(dog)", "asdlkcat+++dogiwod", RegexOptions.None, new string[] { "cat+++dog", "cat", "+++", "dog" } }; yield return new object[] { null, @"(cat)(\x2C*)(dog)", "asdlkcat,,,dogiwod", RegexOptions.None, new string[] { "cat,,,dog", "cat", ",,,", "dog" } }; yield return new object[] { null, @"(cat)(\x2D*)(dog)", "asdlkcat---dogiwod", RegexOptions.None, new string[] { "cat---dog", "cat", "---", "dog" } }; yield return new object[] { null, @"(cat)(\x2E*)(dog)", "asdlkcat...dogiwod", RegexOptions.None, new string[] { "cat...dog", "cat", "...", "dog" } }; yield return new object[] { null, @"(cat)(\x2F*)(dog)", "asdlkcat///dogiwod", RegexOptions.None, new string[] { "cat///dog", "cat", "///", "dog" } }; // ScanControl yield return new object[] { null, @"(cat)(\c@*)(dog)", "asdlkcat\0\0dogiwod", RegexOptions.None, new string[] { "cat\0\0dog", "cat", "\0\0", "dog" } }; yield return new object[] { null, @"(cat)(\cA*)(dog)", "asdlkcat\u0001dogiwod", RegexOptions.None, new string[] { "cat\u0001dog", "cat", "\u0001", "dog" } }; yield return new object[] { null, @"(cat)(\ca*)(dog)", "asdlkcat\u0001dogiwod", RegexOptions.None, new string[] { "cat\u0001dog", "cat", "\u0001", "dog" } }; yield return new object[] { null, @"(cat)(\cC*)(dog)", "asdlkcat\u0003dogiwod", RegexOptions.None, new string[] { "cat\u0003dog", "cat", "\u0003", "dog" } }; yield return new object[] { null, @"(cat)(\cc*)(dog)", "asdlkcat\u0003dogiwod", RegexOptions.None, new string[] { "cat\u0003dog", "cat", "\u0003", "dog" } }; yield return new object[] { null, @"(cat)(\cD*)(dog)", "asdlkcat\u0004dogiwod", RegexOptions.None, new string[] { "cat\u0004dog", "cat", "\u0004", "dog" } }; yield return new object[] { null, @"(cat)(\cd*)(dog)", "asdlkcat\u0004dogiwod", RegexOptions.None, new string[] { "cat\u0004dog", "cat", "\u0004", "dog" } }; yield return new object[] { null, @"(cat)(\cX*)(dog)", "asdlkcat\u0018dogiwod", RegexOptions.None, new string[] { "cat\u0018dog", "cat", "\u0018", "dog" } }; yield return new object[] { null, @"(cat)(\cx*)(dog)", "asdlkcat\u0018dogiwod", RegexOptions.None, new string[] { "cat\u0018dog", "cat", "\u0018", "dog" } }; yield return new object[] { null, @"(cat)(\cZ*)(dog)", "asdlkcat\u001adogiwod", RegexOptions.None, new string[] { "cat\u001adog", "cat", "\u001a", "dog" } }; yield return new object[] { null, @"(cat)(\cz*)(dog)", "asdlkcat\u001adogiwod", RegexOptions.None, new string[] { "cat\u001adog", "cat", "\u001a", "dog" } }; if (!PlatformDetection.IsNetFramework) // missing fix for https://github.com/dotnet/runtime/issues/24759 { yield return new object[] { null, @"(cat)(\c[*)(dog)", "asdlkcat\u001bdogiwod", RegexOptions.None, new string[] { "cat\u001bdog", "cat", "\u001b", "dog" } }; } // Atomic Zero-Width Assertions \A \G ^ \Z \z \b \B //\A yield return new object[] { null, @"\Acat\s+dog", "cat \n\n\n dog", RegexOptions.None, new string[] { "cat \n\n\n dog" } }; yield return new object[] { null, @"\Acat\s+dog", "cat \n\n\n dog", RegexOptions.Multiline, new string[] { "cat \n\n\n dog" } }; yield return new object[] { null, @"\A(cat)\s+(dog)", "cat \n\n\n dog", RegexOptions.None, new string[] { "cat \n\n\n dog", "cat", "dog" } }; yield return new object[] { null, @"\A(cat)\s+(dog)", "cat \n\n\n dog", RegexOptions.Multiline, new string[] { "cat \n\n\n dog", "cat", "dog" } }; //\G yield return new object[] { null, @"\Gcat\s+dog", "cat \n\n\n dog", RegexOptions.None, new string[] { "cat \n\n\n dog" } }; yield return new object[] { null, @"\Gcat\s+dog", "cat \n\n\n dog", RegexOptions.Multiline, new string[] { "cat \n\n\n dog" } }; yield return new object[] { null, @"\Gcat\s+dog", "cat \n\n\n dog", RegexOptions.ECMAScript, new string[] { "cat \n\n\n dog" } }; yield return new object[] { null, @"\G(cat)\s+(dog)", "cat \n\n\n dog", RegexOptions.None, new string[] { "cat \n\n\n dog", "cat", "dog" } }; yield return new object[] { null, @"\G(cat)\s+(dog)", "cat \n\n\n dog", RegexOptions.Multiline, new string[] { "cat \n\n\n dog", "cat", "dog" } }; yield return new object[] { null, @"\G(cat)\s+(dog)", "cat \n\n\n dog", RegexOptions.ECMAScript, new string[] { "cat \n\n\n dog", "cat", "dog" } }; //^ yield return new object[] { null, @"^cat\s+dog", "cat \n\n\n dog", RegexOptions.None, new string[] { "cat \n\n\n dog" } }; yield return new object[] { null, @"^cat\s+dog", "cat \n\n\n dog", RegexOptions.Multiline, new string[] { "cat \n\n\n dog" } }; yield return new object[] { null, @"mouse\s\n^cat\s+dog", "mouse\n\ncat \n\n\n dog", RegexOptions.Multiline, new string[] { "mouse\n\ncat \n\n\n dog" } }; yield return new object[] { null, @"^cat\s+dog", "cat \n\n\n dog", RegexOptions.ECMAScript, new string[] { "cat \n\n\n dog" } }; yield return new object[] { null, @"^(cat)\s+(dog)", "cat \n\n\n dog", RegexOptions.None, new string[] { "cat \n\n\n dog", "cat", "dog" } }; yield return new object[] { null, @"^(cat)\s+(dog)", "cat \n\n\n dog", RegexOptions.Multiline, new string[] { "cat \n\n\n dog", "cat", "dog" } }; yield return new object[] { null, @"(mouse)\s\n^(cat)\s+(dog)", "mouse\n\ncat \n\n\n dog", RegexOptions.Multiline, new string[] { "mouse\n\ncat \n\n\n dog", "mouse", "cat", "dog" } }; yield return new object[] { null, @"^(cat)\s+(dog)", "cat \n\n\n dog", RegexOptions.ECMAScript, new string[] { "cat \n\n\n dog", "cat", "dog" } }; //\Z yield return new object[] { null, @"cat\s+dog\Z", "cat \n\n\n dog", RegexOptions.None, new string[] { "cat \n\n\n dog" } }; yield return new object[] { null, @"cat\s+dog\Z", "cat \n\n\n dog", RegexOptions.Multiline, new string[] { "cat \n\n\n dog" } }; yield return new object[] { null, @"cat\s+dog\Z", "cat \n\n\n dog", RegexOptions.ECMAScript, new string[] { "cat \n\n\n dog" } }; yield return new object[] { null, @"cat\s+dog\Z", "cat \n\n\n dog\n", RegexOptions.None, new string[] { "cat \n\n\n dog" } }; yield return new object[] { null, @"cat\s+dog\Z", "cat \n\n\n dog\n", RegexOptions.Multiline, new string[] { "cat \n\n\n dog" } }; yield return new object[] { null, @"cat\s+dog\Z", "cat \n\n\n dog\n", RegexOptions.ECMAScript, new string[] { "cat \n\n\n dog" } }; yield return new object[] { null, @"(cat)\s+(dog)\Z", "cat \n\n\n dog", RegexOptions.None, new string[] { "cat \n\n\n dog", "cat", "dog" } }; yield return new object[] { null, @"(cat)\s+(dog)\Z", "cat \n\n\n dog", RegexOptions.Multiline, new string[] { "cat \n\n\n dog", "cat", "dog" } }; yield return new object[] { null, @"(cat)\s+(dog)\Z", "cat \n\n\n dog", RegexOptions.ECMAScript, new string[] { "cat \n\n\n dog", "cat", "dog" } }; yield return new object[] { null, @"(cat)\s+(dog)\Z", "cat \n\n\n dog\n", RegexOptions.None, new string[] { "cat \n\n\n dog", "cat", "dog" } }; yield return new object[] { null, @"(cat)\s+(dog)\Z", "cat \n\n\n dog\n", RegexOptions.Multiline, new string[] { "cat \n\n\n dog", "cat", "dog" } }; yield return new object[] { null, @"(cat)\s+(dog)\Z", "cat \n\n\n dog\n", RegexOptions.ECMAScript, new string[] { "cat \n\n\n dog", "cat", "dog" } }; //\z yield return new object[] { null, @"cat\s+dog\z", "cat \n\n\n dog", RegexOptions.None, new string[] { "cat \n\n\n dog" } }; yield return new object[] { null, @"cat\s+dog\z", "cat \n\n\n dog", RegexOptions.Multiline, new string[] { "cat \n\n\n dog" } }; yield return new object[] { null, @"cat\s+dog\z", "cat \n\n\n dog", RegexOptions.ECMAScript, new string[] { "cat \n\n\n dog" } }; yield return new object[] { null, @"(cat)\s+(dog)\z", "cat \n\n\n dog", RegexOptions.None, new string[] { "cat \n\n\n dog", "cat", "dog" } }; yield return new object[] { null, @"(cat)\s+(dog)\z", "cat \n\n\n dog", RegexOptions.Multiline, new string[] { "cat \n\n\n dog", "cat", "dog" } }; yield return new object[] { null, @"(cat)\s+(dog)\z", "cat \n\n\n dog", RegexOptions.ECMAScript, new string[] { "cat \n\n\n dog", "cat", "dog" } }; //\b yield return new object[] { null, @"\bcat\b", "cat", RegexOptions.None, new string[] { "cat" } }; yield return new object[] { null, @"\bcat\b", "dog cat mouse", RegexOptions.None, new string[] { "cat" } }; yield return new object[] { null, @"\bcat\b", "cat", RegexOptions.ECMAScript, new string[] { "cat" } }; yield return new object[] { null, @"\bcat\b", "dog cat mouse", RegexOptions.ECMAScript, new string[] { "cat" } }; yield return new object[] { null, @".*\bcat\b", "cat", RegexOptions.None, new string[] { "cat" } }; yield return new object[] { null, @".*\bcat\b", "dog cat mouse", RegexOptions.None, new string[] { "dog cat" } }; yield return new object[] { null, @".*\bcat\b", "cat", RegexOptions.ECMAScript, new string[] { "cat" } }; yield return new object[] { null, @".*\bcat\b", "dog cat mouse", RegexOptions.ECMAScript, new string[] { "dog cat" } }; yield return new object[] { null, @"\b@cat", "123START123@catEND", RegexOptions.None, new string[] { "@cat" } }; yield return new object[] { null, @"\b\<cat", "123START123<catEND", RegexOptions.None, new string[] { "<cat" } }; yield return new object[] { null, @"\b,cat", "satwe,,,START,catEND", RegexOptions.None, new string[] { ",cat" } }; yield return new object[] { null, @"\b\[cat", "`12START123[catEND", RegexOptions.None, new string[] { "[cat" } }; //\B yield return new object[] { null, @"\Bcat\B", "dogcatmouse", RegexOptions.None, new string[] { "cat" } }; yield return new object[] { null, @"dog\Bcat\B", "dogcatmouse", RegexOptions.None, new string[] { "dogcat" } }; yield return new object[] { null, @".*\Bcat\B", "dogcatmouse", RegexOptions.None, new string[] { "dogcat" } }; yield return new object[] { null, @"\Bcat\B", "dogcatmouse", RegexOptions.ECMAScript, new string[] { "cat" } }; yield return new object[] { null, @"dog\Bcat\B", "dogcatmouse", RegexOptions.ECMAScript, new string[] { "dogcat" } }; yield return new object[] { null, @".*\Bcat\B", "dogcatmouse", RegexOptions.ECMAScript, new string[] { "dogcat" } }; yield return new object[] { null, @"\B@cat", "123START123;@catEND", RegexOptions.None, new string[] { "@cat" } }; yield return new object[] { null, @"\B\<cat", "123START123'<catEND", RegexOptions.None, new string[] { "<cat" } }; yield return new object[] { null, @"\B,cat", "satwe,,,START',catEND", RegexOptions.None, new string[] { ",cat" } }; yield return new object[] { null, @"\B\[cat", "`12START123'[catEND", RegexOptions.None, new string[] { "[cat" } }; // \w matching \p{Lm} (Letter, Modifier) yield return new object[] { null, @"\w+\s+\w+", "cat\u02b0 dog\u02b1", RegexOptions.None, new string[] { "cat\u02b0 dog\u02b1" } }; yield return new object[] { null, @"cat\w+\s+dog\w+", "STARTcat\u30FC dog\u3005END", RegexOptions.None, new string[] { "cat\u30FC dog\u3005END" } }; yield return new object[] { null, @"cat\w+\s+dog\w+", "STARTcat\uff9e dog\uff9fEND", RegexOptions.None, new string[] { "cat\uff9e dog\uff9fEND" } }; yield return new object[] { null, @"(\w+)\s+(\w+)", "cat\u02b0 dog\u02b1", RegexOptions.None, new string[] { "cat\u02b0 dog\u02b1", "cat\u02b0", "dog\u02b1" } }; yield return new object[] { null, @"(cat\w+)\s+(dog\w+)", "STARTcat\u30FC dog\u3005END", RegexOptions.None, new string[] { "cat\u30FC dog\u3005END", "cat\u30FC", "dog\u3005END" } }; yield return new object[] { null, @"(cat\w+)\s+(dog\w+)", "STARTcat\uff9e dog\uff9fEND", RegexOptions.None, new string[] { "cat\uff9e dog\uff9fEND", "cat\uff9e", "dog\uff9fEND" } }; // Positive and negative character classes [a-c]|[^b-c] yield return new object[] { null, @"[^a]|d", "d", RegexOptions.None, new string[] { "d" } }; yield return new object[] { null, @"([^a]|[d])*", "Hello Worlddf", RegexOptions.None, new string[] { "Hello Worlddf", "f" } }; yield return new object[] { null, @"([^{}]|\n)+", "{{{{Hello\n World \n}END", RegexOptions.None, new string[] { "Hello\n World \n", "\n" } }; yield return new object[] { null, @"([a-d]|[^abcd])+", "\tonce\n upon\0 a- ()*&^%#time?", RegexOptions.None, new string[] { "\tonce\n upon\0 a- ()*&^%#time?", "?" } }; yield return new object[] { null, @"([^a]|[a])*", "once upon a time", RegexOptions.None, new string[] { "once upon a time", "e" } }; yield return new object[] { null, @"([a-d]|[^abcd]|[x-z]|^wxyz])+", "\tonce\n upon\0 a- ()*&^%#time?", RegexOptions.None, new string[] { "\tonce\n upon\0 a- ()*&^%#time?", "?" } }; yield return new object[] { null, @"([a-d]|[e-i]|[^e]|wxyz])+", "\tonce\n upon\0 a- ()*&^%#time?", RegexOptions.None, new string[] { "\tonce\n upon\0 a- ()*&^%#time?", "?" } }; // Canonical and noncanonical char class, where one group is in it's // simplest form [a-e] and another is more complex. yield return new object[] { null, @"^(([^b]+ )|(.* ))$", "aaa ", RegexOptions.None, new string[] { "aaa ", "aaa ", "aaa ", "" } }; yield return new object[] { null, @"^(([^b]+ )|(.*))$", "aaa", RegexOptions.None, new string[] { "aaa", "aaa", "", "aaa" } }; yield return new object[] { null, @"^(([^b]+ )|(.* ))$", "bbb ", RegexOptions.None, new string[] { "bbb ", "bbb ", "", "bbb " } }; yield return new object[] { null, @"^(([^b]+ )|(.*))$", "bbb", RegexOptions.None, new string[] { "bbb", "bbb", "", "bbb" } }; yield return new object[] { null, @"^((a*)|(.*))$", "aaa", RegexOptions.None, new string[] { "aaa", "aaa", "aaa", "" } }; yield return new object[] { null, @"^((a*)|(.*))$", "aaabbb", RegexOptions.None, new string[] { "aaabbb", "aaabbb", "", "aaabbb" } }; yield return new object[] { null, @"(([0-9])|([a-z])|([A-Z]))*", "{hello 1234567890 world}", RegexOptions.None, new string[] { "", "", "", "", "" } }; yield return new object[] { null, @"(([0-9])|([a-z])|([A-Z]))+", "{hello 1234567890 world}", RegexOptions.None, new string[] { "hello", "o", "", "o", "" } }; yield return new object[] { null, @"(([0-9])|([a-z])|([A-Z]))*", "{HELLO 1234567890 world}", RegexOptions.None, new string[] { "", "", "", "", "" } }; yield return new object[] { null, @"(([0-9])|([a-z])|([A-Z]))+", "{HELLO 1234567890 world}", RegexOptions.None, new string[] { "HELLO", "O", "", "", "O" } }; yield return new object[] { null, @"(([0-9])|([a-z])|([A-Z]))*", "{1234567890 hello world}", RegexOptions.None, new string[] { "", "", "", "", "" } }; yield return new object[] { null, @"(([0-9])|([a-z])|([A-Z]))+", "{1234567890 hello world}", RegexOptions.None, new string[] { "1234567890", "0", "0", "", "" } }; yield return new object[] { null, @"^(([a-d]*)|([a-z]*))$", "aaabbbcccdddeeefff", RegexOptions.None, new string[] { "aaabbbcccdddeeefff", "aaabbbcccdddeeefff", "", "aaabbbcccdddeeefff" } }; yield return new object[] { null, @"^(([d-f]*)|([c-e]*))$", "dddeeeccceee", RegexOptions.None, new string[] { "dddeeeccceee", "dddeeeccceee", "", "dddeeeccceee" } }; yield return new object[] { null, @"^(([c-e]*)|([d-f]*))$", "dddeeeccceee", RegexOptions.None, new string[] { "dddeeeccceee", "dddeeeccceee", "dddeeeccceee", "" } }; yield return new object[] { null, @"(([a-d]*)|([a-z]*))", "aaabbbcccdddeeefff", RegexOptions.None, new string[] { "aaabbbcccddd", "aaabbbcccddd", "aaabbbcccddd", "" } }; yield return new object[] { null, @"(([d-f]*)|([c-e]*))", "dddeeeccceee", RegexOptions.None, new string[] { "dddeee", "dddeee", "dddeee", "" } }; yield return new object[] { null, @"(([c-e]*)|([d-f]*))", "dddeeeccceee", RegexOptions.None, new string[] { "dddeeeccceee", "dddeeeccceee", "dddeeeccceee", "" } }; yield return new object[] { null, @"(([a-d]*)|(.*))", "aaabbbcccdddeeefff", RegexOptions.None, new string[] { "aaabbbcccddd", "aaabbbcccddd", "aaabbbcccddd", "" } }; yield return new object[] { null, @"(([d-f]*)|(.*))", "dddeeeccceee", RegexOptions.None, new string[] { "dddeee", "dddeee", "dddeee", "" } }; yield return new object[] { null, @"(([c-e]*)|(.*))", "dddeeeccceee", RegexOptions.None, new string[] { "dddeeeccceee", "dddeeeccceee", "dddeeeccceee", "" } }; // \p{Pi} (Punctuation Initial quote) \p{Pf} (Punctuation Final quote) yield return new object[] { null, @"\p{Pi}(\w*)\p{Pf}", "\u00ABCat\u00BB \u00BBDog\u00AB'", RegexOptions.None, new string[] { "\u00ABCat\u00BB", "Cat" } }; yield return new object[] { null, @"\p{Pi}(\w*)\p{Pf}", "\u2018Cat\u2019 \u2019Dog\u2018'", RegexOptions.None, new string[] { "\u2018Cat\u2019", "Cat" } }; // ECMAScript yield return new object[] { null, @"(?<cat>cat)\s+(?<dog>dog)\s+\123\s+\234", "asdfcat dog cat23 dog34eia", RegexOptions.ECMAScript, new string[] { "cat dog cat23 dog34", "cat", "dog" } }; // Balanced Matching yield return new object[] { null, @"<div> (?> <div>(?<DEPTH>) | </div> (?<-DEPTH>) | .? )*? (?(DEPTH)(?!)) </div>", "<div>this is some <div>red</div> text</div></div></div>", RegexOptions.IgnorePatternWhitespace, new string[] { "<div>this is some <div>red</div> text</div>", "" } }; yield return new object[] { null, @"( ((?'open'<+)[^<>]*)+ ((?'close-open'>+)[^<>]*)+ )+", "<01deep_01<02deep_01<03deep_01>><02deep_02><02deep_03<03deep_03>>>", RegexOptions.IgnorePatternWhitespace, new string[] { "<01deep_01<02deep_01<03deep_01>><02deep_02><02deep_03<03deep_03>>>", "<02deep_03<03deep_03>>>", "<03deep_03", ">>>", "<", "03deep_03" } }; yield return new object[] { null, @"( (?<start><)? [^<>]? (?<end-start>>)? )*", "<01deep_01<02deep_01<03deep_01>><02deep_02><02deep_03<03deep_03>>>", RegexOptions.IgnorePatternWhitespace, new string[] { "<01deep_01<02deep_01<03deep_01>><02deep_02><02deep_03<03deep_03>>>", "", "", "01deep_01<02deep_01<03deep_01>><02deep_02><02deep_03<03deep_03>>" } }; yield return new object[] { null, @"( (?<start><[^/<>]*>)? [^<>]? (?<end-start></[^/<>]*>)? )*", "<b><a>Cat</a></b>", RegexOptions.IgnorePatternWhitespace, new string[] { "<b><a>Cat</a></b>", "", "", "<a>Cat</a>" } }; yield return new object[] { null, @"( (?<start><(?<TagName>[^/<>]*)>)? [^<>]? (?<end-start></\k<TagName>>)? )*", "<b>cat</b><a>dog</a>", RegexOptions.IgnorePatternWhitespace, new string[] { "<b>cat</b><a>dog</a>", "", "", "a", "dog" } }; // Balanced Matching With Backtracking yield return new object[] { null, @"( (?<start><[^/<>]*>)? .? (?<end-start></[^/<>]*>)? )* (?(start)(?!)) ", "<b><a>Cat</a></b><<<<c>>>><<d><e<f>><g><<<>>>>", RegexOptions.IgnorePatternWhitespace, new string[] { "<b><a>Cat</a></b><<<<c>>>><<d><e<f>><g><<<>>>>", "", "", "<a>Cat" } }; // Character Classes and Lazy quantifier yield return new object[] { null, @"([0-9]+?)([\w]+?)", "55488aheiaheiad", RegexOptions.ECMAScript, new string[] { "55", "5", "5" } }; yield return new object[] { null, @"([0-9]+?)([a-z]+?)", "55488aheiaheiad", RegexOptions.ECMAScript, new string[] { "55488a", "55488", "a" } }; // Miscellaneous/Regression scenarios yield return new object[] { null, @"(?<openingtag>1)(?<content>.*?)(?=2)", "1" + Environment.NewLine + "<Projecaa DefaultTargets=\"x\"/>" + Environment.NewLine + "2", RegexOptions.Singleline | RegexOptions.ExplicitCapture, new string[] { "1" + Environment.NewLine + "<Projecaa DefaultTargets=\"x\"/>" + Environment.NewLine, "1", Environment.NewLine + "<Projecaa DefaultTargets=\"x\"/>"+ Environment.NewLine } }; yield return new object[] { null, @"\G<%#(?<code>.*?)?%>", @"<%# DataBinder.Eval(this, ""MyNumber"") %>", RegexOptions.Singleline, new string[] { @"<%# DataBinder.Eval(this, ""MyNumber"") %>", @" DataBinder.Eval(this, ""MyNumber"") " } }; // Nested Quantifiers yield return new object[] { null, @"^[abcd]{0,0x10}*$", "a{0,0x10}}}", RegexOptions.None, new string[] { "a{0,0x10}}}" } }; // Lazy operator Backtracking yield return new object[] { null, @"http://([a-zA-z0-9\-]*\.?)*?(:[0-9]*)??/", "http://www.msn.com/", RegexOptions.IgnoreCase, new string[] { "http://www.msn.com/", "com", string.Empty } }; yield return new object[] { null, @"http://([a-zA-Z0-9\-]*\.?)*?/", @"http://www.google.com/", RegexOptions.IgnoreCase, new string[] { "http://www.google.com/", "com" } }; yield return new object[] { null, @"([a-z]*?)([\w])", "cat", RegexOptions.IgnoreCase, new string[] { "c", string.Empty, "c" } }; yield return new object[] { null, @"^([a-z]*?)([\w])$", "cat", RegexOptions.IgnoreCase, new string[] { "cat", "ca", "t" } }; // Backtracking yield return new object[] { null, @"([a-z]*)([\w])", "cat", RegexOptions.IgnoreCase, new string[] { "cat", "ca", "t" } }; yield return new object[] { null, @"^([a-z]*)([\w])$", "cat", RegexOptions.IgnoreCase, new string[] { "cat", "ca", "t" } }; // Quantifiers yield return new object[] { null, @"a*", "", RegexOptions.None, new string[] { "" } }; yield return new object[] { null, @"a*", "a", RegexOptions.None, new string[] { "a" } }; yield return new object[] { null, @"a*", "aa", RegexOptions.None, new string[] { "aa" } }; yield return new object[] { null, @"a*", "aaa", RegexOptions.None, new string[] { "aaa" } }; yield return new object[] { null, @"a*?", "", RegexOptions.None, new string[] { "" } }; yield return new object[] { null, @"a*?", "a", RegexOptions.None, new string[] { "" } }; yield return new object[] { null, @"a*?", "aa", RegexOptions.None, new string[] { "" } }; yield return new object[] { null, @"a+?", "aa", RegexOptions.None, new string[] { "a" } }; yield return new object[] { null, @"a{1,", "a{1,", RegexOptions.None, new string[] { "a{1," } }; yield return new object[] { null, @"a{1,3}", "aaaaa", RegexOptions.None, new string[] { "aaa" } }; yield return new object[] { null, @"a{1,3}?", "aaaaa", RegexOptions.None, new string[] { "a" } }; yield return new object[] { null, @"a{2,2}", "aaaaa", RegexOptions.None, new string[] { "aa" } }; yield return new object[] { null, @"a{2,2}?", "aaaaa", RegexOptions.None, new string[] { "aa" } }; yield return new object[] { null, @".{1,3}", "bb\nba", RegexOptions.None, new string[] { "bb" } }; yield return new object[] { null, @".{1,3}?", "bb\nba", RegexOptions.None, new string[] { "b" } }; yield return new object[] { null, @".{2,2}", "bbb\nba", RegexOptions.None, new string[] { "bb" } }; yield return new object[] { null, @".{2,2}?", "bbb\nba", RegexOptions.None, new string[] { "bb" } }; yield return new object[] { null, @"[abc]{1,3}", "ccaba", RegexOptions.None, new string[] { "cca" } }; yield return new object[] { null, @"[abc]{1,3}?", "ccaba", RegexOptions.None, new string[] { "c" } }; yield return new object[] { null, @"[abc]{2,2}", "ccaba", RegexOptions.None, new string[] { "cc" } }; yield return new object[] { null, @"[abc]{2,2}?", "ccaba", RegexOptions.None, new string[] { "cc" } }; yield return new object[] { null, @"(?:[abc]def){1,3}xyz", "cdefxyz", RegexOptions.None, new string[] { "cdefxyz" } }; yield return new object[] { null, @"(?:[abc]def){1,3}xyz", "adefbdefcdefxyz", RegexOptions.None, new string[] { "adefbdefcdefxyz" } }; yield return new object[] { null, @"(?:[abc]def){1,3}?xyz", "cdefxyz", RegexOptions.None, new string[] { "cdefxyz" } }; yield return new object[] { null, @"(?:[abc]def){1,3}?xyz", "adefbdefcdefxyz", RegexOptions.None, new string[] { "adefbdefcdefxyz" } }; yield return new object[] { null, @"(?:[abc]def){2,2}xyz", "adefbdefcdefxyz", RegexOptions.None, new string[] { "bdefcdefxyz" } }; yield return new object[] { null, @"(?:[abc]def){2,2}?xyz", "adefbdefcdefxyz", RegexOptions.None, new string[] { "bdefcdefxyz" } }; foreach (string prefix in new[] { "", "xyz" }) { yield return new object[] { null, prefix + @"(?:[abc]def){1,3}", prefix + "cdef", RegexOptions.None, new string[] { prefix + "cdef" } }; yield return new object[] { null, prefix + @"(?:[abc]def){1,3}", prefix + "cdefadefbdef", RegexOptions.None, new string[] { prefix + "cdefadefbdef" } }; yield return new object[] { null, prefix + @"(?:[abc]def){1,3}", prefix + "cdefadefbdefadef", RegexOptions.None, new string[] { prefix + "cdefadefbdef" } }; yield return new object[] { null, prefix + @"(?:[abc]def){1,3}?", prefix + "cdef", RegexOptions.None, new string[] { prefix + "cdef" } }; yield return new object[] { null, prefix + @"(?:[abc]def){1,3}?", prefix + "cdefadefbdef", RegexOptions.None, new string[] { prefix + "cdef" } }; yield return new object[] { null, prefix + @"(?:[abc]def){2,2}", prefix + "cdefadefbdefadef", RegexOptions.None, new string[] { prefix + "cdefadef" } }; yield return new object[] { null, prefix + @"(?:[abc]def){2,2}?", prefix + "cdefadefbdefadef", RegexOptions.None, new string[] { prefix + "cdefadef" } }; } yield return new object[] { null, @"(cat){", "cat{", RegexOptions.None, new string[] { "cat{", "cat" } }; yield return new object[] { null, @"(cat){}", "cat{}", RegexOptions.None, new string[] { "cat{}", "cat" } }; yield return new object[] { null, @"(cat){,", "cat{,", RegexOptions.None, new string[] { "cat{,", "cat" } }; yield return new object[] { null, @"(cat){,}", "cat{,}", RegexOptions.None, new string[] { "cat{,}", "cat" } }; yield return new object[] { null, @"(cat){cat}", "cat{cat}", RegexOptions.None, new string[] { "cat{cat}", "cat" } }; yield return new object[] { null, @"(cat){cat,5}", "cat{cat,5}", RegexOptions.None, new string[] { "cat{cat,5}", "cat" } }; yield return new object[] { null, @"(cat){5,dog}", "cat{5,dog}", RegexOptions.None, new string[] { "cat{5,dog}", "cat" } }; yield return new object[] { null, @"(cat){cat,dog}", "cat{cat,dog}", RegexOptions.None, new string[] { "cat{cat,dog}", "cat" } }; yield return new object[] { null, @"(cat){,}?", "cat{,}?", RegexOptions.None, new string[] { "cat{,}", "cat" } }; yield return new object[] { null, @"(cat){cat}?", "cat{cat}?", RegexOptions.None, new string[] { "cat{cat}", "cat" } }; yield return new object[] { null, @"(cat){cat,5}?", "cat{cat,5}?", RegexOptions.None, new string[] { "cat{cat,5}", "cat" } }; yield return new object[] { null, @"(cat){5,dog}?", "cat{5,dog}?", RegexOptions.None, new string[] { "cat{5,dog}", "cat" } }; yield return new object[] { null, @"(cat){cat,dog}?", "cat{cat,dog}?", RegexOptions.None, new string[] { "cat{cat,dog}", "cat" } }; // Atomic subexpressions // Implicitly upgrading (or not) oneloop to be atomic yield return new object[] { null, @"a*b", "aaab", RegexOptions.None, new string[] { "aaab" } }; yield return new object[] { null, @"a*b+", "aaab", RegexOptions.None, new string[] { "aaab" } }; yield return new object[] { null, @"a*b+?", "aaab", RegexOptions.None, new string[] { "aaab" } }; yield return new object[] { null, @"a*(?>b+)", "aaab", RegexOptions.None, new string[] { "aaab" } }; yield return new object[] { null, @"a*[^a]", "aaab", RegexOptions.None, new string[] { "aaab" } }; yield return new object[] { null, @"a*[^a]+", "aaab", RegexOptions.None, new string[] { "aaab" } }; yield return new object[] { null, @"a*[^a]+?", "aaab", RegexOptions.None, new string[] { "aaab" } }; yield return new object[] { null, @"a*(?>[^a]+)", "aaab", RegexOptions.None, new string[] { "aaab" } }; yield return new object[] { null, @"a*bcd", "aaabcd", RegexOptions.None, new string[] { "aaabcd" } }; yield return new object[] { null, @"a*[bcd]", "aaab", RegexOptions.None, new string[] { "aaab" } }; yield return new object[] { null, @"a*[bcd]+", "aaab", RegexOptions.None, new string[] { "aaab" } }; yield return new object[] { null, @"a*[bcd]+?", "aaab", RegexOptions.None, new string[] { "aaab" } }; yield return new object[] { null, @"a*(?>[bcd]+)", "aaab", RegexOptions.None, new string[] { "aaab" } }; yield return new object[] { null, @"a*[bcd]{1,3}", "aaab", RegexOptions.None, new string[] { "aaab" } }; yield return new object[] { null, @"a*([bcd]ab|[bef]cd){1,3}", "aaababecdcac", RegexOptions.ExplicitCapture, new string[] { "aaababecd" } }; yield return new object[] { null, @"a*([bcd]|[aef]){1,3}", "befb", RegexOptions.ExplicitCapture, new string[] { "bef" } }; // can't upgrade yield return new object[] { null, @"a*$", "aaa", RegexOptions.None, new string[] { "aaa" } }; yield return new object[] { null, @"a*$", "aaa", RegexOptions.Multiline, new string[] { "aaa" } }; yield return new object[] { null, @"a*\b", "aaa bbb", RegexOptions.None, new string[] { "aaa" } }; yield return new object[] { null, @"a*\b", "aaa bbb", RegexOptions.ECMAScript, new string[] { "aaa" } }; yield return new object[] { null, @"@*\B", "@@@", RegexOptions.None, new string[] { "@@@" } }; yield return new object[] { null, @"@*\B", "@@@", RegexOptions.ECMAScript, new string[] { "@@@" } }; yield return new object[] { null, @"(?:abcd*|efgh)i", "efghi", RegexOptions.None, new string[] { "efghi" } }; yield return new object[] { null, @"(?:abcd|efgh*)i", "efgi", RegexOptions.None, new string[] { "efgi" } }; yield return new object[] { null, @"(?:abcd|efghj{2,}|j[klm]o+)i", "efghjjjjji", RegexOptions.None, new string[] { "efghjjjjji" } }; yield return new object[] { null, @"(?:abcd|efghi{2,}|j[klm]o+)i", "efghiii", RegexOptions.None, new string[] { "efghiii" } }; yield return new object[] { null, @"(?:abcd|efghi{2,}|j[klm]o+)i", "efghiiiiiiii", RegexOptions.None, new string[] { "efghiiiiiiii" } }; yield return new object[] { null, @"a?ba?ba?ba?b", "abbabab", RegexOptions.None, new string[] { "abbabab" } }; yield return new object[] { null, @"a?ba?ba?ba?b", "abBAbab", RegexOptions.IgnoreCase, new string[] { "abBAbab" } }; // Implicitly upgrading (or not) notoneloop to be atomic yield return new object[] { null, @"[^b]*b", "aaab", RegexOptions.None, new string[] { "aaab" } }; yield return new object[] { null, @"[^b]*b+", "aaab", RegexOptions.None, new string[] { "aaab" } }; yield return new object[] { null, @"[^b]*b+?", "aaab", RegexOptions.None, new string[] { "aaab" } }; yield return new object[] { null, @"[^b]*(?>b+)", "aaab", RegexOptions.None, new string[] { "aaab" } }; yield return new object[] { null, @"[^b]*bac", "aaabac", RegexOptions.None, new string[] { "aaabac" } }; yield return new object[] { null, @"[^b]*", "aaa", RegexOptions.None, new string[] { "aaa" } }; yield return new object[] { null, @"(?:abc[^b]*|efgh)i", "efghi", RegexOptions.None, new string[] { "efghi" } }; // can't upgrade yield return new object[] { null, @"(?:abcd|efg[^b]*)b", "efgb", RegexOptions.None, new string[] { "efgb" } }; yield return new object[] { null, @"(?:abcd|efg[^b]*)i", "efgi", RegexOptions.None, new string[] { "efgi" } }; // can't upgrade yield return new object[] { null, @"[^a]?a[^a]?a[^a]?a[^a]?a", "baababa", RegexOptions.None, new string[] { "baababa" } }; yield return new object[] { null, @"[^a]?a[^a]?a[^a]?a[^a]?a", "BAababa", RegexOptions.IgnoreCase, new string[] { "BAababa" } }; // Implicitly upgrading (or not) setloop to be atomic yield return new object[] { null, @"[ac]*", "aaa", RegexOptions.None, new string[] { "aaa" } }; yield return new object[] { null, @"[ac]*b", "aaab", RegexOptions.None, new string[] { "aaab" } }; yield return new object[] { null, @"[ac]*b+", "aaab", RegexOptions.None, new string[] { "aaab" } }; yield return new object[] { null, @"[ac]*b+?", "aaab", RegexOptions.None, new string[] { "aaab" } }; yield return new object[] { null, @"[ac]*(?>b+)", "aaab", RegexOptions.None, new string[] { "aaab" } }; yield return new object[] { null, @"[ac]*[^a]", "aaab", RegexOptions.None, new string[] { "aaab" } }; yield return new object[] { null, @"[ac]*[^a]+", "aaab", RegexOptions.None, new string[] { "aaab" } }; yield return new object[] { null, @"[ac]*[^a]+?", "aaab", RegexOptions.None, new string[] { "aaab" } }; yield return new object[] { null, @"[ac]*(?>[^a]+)", "aaab", RegexOptions.None, new string[] { "aaab" } }; yield return new object[] { null, @"[ac]*bcd", "aaabcd", RegexOptions.None, new string[] { "aaabcd" } }; yield return new object[] { null, @"[ac]*[bd]", "aaab", RegexOptions.None, new string[] { "aaab" } }; yield return new object[] { null, @"[ac]*[bd]+", "aaab", RegexOptions.None, new string[] { "aaab" } }; yield return new object[] { null, @"[ac]*[bd]+?", "aaab", RegexOptions.None, new string[] { "aaab" } }; yield return new object[] { null, @"[ac]*(?>[bd]+)", "aaab", RegexOptions.None, new string[] { "aaab" } }; yield return new object[] { null, @"[ac]*[bd]{1,3}", "aaab", RegexOptions.None, new string[] { "aaab" } }; yield return new object[] { null, @"[ac]*$", "aaa", RegexOptions.None, new string[] { "aaa" } }; yield return new object[] { null, @"[ac]*$", "aaa", RegexOptions.Multiline, new string[] { "aaa" } }; yield return new object[] { null, @"[ac]*\b", "aaa bbb", RegexOptions.None, new string[] { "aaa" } }; yield return new object[] { null, @"[ac]*\b", "aaa bbb", RegexOptions.ECMAScript, new string[] { "aaa" } }; yield return new object[] { null, @"[@']*\B", "@@@", RegexOptions.None, new string[] { "@@@" } }; yield return new object[] { null, @"[@']*\B", "@@@", RegexOptions.ECMAScript, new string[] { "@@@" } }; yield return new object[] { null, @".*.", "@@@", RegexOptions.Singleline, new string[] { "@@@" } }; yield return new object[] { null, @"(?:abcd|efg[hij]*)h", "efgh", RegexOptions.None, new string[] { "efgh" } }; // can't upgrade yield return new object[] { null, @"(?:abcd|efg[hij]*)ih", "efgjih", RegexOptions.None, new string[] { "efgjih" } }; // can't upgrade yield return new object[] { null, @"(?:abcd|efg[hij]*)k", "efgjk", RegexOptions.None, new string[] { "efgjk" } }; yield return new object[] { null, @"[ace]?b[ace]?b[ace]?b[ace]?b", "cbbabeb", RegexOptions.None, new string[] { "cbbabeb" } }; yield return new object[] { null, @"[ace]?b[ace]?b[ace]?b[ace]?b", "cBbAbEb", RegexOptions.IgnoreCase, new string[] { "cBbAbEb" } }; yield return new object[] { null, @"a[^wz]*w", "abcdcdcdwz", RegexOptions.None, new string[] { "abcdcdcdw" } }; yield return new object[] { null, @"a[^wyz]*w", "abcdcdcdwz", RegexOptions.None, new string[] { "abcdcdcdw" } }; yield return new object[] { null, @"a[^wyz]*W", "abcdcdcdWz", RegexOptions.IgnoreCase, new string[] { "abcdcdcdW" } }; // Implicitly upgrading (or not) concat loops to be atomic yield return new object[] { null, @"(?:[ab]c[de]f)*", "", RegexOptions.None, new string[] { "" } }; yield return new object[] { null, @"(?:[ab]c[de]f)*", "acdf", RegexOptions.None, new string[] { "acdf" } }; yield return new object[] { null, @"(?:[ab]c[de]f)*", "acdfbcef", RegexOptions.None, new string[] { "acdfbcef" } }; yield return new object[] { null, @"(?:[ab]c[de]f)*", "cdfbcef", RegexOptions.None, new string[] { "" } }; yield return new object[] { null, @"(?:[ab]c[de]f)+", "cdfbcef", RegexOptions.None, new string[] { "bcef" } }; yield return new object[] { null, @"(?:[ab]c[de]f)*", "bcefbcdfacfe", RegexOptions.None, new string[] { "bcefbcdf" } }; // Implicitly upgrading (or not) nested loops to be atomic yield return new object[] { null, @"(?:a){3}", "aaaaaaaaa", RegexOptions.None, new string[] { "aaa" } }; yield return new object[] { null, @"(?:a){3}?", "aaaaaaaaa", RegexOptions.None, new string[] { "aaa" } }; yield return new object[] { null, @"(?:a{2}){3}", "aaaaaaaaa", RegexOptions.None, new string[] { "aaaaaa" } }; yield return new object[] { null, @"(?:a{2}?){3}?", "aaaaaaaaa", RegexOptions.None, new string[] { "aaaaaa" } }; yield return new object[] { null, @"(?:(?:[ab]c[de]f){3}){2}", "acdfbcdfacefbcefbcefbcdfacdef", RegexOptions.None, new string[] { "acdfbcdfacefbcefbcefbcdf" } }; yield return new object[] { null, @"(?:(?:[ab]c[de]f){3}hello){2}", "aaaaaacdfbcdfacefhellobcefbcefbcdfhellooooo", RegexOptions.None, new string[] { "acdfbcdfacefhellobcefbcefbcdfhello" } }; yield return new object[] { null, @"CN=(.*[^,]+).*", "CN=localhost", RegexOptions.Singleline, new string[] { "CN=localhost", "localhost" } }; // Nested atomic yield return new object[] { null, @"(?>abc[def]gh(i*))", "123abceghiii456", RegexOptions.None, new string[] { "abceghiii", "iii" } }; yield return new object[] { null, @"(?>(?:abc)*)", "abcabcabc", RegexOptions.None, new string[] { "abcabcabc" } }; // Anchoring loops beginning with .* / .+ yield return new object[] { null, @".*", "", RegexOptions.None, new string[] { "" } }; yield return new object[] { null, @".*", "\n\n\n\n", RegexOptions.None, new string[] { "" } }; yield return new object[] { null, @".*", "\n\n\n\n", RegexOptions.Singleline, new string[] { "\n\n\n\n" } }; yield return new object[] { null, @".*[1a]", "\n\n\n\n1", RegexOptions.None, new string[] { "1" } }; yield return new object[] { null, @"(?s).*(?-s)[1a]", "1\n\n\n\n", RegexOptions.None, new string[] { "1" } }; yield return new object[] { null, @"(?s).*(?-s)[1a]", "\n\n\n\n1", RegexOptions.None, new string[] { "\n\n\n\n1" } }; yield return new object[] { null, @".*|.*|.*", "", RegexOptions.None, new string[] { "" } }; yield return new object[] { null, @".*123|abc", "abc\n123", RegexOptions.None, new string[] { "abc" } }; yield return new object[] { null, @".*123|abc", "abc\n123", RegexOptions.Singleline, new string[] { "abc\n123" } }; yield return new object[] { null, @".*", "\n", RegexOptions.None, new string[] { "" } }; yield return new object[] { null, @".*\n", "\n", RegexOptions.None, new string[] { "\n" } }; yield return new object[] { null, @".*", "\n", RegexOptions.Singleline, new string[] { "\n" } }; yield return new object[] { null, @".*\n", "\n", RegexOptions.Singleline, new string[] { "\n" } }; yield return new object[] { null, @".*", "abc", RegexOptions.None, new string[] { "abc" } }; yield return new object[] { null, @".*abc", "abc", RegexOptions.None, new string[] { "abc" } }; yield return new object[] { null, @".*abc|ghi", "ghi", RegexOptions.None, new string[] { "ghi" } }; yield return new object[] { null, @".*abc|.*ghi", "abcghi", RegexOptions.None, new string[] { "abc" } }; yield return new object[] { null, @".*abc|.*ghi", "bcghi", RegexOptions.None, new string[] { "bcghi" } }; yield return new object[] { null, @".*abc|.+c", " \n \n bc", RegexOptions.None, new string[] { " bc" } }; yield return new object[] { null, @".*abc", "12345 abc", RegexOptions.None, new string[] { "12345 abc" } }; yield return new object[] { null, @".*abc", "12345\n abc", RegexOptions.None, new string[] { " abc" } }; yield return new object[] { null, @".*abc", "12345\n abc", RegexOptions.Singleline, new string[] { "12345\n abc" } }; yield return new object[] { null, @"(.*)abc\1", "\n12345abc12345", RegexOptions.Singleline, new string[] { "12345abc12345", "12345" } }; yield return new object[] { null, @".*\nabc", "\n123\nabc", RegexOptions.None, new string[] { "123\nabc" } }; yield return new object[] { null, @".*\nabc", "\n123\nabc", RegexOptions.Singleline, new string[] { "\n123\nabc" } }; yield return new object[] { null, @".*abc", "abc abc abc \nabc", RegexOptions.None, new string[] { "abc abc abc" } }; yield return new object[] { null, @".*abc", "abc abc abc \nabc", RegexOptions.Singleline, new string[] { "abc abc abc \nabc" } }; yield return new object[] { null, @".*?abc", "abc abc abc \nabc", RegexOptions.None, new string[] { "abc" } }; yield return new object[] { null, @"[^\n]*abc", "123abc\n456abc\n789abc", RegexOptions.None, new string[] { "123abc" } }; yield return new object[] { null, @"[^\n]*abc", "123abc\n456abc\n789abc", RegexOptions.Singleline, new string[] { "123abc" } }; yield return new object[] { null, @"[^\n]*abc", "123ab\n456abc\n789abc", RegexOptions.None, new string[] { "456abc" } }; yield return new object[] { null, @"[^\n]*abc", "123ab\n456abc\n789abc", RegexOptions.Singleline, new string[] { "456abc" } }; yield return new object[] { null, @".+", "a", RegexOptions.None, new string[] { "a" } }; yield return new object[] { null, @".+", "\nabc", RegexOptions.None, new string[] { "abc" } }; yield return new object[] { null, @".+", "\n", RegexOptions.Singleline, new string[] { "\n" } }; yield return new object[] { null, @".+", "\nabc", RegexOptions.Singleline, new string[] { "\nabc" } }; yield return new object[] { null, @".+abc", "aaaabc", RegexOptions.None, new string[] { "aaaabc" } }; yield return new object[] { null, @".+abc", "12345 abc", RegexOptions.None, new string[] { "12345 abc" } }; yield return new object[] { null, @".+abc", "12345\n abc", RegexOptions.None, new string[] { " abc" } }; yield return new object[] { null, @".+abc", "12345\n abc", RegexOptions.Singleline, new string[] { "12345\n abc" } }; yield return new object[] { null, @"(.+)abc\1", "\n12345abc12345", RegexOptions.Singleline, new string[] { "12345abc12345", "12345" } }; // Unanchored .* yield return new object[] { null, @"\A\s*(?<name>\w+)(\s*\((?<arguments>.*)\))?\s*\Z", "Match(Name)", RegexOptions.None, new string[] { "Match(Name)", "(Name)", "Match", "Name" } }; yield return new object[] { null, @"\A\s*(?<name>\w+)(\s*\((?<arguments>.*)\))?\s*\Z", "Match(Na\nme)", RegexOptions.Singleline, new string[] { "Match(Na\nme)", "(Na\nme)", "Match", "Na\nme" } }; foreach (RegexOptions options in new[] { RegexOptions.None, RegexOptions.Singleline }) { yield return new object[] { null, @"abcd.*", @"abcabcd", options, new string[] { "abcd" } }; yield return new object[] { null, @"abcd.*", @"abcabcde", options, new string[] { "abcde" } }; yield return new object[] { null, @"abcd.*", @"abcabcdefg", options, new string[] { "abcdefg" } }; yield return new object[] { null, @"abcd(.*)", @"ababcd", options, new string[] { "abcd", "" } }; yield return new object[] { null, @"abcd(.*)", @"aabcde", options, new string[] { "abcde", "e" } }; yield return new object[] { null, @"abcd(.*)", @"abcabcdefg", options, new string[] { "abcdefg", "efg" } }; yield return new object[] { null, @"abcd(.*)e", @"abcabcdefg", options, new string[] { "abcde", "" } }; yield return new object[] { null, @"abcd(.*)f", @"abcabcdefg", options, new string[] { "abcdef", "e" } }; } // Grouping Constructs Invalid Regular Expressions yield return new object[] { null, @"()", "cat", RegexOptions.None, new string[] { string.Empty, string.Empty } }; yield return new object[] { null, @"(?<cat>)", "cat", RegexOptions.None, new string[] { string.Empty, string.Empty } }; yield return new object[] { null, @"(?'cat')", "cat", RegexOptions.None, new string[] { string.Empty, string.Empty } }; yield return new object[] { null, @"(?:)", "cat", RegexOptions.None, new string[] { string.Empty } }; yield return new object[] { null, @"(?imn)", "cat", RegexOptions.None, new string[] { string.Empty } }; yield return new object[] { null, @"(?imn)cat", "(?imn)cat", RegexOptions.None, new string[] { "cat" } }; yield return new object[] { null, @"(?=)", "cat", RegexOptions.None, new string[] { string.Empty } }; yield return new object[] { null, @"(?<=)", "cat", RegexOptions.None, new string[] { string.Empty } }; yield return new object[] { null, @"(?>)", "cat", RegexOptions.None, new string[] { string.Empty } }; // Alternation construct Invalid Regular Expressions yield return new object[] { null, @"(?()|)", "(?()|)", RegexOptions.None, new string[] { "" } }; yield return new object[] { null, @"(?(cat)|)", "cat", RegexOptions.None, new string[] { "" } }; yield return new object[] { null, @"(?(cat)|)", "dog", RegexOptions.None, new string[] { "" } }; yield return new object[] { null, @"(?(cat)catdog|)", "catdog", RegexOptions.None, new string[] { "catdog" } }; yield return new object[] { null, @"(?(cat)catdog|)", "dog", RegexOptions.None, new string[] { "" } }; yield return new object[] { null, @"(?(cat)dog|)", "dog", RegexOptions.None, new string[] { "" } }; yield return new object[] { null, @"(?(cat)dog|)", "cat", RegexOptions.None, new string[] { "" } }; yield return new object[] { null, @"(?(cat)|catdog)", "cat", RegexOptions.None, new string[] { "" } }; yield return new object[] { null, @"(?(cat)|catdog)", "catdog", RegexOptions.None, new string[] { "" } }; yield return new object[] { null, @"(?(cat)|dog)", "dog", RegexOptions.None, new string[] { "dog" } }; // Invalid unicode yield return new object[] { null, "([\u0000-\uFFFF-[azAZ09]]|[\u0000-\uFFFF-[^azAZ09]])+", "azAZBCDE1234567890BCDEFAZza", RegexOptions.None, new string[] { "azAZBCDE1234567890BCDEFAZza", "a" } }; yield return new object[] { null, "[\u0000-\uFFFF-[\u0000-\uFFFF-[\u0000-\uFFFF-[\u0000-\uFFFF-[\u0000-\uFFFF-[a]]]]]]+", "abcxyzABCXYZ123890", RegexOptions.None, new string[] { "bcxyzABCXYZ123890" } }; yield return new object[] { null, "[\u0000-\uFFFF-[\u0000-\uFFFF-[\u0000-\uFFFF-[\u0000-\uFFFF-[\u0000-\uFFFF-[\u0000-\uFFFF-[a]]]]]]]+", "bcxyzABCXYZ123890a", RegexOptions.None, new string[] { "a" } }; yield return new object[] { null, "[\u0000-\uFFFF-[\\p{P}\\p{S}\\p{C}]]+", "!@`';.,$+<>=\x0001\x001FazAZ09", RegexOptions.None, new string[] { "azAZ09" } }; yield return new object[] { null, @"[\uFFFD-\uFFFF]+", "\uFFFC\uFFFD\uFFFE\uFFFF", RegexOptions.IgnoreCase, new string[] { "\uFFFD\uFFFE\uFFFF" } }; yield return new object[] { null, @"[\uFFFC-\uFFFE]+", "\uFFFB\uFFFC\uFFFD\uFFFE\uFFFF", RegexOptions.IgnoreCase, new string[] { "\uFFFC\uFFFD\uFFFE" } }; // Empty Match yield return new object[] { null, @"([a*]*)+?$", "ab", RegexOptions.None, new string[] { "", "" } }; yield return new object[] { null, @"(a*)+?$", "b", RegexOptions.None, new string[] { "", "" } }; } public static IEnumerable<object[]> Groups_CustomCulture_TestData_enUS() { yield return new object[] { "en-US", "CH", "Ch", RegexOptions.IgnoreCase, new string[] { "Ch" } }; yield return new object[] { "en-US", "cH", "Ch", RegexOptions.IgnoreCase, new string[] { "Ch" } }; yield return new object[] { "en-US", "AA", "Aa", RegexOptions.IgnoreCase, new string[] { "Aa" } }; yield return new object[] { "en-US", "aA", "Aa", RegexOptions.IgnoreCase, new string[] { "Aa" } }; yield return new object[] { "en-US", "\u0130", "\u0049", RegexOptions.IgnoreCase, new string[] { "\u0049" } }; yield return new object[] { "en-US", "\u0130", "\u0069", RegexOptions.IgnoreCase, new string[] { "\u0069" } }; } public static IEnumerable<object[]> Groups_CustomCulture_TestData_Czech() { yield return new object[] { "cs-CZ", "CH", "Ch", RegexOptions.IgnoreCase, new string[] { "Ch" } }; yield return new object[] { "cs-CZ", "cH", "Ch", RegexOptions.IgnoreCase, new string[] { "Ch" } }; } public static IEnumerable<object[]> Groups_CustomCulture_TestData_Danish() { yield return new object[] { "da-DK", "AA", "Aa", RegexOptions.IgnoreCase, new string[] { "Aa" } }; yield return new object[] { "da-DK", "aA", "Aa", RegexOptions.IgnoreCase, new string[] { "Aa" } }; } public static IEnumerable<object[]> Groups_CustomCulture_TestData_Turkish() { yield return new object[] { "tr-TR", "\u0131", "\u0049", RegexOptions.IgnoreCase, new string[] { "\u0049" } }; yield return new object[] { "tr-TR", "\u0130", "\u0069", RegexOptions.IgnoreCase, new string[] { "\u0069" } }; } public static IEnumerable<object[]> Groups_CustomCulture_TestData_AzeriLatin() { if (PlatformDetection.IsNotBrowser) { yield return new object[] { "az-Latn-AZ", "\u0131", "\u0049", RegexOptions.IgnoreCase, new string[] { "\u0049" } }; yield return new object[] { "az-Latn-AZ", "\u0130", "\u0069", RegexOptions.IgnoreCase, new string[] { "\u0069" } }; } } [Theory] [MemberData(nameof(Groups_Basic_TestData))] [MemberData(nameof(Groups_CustomCulture_TestData_enUS))] [MemberData(nameof(Groups_CustomCulture_TestData_Czech))] [MemberData(nameof(Groups_CustomCulture_TestData_Danish))] [MemberData(nameof(Groups_CustomCulture_TestData_Turkish))] [MemberData(nameof(Groups_CustomCulture_TestData_AzeriLatin))] public void Groups(string cultureName, string pattern, string input, RegexOptions options, string[] expectedGroups) { if (cultureName is null) { CultureInfo culture = CultureInfo.CurrentCulture; cultureName = culture.Equals(CultureInfo.InvariantCulture) ? "en-US" : culture.Name; } using (new ThreadCultureChange(cultureName)) { Groups(pattern, input, options, expectedGroups); Groups(pattern, input, RegexOptions.Compiled | options, expectedGroups); } static void Groups(string pattern, string input, RegexOptions options, string[] expectedGroups) { Regex regex = new Regex(pattern, options); Match match = regex.Match(input); Assert.True(match.Success); Assert.Equal(expectedGroups.Length, match.Groups.Count); Assert.Equal(expectedGroups[0], match.Value); int[] groupNumbers = regex.GetGroupNumbers(); string[] groupNames = regex.GetGroupNames(); for (int i = 0; i < expectedGroups.Length; i++) { Assert.Equal(expectedGroups[i], match.Groups[groupNumbers[i]].Value); Assert.Equal(match.Groups[groupNumbers[i]], match.Groups[groupNames[i]]); Assert.Equal(groupNumbers[i], regex.GroupNumberFromName(groupNames[i])); Assert.Equal(groupNames[i], regex.GroupNameFromNumber(groupNumbers[i])); } } } [Fact] public void Synchronized_NullGroup_Throws() { AssertExtensions.Throws<ArgumentNullException>("inner", () => Group.Synchronized(null)); } [Theory] [InlineData(@"(cat)([\v]*)(dog)", "cat\v\v\vdog")] [InlineData("abc", "def")] // no match public void Synchronized_ValidGroup_Success(string pattern, string input) { Match match = Regex.Match(input, pattern); Group synchronizedGroup = Group.Synchronized(match.Groups[0]); Assert.NotNull(synchronizedGroup); } } }
98.581446
289
0.543229
[ "MIT" ]
2m0nd/runtime
src/libraries/System.Text.RegularExpressions/tests/Regex.Groups.Tests.cs
91,385
C#
// ------------------------------------------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------------------------------------------- using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Microsoft.Azure.WebJobs; namespace Microsoft.Health.Fhir.Ingest { public interface IEnumerableAsyncCollector<T> : IAsyncCollector<T> { /// <summary> /// Adds one or more items to the <see cref="T:Microsoft.Azure.WebJobs.IAsyncCollector`1" />. /// </summary> /// <param name="items">The items to be added.</param> /// <param name="cancellationToken">The token to monitor for cancellation requests.</param> /// <returns>A task that will add the item to the collector.</returns> Task AddAsync(IEnumerable<T> items, CancellationToken cancellationToken = default(CancellationToken)); } }
48.043478
110
0.577376
[ "MIT" ]
cwang-dhs/iomt-fhir
src/lib/Microsoft.Health.Fhir.Ingest/Data/IEnumerableAsyncCollector.cs
1,107
C#
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; using CSharpKonachan.Models; using Newtonsoft.Json; [assembly: CLSCompliant(true)] namespace CSharpKonachan { public class BooruClient { private string site; private bool isnsfw; public BooruClient(string userSite,bool nsfw) { site = userSite; isnsfw = nsfw; } /// <summary> /// 返回获取结果 /// </summary> public class PostResult { public List<Post> Posts { get; set; } public Exception Exception { get; set; } } private string post = "post.json?"; private string tag = "tag.json?"; private string note = "note.json?"; private string user = "user.json?"; private string artist = "artist.json?"; private string Limit(int? limit) { return "limit=" + limit + ""; } private string Page(int? page) { return "page=" + page + "&"; } private string Tags(List<string> tags) { string listTags = ""; for (int i = 0; i < tags.Count; i++) { listTags += tags[i]; if (i > 0) { listTags += "+"; } } return "tags=" + listTags; } private string Order(orderTag? order) { return "order=" + order.ToString() + "&"; } private string Id(int? id) { return "id=" + id + "&"; } private string After_id(int? after_id) { return "after_id=" + after_id + "&"; } private string Name(string name) { return "name=" + name + "&"; } private string Name_pattern(string name_pattern) { return "name_pattern=" + name_pattern + "&"; } private string Post_id(int? post_id) { return "post_id" + post_id + "&"; } public enum orderTag { date, count, name } class Element { public string href; public string title; } /// <summary> /// 重写WebClient 使支持TimeOut /// </summary> private class WebClientWithTimeout : WebClient { protected override WebRequest GetWebRequest(Uri uri) { WebRequest w = base.GetWebRequest(uri); w.Timeout = 10000; //十秒钟超时 return w; } } string GetUrl(string url) { using(var x = new WebClientWithTimeout()) { x.Encoding = Encoding.UTF8; bool isTimeout = false; string result = ""; do { try { result = x.DownloadString(url); isTimeout = false; } catch(WebException we) { switch (we.Status) { case WebExceptionStatus.Timeout: isTimeout = true; break; default: throw we; } } } while (isTimeout); return result; } } /// <summary> /// 获取所有Post /// </summary> /// <param name="tags"></param> /// <returns></returns> public List<Post> GetPost(List<string> tags = null) { int pageCount = 1; var url = site + post; List<Post> posts = new List<Post>(); //获取最大page数 url += Page(pageCount); if (isnsfw == false) { url += " rating:safe"; } pageCount = GetPageCount(tags); string html = null; for (int i = 1; i <= pageCount; i++) { url = site + post; url += Page(i); if (tags != null) { url += Tags(tags); } if (isnsfw == false) { url += " rating:safe"; } html = GetUrl(url); posts = JsonConvert.DeserializeObject<List<Post>>(html); } return posts; } /// <summary> /// 获取Page数 /// </summary> /// <returns></returns> public int GetPageCount(List<string> tags = null) { int pageCount = 1; var url = site + post; //获取最大page数 url += Page(pageCount); //获取最大page数 url += Page(pageCount); if (tags != null) { url += Tags(tags); } if (isnsfw == false) { url += " rating:safe"; } using (WebClientWithTimeout webclient = new WebClientWithTimeout()) { //伪装成Chrome webclient.Headers.Add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36"); bool isTimeout = false; string result = ""; do { try { result = Encoding.GetEncoding("UTF-8").GetString(webclient.DownloadData(url.Replace(".json", ""))); isTimeout = false; } catch(WebException we) { switch (we.Status) { case WebExceptionStatus.Timeout: isTimeout = true; break; default: throw new Exception(we.Message); } } } while (isTimeout); string patten = @"(href|rel|title)=""([^""]*)"; List<Element> elements = new List<Element>(); Regex.Matches(result, patten).Cast<Match>().ToList().ForEach(x => { if (x.Groups[1].Value == "href") { elements.Add(new Element { href = x.Groups[2].Value }); //添加到元素中 } if (x.Groups[1].Value == "title") { elements[elements.Count - 1].title = x.Groups[2].Value; } }); Element lastPageElement = elements.Find(x => x.title == "Last Page"); //别问我这是什么逻辑,当时就是这样翻源码的QwQ //能用就好(有时间会改改 if (lastPageElement != null) { int i = lastPageElement.href.IndexOf("=");//找=的位置 int j = lastPageElement.href.IndexOf("&");//找&的位置 pageCount = Convert.ToInt32(lastPageElement.href.Substring(i + 1).Substring(0, j - i - 1)); //Console.WriteLine("共找到{0}页内容,正在解析...", pageCount); } } return pageCount; } /// <summary> /// 获取Post /// </summary> /// <param name="limit"></param> /// <param name="page"></param> /// <param name="tags"></param> /// <returns></returns> public List<Post> GetPost(int? page = null, List<string> tags = null) { var url = site + post; if (page != null) { url += Page(page); } if (tags != null) { url += Tags(tags); } if(isnsfw == false) { url += " rating:safe"; } string html = GetUrl(url); List<Post> posts = new List<Post>(); posts = JsonConvert.DeserializeObject<List<Post>>(html); //foreach (var item in JsonConvert.DeserializeObject<Post[]>(html)) //{ // posts.Add(item); //} return posts; } /// <summary> /// 获取初始页面(无TAG) /// </summary> /// <returns></returns> public List<Post> GetPost() { List<Post> posts = new List<Post>(); var url = site + post; url += "tags="; if (isnsfw == false) { url += " rating:safe"; } string html = GetUrl(url); posts = JsonConvert.DeserializeObject<List<Post>>(html); return posts; } public Tag[] GetTag(int? id = null, int? after_id = null, int? limit = null, int? page = null, orderTag? order = null) { var url = site+ tag; if (id != null) { url += Id(id); } else if (after_id != null) { url += After_id(after_id); } else if (limit != null) { url += Limit(limit); } else if (page != null) { url += Page(page); } else if (order != null) { url += Order(order); } string html = GetUrl(url); return JsonConvert.DeserializeObject<Tag[]>(html); } public Tag[] GetTag(string name = null, string name_pattern = null, int? limit = null, int? page = null, orderTag? order = null) { var url = site + tag; if (name != null) { url += Name(name); } else if (name_pattern != null) { url += Name_pattern(name_pattern); } else if (limit != null) { url += Limit(limit); } else if (page != null) { url += Page(page); } else if (order != null) { url += Order(order); } string html = GetUrl(url); return JsonConvert.DeserializeObject<Tag[]>(html); } public Artist[] GetArtist(string name = null, orderTag? order = null, int? page = null) { var url = site + artist; if (name != null) { url += Name(name); } else if (order != null) { url += Order(order); } else if (page != null) { url += Page(page); } string html = GetUrl(url); return JsonConvert.DeserializeObject<Artist[]>(html); } public Note[] GetNote(int? post_id = null) { var url = site + note; if (post_id != null) { url += Post_id(post_id); } string html = GetUrl(url); return JsonConvert.DeserializeObject<Note[]>(html); } public User[] GetUser(int? id= null) { var url = site + user; if (id != null) { url += Id(id); } string html = GetUrl(url); return JsonConvert.DeserializeObject<User[]>(html); } public User[] GetUser(string name = null) { var url = site + user; if (name != null) { url += Name(name); } string html = GetUrl(url); return JsonConvert.DeserializeObject<User[]>(html); } } }
31.26178
165
0.410819
[ "MIT" ]
YukiCoco/AcgViewer
CSharpKonachan/Client.cs
12,160
C#
// <auto-generated/> #pragma warning disable 1591 namespace Test { #line hidden using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Components; public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 219 private void __RazorDirectiveTokenHelpers__() { } #pragma warning restore 219 #pragma warning disable 0414 private static System.Object __o = null; #pragma warning restore 0414 #pragma warning disable 1998 protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder) { __o = new System.Action<System.EventArgs>( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" e => { Increment(); } #line default #line hidden #nullable disable ); __builder.AddAttribute(-1, "ChildContent", (Microsoft.AspNetCore.Components.RenderFragment)((__builder2) => { } )); #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" __o = typeof(MyComponent); #line default #line hidden #nullable disable } #pragma warning restore 1998 #nullable restore #line 3 "x:\dir\subdir\Test\TestComponent.cshtml" private int counter; private void Increment() { counter++; } #line default #line hidden #nullable disable } } #pragma warning restore 1591
26.931034
121
0.665813
[ "Apache-2.0" ]
Therzok/AspNetCore-Tooling
src/Razor/test/RazorLanguage.Test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithLambdaEventHandler/TestComponent.codegen.cs
1,562
C#
// Copyright (c) 2007 James Newton-King. All rights reserved. // Use of this source code is governed by The MIT License, // as found in the license.md file. using TestObjects; namespace Argon.Tests; public class JsonTextWriterAsyncTests : TestFixtureBase { public class LazyStringWriter : StringWriter { public LazyStringWriter(IFormatProvider formatProvider) : base(formatProvider) { } public override Task FlushAsync() { return DoDelay(base.FlushAsync()); } public override Task WriteAsync(char value) { return DoDelay(base.WriteAsync(value)); } public override Task WriteAsync(char[] buffer, int index, int count) { return DoDelay(base.WriteAsync(buffer, index, count)); } public override Task WriteAsync(string value) { return DoDelay(base.WriteAsync(value)); } public override Task WriteLineAsync() { return DoDelay(base.WriteLineAsync()); } public override Task WriteLineAsync(char value) { return DoDelay(base.WriteLineAsync(value)); } public override Task WriteLineAsync(char[] buffer, int index, int count) { return DoDelay(base.WriteLineAsync(buffer, index, count)); } public override Task WriteLineAsync(string value) { return DoDelay(base.WriteLineAsync(value)); } static async Task DoDelay(Task t) { await Task.Delay(TimeSpan.FromSeconds(0.01)); await t; } } [Fact] public async Task WriteLazy() { var stringWriter = new LazyStringWriter(CultureInfo.InvariantCulture); using (var writer = new JsonTextWriter(stringWriter)) { writer.Indentation = 4; writer.Formatting = Formatting.Indented; await writer.WriteStartObjectAsync(); await writer.WritePropertyNameAsync("PropByte"); await writer.WriteValueAsync((byte) 1); await writer.WritePropertyNameAsync("PropSByte"); await writer.WriteValueAsync((sbyte) 2); await writer.WritePropertyNameAsync("PropShort"); await writer.WriteValueAsync((short) 3); await writer.WritePropertyNameAsync("PropUInt"); await writer.WriteValueAsync((uint) 4); await writer.WritePropertyNameAsync("PropUShort"); await writer.WriteValueAsync((ushort) 5); await writer.WritePropertyNameAsync("PropUri"); await writer.WriteValueAsync(new Uri("http://localhost/")); await writer.WritePropertyNameAsync("PropRaw"); await writer.WriteRawValueAsync("'raw string'"); await writer.WritePropertyNameAsync("PropObjectNull"); await writer.WriteValueAsync((object) null); await writer.WritePropertyNameAsync("PropObjectBigInteger"); await writer.WriteValueAsync(BigInteger.Parse("123456789012345678901234567890")); await writer.WritePropertyNameAsync("PropUndefined"); await writer.WriteUndefinedAsync(); await writer.WritePropertyNameAsync(@"PropEscaped ""name""", true); await writer.WriteNullAsync(); await writer.WritePropertyNameAsync(@"PropUnescaped", false); await writer.WriteNullAsync(); await writer.WritePropertyNameAsync("PropArray"); await writer.WriteStartArrayAsync(); await writer.WriteValueAsync("string!"); await writer.WriteEndArrayAsync(); await writer.WritePropertyNameAsync("PropNested"); await writer.WriteStartArrayAsync(); await writer.WriteStartArrayAsync(); await writer.WriteStartArrayAsync(); await writer.WriteStartArrayAsync(); await writer.WriteStartArrayAsync(); await writer.WriteEndArrayAsync(); await writer.WriteEndArrayAsync(); await writer.WriteEndArrayAsync(); await writer.WriteEndArrayAsync(); await writer.WriteEndArrayAsync(); await writer.WriteEndObjectAsync(); } XUnitAssert.AreEqualNormalized(@"{ ""PropByte"": 1, ""PropSByte"": 2, ""PropShort"": 3, ""PropUInt"": 4, ""PropUShort"": 5, ""PropUri"": ""http://localhost/"", ""PropRaw"": 'raw string', ""PropObjectNull"": null, ""PropObjectBigInteger"": 123456789012345678901234567890, ""PropUndefined"": undefined, ""PropEscaped \""name\"""": null, ""PropUnescaped"": null, ""PropArray"": [ ""string!"" ], ""PropNested"": [ [ [ [ [] ] ] ] ] }", stringWriter.ToString()); } [Fact] public async Task WriteLazy_Property() { var stringWriter = new LazyStringWriter(CultureInfo.InvariantCulture); using (var writer = new JsonTextWriter(stringWriter)) { writer.Indentation = 4; writer.Formatting = Formatting.Indented; await writer.WriteStartArrayAsync(); await writer.WriteStartObjectAsync(); await writer.WritePropertyNameAsync("IncompleteProp"); await writer.WriteEndArrayAsync(); } XUnitAssert.AreEqualNormalized(@"[ { ""IncompleteProp"": null } ]", stringWriter.ToString()); } [Fact] public async Task BufferTestAsync() { var arrayPool = new FakeArrayPool(); var longString = new string('A', 2000); var longEscapedString = $"Hello!{new string('!', 50)}{new string('\n', 1000)}Good bye!"; var longerEscapedString = $"Hello!{new string('!', 2000)}{new string('\n', 1000)}Good bye!"; for (var i = 0; i < 1000; i++) { var stringWriter = new StringWriter(CultureInfo.InvariantCulture); using (var writer = new JsonTextWriter(stringWriter)) { writer.ArrayPool = arrayPool; await writer.WriteStartObjectAsync(); await writer.WritePropertyNameAsync("Prop1"); await writer.WriteValueAsync(new DateTime(2000, 12, 12, 12, 12, 12, DateTimeKind.Utc)); await writer.WritePropertyNameAsync("Prop2"); await writer.WriteValueAsync(longString); await writer.WritePropertyNameAsync("Prop3"); await writer.WriteValueAsync(longEscapedString); await writer.WritePropertyNameAsync("Prop4"); await writer.WriteValueAsync(longerEscapedString); await writer.WriteEndObjectAsync(); } if ((i + 1) % 100 == 0) { Console.WriteLine($"Allocated buffers: {arrayPool.FreeArrays.Count}"); } } Assert.Equal(0, arrayPool.UsedArrays.Count); Assert.Equal(3, arrayPool.FreeArrays.Count); } [Fact] public async Task BufferTest_WithErrorAsync() { var arrayPool = new FakeArrayPool(); var stringWriter = new StringWriter(CultureInfo.InvariantCulture); try { // dispose will free used buffers using (var writer = new JsonTextWriter(stringWriter)) { writer.ArrayPool = arrayPool; await writer.WriteStartObjectAsync(); await writer.WritePropertyNameAsync("Prop1"); await writer.WriteValueAsync(new DateTime(2000, 12, 12, 12, 12, 12, DateTimeKind.Utc)); await writer.WritePropertyNameAsync("Prop2"); await writer.WriteValueAsync("This is an escaped \n string!"); await writer.WriteValueAsync("Error!"); } XUnitAssert.Fail(); } catch { } Assert.Equal(0, arrayPool.UsedArrays.Count); Assert.Equal(1, arrayPool.FreeArrays.Count); } [Fact] public async Task NewLineAsync() { var ms = new MemoryStream(); using (var streamWriter = new StreamWriter(ms, new UTF8Encoding(false)) {NewLine = "\n"}) using (var jsonWriter = new JsonTextWriter(streamWriter) { CloseOutput = true, Indentation = 2, Formatting = Formatting.Indented }) { await jsonWriter.WriteStartObjectAsync(); await jsonWriter.WritePropertyNameAsync("prop"); await jsonWriter.WriteValueAsync(true); await jsonWriter.WriteEndObjectAsync(); } var data = ms.ToArray(); var json = Encoding.UTF8.GetString(data, 0, data.Length); XUnitAssert.EqualsNormalized(@"{ ""prop"": true }", json); } [Fact] public async Task QuoteNameAndStringsAsync() { var stringBuilder = new StringBuilder(); var stringWriter = new StringWriter(stringBuilder); var writer = new JsonTextWriter(stringWriter) { QuoteName = false }; await writer.WriteStartObjectAsync(); await writer.WritePropertyNameAsync("name"); await writer.WriteValueAsync("value"); await writer.WriteEndObjectAsync(); await writer.FlushAsync(); Assert.Equal(@"{name:""value""}", stringBuilder.ToString()); } [Fact] public async Task QuoteValueAndStringsAsync() { var stringBuilder = new StringBuilder(); var stringWriter = new StringWriter(stringBuilder); var writer = new JsonTextWriter(stringWriter) { QuoteValue = false }; await writer.WriteStartObjectAsync(); await writer.WritePropertyNameAsync("name"); await writer.WriteValueAsync("value"); await writer.WriteEndObjectAsync(); await writer.FlushAsync(); Assert.Equal(@"{""name"":value}", stringBuilder.ToString()); } [Fact] public async Task CloseOutputAsync() { var ms = new MemoryStream(); var writer = new JsonTextWriter(new StreamWriter(ms)); Assert.True(ms.CanRead); await writer.CloseAsync(); Assert.False(ms.CanRead); ms = new(); writer = new(new StreamWriter(ms)) {CloseOutput = false}; Assert.True(ms.CanRead); await writer.CloseAsync(); Assert.True(ms.CanRead); } [Fact] public async Task WriteIConvertableAsync() { var stringWriter = new StringWriter(); var jsonWriter = new JsonTextWriter(stringWriter); await jsonWriter.WriteValueAsync(new ConvertibleInt(1)); Assert.Equal("1", stringWriter.ToString()); } [Fact] public async Task ValueFormattingAsync() { var stringBuilder = new StringBuilder(); var stringWriter = new StringWriter(stringBuilder); using (var jsonWriter = new JsonTextWriter(stringWriter)) { await jsonWriter.WriteStartArrayAsync(); await jsonWriter.WriteValueAsync('@'); await jsonWriter.WriteValueAsync("\r\n\t\f\b?{\\r\\n\"\'"); await jsonWriter.WriteValueAsync(true); await jsonWriter.WriteValueAsync(10); await jsonWriter.WriteValueAsync(10.99); await jsonWriter.WriteValueAsync(0.99); await jsonWriter.WriteValueAsync(0.000000000000000001d); await jsonWriter.WriteValueAsync(0.000000000000000001m); await jsonWriter.WriteValueAsync((string) null); await jsonWriter.WriteValueAsync((object) null); await jsonWriter.WriteValueAsync("This is a string."); await jsonWriter.WriteNullAsync(); await jsonWriter.WriteUndefinedAsync(); await jsonWriter.WriteEndArrayAsync(); } var expected = @"[""@"",""\r\n\t\f\b?{\\r\\n\""'"",true,10,10.99,0.99,1E-18,0.000000000000000001,null,null,""This is a string."",null,undefined]"; var result = stringBuilder.ToString(); Assert.Equal(expected, result); } [Fact] public async Task NullableValueFormattingAsync() { var stringWriter = new StringWriter(); using (var jsonWriter = new JsonTextWriter(stringWriter)) { await jsonWriter.WriteStartArrayAsync(); await jsonWriter.WriteValueAsync((char?) null); await jsonWriter.WriteValueAsync((char?) 'c'); await jsonWriter.WriteValueAsync((bool?) null); await jsonWriter.WriteValueAsync((bool?) true); await jsonWriter.WriteValueAsync((byte?) null); await jsonWriter.WriteValueAsync((byte?) 1); await jsonWriter.WriteValueAsync((sbyte?) null); await jsonWriter.WriteValueAsync((sbyte?) 1); await jsonWriter.WriteValueAsync((short?) null); await jsonWriter.WriteValueAsync((short?) 1); await jsonWriter.WriteValueAsync((ushort?) null); await jsonWriter.WriteValueAsync((ushort?) 1); await jsonWriter.WriteValueAsync((int?) null); await jsonWriter.WriteValueAsync((int?) 1); await jsonWriter.WriteValueAsync((uint?) null); await jsonWriter.WriteValueAsync((uint?) 1); await jsonWriter.WriteValueAsync((long?) null); await jsonWriter.WriteValueAsync((long?) 1); await jsonWriter.WriteValueAsync((ulong?) null); await jsonWriter.WriteValueAsync((ulong?) 1); await jsonWriter.WriteValueAsync((double?) null); await jsonWriter.WriteValueAsync((double?) 1.1); await jsonWriter.WriteValueAsync((float?) null); await jsonWriter.WriteValueAsync((float?) 1.1); await jsonWriter.WriteValueAsync((decimal?) null); await jsonWriter.WriteValueAsync((decimal?) 1.1m); await jsonWriter.WriteValueAsync((DateTime?) null); await jsonWriter.WriteValueAsync((DateTime?) new DateTime(ParseTests.InitialJavaScriptDateTicks, DateTimeKind.Utc)); await jsonWriter.WriteValueAsync((DateTimeOffset?) null); await jsonWriter.WriteValueAsync((DateTimeOffset?) new DateTimeOffset(ParseTests.InitialJavaScriptDateTicks, TimeSpan.Zero)); await jsonWriter.WriteEndArrayAsync(); } var json = stringWriter.ToString(); await Verify(json); } [Fact] public async Task WriteValueObjectWithNullableAsync() { var stringWriter = new StringWriter(); using (var jsonWriter = new JsonTextWriter(stringWriter)) { char? value = 'c'; await jsonWriter.WriteStartArrayAsync(); await jsonWriter.WriteValueAsync((object) value); await jsonWriter.WriteEndArrayAsync(); } var json = stringWriter.ToString(); var expected = @"[""c""]"; Assert.Equal(expected, json); } [Fact] public async Task WriteValueObjectWithUnsupportedValueAsync() { var stringWriter = new StringWriter(); using var jsonWriter = new JsonTextWriter(stringWriter); await jsonWriter.WriteStartArrayAsync(); await XUnitAssert.ThrowsAsync<JsonWriterException>( () => jsonWriter.WriteValueAsync(new Version(1, 1, 1, 1)), @"Unsupported type: System.Version. Use the JsonSerializer class to get the object's JSON representation. Path ''."); } [Fact] public async Task StringEscapingAsync() { var stringBuilder = new StringBuilder(); var stringWriter = new StringWriter(stringBuilder); using (var jsonWriter = new JsonTextWriter(stringWriter)) { await jsonWriter.WriteStartArrayAsync(); await jsonWriter.WriteValueAsync(@"""These pretzels are making me thirsty!"""); await jsonWriter.WriteValueAsync("Jeff's house was burninated."); await jsonWriter.WriteValueAsync("1. You don't talk about fight club.\r\n2. You don't talk about fight club."); await jsonWriter.WriteValueAsync("35% of\t statistics\n are made\r up."); await jsonWriter.WriteEndArrayAsync(); } var expected = @"[""\""These pretzels are making me thirsty!\"""",""Jeff's house was burninated."",""1. You don't talk about fight club.\r\n2. You don't talk about fight club."",""35% of\t statistics\n are made\r up.""]"; var result = stringBuilder.ToString(); Assert.Equal(expected, result); } [Fact] public async Task WriteEndAsync() { var stringBuilder = new StringBuilder(); var stringWriter = new StringWriter(stringBuilder); using (var jsonWriter = new JsonTextWriter(stringWriter) { Formatting = Formatting.Indented }) { await jsonWriter.WriteStartObjectAsync(); await jsonWriter.WritePropertyNameAsync("CPU"); await jsonWriter.WriteValueAsync("Intel"); await jsonWriter.WritePropertyNameAsync("PSU"); await jsonWriter.WriteValueAsync("500W"); await jsonWriter.WritePropertyNameAsync("Drives"); await jsonWriter.WriteStartArrayAsync(); await jsonWriter.WriteValueAsync("DVD read/writer"); await jsonWriter.WriteCommentAsync("(broken)"); await jsonWriter.WriteValueAsync("500 gigabyte hard drive"); await jsonWriter.WriteValueAsync("200 gigabyte hard drive"); await jsonWriter.WriteEndObjectAsync(); Assert.Equal(WriteState.Start, jsonWriter.WriteState); } var expected = @"{ ""CPU"": ""Intel"", ""PSU"": ""500W"", ""Drives"": [ ""DVD read/writer"" /*(broken)*/, ""500 gigabyte hard drive"", ""200 gigabyte hard drive"" ] }"; var result = stringBuilder.ToString(); XUnitAssert.AreEqualNormalized(expected, result); } [Fact] public async Task CloseWithRemainingContentAsync() { var stringBuilder = new StringBuilder(); var stringWriter = new StringWriter(stringBuilder); using (var jsonWriter = new JsonTextWriter(stringWriter) { Formatting = Formatting.Indented }) { await jsonWriter.WriteStartObjectAsync(); await jsonWriter.WritePropertyNameAsync("CPU"); await jsonWriter.WriteValueAsync("Intel"); await jsonWriter.WritePropertyNameAsync("PSU"); await jsonWriter.WriteValueAsync("500W"); await jsonWriter.WritePropertyNameAsync("Drives"); await jsonWriter.WriteStartArrayAsync(); await jsonWriter.WriteValueAsync("DVD read/writer"); await jsonWriter.WriteCommentAsync("(broken)"); await jsonWriter.WriteValueAsync("500 gigabyte hard drive"); await jsonWriter.WriteValueAsync("200 gigabyte hard drive"); await jsonWriter.CloseAsync(); } var expected = @"{ ""CPU"": ""Intel"", ""PSU"": ""500W"", ""Drives"": [ ""DVD read/writer"" /*(broken)*/, ""500 gigabyte hard drive"", ""200 gigabyte hard drive"" ] }"; var result = stringBuilder.ToString(); XUnitAssert.AreEqualNormalized(expected, result); } [Fact] public async Task IndentingAsync() { var stringBuilder = new StringBuilder(); var stringWriter = new StringWriter(stringBuilder); using (var jsonWriter = new JsonTextWriter(stringWriter) { Formatting = Formatting.Indented }) { await jsonWriter.WriteStartObjectAsync(); await jsonWriter.WritePropertyNameAsync("CPU"); await jsonWriter.WriteValueAsync("Intel"); await jsonWriter.WritePropertyNameAsync("PSU"); await jsonWriter.WriteValueAsync("500W"); await jsonWriter.WritePropertyNameAsync("Drives"); await jsonWriter.WriteStartArrayAsync(); await jsonWriter.WriteValueAsync("DVD read/writer"); await jsonWriter.WriteCommentAsync("(broken)"); await jsonWriter.WriteValueAsync("500 gigabyte hard drive"); await jsonWriter.WriteValueAsync("200 gigabyte hard drive"); await jsonWriter.WriteEndAsync(); await jsonWriter.WriteEndObjectAsync(); Assert.Equal(WriteState.Start, jsonWriter.WriteState); } // { // "CPU": "Intel", // "PSU": "500W", // "Drives": [ // "DVD read/writer" // /*(broken)*/, // "500 gigabyte hard drive", // "200 gigabyte hard drive" // ] // } var expected = @"{ ""CPU"": ""Intel"", ""PSU"": ""500W"", ""Drives"": [ ""DVD read/writer"" /*(broken)*/, ""500 gigabyte hard drive"", ""200 gigabyte hard drive"" ] }"; var result = stringBuilder.ToString(); XUnitAssert.AreEqualNormalized(expected, result); } [Fact] public async Task StateAsync() { var stringBuilder = new StringBuilder(); var stringWriter = new StringWriter(stringBuilder); using var jsonWriter = new JsonTextWriter(stringWriter); Assert.Equal(WriteState.Start, jsonWriter.WriteState); await jsonWriter.WriteStartObjectAsync(); Assert.Equal(WriteState.Object, jsonWriter.WriteState); Assert.Equal("", jsonWriter.Path); await jsonWriter.WritePropertyNameAsync("CPU"); Assert.Equal(WriteState.Property, jsonWriter.WriteState); Assert.Equal("CPU", jsonWriter.Path); await jsonWriter.WriteValueAsync("Intel"); Assert.Equal(WriteState.Object, jsonWriter.WriteState); Assert.Equal("CPU", jsonWriter.Path); await jsonWriter.WritePropertyNameAsync("Drives"); Assert.Equal(WriteState.Property, jsonWriter.WriteState); Assert.Equal("Drives", jsonWriter.Path); await jsonWriter.WriteStartArrayAsync(); Assert.Equal(WriteState.Array, jsonWriter.WriteState); await jsonWriter.WriteValueAsync("DVD read/writer"); Assert.Equal(WriteState.Array, jsonWriter.WriteState); Assert.Equal("Drives[0]", jsonWriter.Path); await jsonWriter.WriteEndAsync(); Assert.Equal(WriteState.Object, jsonWriter.WriteState); Assert.Equal("Drives", jsonWriter.Path); await jsonWriter.WriteEndObjectAsync(); Assert.Equal(WriteState.Start, jsonWriter.WriteState); Assert.Equal("", jsonWriter.Path); } [Fact] public async Task FloatingPointNonFiniteNumbers_SymbolAsync() { var stringBuilder = new StringBuilder(); var stringWriter = new StringWriter(stringBuilder); using (var jsonWriter = new JsonTextWriter(stringWriter) { Formatting = Formatting.Indented, FloatFormatHandling = FloatFormatHandling.Symbol }) { await jsonWriter.WriteStartArrayAsync(); await jsonWriter.WriteValueAsync(double.NaN); await jsonWriter.WriteValueAsync(double.PositiveInfinity); await jsonWriter.WriteValueAsync(double.NegativeInfinity); await jsonWriter.WriteValueAsync(float.NaN); await jsonWriter.WriteValueAsync(float.PositiveInfinity); await jsonWriter.WriteValueAsync(float.NegativeInfinity); await jsonWriter.WriteEndArrayAsync(); await jsonWriter.FlushAsync(); } var expected = @"[ NaN, Infinity, -Infinity, NaN, Infinity, -Infinity ]"; var result = stringBuilder.ToString(); XUnitAssert.AreEqualNormalized(expected, result); } [Fact] public async Task FloatingPointNonFiniteNumbers_ZeroAsync() { var stringBuilder = new StringBuilder(); var stringWriter = new StringWriter(stringBuilder); using (var jsonWriter = new JsonTextWriter(stringWriter) { Formatting = Formatting.Indented, FloatFormatHandling = FloatFormatHandling.DefaultValue }) { await jsonWriter.WriteStartArrayAsync(); await jsonWriter.WriteValueAsync(double.NaN); await jsonWriter.WriteValueAsync(double.PositiveInfinity); await jsonWriter.WriteValueAsync(double.NegativeInfinity); await jsonWriter.WriteValueAsync(float.NaN); await jsonWriter.WriteValueAsync(float.PositiveInfinity); await jsonWriter.WriteValueAsync(float.NegativeInfinity); await jsonWriter.WriteValueAsync((double?) double.NaN); await jsonWriter.WriteValueAsync((double?) double.PositiveInfinity); await jsonWriter.WriteValueAsync((double?) double.NegativeInfinity); await jsonWriter.WriteValueAsync((float?) float.NaN); await jsonWriter.WriteValueAsync((float?) float.PositiveInfinity); await jsonWriter.WriteValueAsync((float?) float.NegativeInfinity); await jsonWriter.WriteEndArrayAsync(); await jsonWriter.FlushAsync(); } var expected = @"[ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, null, null, null, null, null, null ]"; var result = stringBuilder.ToString(); XUnitAssert.AreEqualNormalized(expected, result); } [Fact] public async Task FloatingPointNonFiniteNumbers_StringAsync() { var stringBuilder = new StringBuilder(); var stringWriter = new StringWriter(stringBuilder); using (var jsonWriter = new JsonTextWriter(stringWriter) { Formatting = Formatting.Indented, FloatFormatHandling = FloatFormatHandling.String }) { await jsonWriter.WriteStartArrayAsync(); await jsonWriter.WriteValueAsync(double.NaN); await jsonWriter.WriteValueAsync(double.PositiveInfinity); await jsonWriter.WriteValueAsync(double.NegativeInfinity); await jsonWriter.WriteValueAsync(float.NaN); await jsonWriter.WriteValueAsync(float.PositiveInfinity); await jsonWriter.WriteValueAsync(float.NegativeInfinity); await jsonWriter.WriteEndArrayAsync(); await jsonWriter.FlushAsync(); } var expected = @"[ ""NaN"", ""Infinity"", ""-Infinity"", ""NaN"", ""Infinity"", ""-Infinity"" ]"; var result = stringBuilder.ToString(); XUnitAssert.AreEqualNormalized(expected, result); } [Fact] public async Task FloatingPointNonFiniteNumbers_QuoteCharAsync() { var stringBuilder = new StringBuilder(); var stringWriter = new StringWriter(stringBuilder); using (var jsonWriter = new JsonTextWriter(stringWriter) { Formatting = Formatting.Indented, FloatFormatHandling = FloatFormatHandling.String, QuoteChar = '\'' }) { await jsonWriter.WriteStartArrayAsync(); await jsonWriter.WriteValueAsync(double.NaN); await jsonWriter.WriteValueAsync(double.PositiveInfinity); await jsonWriter.WriteValueAsync(double.NegativeInfinity); await jsonWriter.WriteValueAsync(float.NaN); await jsonWriter.WriteValueAsync(float.PositiveInfinity); await jsonWriter.WriteValueAsync(float.NegativeInfinity); await jsonWriter.WriteEndArrayAsync(); await jsonWriter.FlushAsync(); } var expected = @"[ 'NaN', 'Infinity', '-Infinity', 'NaN', 'Infinity', '-Infinity' ]"; var result = stringBuilder.ToString(); XUnitAssert.AreEqualNormalized(expected, result); } [Fact] public async Task WriteRawInStartAsync() { var stringBuilder = new StringBuilder(); var stringWriter = new StringWriter(stringBuilder); using (var jsonWriter = new JsonTextWriter(stringWriter) { Formatting = Formatting.Indented, FloatFormatHandling = FloatFormatHandling.Symbol }) { await jsonWriter.WriteRawAsync("[1,2,3,4,5]"); await jsonWriter.WriteWhitespaceAsync(" "); await jsonWriter.WriteStartArrayAsync(); await jsonWriter.WriteValueAsync(double.NaN); await jsonWriter.WriteEndArrayAsync(); } var expected = @"[1,2,3,4,5] [ NaN ]"; var result = stringBuilder.ToString(); XUnitAssert.AreEqualNormalized(expected, result); } [Fact] public async Task WriteRawInArrayAsync() { var stringBuilder = new StringBuilder(); var stringWriter = new StringWriter(stringBuilder); using (var jsonWriter = new JsonTextWriter(stringWriter) { Formatting = Formatting.Indented, FloatFormatHandling = FloatFormatHandling.Symbol }) { await jsonWriter.WriteStartArrayAsync(); await jsonWriter.WriteValueAsync(double.NaN); await jsonWriter.WriteRawAsync(",[1,2,3,4,5]"); await jsonWriter.WriteRawAsync(",[1,2,3,4,5]"); await jsonWriter.WriteValueAsync(float.NaN); await jsonWriter.WriteEndArrayAsync(); } var expected = @"[ NaN,[1,2,3,4,5],[1,2,3,4,5], NaN ]"; var result = stringBuilder.ToString(); XUnitAssert.AreEqualNormalized(expected, result); } [Fact] public async Task WriteRawInObjectAsync() { var stringBuilder = new StringBuilder(); var stringWriter = new StringWriter(stringBuilder); using (var jsonWriter = new JsonTextWriter(stringWriter) { Formatting = Formatting.Indented }) { await jsonWriter.WriteStartObjectAsync(); await jsonWriter.WriteRawAsync(@"""PropertyName"":[1,2,3,4,5]"); await jsonWriter.WriteEndAsync(); } var expected = @"{""PropertyName"":[1,2,3,4,5]}"; var result = stringBuilder.ToString(); Assert.Equal(expected, result); } [Fact] public async Task WriteTokenAsync() { var cancel = CancellationToken.None; var reader = new JsonTextReader(new StringReader("[1,2,3,4,5]")); reader.Read(); reader.Read(); var stringWriter = new StringWriter(); var jsonWriter = new JsonTextWriter(stringWriter); await jsonWriter.WriteTokenAsync(reader, cancel); Assert.Equal("1", stringWriter.ToString()); } [Fact] public async Task WriteRawValueAsync() { var stringBuilder = new StringBuilder(); var stringWriter = new StringWriter(stringBuilder); using (var jsonWriter = new JsonTextWriter(stringWriter)) { var i = 0; var rawJson = "[1,2]"; await jsonWriter.WriteStartObjectAsync(); while (i < 3) { await jsonWriter.WritePropertyNameAsync($"d{i}"); await jsonWriter.WriteRawValueAsync(rawJson); i++; } await jsonWriter.WriteEndObjectAsync(); } Assert.Equal(@"{""d0"":[1,2],""d1"":[1,2],""d2"":[1,2]}", stringBuilder.ToString()); } [Fact] public async Task WriteFloatingPointNumberAsync() { var stringBuilder = new StringBuilder(); var stringWriter = new StringWriter(stringBuilder); using (var jsonWriter = new JsonTextWriter(stringWriter)) { jsonWriter.FloatFormatHandling = FloatFormatHandling.Symbol; await jsonWriter.WriteStartArrayAsync(); await jsonWriter.WriteValueAsync(0.0); await jsonWriter.WriteValueAsync(0f); await jsonWriter.WriteValueAsync(0.1); await jsonWriter.WriteValueAsync(1.0); await jsonWriter.WriteValueAsync(1.000001); await jsonWriter.WriteValueAsync(0.000001); await jsonWriter.WriteValueAsync(double.Epsilon); await jsonWriter.WriteValueAsync(double.PositiveInfinity); await jsonWriter.WriteValueAsync(double.NegativeInfinity); await jsonWriter.WriteValueAsync(double.NaN); await jsonWriter.WriteValueAsync(double.MaxValue); await jsonWriter.WriteValueAsync(double.MinValue); await jsonWriter.WriteValueAsync(float.PositiveInfinity); await jsonWriter.WriteValueAsync(float.NegativeInfinity); await jsonWriter.WriteValueAsync(float.NaN); await jsonWriter.WriteEndArrayAsync(); } #if NET5_0_OR_GREATER Assert.Equal(@"[0.0,0.0,0.1,1.0,1.000001,1E-06,5E-324,Infinity,-Infinity,NaN,1.7976931348623157E+308,-1.7976931348623157E+308,Infinity,-Infinity,NaN]", stringBuilder.ToString()); #else Assert.Equal(@"[0.0,0.0,0.1,1.0,1.000001,1E-06,4.94065645841247E-324,Infinity,-Infinity,NaN,1.7976931348623157E+308,-1.7976931348623157E+308,Infinity,-Infinity,NaN]", stringBuilder.ToString()); #endif } [Fact] public async Task WriteIntegerNumberAsync() { var stringBuilder = new StringBuilder(); var stringWriter = new StringWriter(stringBuilder); using (var jsonWriter = new JsonTextWriter(stringWriter) { Formatting = Formatting.Indented }) { await jsonWriter.WriteStartArrayAsync(); await jsonWriter.WriteValueAsync(int.MaxValue); await jsonWriter.WriteValueAsync(int.MinValue); await jsonWriter.WriteValueAsync(0); await jsonWriter.WriteValueAsync(-0); await jsonWriter.WriteValueAsync(9L); await jsonWriter.WriteValueAsync(9UL); await jsonWriter.WriteValueAsync(long.MaxValue); await jsonWriter.WriteValueAsync(long.MinValue); await jsonWriter.WriteValueAsync(ulong.MaxValue); await jsonWriter.WriteValueAsync(ulong.MinValue); await jsonWriter.WriteEndArrayAsync(); } Console.WriteLine(stringBuilder.ToString()); XUnitAssert.AreEqualNormalized(@"[ 2147483647, -2147483648, 0, 0, 9, 9, 9223372036854775807, -9223372036854775808, 18446744073709551615, 0 ]", stringBuilder.ToString()); } [Fact] public async Task WriteTokenDirectAsync() { var stringBuilder = new StringBuilder(); var stringWriter = new StringWriter(stringBuilder); using (var jsonWriter = new JsonTextWriter(stringWriter)) { await jsonWriter.WriteTokenAsync(JsonToken.StartArray); await jsonWriter.WriteTokenAsync(JsonToken.Integer, 1); await jsonWriter.WriteTokenAsync(JsonToken.StartObject); await jsonWriter.WriteTokenAsync(JsonToken.PropertyName, "string"); await jsonWriter.WriteTokenAsync(JsonToken.Integer, int.MaxValue); await jsonWriter.WriteTokenAsync(JsonToken.EndObject); await jsonWriter.WriteTokenAsync(JsonToken.EndArray); } Assert.Equal(@"[1,{""string"":2147483647}]", stringBuilder.ToString()); } [Fact] public async Task WriteTokenDirect_BadValueAsync() { var stringBuilder = new StringBuilder(); var stringWriter = new StringWriter(stringBuilder); using var jsonWriter = new JsonTextWriter(stringWriter); await jsonWriter.WriteTokenAsync(JsonToken.StartArray); await XUnitAssert.ThrowsAsync<FormatException>( () => jsonWriter.WriteTokenAsync(JsonToken.Integer, "three"), "Input string was not in a correct format."); } [Fact] public async Task TokenTypeOutOfRangeAsync() { using var jsonWriter = new JsonTextWriter(new StringWriter()); var ex = await XUnitAssert.ThrowsAsync<ArgumentOutOfRangeException>(() => jsonWriter.WriteTokenAsync((JsonToken) int.MinValue)); Assert.Equal("token", ex.ParamName); ex = await XUnitAssert.ThrowsAsync<ArgumentOutOfRangeException>( () => jsonWriter.WriteTokenAsync((JsonToken) int.MinValue, "test")); Assert.Equal("token", ex.ParamName); } [Fact] public async Task BadWriteEndArrayAsync() { var stringBuilder = new StringBuilder(); var stringWriter = new StringWriter(stringBuilder); using var jsonWriter = new JsonTextWriter(stringWriter); await jsonWriter.WriteStartArrayAsync(); await jsonWriter.WriteValueAsync(0.0); await jsonWriter.WriteEndArrayAsync(); await XUnitAssert.ThrowsAsync<JsonWriterException>( () => jsonWriter.WriteEndArrayAsync(), "No token to close. Path ''."); } [Fact] public async Task IndentationAsync() { var stringBuilder = new StringBuilder(); var stringWriter = new StringWriter(stringBuilder); using (var jsonWriter = new JsonTextWriter(stringWriter) { Formatting = Formatting.Indented, FloatFormatHandling = FloatFormatHandling.Symbol }) { jsonWriter.Indentation = 5; jsonWriter.IndentChar = '_'; jsonWriter.QuoteChar = '\''; await jsonWriter.WriteStartObjectAsync(); await jsonWriter.WritePropertyNameAsync("propertyName"); await jsonWriter.WriteValueAsync(double.NaN); jsonWriter.IndentChar = '?'; jsonWriter.Indentation = 6; await jsonWriter.WritePropertyNameAsync("prop2"); await jsonWriter.WriteValueAsync(123); await jsonWriter.WriteEndObjectAsync(); } var expected = @"{ _____'propertyName': NaN, ??????'prop2': 123 }"; var result = stringBuilder.ToString(); XUnitAssert.AreEqualNormalized(expected, result); } [Fact] public async Task WriteSingleBytesAsync() { var stringBuilder = new StringBuilder(); var stringWriter = new StringWriter(stringBuilder); var text = "Hello world."; var data = Encoding.UTF8.GetBytes(text); using (var jsonWriter = new JsonTextWriter(stringWriter) { Formatting = Formatting.Indented }) { await jsonWriter.WriteValueAsync(data); } var expected = @"""SGVsbG8gd29ybGQu"""; var result = stringBuilder.ToString(); Assert.Equal(expected, result); var d2 = Convert.FromBase64String(result.Trim('"')); Assert.Equal(text, Encoding.UTF8.GetString(d2, 0, d2.Length)); } [Fact] public async Task WriteBytesInArrayAsync() { var stringBuilder = new StringBuilder(); var stringWriter = new StringWriter(stringBuilder); var text = "Hello world."; var data = Encoding.UTF8.GetBytes(text); using (var jsonWriter = new JsonTextWriter(stringWriter) { Formatting = Formatting.Indented }) { Assert.Equal(Formatting.Indented, jsonWriter.Formatting); await jsonWriter.WriteStartArrayAsync(); await jsonWriter.WriteValueAsync(data); await jsonWriter.WriteValueAsync(data); await jsonWriter.WriteValueAsync((object) data); await jsonWriter.WriteValueAsync((byte[]) null); await jsonWriter.WriteValueAsync((Uri) null); await jsonWriter.WriteEndArrayAsync(); } var expected = @"[ ""SGVsbG8gd29ybGQu"", ""SGVsbG8gd29ybGQu"", ""SGVsbG8gd29ybGQu"", null, null ]"; var result = stringBuilder.ToString(); XUnitAssert.AreEqualNormalized(expected, result); } [Fact] public async Task DateTimeZoneHandlingAsync() { var stringWriter = new StringWriter(); var jsonWriter = new JsonTextWriter(stringWriter) { DateTimeZoneHandling = DateTimeZoneHandling.Utc }; await jsonWriter.WriteValueAsync(new DateTime(2000, 1, 1, 1, 1, 1, DateTimeKind.Unspecified)); Assert.Equal(@"""2000-01-01T01:01:01Z""", stringWriter.ToString()); } [Fact] public async Task HtmlEscapeHandlingAsync() { var stringWriter = new StringWriter(); var jsonWriter = new JsonTextWriter(stringWriter) { EscapeHandling = EscapeHandling.EscapeHtml }; var script = @"<script type=""text/javascript"">alert('hi');</script>"; await jsonWriter.WriteValueAsync(script); var json = stringWriter.ToString(); Assert.Equal(@"""\u003cscript type=\u0022text/javascript\u0022\u003ealert(\u0027hi\u0027);\u003c/script\u003e""", json); var reader = new JsonTextReader(new StringReader(json)); Assert.Equal(script, reader.ReadAsString()); } [Fact] public async Task NonAsciiEscapeHandlingAsync() { var stringWriter = new StringWriter(); var jsonWriter = new JsonTextWriter(stringWriter) { EscapeHandling = EscapeHandling.EscapeNonAscii }; var unicode = "\u5f20"; await jsonWriter.WriteValueAsync(unicode); var json = stringWriter.ToString(); Assert.Equal(8, json.Length); Assert.Equal(@"""\u5f20""", json); var reader = new JsonTextReader(new StringReader(json)); Assert.Equal(unicode, reader.ReadAsString()); stringWriter = new(); jsonWriter = new(stringWriter) { EscapeHandling = EscapeHandling.Default }; await jsonWriter.WriteValueAsync(unicode); json = stringWriter.ToString(); Assert.Equal(3, json.Length); Assert.Equal("\"\u5f20\"", json); } [Fact] public async Task NoEscapeHandlingAsync() { var stringWriter = new StringWriter(); var jsonWriter = new JsonTextWriter(stringWriter) { EscapeHandling = EscapeHandling.None }; var unicode = "\u5f20"; await jsonWriter.WriteValueAsync(unicode); var json = stringWriter.ToString(); Assert.Equal(3, json.Length); Assert.Equal(@"""张""", json); var reader = new JsonTextReader(new StringReader(json)); Assert.Equal(unicode, reader.ReadAsString()); stringWriter = new(); jsonWriter = new(stringWriter) { EscapeHandling = EscapeHandling.Default }; await jsonWriter.WriteValueAsync(unicode); json = stringWriter.ToString(); Assert.Equal(3, json.Length); Assert.Equal("\"\u5f20\"", json); } [Fact] public async Task WriteEndOnPropertyAsync() { var stringWriter = new StringWriter(); var jsonWriter = new JsonTextWriter(stringWriter); jsonWriter.QuoteChar = '\''; await jsonWriter.WriteStartObjectAsync(); await jsonWriter.WritePropertyNameAsync("Blah"); await jsonWriter.WriteEndAsync(); Assert.Equal("{'Blah':null}", stringWriter.ToString()); } [Fact] public async Task QuoteCharAsync() { var stringWriter = new StringWriter(); var jsonWriter = new JsonTextWriter(stringWriter) { Formatting = Formatting.Indented, QuoteChar = '\'' }; await jsonWriter.WriteStartArrayAsync(); await jsonWriter.WriteValueAsync(new DateTime(2000, 1, 1, 1, 1, 1, DateTimeKind.Utc)); await jsonWriter.WriteValueAsync(new DateTimeOffset(2000, 1, 1, 1, 1, 1, TimeSpan.Zero)); jsonWriter.DateFormatString = "yyyy gg"; await jsonWriter.WriteValueAsync(new DateTime(2000, 1, 1, 1, 1, 1, DateTimeKind.Utc)); await jsonWriter.WriteValueAsync(new DateTimeOffset(2000, 1, 1, 1, 1, 1, TimeSpan.Zero)); await jsonWriter.WriteValueAsync(new byte[] {1, 2, 3}); await jsonWriter.WriteValueAsync(TimeSpan.Zero); await jsonWriter.WriteValueAsync(new Uri("http://www.google.com/")); await jsonWriter.WriteValueAsync(Guid.Empty); await jsonWriter.WriteEndAsync(); XUnitAssert.AreEqualNormalized(@"[ '2000-01-01T01:01:01Z', '2000-01-01T01:01:01+00:00', '2000 A.D.', '2000 A.D.', 'AQID', '00:00:00', 'http://www.google.com/', '00000000-0000-0000-0000-000000000000' ]", stringWriter.ToString()); } [Fact] public async Task CultureAsync() { var culture = new CultureInfo("en-NZ") { DateTimeFormat = { AMDesignator = "a.m.", PMDesignator = "p.m." } }; var stringWriter = new StringWriter(); var jsonWriter = new JsonTextWriter(stringWriter) { QuoteChar = '\'', Formatting = Formatting.Indented, DateFormatString = "yyyy tt", Culture = culture }; await jsonWriter.WriteStartArrayAsync(); await jsonWriter.WriteValueAsync(new DateTime(2000, 1, 1, 1, 1, 1, DateTimeKind.Utc)); await jsonWriter.WriteValueAsync(new DateTimeOffset(2000, 1, 1, 1, 1, 1, TimeSpan.Zero)); await jsonWriter.WriteEndAsync(); XUnitAssert.AreEqualNormalized(@"[ '2000 a.m.', '2000 a.m.' ]", stringWriter.ToString()); } [Fact] public async Task CompareNewStringEscapingWithOldAsync() { var c = (char) 0; do { var swNew = new StringWriter(); var jsonWriter = new JsonTextWriter(new StreamWriter(Stream.Null)); await JavaScriptUtils.WriteEscapedJavaScriptStringAsync(swNew, c.ToString(), '"', true, JavaScriptUtils.DoubleQuoteEscapeFlags, EscapeHandling.Default, jsonWriter, null); var swOld = new StringWriter(); WriteEscapedJavaScriptStringOld(swOld, c.ToString(), '"', true); var newText = swNew.ToString(); var oldText = swOld.ToString(); if (newText != oldText) { throw new($"Difference for char '{c}' (value {(int) c}). Old text: {oldText}, New text: {newText}"); } c++; } while (c != char.MaxValue); } const string EscapedUnicodeText = "!"; static void WriteEscapedJavaScriptStringOld(TextWriter writer, string s, char delimiter, bool appendDelimiters) { // leading delimiter if (appendDelimiters) { writer.Write(delimiter); } if (s != null) { char[] chars = null; char[] unicodeBuffer = null; var lastWritePosition = 0; for (var i = 0; i < s.Length; i++) { var c = s[i]; // don't escape standard text/numbers except '\' and the text delimiter if (c >= ' ' && c < 128 && c != '\\' && c != delimiter) { continue; } string escapedValue; switch (c) { case '\t': escapedValue = @"\t"; break; case '\n': escapedValue = @"\n"; break; case '\r': escapedValue = @"\r"; break; case '\f': escapedValue = @"\f"; break; case '\b': escapedValue = @"\b"; break; case '\\': escapedValue = @"\\"; break; case '\u0085': // Next Line escapedValue = @"\u0085"; break; case '\u2028': // Line Separator escapedValue = @"\u2028"; break; case '\u2029': // Paragraph Separator escapedValue = @"\u2029"; break; case '\'': // this charater is being used as the delimiter escapedValue = @"\'"; break; case '"': // this charater is being used as the delimiter escapedValue = "\\\""; break; default: if (c <= '\u001f') { unicodeBuffer ??= new char[6]; StringUtils.ToCharAsUnicode(c, unicodeBuffer); // slightly hacky but it saves multiple conditions in if test escapedValue = EscapedUnicodeText; } else { escapedValue = null; } break; } if (escapedValue == null) { continue; } if (i > lastWritePosition) { chars ??= s.ToCharArray(); // write unchanged chars before writing escaped text writer.Write(chars, lastWritePosition, i - lastWritePosition); } lastWritePosition = i + 1; if (string.Equals(escapedValue, EscapedUnicodeText)) { writer.Write(unicodeBuffer); } else { writer.Write(escapedValue); } } if (lastWritePosition == 0) { // no escaped text, write entire string writer.Write(s); } else { chars ??= s.ToCharArray(); // write remaining text writer.Write(chars, lastWritePosition, s.Length - lastWritePosition); } } // trailing delimiter if (appendDelimiters) { writer.Write(delimiter); } } [Fact] public async Task CustomJsonTextWriterTestsAsync() { var stringWriter = new StringWriter(); CustomJsonTextWriter writer = new CustomAsyncJsonTextWriter(stringWriter) {Formatting = Formatting.Indented}; await writer.WriteStartObjectAsync(); Assert.Equal(WriteState.Object, writer.WriteState); await writer.WritePropertyNameAsync("Property1"); Assert.Equal(WriteState.Property, writer.WriteState); Assert.Equal("Property1", writer.Path); await writer.WriteNullAsync(); Assert.Equal(WriteState.Object, writer.WriteState); await writer.WriteEndObjectAsync(); Assert.Equal(WriteState.Start, writer.WriteState); XUnitAssert.AreEqualNormalized(@"{{{ ""1ytreporP"": NULL!!! }}}", stringWriter.ToString()); } [Fact] public async Task QuoteDictionaryNamesAsync() { var d = new Dictionary<string, int> { {"a", 1} }; var settings = new JsonSerializerSettings { Formatting = Formatting.Indented }; var serializer = JsonSerializer.Create(settings); using var stringWriter = new StringWriter(); using (var writer = new JsonTextWriter(stringWriter) { QuoteName = false }) { serializer.Serialize(writer, d); await writer.CloseAsync(); } XUnitAssert.AreEqualNormalized(@"{ a: 1 }", stringWriter.ToString()); } [Fact] public async Task QuoteDictionaryValuesAsync() { var d = new Dictionary<string, string> { {"a", "b"} }; var settings = new JsonSerializerSettings { Formatting = Formatting.Indented }; var serializer = JsonSerializer.Create(settings); using var stringWriter = new StringWriter(); using (var writer = new JsonTextWriter(stringWriter) { QuoteValue = false }) { serializer.Serialize(writer, d); await writer.CloseAsync(); } XUnitAssert.AreEqualNormalized(@"{ ""a"": b }", stringWriter.ToString()); } [Fact] public async Task WriteCommentsAsync() { var json = $@"//comment*//*hi*/ {{//comment Name://comment true//comment after true{StringUtils.CarriageReturn} ,//comment after comma{StringUtils.CarriageReturnLineFeed} ExpiryDate:'2014-06-04T00:00:00Z', Price: 3.99, Sizes: //comment [//comment ""Small""//comment ]//comment }}//comment //comment 1 "; var reader = new JsonTextReader(new StringReader(json)); var stringWriter = new StringWriter(); var jsonWriter = new JsonTextWriter(stringWriter) { Formatting = Formatting.Indented }; await jsonWriter.WriteTokenAsync(reader, true); XUnitAssert.AreEqualNormalized(@"/*comment*//*hi*/*/{/*comment*/ ""Name"": /*comment*/ true/*comment after true*//*comment after comma*/, ""ExpiryDate"": ""2014-06-04T00:00:00Z"", ""Price"": 3.99, ""Sizes"": /*comment*/ [ /*comment*/ ""Small"" /*comment*/ ]/*comment*/ }/*comment *//*comment 1 */", stringWriter.ToString()); } [Fact] public void AsyncMethodsAlreadyCancelled() { var source = new CancellationTokenSource(); var token = source.Token; source.Cancel(); var writer = new JsonTextWriter(new StreamWriter(Stream.Null)); Assert.True(writer.CloseAsync(token).IsCanceled); Assert.True(writer.FlushAsync(token).IsCanceled); Assert.True(writer.WriteCommentAsync("test", token).IsCanceled); Assert.True(writer.WriteEndArrayAsync(token).IsCanceled); Assert.True(writer.WriteEndAsync(token).IsCanceled); Assert.True(writer.WriteEndObjectAsync(token).IsCanceled); Assert.True(writer.WriteNullAsync(token).IsCanceled); Assert.True(writer.WritePropertyNameAsync("test", token).IsCanceled); Assert.True(writer.WritePropertyNameAsync("test", false, token).IsCanceled); Assert.True(writer.WriteRawAsync("{}", token).IsCanceled); Assert.True(writer.WriteRawValueAsync("{}", token).IsCanceled); Assert.True(writer.WriteStartArrayAsync(token).IsCanceled); Assert.True(writer.WriteStartObjectAsync(token).IsCanceled); Assert.True(writer.WriteTokenAsync(JsonToken.Comment, token).IsCanceled); Assert.True(writer.WriteTokenAsync(JsonToken.Boolean, true, token).IsCanceled); var reader = new JsonTextReader(new StringReader("[1,2,3,4,5]")); Assert.True(writer.WriteTokenAsync(reader, token).IsCanceled); Assert.True(writer.WriteUndefinedAsync(token).IsCanceled); Assert.True(writer.WriteValueAsync(default(bool), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(bool?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(byte), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(byte?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(byte[]), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(char), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(char?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(DateTime), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(DateTime?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(DateTimeOffset), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(DateTimeOffset?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(decimal), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(decimal?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(double), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(double?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(float), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(float?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(Guid), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(Guid?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(int), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(int?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(long), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(long?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(object), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(sbyte), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(sbyte?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(short), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(short?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(TimeSpan), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(TimeSpan?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(uint), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(uint?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(ulong), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(ulong?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(Uri), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(ushort), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(ushort?), token).IsCanceled); Assert.True(writer.WriteWhitespaceAsync(" ", token).IsCanceled); } class NoOverridesDerivedJsonTextWriter : JsonTextWriter { public NoOverridesDerivedJsonTextWriter(TextWriter textWriter) : base(textWriter) { } } class MinimalOverridesDerivedJsonWriter : JsonWriter { public override void Flush() { } } [Fact] public void AsyncMethodsAlreadyCancelledOnTextWriterSubclass() { var source = new CancellationTokenSource(); var token = source.Token; source.Cancel(); var writer = new NoOverridesDerivedJsonTextWriter(new StreamWriter(Stream.Null)); Assert.True(writer.CloseAsync(token).IsCanceled); Assert.True(writer.FlushAsync(token).IsCanceled); Assert.True(writer.WriteCommentAsync("test", token).IsCanceled); Assert.True(writer.WriteEndArrayAsync(token).IsCanceled); Assert.True(writer.WriteEndAsync(token).IsCanceled); Assert.True(writer.WriteEndObjectAsync(token).IsCanceled); Assert.True(writer.WriteNullAsync(token).IsCanceled); Assert.True(writer.WritePropertyNameAsync("test", token).IsCanceled); Assert.True(writer.WritePropertyNameAsync("test", false, token).IsCanceled); Assert.True(writer.WriteRawAsync("{}", token).IsCanceled); Assert.True(writer.WriteRawValueAsync("{}", token).IsCanceled); Assert.True(writer.WriteStartArrayAsync(token).IsCanceled); Assert.True(writer.WriteStartObjectAsync(token).IsCanceled); Assert.True(writer.WriteTokenAsync(JsonToken.Comment, token).IsCanceled); Assert.True(writer.WriteTokenAsync(JsonToken.Boolean, true, token).IsCanceled); var reader = new JsonTextReader(new StringReader("[1,2,3,4,5]")); Assert.True(writer.WriteTokenAsync(reader, token).IsCanceled); Assert.True(writer.WriteUndefinedAsync(token).IsCanceled); Assert.True(writer.WriteValueAsync(default(bool), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(bool?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(byte), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(byte?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(byte[]), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(char), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(char?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(DateTime), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(DateTime?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(DateTimeOffset), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(DateTimeOffset?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(decimal), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(decimal?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(double), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(double?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(float), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(float?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(Guid), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(Guid?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(int), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(int?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(long), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(long?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(object), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(sbyte), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(sbyte?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(short), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(short?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(TimeSpan), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(TimeSpan?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(uint), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(uint?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(ulong), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(ulong?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(Uri), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(ushort), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(ushort?), token).IsCanceled); Assert.True(writer.WriteWhitespaceAsync(" ", token).IsCanceled); } [Fact] public void AsyncMethodsAlreadyCancelledOnWriterSubclass() { var source = new CancellationTokenSource(); var token = source.Token; source.Cancel(); var writer = new MinimalOverridesDerivedJsonWriter(); Assert.True(writer.CloseAsync(token).IsCanceled); Assert.True(writer.FlushAsync(token).IsCanceled); Assert.True(writer.WriteCommentAsync("test", token).IsCanceled); Assert.True(writer.WriteEndArrayAsync(token).IsCanceled); Assert.True(writer.WriteEndAsync(token).IsCanceled); Assert.True(writer.WriteEndObjectAsync(token).IsCanceled); Assert.True(writer.WriteNullAsync(token).IsCanceled); Assert.True(writer.WritePropertyNameAsync("test", token).IsCanceled); Assert.True(writer.WritePropertyNameAsync("test", false, token).IsCanceled); Assert.True(writer.WriteRawAsync("{}", token).IsCanceled); Assert.True(writer.WriteRawValueAsync("{}", token).IsCanceled); Assert.True(writer.WriteStartArrayAsync(token).IsCanceled); Assert.True(writer.WriteStartObjectAsync(token).IsCanceled); Assert.True(writer.WriteTokenAsync(JsonToken.Comment, token).IsCanceled); Assert.True(writer.WriteTokenAsync(JsonToken.Boolean, true, token).IsCanceled); var reader = new JsonTextReader(new StringReader("[1,2,3,4,5]")); Assert.True(writer.WriteTokenAsync(reader, token).IsCanceled); Assert.True(writer.WriteUndefinedAsync(token).IsCanceled); Assert.True(writer.WriteValueAsync(default(bool), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(bool?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(byte), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(byte?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(byte[]), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(char), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(char?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(DateTime), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(DateTime?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(DateTimeOffset), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(DateTimeOffset?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(decimal), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(decimal?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(double), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(double?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(float), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(float?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(Guid), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(Guid?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(int), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(int?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(long), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(long?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(object), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(sbyte), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(sbyte?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(short), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(short?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(TimeSpan), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(TimeSpan?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(uint), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(uint?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(ulong), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(ulong?), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(Uri), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(ushort), token).IsCanceled); Assert.True(writer.WriteValueAsync(default(ushort?), token).IsCanceled); Assert.True(writer.WriteWhitespaceAsync(" ", token).IsCanceled); } [Fact] public async Task FailureOnStartWriteProperty() { var writer = new JsonTextWriter(new ThrowingWriter(' ')); writer.Formatting = Formatting.Indented; await writer.WriteStartObjectAsync(); await XUnitAssert.ThrowsAsync<InvalidOperationException>(() => writer.WritePropertyNameAsync("aa")); } [Fact] public async Task FailureOnStartWriteObject() { var writer = new JsonTextWriter(new ThrowingWriter('{')); await XUnitAssert.ThrowsAsync<InvalidOperationException>(() => writer.WriteStartObjectAsync()); } public class ThrowingWriter : TextWriter { // allergic to certain characters, this null-stream writer throws on any attempt to write them. char[] singleCharBuffer = new char[1]; public ThrowingWriter(params char[] throwChars) { ThrowChars = throwChars; } public char[] ThrowChars { get; set; } public override Encoding Encoding => Encoding.UTF8; public override Task WriteAsync(char value) { singleCharBuffer[0] = value; return WriteAsync(singleCharBuffer, 0, 1); } public override Task WriteAsync(char[] buffer, int index, int count) { if (buffer.Skip(index).Take(count).Any(c => ThrowChars.Contains(c))) { // Pre-4.6 equivalent to .FromException() var tcs = new TaskCompletionSource<bool>(); tcs.SetException(new InvalidOperationException()); return tcs.Task; } return Task.Delay(0); } public override Task WriteAsync(string value) { return WriteAsync(value.ToCharArray(), 0, value.Length); } public override void Write(char value) { throw new NotImplementedException(); } } } public class CustomAsyncJsonTextWriter : CustomJsonTextWriter { public CustomAsyncJsonTextWriter(TextWriter textWriter) : base(textWriter) { } public override Task WritePropertyNameAsync(string name, CancellationToken cancellation = default) { return WritePropertyNameAsync(name, true, cancellation); } public override async Task WritePropertyNameAsync(string name, bool escape, CancellationToken cancellation = default) { await SetWriteStateAsync(JsonToken.PropertyName, name, cancellation); if (QuoteName) { await writer.WriteAsync(QuoteChar); } await writer.WriteAsync(new string(name.ToCharArray().Reverse().ToArray())); if (QuoteName) { await writer.WriteAsync(QuoteChar); } await writer.WriteAsync(':'); } public override async Task WriteNullAsync(CancellationToken cancellation = default) { await SetWriteStateAsync(JsonToken.Null, null, cancellation); await writer.WriteAsync("NULL!!!"); } public override async Task WriteStartObjectAsync(CancellationToken cancellation = default) { await SetWriteStateAsync(JsonToken.StartObject, null, cancellation); await writer.WriteAsync("{{{"); } public override Task WriteEndObjectAsync(CancellationToken cancellation = default) { return SetWriteStateAsync(JsonToken.EndObject, null, cancellation); } protected override Task WriteEndAsync(JsonToken token, CancellationToken cancellation) { if (token == JsonToken.EndObject) { return writer.WriteAsync("}}}"); } return base.WriteEndAsync(token, cancellation); } }
36.014529
229
0.618599
[ "MIT" ]
SimonCropp/Argonautica
src/Tests/JsonTextWriterAsyncTests.cs
71,889
C#
#region License // Copyright (c) 2007 James Newton-King // // Permission is hereby granted, free of charge, to any person // obtaining a copy of this software and associated documentation // files (the "Software"), to deal in the Software without // restriction, including without limitation the rights to use, // copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the // Software is furnished to do so, subject to the following // conditions: // // The above copyright notice and this permission notice shall be // included in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR // OTHER DEALINGS IN THE SOFTWARE. #endregion using System; using System.Collections.Generic; #if NET20 using Newtonsoft.Json.Utilities.LinqBridge; #else using System.Linq; #endif using System.Text; #if DNXCORE50 using Xunit; using Test = Xunit.FactAttribute; using Assert = Newtonsoft.Json.Tests.XUnitAssert; #else using NUnit.Framework; #endif namespace Newtonsoft.Json.Tests.Documentation.Samples.Serializer { [TestFixture] public class DeserializeCollection : TestFixtureBase { [Test] public void Example() { #region Usage string json = @"['Starcraft','Halo','Legend of Zelda']"; List<string> videogames = JsonConvert.DeserializeObject<List<string>>(json); Console.WriteLine(string.Join(", ", videogames.ToArray())); // Starcraft, Halo, Legend of Zelda #endregion Assert.AreEqual("Starcraft, Halo, Legend of Zelda", string.Join(", ", videogames.ToArray())); } } }
34.032258
105
0.715166
[ "MIT" ]
jkorell/Newtonsoft.Json
Src/Newtonsoft.Json.Tests/Documentation/Samples/Serializer/DeserializeCollection.cs
2,112
C#
using System.Collections; using System.Collections.Generic; using UnityEngine; using DeepSpace.JsonProtocol; namespace DeepSpace.Udp { public class UdpFieldOfViewSync : MonoBehaviour { public UdpManager udpManager; public FloorNetworkHandler floorNetworkHandler; public OffAxisFieldOfViewManager _fieldOfViewManager; public string networkId; // TODO: Get this from an ID Manager, etc. private UdpCmdConfigMgr _configMgr; private void Awake() { _configMgr = UdpCmdConfigMgr.Instance as UdpCmdConfigMgr; } private void Start() { if(_configMgr.applicationType == CmdConfigManager.AppType.FLOOR) { floorNetworkHandler.RegisterFieldOfViewForSync(this); } } private void ChangeFovOverNetwork(FieldOfViewAsset fovAsset) { // Wall only: if (_configMgr.applicationType == CmdConfigManager.AppType.WALL) { // Sending the sync data via UDP: fovAsset.Asset_Id = networkId; udpManager.SenderToFloor.AddMessage(JsonUtility.ToJson(fovAsset)); // Apply the field of view delayed: StartCoroutine(ApplyFovAfter(_configMgr.networkFrameDelay, fovAsset)); } else // Floor only: { // Apply the field of view: ApplyFovLocally(fovAsset); } } private IEnumerator ApplyFovAfter(int frameAmount, FieldOfViewAsset fovAsset) { for (int ii = 0; ii < frameAmount; ++ii) { yield return null; // Wait for one frame. } ApplyFovLocally(fovAsset); } // This method changes the FOV on the local host: public void ApplyFovLocally(FieldOfViewAsset fovAsset) { if (fovAsset.Reset == true) { _fieldOfViewManager.ResetFOV(); } else if (fovAsset.ZOffset != 0f) { _fieldOfViewManager.ChangeFOV(fovAsset.ZOffset); } } public void ChangeFOV(float changeValue) { FieldOfViewAsset fovAsset = new FieldOfViewAsset(); fovAsset.ZOffset = changeValue; ChangeFovOverNetwork(fovAsset); } public void ResetFOV() { FieldOfViewAsset fovAsset = new FieldOfViewAsset(); fovAsset.Reset = true; ChangeFovOverNetwork(fovAsset); } } }
23.235955
79
0.721954
[ "MIT" ]
ArsElectronicaFuturelab/DeepSpaceDevKit
Assets/DeepSpace/Scripts/UDP/UdpFieldOfViewSync.cs
2,070
C#
//#if (!__solua__ && !__Windows__) // #define __liblua__ //#endif namespace SharpLua { using System; using System.Runtime.InteropServices; using System.Reflection; using System.Collections; using System.Text; using System.Security; using SharpLua; /* * Lua types for the API, returned by lua_type function */ public enum LuaTypes { LUA_TNONE = -1, LUA_TNIL = 0, LUA_TBOOLEAN = 1, LUA_TLIGHTUSERDATA = 2, LUA_TNUMBER = 3, LUA_TSTRING = 4, LUA_TTABLE = 5, LUA_TFUNCTION = 6, LUA_TUSERDATA = 7, LUA_TTHREAD = 8, } // steffenj: BEGIN lua garbage collector options /* * Lua Garbage Collector options (param "what") */ public enum LuaGCOptions { LUA_GCSTOP = 0, LUA_GCRESTART = 1, LUA_GCCOLLECT = 2, LUA_GCCOUNT = 3, LUA_GCCOUNTB = 4, LUA_GCSTEP = 5, LUA_GCSETPAUSE = 6, LUA_GCSETSTEPMUL = 7, } /* sealed class LuaGCOptions { public static int LUA_GCSTOP = 0; public static int LUA_GCRESTART = 1; public static int LUA_GCCOLLECT = 2; public static int LUA_GCCOUNT = 3; public static int LUA_GCCOUNTB = 4; public static int LUA_GCSTEP = 5; public static int LUA_GCSETPAUSE = 6; public static int LUA_GCSETSTEPMUL = 7; }; */ // steffenj: END lua garbage collector options /* * Special stack indexes */ public class LuaIndexes { public static int LUA_REGISTRYINDEX = -10000; public static int LUA_ENVIRONINDEX = -10001; // steffenj: added environindex public static int LUA_GLOBALSINDEX = -10002; // steffenj: globalsindex previously was -10001 } /* * Structure used by the chunk reader */ [StructLayout(LayoutKind.Sequential)] public struct ReaderInfo { public String chunkData; public bool finished; } /* * Delegate for functions passed to Lua as function pointers */ public delegate int LuaCSFunction(SharpLua.Lua.LuaState luaState); /* * Delegate for chunk readers used with lua_load */ public delegate string LuaChunkReader(SharpLua.Lua.LuaState luaState, ref ReaderInfo data, ref uint size); /// <summary> /// Used to handle Lua panics /// </summary> /// <param name="luaState"></param> /// <returns></returns> public delegate int LuaFunctionCallback(SharpLua.Lua.LuaState luaState); /* * P/Invoke wrapper of the Lua API * * Author: Fabio Mascarenhas * Version: 1.0 * * // steffenj: noteable changes in the LuaDLL API: * - luaopen_* functions are gone * (however Lua class constructor already calls luaL_openlibs now, so just remove these calls) * - deprecated functions: lua_open, lua_strlen, lua_dostring * (they still work but may be removed with next Lua version) * * list of functions of the Lua 5.1.1 C API that are not in LuaDLL * i thought this may come in handy for the next Lua version upgrade and for anyone to see * what the differences are in the APIs (C API vs LuaDLL API) lua_concat (use System.String concatenation or similar) lua_cpcall (no point in calling C functions) lua_dump (would write to unmanaged memory via lua_Writer) lua_getallocf (no C functions/pointers) lua_isthread (no threads) lua_newstate (use luaL_newstate) lua_newthread (no threads) lua_pushcclosure (no C functions/pointers) lua_pushcfunction (no C functions/pointers) lua_pushfstring (use lua_pushstring) lua_pushthread (no threads) lua_pushvfstring (use lua_pushstring) lua_register (all libs already opened, use require in scripts for external libs) lua_resume (no threads) lua_setallocf (no C functions/pointers) lua_status (no threads) lua_tointeger (use System.Convert) lua_tolstring (use lua_tostring) lua_topointer (no C functions/pointers) lua_tothread (no threads) lua_xmove (no threads) lua_yield (no threads) luaL_add* (use System.String concatenation or similar) luaL_argcheck (function argument checking unnecessary) luaL_argerror (function argument checking unnecessary) luaL_buffinit (use System.String concatenation or similar) luaL_checkany (function argument checking unnecessary) luaL_checkint (function argument checking unnecessary) luaL_checkinteger (function argument checking unnecessary) luaL_checklong (function argument checking unnecessary) luaL_checklstring (function argument checking unnecessary) luaL_checknumber (function argument checking unnecessary) luaL_checkoption (function argument checking unnecessary) luaL_checkstring (function argument checking unnecessary) luaL_checktype (function argument checking unnecessary) luaL_prepbuffer (use System.String concatenation or similar) luaL_pushresult (use System.String concatenation or similar) luaL_register (all libs already opened, use require in scripts for external libs) luaL_typerror (function argument checking unnecessary) (complete lua_Debug interface omitted) lua_gethook*** lua_getinfo lua_getlocal lua_getstack lua_getupvalue lua_sethook lua_setlocal lua_setupvalue */ /*public*/ class LuaDLL { // for debugging // const string BASEPATH = @"C:\development\software\dotnet\tools\PulseRecognizer\PulseRecognizer\bin\Debug\"; // const string BASEPATH = @"C:\development\software\ThirdParty\lua\Built\"; /*const string BASEPATH = ""; #if __Windows__ const string DLLX = ".dll"; #else const string DLLX = ".so"; #endif #if __lib__ const string PREFIX = "liblua"; #else const string PREFIX = "lua"; #endif #if __novs__ const string DLL = PREFIX; #elif __dot__ const string DLL = PREFIX+"5.1"; #else const string DLL = PREFIX+"51"; #endif const string LUADLL = BASEPATH + DLL + DLLX; const string LUALIBDLL = LUADLL; #if __embed__ const string STUBDLL = LUADLL; #else const string STUBDLL = BASEPATH + "luanet" + DLLX; #endif */ // steffenj: BEGIN additional Lua API functions new in Lua 5.1 //[DllImport(LUADLL, CallingConvention = CallingConvention.Cdecl)] public static int lua_gc(SharpLua.Lua.LuaState luaState, LuaGCOptions what, int data) { return SharpLua.Lua.lua_gc(luaState, (int)what, data); } //[DllImport(LUADLL, CallingConvention = CallingConvention.Cdecl)] public static string lua_typename(SharpLua.Lua.LuaState luaState, LuaTypes type) { return SharpLua.Lua.lua_typename(luaState, (int)type).ToString(); } public static string luaL_typename(SharpLua.Lua.LuaState luaState, int stackPos) { return lua_typename(luaState, lua_type(luaState, stackPos)); } //[DllImport(LUALIBDLL, CallingConvention = CallingConvention.Cdecl)] public static void luaL_error(SharpLua.Lua.LuaState luaState, string message) { SharpLua.Lua.luaL_error(luaState, message); } public static void lua_error(SharpLua.Lua.LuaState luaState) { SharpLua.Lua.lua_error(luaState); } //[DllImport(LUALIBDLL, CallingConvention = CallingConvention.Cdecl)] //Not wrapped //public static string luaL_gsub(SharpLua.Lua.lua_State luaState, string str, string pattern, string replacement); #if false // the functions below are still untested //[DllImport(LUADLL, CallingConvention = CallingConvention.Cdecl)] public static void lua_getfenv(SharpLua.Lua.lua_State luaState, int stackPos); public static int lua_isfunction(SharpLua.Lua.lua_State luaState, int stackPos); public static int lua_islightuserdata(SharpLua.Lua.lua_State luaState, int stackPos); public static int lua_istable(SharpLua.Lua.lua_State luaState, int stackPos); public static int lua_isuserdata(SharpLua.Lua.lua_State luaState, int stackPos); public static int lua_lessthan(SharpLua.Lua.lua_State luaState, int stackPos1, int stackPos2); public static int lua_rawequal(SharpLua.Lua.lua_State luaState, int stackPos1, int stackPos2); public static int lua_setfenv(SharpLua.Lua.lua_State luaState, int stackPos); public static void lua_setfield(SharpLua.Lua.lua_State luaState, int stackPos, string name); public static int luaL_callmeta(SharpLua.Lua.lua_State luaState, int stackPos, string name); // steffenj: END additional Lua API functions new in Lua 5.1 #endif // steffenj: BEGIN Lua 5.1.1 API change (lua_open replaced by luaL_newstate) //[DllImport(LUALIBDLL, CallingConvention = CallingConvention.Cdecl)] public static SharpLua.Lua.LuaState luaL_newstate() { return SharpLua.Lua.luaL_newstate(); } /// <summary>DEPRECATED - use luaL_newstate() instead!</summary> public static SharpLua.Lua.LuaState lua_open() { return LuaDLL.luaL_newstate(); } // steffenj: END Lua 5.1.1 API change (lua_open replaced by luaL_newstate) //[DllImport(LUADLL, CallingConvention = CallingConvention.Cdecl)] public static void lua_close(SharpLua.Lua.LuaState luaState) { SharpLua.Lua.lua_close(luaState); } // steffenj: BEGIN Lua 5.1.1 API change (new function luaL_openlibs) //[DllImport(LUALIBDLL, CallingConvention = CallingConvention.Cdecl)] public static void luaL_openlibs(SharpLua.Lua.LuaState luaState) { SharpLua.Lua.luaL_openlibs(luaState); } /* //[DllImport(LUALIBDLL, CallingConvention = CallingConvention.Cdecl)] public static extern void luaopen_base(IntPtr luaState); //[DllImport(LUALIBDLL,CallingConvention=CallingConvention.Cdecl)] public static extern void luaopen_io(IntPtr luaState); //[DllImport(LUALIBDLL,CallingConvention=CallingConvention.Cdecl)] public static extern void luaopen_table(IntPtr luaState); //[DllImport(LUALIBDLL,CallingConvention=CallingConvention.Cdecl)] public static extern void luaopen_string(IntPtr luaState); //[DllImport(LUALIBDLL,CallingConvention=CallingConvention.Cdecl)] public static extern void luaopen_math(IntPtr luaState); //[DllImport(LUALIBDLL,CallingConvention=CallingConvention.Cdecl)] public static extern void luaopen_debug(IntPtr luaState); //[DllImport(LUALIBDLL,CallingConvention=CallingConvention.Cdecl)] public static extern void luaopen_loadlib(IntPtr luaState); */ // steffenj: END Lua 5.1.1 API change (new function luaL_openlibs) // steffenj: BEGIN Lua 5.1.1 API change (lua_strlen is now lua_objlen) //[DllImport(LUADLL, CallingConvention = CallingConvention.Cdecl)] public static int lua_objlen(SharpLua.Lua.LuaState luaState, int stackPos) { return (int)SharpLua.Lua.lua_objlen(luaState, stackPos); } /// <summary>DEPRECATED - use lua_objlen(IntPtr luaState, int stackPos) instead!</summary> public static int lua_strlen(SharpLua.Lua.LuaState luaState, int stackPos) { return lua_objlen(luaState, stackPos); } // steffenj: END Lua 5.1.1 API change (lua_strlen is now lua_objlen) // steffenj: BEGIN Lua 5.1.1 API change (lua_dostring is now a macro luaL_dostring) //[DllImport(LUALIBDLL, CallingConvention = CallingConvention.Cdecl)] public static int luaL_loadstring(SharpLua.Lua.LuaState luaState, string chunk) { return SharpLua.Lua.luaL_loadstring(luaState, chunk); } public static int luaL_dostring(SharpLua.Lua.LuaState luaState, string chunk) { int result = LuaDLL.luaL_loadstring(luaState, chunk); if (result != 0) return result; return LuaDLL.lua_pcall(luaState, 0, -1, 0); } /// <summary>DEPRECATED - use luaL_dostring(IntPtr luaState, string chunk) instead!</summary> public static int lua_dostring(SharpLua.Lua.LuaState luaState, string chunk) { return LuaDLL.luaL_dostring(luaState, chunk); } // steffenj: END Lua 5.1.1 API change (lua_dostring is now a macro luaL_dostring) // steffenj: BEGIN Lua 5.1.1 API change (lua_newtable is gone, lua_createtable is new) //[DllImport(LUADLL, CallingConvention = CallingConvention.Cdecl)] public static void lua_createtable(SharpLua.Lua.LuaState luaState, int narr, int nrec) { SharpLua.Lua.lua_createtable(luaState, narr, nrec); } public static void lua_newtable(SharpLua.Lua.LuaState luaState) { LuaDLL.lua_createtable(luaState, 0, 0); } // steffenj: END Lua 5.1.1 API change (lua_newtable is gone, lua_createtable is new) // steffenj: BEGIN Lua 5.1.1 API change (lua_dofile now in LuaLib as luaL_dofile macro) //[DllImport(LUALIBDLL, CallingConvention = CallingConvention.Cdecl)] public static int luaL_dofile(SharpLua.Lua.LuaState luaState, string fileName) { int result = LuaDLL.luaL_loadfile(luaState, fileName); if (result != 0) return result; return LuaDLL.lua_pcall(luaState, 0, -1, 0); } // steffenj: END Lua 5.1.1 API change (lua_dofile now in LuaLib as luaL_dofile) public static void lua_getglobal(SharpLua.Lua.LuaState luaState, string name) { LuaDLL.lua_pushstring(luaState, name); LuaDLL.lua_gettable(luaState, LuaIndexes.LUA_GLOBALSINDEX); } public static void lua_setglobal(SharpLua.Lua.LuaState luaState, string name) { LuaDLL.lua_pushstring(luaState, name); LuaDLL.lua_insert(luaState, -2); LuaDLL.lua_settable(luaState, LuaIndexes.LUA_GLOBALSINDEX); } //[DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] public static void lua_settop(SharpLua.Lua.LuaState luaState, int newTop) { SharpLua.Lua.lua_settop(luaState, newTop); } // steffenj: BEGIN added lua_pop "macro" public static void lua_pop(SharpLua.Lua.LuaState luaState, int amount) { LuaDLL.lua_settop(luaState, -(amount) - 1); } // steffenj: END added lua_pop "macro" //[DllImport(LUADLL, CallingConvention = CallingConvention.Cdecl)] public static void lua_insert(SharpLua.Lua.LuaState luaState, int newTop) { SharpLua.Lua.lua_insert(luaState, newTop); } //[DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] public static void lua_remove(SharpLua.Lua.LuaState luaState, int index) { SharpLua.Lua.lua_remove(luaState, index); } //[DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] public static void lua_gettable(SharpLua.Lua.LuaState luaState, int index) { SharpLua.Lua.lua_gettable(luaState, index); } //[DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] public static void lua_rawget(SharpLua.Lua.LuaState luaState, int index) { SharpLua.Lua.lua_rawget(luaState, index); } //[DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] public static void lua_settable(SharpLua.Lua.LuaState luaState, int index) { SharpLua.Lua.lua_settable(luaState, index); } //[DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] public static void lua_rawset(SharpLua.Lua.LuaState luaState, int index) { SharpLua.Lua.lua_rawset(luaState, index); } //[DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] public static void lua_setmetatable(SharpLua.Lua.LuaState luaState, int objIndex) { SharpLua.Lua.lua_setmetatable(luaState, objIndex); } //[DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] public static int lua_getmetatable(SharpLua.Lua.LuaState luaState, int objIndex) { return SharpLua.Lua.lua_getmetatable(luaState, objIndex); } //[DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] public static int lua_equal(SharpLua.Lua.LuaState luaState, int index1, int index2) { return SharpLua.Lua.lua_equal(luaState, index1, index2); } //[DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] public static void lua_pushvalue(SharpLua.Lua.LuaState luaState, int index) { SharpLua.Lua.lua_pushvalue(luaState, index); } //[DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] public static void lua_replace(SharpLua.Lua.LuaState luaState, int index) { SharpLua.Lua.lua_replace(luaState, index); } //[DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] public static int lua_gettop(SharpLua.Lua.LuaState luaState) { return SharpLua.Lua.lua_gettop(luaState); } //[DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] public static LuaTypes lua_type(SharpLua.Lua.LuaState luaState, int index) { return (LuaTypes)SharpLua.Lua.lua_type(luaState, index); } public static bool lua_isnil(SharpLua.Lua.LuaState luaState, int index) { return (LuaDLL.lua_type(luaState, index) == LuaTypes.LUA_TNIL); } //[DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] public static bool lua_isnumber(SharpLua.Lua.LuaState luaState, int index) { return (LuaDLL.lua_type(luaState, index) == LuaTypes.LUA_TNUMBER); } public static bool lua_isboolean(SharpLua.Lua.LuaState luaState, int index) { return LuaDLL.lua_type(luaState, index) == LuaTypes.LUA_TBOOLEAN; } //[DllImport(LUALIBDLL,CallingConvention=CallingConvention.Cdecl)] public static int luaL_ref(SharpLua.Lua.LuaState luaState, int registryIndex) { return SharpLua.Lua.luaL_ref(luaState, registryIndex); } public static int lua_ref(SharpLua.Lua.LuaState luaState, int lockRef) { if (lockRef != 0) { return LuaDLL.luaL_ref(luaState, LuaIndexes.LUA_REGISTRYINDEX); } else return 0; } //[DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] public static void lua_rawgeti(SharpLua.Lua.LuaState luaState, int tableIndex, int index) { SharpLua.Lua.lua_rawgeti(luaState, tableIndex, index); } //[DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] public static void lua_rawseti(SharpLua.Lua.LuaState luaState, int tableIndex, int index) { SharpLua.Lua.lua_rawseti(luaState, tableIndex, index); } //[DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] public static object lua_newuserdata(SharpLua.Lua.LuaState luaState, int size) { return SharpLua.Lua.lua_newuserdata(luaState, (uint)size); } //[DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] public static object lua_touserdata(SharpLua.Lua.LuaState luaState, int index) { return SharpLua.Lua.lua_touserdata(luaState, index); } public static void lua_getref(SharpLua.Lua.LuaState luaState, int reference) { LuaDLL.lua_rawgeti(luaState, LuaIndexes.LUA_REGISTRYINDEX, reference); } //[DllImport(LUALIBDLL,CallingConvention=CallingConvention.Cdecl)] public static void luaL_unref(SharpLua.Lua.LuaState luaState, int registryIndex, int reference) { SharpLua.Lua.luaL_unref(luaState, registryIndex, reference); } public static void lua_unref(SharpLua.Lua.LuaState luaState, int reference) { LuaDLL.luaL_unref(luaState, LuaIndexes.LUA_REGISTRYINDEX, reference); } //[DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] public static bool lua_isstring(SharpLua.Lua.LuaState luaState, int index) { return SharpLua.Lua.lua_isstring(luaState, index) != 0; } //[DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] public static bool lua_iscfunction(SharpLua.Lua.LuaState luaState, int index) { return SharpLua.Lua.lua_iscfunction(luaState, index); } //[DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] public static void lua_pushnil(SharpLua.Lua.LuaState luaState) { SharpLua.Lua.lua_pushnil(luaState); } //[DllImport(STUBDLL,CallingConvention=CallingConvention.Cdecl)] public static void lua_pushstdcallcfunction(SharpLua.Lua.LuaState luaState, SharpLua.Lua.lua_CFunction function) { SharpLua.Lua.lua_pushcfunction(luaState, function); } //[DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] public static void lua_call(SharpLua.Lua.LuaState luaState, int nArgs, int nResults) { SharpLua.Lua.lua_call(luaState, nArgs, nResults); } //[DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] public static int lua_pcall(SharpLua.Lua.LuaState luaState, int nArgs, int nResults, int errfunc) { return SharpLua.Lua.lua_pcall(luaState, nArgs, nResults, errfunc); } //[DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] //not wrapped //public static extern int lua_rawcall(SharpLua.Lua.lua_State luaState, int nArgs, int nResults) //[DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] public static SharpLua.Lua.lua_CFunction lua_tocfunction(SharpLua.Lua.LuaState luaState, int index) { return SharpLua.Lua.lua_tocfunction(luaState, index); } //[DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] public static double lua_tonumber(SharpLua.Lua.LuaState luaState, int index) { return SharpLua.Lua.lua_tonumber(luaState, index); } //[DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] public static bool lua_toboolean(SharpLua.Lua.LuaState luaState, int index) { return SharpLua.Lua.lua_toboolean(luaState, index) != 0; } //[DllImport(LUADLL,CallingConvention = CallingConvention.Cdecl)] //unwrapped //public static IntPtr lua_tolstring(SharpLua.Lua.lua_State luaState, int index, out int strLen) public static string lua_tostring(SharpLua.Lua.LuaState luaState, int index) { #if true // FIXME use the same format string as lua i.e. LUA_NUMBER_FMT LuaTypes t = lua_type(luaState, index); if (t == LuaTypes.LUA_TNUMBER) return string.Format("{0}", lua_tonumber(luaState, index)); else if (t == LuaTypes.LUA_TSTRING) { uint strlen; return SharpLua.Lua.lua_tolstring(luaState, index, out strlen).ToString(); } else if (t == LuaTypes.LUA_TNIL) return null; // treat lua nulls to as C# nulls else return "0"; // Because luaV_tostring does this #else size_t strlen; // Note! This method will _change_ the representation of the object on the stack to a string. // We do not want this behavior so we do the conversion ourselves const char *str = Lua.lua_tolstring(luaState, index, &strlen); if (str) return Marshal::PtrToStringAnsi(IntPtr((char *) str), strlen); else return nullptr; // treat lua nulls to as C# nulls #endif } //[DllImport(LUADLL, CallingConvention = CallingConvention.Cdecl)] public static Lua.lua_CFunction lua_atpanic(SharpLua.Lua.LuaState luaState, SharpLua.Lua.lua_CFunction panicf) { return SharpLua.Lua.lua_atpanic(luaState, panicf); } //[DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] public static void lua_pushnumber(SharpLua.Lua.LuaState luaState, double number) { SharpLua.Lua.lua_pushnumber(luaState, number); } //[DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] public static void lua_pushboolean(SharpLua.Lua.LuaState luaState, bool value) { SharpLua.Lua.lua_pushboolean(luaState, value ? 1 : 0); } //[DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] // Not yet wrapped //public static void lua_pushlstring(SharpLua.Lua.lua_State luaState, string str, int size); //[DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] public static void lua_pushstring(SharpLua.Lua.LuaState luaState, string str) { SharpLua.Lua.lua_pushstring(luaState, str); } //[DllImport(LUALIBDLL,CallingConvention=CallingConvention.Cdecl)] public static int luaL_newmetatable(SharpLua.Lua.LuaState luaState, string meta) { return SharpLua.Lua.luaL_newmetatable(luaState, meta); } // steffenj: BEGIN Lua 5.1.1 API change (luaL_getmetatable is now a macro using lua_getfield) //[DllImport(LUADLL, CallingConvention = CallingConvention.Cdecl)] public static void lua_getfield(SharpLua.Lua.LuaState luaState, int stackPos, string meta) { SharpLua.Lua.lua_getfield(luaState, stackPos, meta); } public static void luaL_getmetatable(SharpLua.Lua.LuaState luaState, string meta) { LuaDLL.lua_getfield(luaState, LuaIndexes.LUA_REGISTRYINDEX, meta); } // steffenj: END Lua 5.1.1 API change (luaL_getmetatable is now a macro using lua_getfield) //[DllImport(LUALIBDLL, CallingConvention = CallingConvention.Cdecl)] public static Object luaL_checkudata(SharpLua.Lua.LuaState luaState, int stackPos, string meta) { return SharpLua.Lua.luaL_checkudata(luaState, stackPos, meta); } //[DllImport(LUALIBDLL,CallingConvention=CallingConvention.Cdecl)] public static bool luaL_getmetafield(SharpLua.Lua.LuaState luaState, int stackPos, string field) { return SharpLua.Lua.luaL_getmetafield(luaState, stackPos, field) != 0; } //[DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] //not yet wrapped //public static extern int lua_load(SharpLua.Lua.lua_State luaState, LuaChunkReader chunkReader, ref ReaderInfo data, string chunkName); //[DllImport(LUALIBDLL,CallingConvention=CallingConvention.Cdecl)] public static int luaL_loadbuffer(SharpLua.Lua.LuaState luaState, string buff, int size, string name) { return SharpLua.Lua.luaL_loadbuffer(luaState, buff, (uint)size, name); } public static int luaL_loadbuffer(SharpLua.Lua.LuaState luaState, char[] buff, int size, string name) { return SharpLua.Lua.luaL_loadbuffer(luaState, buff, (uint)size, name); } //[DllImport(LUALIBDLL,CallingConvention=CallingConvention.Cdecl)] public static int luaL_loadfile(SharpLua.Lua.LuaState luaState, string filename) { return SharpLua.Lua.luaL_loadfile(luaState, filename); } //[DllImport(STUBDLL,CallingConvention=CallingConvention.Cdecl)] public static bool luaL_checkmetatable(SharpLua.Lua.LuaState luaState, int index) { bool retVal = false; if (lua_getmetatable(luaState, index) != 0) { lua_pushlightuserdata(luaState, luanet_gettag()); lua_rawget(luaState, -2); retVal = !lua_isnil(luaState, -1); lua_settop(luaState, -3); } return retVal; } //[DllImport(STUBDLL,CallingConvention=CallingConvention.Cdecl)] public static void luanet_newudata(SharpLua.Lua.LuaState luaState, int val) { byte[] userdata = lua_newuserdata(luaState, sizeof(int)) as byte[]; intToFourBytes(val, userdata); } //[DllImport(STUBDLL,CallingConvention=CallingConvention.Cdecl)] public static int luanet_tonetobject(SharpLua.Lua.LuaState luaState, int index) { byte[] udata; if (lua_type(luaState, index) == LuaTypes.LUA_TUSERDATA) { if (luaL_checkmetatable(luaState, index)) { udata = lua_touserdata(luaState, index) as byte[]; if (udata != null) { return fourBytesToInt(udata); } } udata = checkudata_raw(luaState, index, "luaNet_class") as byte[]; if (udata != null) return fourBytesToInt(udata); udata = checkudata_raw(luaState, index, "luaNet_searchbase") as byte[]; if (udata != null) return fourBytesToInt(udata); udata = checkudata_raw(luaState, index, "luaNet_function") as byte[]; if (udata != null) return fourBytesToInt(udata); } return -1; } //[DllImport(STUBDLL,CallingConvention=CallingConvention.Cdecl)] public static int luanet_rawnetobj(SharpLua.Lua.LuaState luaState, int obj) { byte[] bytes = lua_touserdata(luaState, obj) as byte[]; return fourBytesToInt(bytes); } //[DllImport(STUBDLL,CallingConvention=CallingConvention.Cdecl)] public static int luanet_checkudata(SharpLua.Lua.LuaState luaState, int ud, string tname) { object udata = checkudata_raw(luaState, ud, tname); if (udata != null) return fourBytesToInt(udata as byte[]); return -1; } //[DllImport(LUADLL, CallingConvention = CallingConvention.Cdecl)] public static bool lua_checkstack(SharpLua.Lua.LuaState luaState, int extra) { return SharpLua.Lua.lua_checkstack(luaState, extra) != 0; } //[DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] public static int lua_next(SharpLua.Lua.LuaState luaState, int index) { return SharpLua.Lua.lua_next(luaState, index); } //[DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] public static void lua_pushlightuserdata(SharpLua.Lua.LuaState luaState, Object udata) { SharpLua.Lua.lua_pushlightuserdata(luaState, udata); } //[DllImport(STUBDLL,CallingConvention=CallingConvention.Cdecl)] public static Object luanet_gettag() { return "_TAG_"; //0; } //[DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] public static void luaL_where(SharpLua.Lua.LuaState luaState, int level) { SharpLua.Lua.luaL_where(luaState, level); } private static int fourBytesToInt(byte[] bytes) { return bytes[0] + (bytes[1] << 8) + (bytes[2] << 16) + (bytes[3] << 24); } private static void intToFourBytes(int val, byte[] bytes) { // gfoot: is this really a good idea? bytes[0] = (byte)val; bytes[1] = (byte)(val >> 8); bytes[2] = (byte)(val >> 16); bytes[3] = (byte)(val >> 24); } private static object checkudata_raw(SharpLua.Lua.LuaState L, int ud, string tname) { object p = SharpLua.Lua.lua_touserdata(L, ud); if (p != null) { /* value is a userdata? */ if (SharpLua.Lua.lua_getmetatable(L, ud) != 0) { bool isEqual; /* does it have a metatable? */ SharpLua.Lua.lua_getfield(L, (int)LuaIndexes.LUA_REGISTRYINDEX, tname); /* get correct metatable */ isEqual = SharpLua.Lua.lua_rawequal(L, -1, -2) != 0; // NASTY - we need our own version of the lua_pop macro // lua_pop(L, 2); /* remove both metatables */ SharpLua.Lua.lua_settop(L, -(2) - 1); if (isEqual) /* does it have the correct mt? */ return p; } } return null; } } }
43.447334
144
0.645715
[ "MIT" ]
Stevie-O/SharpLua
SharpLua/Interfacing/LuaDLL.cs
33,411
C#
namespace Aigamo.Saruhashi { public interface IFont { } }
8.857143
27
0.709677
[ "MIT" ]
ycanardeau/Saruhashi
Aigamo.Saruhashi/IFont.cs
64
C#
using System; using System.Linq; using Vexe.Runtime.Extensions; using Vexe.Runtime.Helpers; using Vexe.Runtime.Types; using Vexe.Editor.Types; namespace Vexe.Editor.Drawers { public class ShowTypeDrawer : AttributeDrawer<Type, ShowTypeAttribute> { private Type[] availableTypes; private string[] typesNames; private int index; protected override void Initialize() { if (attribute.FromThisGo) { availableTypes = gameObject.GetAllComponents() .Select(x => x.GetType()) .Where(x => x.IsA(attribute.baseType)) .ToArray(); } else { availableTypes = ReflectionHelper.GetAllTypesOf(attribute.baseType) .Where(t => !t.IsAbstract) .ToArray(); } typesNames = availableTypes.Select(t => t.Name) .ToArray(); } public override void OnGUI() { index = member.IsNull() ? -1 : availableTypes.IndexOf(memberValue); var selection = gui.Popup(displayText, index, typesNames); { if (index != selection) { memberValue = availableTypes[selection]; index = selection; } } } } }
22.836735
71
0.644325
[ "MIT" ]
DanielPotter/VFW
Assets/Plugins/Editor/Vexe/Drawers/User/ShowTypeDrawer.cs
1,121
C#
using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Data; namespace WeatherApp.ViewModel { public class BoolToRainConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { bool isRaining = (bool)value; if (isRaining) { return "Currently raining"; } return "Currently not raining"; } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { throw new NotImplementedException(); } } }
26
103
0.640584
[ "MIT" ]
michalovsky/weather-app
src/ViewModel/BoolToRainConverter.cs
756
C#
using System.Collections.Generic; using System.Runtime.Serialization; namespace LMPlatform.UI.Services.Modules.Materials { [DataContract] public class DocumentsViewData { private List<Models.Materials> dc; public DocumentsViewData(Models.Materials materials) { Id = materials.Id; Name = materials.Name; Text = materials.Text; } public DocumentsViewData(List<Models.Materials> dc) { // TODO: Complete member initialization this.dc = dc; } [DataMember] public int Id { get; set; } [DataMember] public string Name { get; set; } [DataMember] public string Text { get; set; } } }
22.969697
60
0.583113
[ "MIT" ]
Kharlap-Sergey/CATSdesigner
api/LMPlatform.UI/Services/Modules/Materials/DocumentsViewData.cs
760
C#
// // -------------------------------------------------------------------------------------------------------------------- // // <copyright file="ILambdaCheck.cs" company=""> // // Copyright 2013 Cyrille DUPUYDAUBY, Thomas PIERRAIN // // 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. // // </copyright> // // -------------------------------------------------------------------------------------------------------------------- // ReSharper disable once CheckNamespace namespace NFluent { using System; /// <summary> /// Provides lambda/action specific check. /// </summary> [Obsolete("", true)] public interface ILambdaCheck : IMustImplementIForkableCheckWithoutDisplayingItsMethodsWithinIntelliSense { /// <summary> /// Checks that the execution time is below a specified threshold. /// </summary> /// <param name="threshold">The threshold.</param> /// <param name="timeUnit">The time unit of the given threshold.</param> /// <returns> /// A check link. /// </returns> /// <exception cref="FluentCheckException">Execution was strictly above limit.</exception> ICheckLink<ILambdaCheck> LastsLessThan(double threshold, TimeUnit timeUnit); /// <summary> /// Check that the code does not throw an exception. /// </summary> /// <returns> /// A check link. /// </returns> /// <exception cref="FluentCheckException">The code raised an exception.</exception> ICheckLink<ILambdaCheck> DoesNotThrow(); /// <summary> /// Checks that the code did throw an exception of a specified type. /// </summary> /// <typeparam name="T">And.Expected exception type.</typeparam> /// <returns> /// A check link. /// </returns> /// <exception cref="FluentCheckException">The code did not raised an exception of the specified type, or did not raised an exception at all.</exception> ILambdaExceptionCheck<T> Throws<T>() where T : Exception; /// <summary> /// Checks that the code did throw an exception of any type. /// </summary> /// <returns> /// A check link. /// </returns> /// <exception cref="FluentCheckException">The code did not raised an exception of any type.</exception> ILambdaExceptionCheck<Exception> ThrowsAny(); } }
45.939394
162
0.566953
[ "Apache-2.0" ]
draptik/NFluent
src/NFluent/Obsolete/ILambdaCheck.cs
2,969
C#
using JetBrains.ReSharper.FeaturesTestFramework.Intentions; using JetBrains.ReSharper.Plugins.Unity.Feature.Services.QuickFixes; using NUnit.Framework; namespace JetBrains.ReSharper.Plugins.Unity.Tests.Intentions.QuickFixes { [TestUnity] public class RedundantSerializeFieldAttributeQuickFixAvailabilityTests : QuickFixAvailabilityTestBase { protected override string RelativeTestDataPath=> @"Intentions\QuickFixes\RedundantSerializeFieldAttribute\Availability"; [Test] public void Test01() { DoNamedTest(); } } [TestUnity] public class RedundantSerializeFieldAttributeQuickFixRemoveTests : CSharpQuickFixTestBase<RedundantAttributeDeadCodeQuickFix> { protected override string RelativeTestDataPath=> @"Intentions\QuickFixes\RedundantSerializeFieldAttribute"; [Test] public void Test01() { DoNamedTest(); } } }
39.954545
129
0.788396
[ "Apache-2.0" ]
mfilippov/resharper-unity
resharper/test/src/Intentions/QuickFixes/RedundantSerializeFieldAttributeQuickFixTests.cs
881
C#
using System; using System.Threading.Tasks; using Autofac; using AutoMapper; using LifeManager.Data.Entities; using LifeManager.Data.Repositories; using LifeManager.Models; using LifeManager.PeopleService.Services; using Microsoft.Extensions.Configuration; using MongoDB.Driver; using NServiceBus; namespace LifeManager.PeopleService { class Program { static async Task Main(string[] args) { var builder = new ConfigurationBuilder() .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true); var config = builder.Build(); var endpointConfiguration = new EndpointConfiguration("LifeManager.People"); endpointConfiguration.UseTransport<RabbitMQTransport>().ConnectionString(config["RabbitMqConnectionString"]) .UseConventionalRoutingTopology(); endpointConfiguration.UsePersistence<InMemoryPersistence>(); endpointConfiguration.EnableInstallers(); endpointConfiguration.LicensePath(config["NServiceBusLicense"]); Mapper.Initialize(cfg => { cfg.CreateMap<Person, PersonModel>().ReverseMap(); }); var diBuilder = new ContainerBuilder(); var mongoClient = new MongoClient(); var database = mongoClient.GetDatabase("people"); diBuilder.RegisterInstance(database); diBuilder.RegisterType<PeopleRepository>() .As<IPeopleRepository>() .SingleInstance(); diBuilder.RegisterType<Services.PeopleService>() .As<IPeopleService>() .SingleInstance(); var container = diBuilder.Build(); endpointConfiguration.UseContainer<AutofacBuilder>(customizations => { customizations.ExistingLifetimeScope(container); }); try { var endpointInstance = await Endpoint.Start(endpointConfiguration) .ConfigureAwait(false); } catch (Exception e) { Console.WriteLine(e); } string input = string.Empty; while (input != "EXIT") { input = Console.ReadLine(); } } } }
33.014085
120
0.599403
[ "MIT" ]
SamuelCox/LifeManager
LifeManager/LifeManager.PeopleService/Program.cs
2,346
C#
// -------------------------------------------------------------------------------------------------- // <auto-generated> // This code was generated by a tool. // Script: ./scripts/cldr-relative-time.csx // // Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. // </auto-generated> // -------------------------------------------------------------------------------------------------- using Alrev.Intl.Abstractions; using Alrev.Intl.Abstractions.PluralRules; using Alrev.Intl.Abstractions.RelativeTime; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Globalization; namespace Alrev.Intl.RelativeTime.Resources { /// <summary> /// Relative Time Units resource for 'English (Falkland Islands)' [en-fk] /// </summary> public class EnFkRelativeTimeResource : ReadOnlyDictionary<RelativeTimeUnitValues, IReadOnlyDictionary<IntlStyleValues, IRelativeTimeResource>>, IRelativeTimeUnitsResource { /// <summary> /// The <see cref="IIntlResource"/> culture /// </summary> public CultureInfo Culture { get; } /// <summary> /// The class constructor /// </summary> public EnFkRelativeTimeResource() : base(new Dictionary<RelativeTimeUnitValues, IReadOnlyDictionary<IntlStyleValues, IRelativeTimeResource>>() { { RelativeTimeUnitValues.Year, new ReadOnlyDictionary<IntlStyleValues, IRelativeTimeResource>( new Dictionary<IntlStyleValues, IRelativeTimeResource>() { { IntlStyleValues.Long, new RelativeTimeResource( new Dictionary<int, string> { { -1, "last year" }, { 0, "this year" }, { 1, "next year" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} year ago" }, { PluralRulesValues.Other, "{0} years ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} year" }, { PluralRulesValues.Other, "in {0} years" } }) }, { IntlStyleValues.Short, new RelativeTimeResource( new Dictionary<int, string> { { -1, "last yr" }, { 0, "this yr" }, { 1, "next yr" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} yr ago" }, { PluralRulesValues.Other, "{0} yr ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} yr" }, { PluralRulesValues.Other, "in {0} yr" } }) }, { IntlStyleValues.Narrow, new RelativeTimeResource( new Dictionary<int, string> { { -1, "last yr" }, { 0, "this yr" }, { 1, "next yr" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} yr ago" }, { PluralRulesValues.Other, "{0} yr ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} yr" }, { PluralRulesValues.Other, "in {0} yr" } }) } }) }, { RelativeTimeUnitValues.Quarter, new ReadOnlyDictionary<IntlStyleValues, IRelativeTimeResource>( new Dictionary<IntlStyleValues, IRelativeTimeResource>() { { IntlStyleValues.Long, new RelativeTimeResource( new Dictionary<int, string> { { -1, "last quarter" }, { 0, "this quarter" }, { 1, "next quarter" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} quarter ago" }, { PluralRulesValues.Other, "{0} quarters ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} quarter" }, { PluralRulesValues.Other, "in {0} quarters" } }) }, { IntlStyleValues.Short, new RelativeTimeResource( new Dictionary<int, string> { { -1, "last qtr." }, { 0, "this qtr." }, { 1, "next qtr." } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} qtr ago" }, { PluralRulesValues.Other, "{0} qtr ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} qtr" }, { PluralRulesValues.Other, "in {0} qtr" } }) }, { IntlStyleValues.Narrow, new RelativeTimeResource( new Dictionary<int, string> { { -1, "last qtr." }, { 0, "this qtr." }, { 1, "next qtr." } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} qtr ago" }, { PluralRulesValues.Other, "{0} qtr ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} qtr" }, { PluralRulesValues.Other, "in {0} qtr" } }) } }) }, { RelativeTimeUnitValues.Month, new ReadOnlyDictionary<IntlStyleValues, IRelativeTimeResource>( new Dictionary<IntlStyleValues, IRelativeTimeResource>() { { IntlStyleValues.Long, new RelativeTimeResource( new Dictionary<int, string> { { -1, "last month" }, { 0, "this month" }, { 1, "next month" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} month ago" }, { PluralRulesValues.Other, "{0} months ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} month" }, { PluralRulesValues.Other, "in {0} months" } }) }, { IntlStyleValues.Short, new RelativeTimeResource( new Dictionary<int, string> { { -1, "last mo" }, { 0, "this mo" }, { 1, "next mo" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} mo ago" }, { PluralRulesValues.Other, "{0} mo ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} mo" }, { PluralRulesValues.Other, "in {0} mo" } }) }, { IntlStyleValues.Narrow, new RelativeTimeResource( new Dictionary<int, string> { { -1, "last mo" }, { 0, "this mo" }, { 1, "next mo" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} mo ago" }, { PluralRulesValues.Other, "{0} mo ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} mo" }, { PluralRulesValues.Other, "in {0} mo" } }) } }) }, { RelativeTimeUnitValues.Week, new ReadOnlyDictionary<IntlStyleValues, IRelativeTimeResource>( new Dictionary<IntlStyleValues, IRelativeTimeResource>() { { IntlStyleValues.Long, new RelativeTimeResource( new Dictionary<int, string> { { -1, "last week" }, { 0, "this week" }, { 1, "next week" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} week ago" }, { PluralRulesValues.Other, "{0} weeks ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} week" }, { PluralRulesValues.Other, "in {0} weeks" } }) }, { IntlStyleValues.Short, new RelativeTimeResource( new Dictionary<int, string> { { -1, "last wk" }, { 0, "this wk" }, { 1, "next wk" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} wk ago" }, { PluralRulesValues.Other, "{0} wk ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} wk" }, { PluralRulesValues.Other, "in {0} wk" } }) }, { IntlStyleValues.Narrow, new RelativeTimeResource( new Dictionary<int, string> { { -1, "last wk" }, { 0, "this wk" }, { 1, "next wk" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} wk ago" }, { PluralRulesValues.Other, "{0} wk ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} wk" }, { PluralRulesValues.Other, "in {0} wk" } }) } }) }, { RelativeTimeUnitValues.Day, new ReadOnlyDictionary<IntlStyleValues, IRelativeTimeResource>( new Dictionary<IntlStyleValues, IRelativeTimeResource>() { { IntlStyleValues.Long, new RelativeTimeResource( new Dictionary<int, string> { { -1, "yesterday" }, { 0, "today" }, { 1, "tomorrow" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} day ago" }, { PluralRulesValues.Other, "{0} days ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} day" }, { PluralRulesValues.Other, "in {0} days" } }) }, { IntlStyleValues.Short, new RelativeTimeResource( new Dictionary<int, string> { { -1, "yesterday" }, { 0, "today" }, { 1, "tomorrow" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} day ago" }, { PluralRulesValues.Other, "{0} days ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} day" }, { PluralRulesValues.Other, "in {0} days" } }) }, { IntlStyleValues.Narrow, new RelativeTimeResource( new Dictionary<int, string> { { -1, "yesterday" }, { 0, "today" }, { 1, "tomorrow" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} day ago" }, { PluralRulesValues.Other, "{0} days ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} day" }, { PluralRulesValues.Other, "in {0} days" } }) } }) }, { RelativeTimeUnitValues.Sunday, new ReadOnlyDictionary<IntlStyleValues, IRelativeTimeResource>( new Dictionary<IntlStyleValues, IRelativeTimeResource>() { { IntlStyleValues.Long, new RelativeTimeResource( new Dictionary<int, string> { { -1, "last Sunday" }, { 0, "this Sunday" }, { 1, "next Sunday" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} Sunday ago" }, { PluralRulesValues.Other, "{0} Sundays ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} Sunday" }, { PluralRulesValues.Other, "in {0} Sundays" } }) }, { IntlStyleValues.Short, new RelativeTimeResource( new Dictionary<int, string> { { -1, "last Sun" }, { 0, "this Sun" }, { 1, "next Sun" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} Sun ago" }, { PluralRulesValues.Other, "{0} Sun ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} Sun" }, { PluralRulesValues.Other, "in {0} Sun" } }) }, { IntlStyleValues.Narrow, new RelativeTimeResource( new Dictionary<int, string> { { -1, "last Su" }, { 0, "this Su" }, { 1, "next Su" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} Su ago" }, { PluralRulesValues.Other, "{0} Su ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} Su" }, { PluralRulesValues.Other, "in {0} Su" } }) } }) }, { RelativeTimeUnitValues.Monday, new ReadOnlyDictionary<IntlStyleValues, IRelativeTimeResource>( new Dictionary<IntlStyleValues, IRelativeTimeResource>() { { IntlStyleValues.Long, new RelativeTimeResource( new Dictionary<int, string> { { -1, "last Monday" }, { 0, "this Monday" }, { 1, "next Monday" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} Monday ago" }, { PluralRulesValues.Other, "{0} Mondays ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} Monday" }, { PluralRulesValues.Other, "in {0} Mondays" } }) }, { IntlStyleValues.Short, new RelativeTimeResource( new Dictionary<int, string> { { -1, "last Mon" }, { 0, "this Mon" }, { 1, "next Mon" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} Mon ago" }, { PluralRulesValues.Other, "{0} Mon ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} Mon" }, { PluralRulesValues.Other, "in {0} Mon" } }) }, { IntlStyleValues.Narrow, new RelativeTimeResource( new Dictionary<int, string> { { -1, "last M" }, { 0, "this M" }, { 1, "next M" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} M ago" }, { PluralRulesValues.Other, "{0} M ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} M" }, { PluralRulesValues.Other, "in {0} M" } }) } }) }, { RelativeTimeUnitValues.Tuesday, new ReadOnlyDictionary<IntlStyleValues, IRelativeTimeResource>( new Dictionary<IntlStyleValues, IRelativeTimeResource>() { { IntlStyleValues.Long, new RelativeTimeResource( new Dictionary<int, string> { { -1, "last Tuesday" }, { 0, "this Tuesday" }, { 1, "next Tuesday" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} Tuesday ago" }, { PluralRulesValues.Other, "{0} Tuesdays ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} Tuesday" }, { PluralRulesValues.Other, "in {0} Tuesdays" } }) }, { IntlStyleValues.Short, new RelativeTimeResource( new Dictionary<int, string> { { -1, "last Tue" }, { 0, "this Tue" }, { 1, "next Tue" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} Tue ago" }, { PluralRulesValues.Other, "{0} Tue ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} Tue" }, { PluralRulesValues.Other, "in {0} Tue" } }) }, { IntlStyleValues.Narrow, new RelativeTimeResource( new Dictionary<int, string> { { -1, "last Tu" }, { 0, "this Tu" }, { 1, "next Tu" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} Tu ago" }, { PluralRulesValues.Other, "{0} Tu ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} Tu" }, { PluralRulesValues.Other, "in {0} Tu" } }) } }) }, { RelativeTimeUnitValues.Wednesday, new ReadOnlyDictionary<IntlStyleValues, IRelativeTimeResource>( new Dictionary<IntlStyleValues, IRelativeTimeResource>() { { IntlStyleValues.Long, new RelativeTimeResource( new Dictionary<int, string> { { -1, "last Wednesday" }, { 0, "this Wednesday" }, { 1, "next Wednesday" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} Wednesday ago" }, { PluralRulesValues.Other, "{0} Wednesdays ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} Wednesday" }, { PluralRulesValues.Other, "in {0} Wednesdays" } }) }, { IntlStyleValues.Short, new RelativeTimeResource( new Dictionary<int, string> { { -1, "last Wed" }, { 0, "this Wed" }, { 1, "next Wed" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} Wed ago" }, { PluralRulesValues.Other, "{0} Wed ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} Wed" }, { PluralRulesValues.Other, "in {0} Wed" } }) }, { IntlStyleValues.Narrow, new RelativeTimeResource( new Dictionary<int, string> { { -1, "last W" }, { 0, "this W" }, { 1, "next W" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} W ago" }, { PluralRulesValues.Other, "{0} W ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} W" }, { PluralRulesValues.Other, "in {0} W" } }) } }) }, { RelativeTimeUnitValues.Thursday, new ReadOnlyDictionary<IntlStyleValues, IRelativeTimeResource>( new Dictionary<IntlStyleValues, IRelativeTimeResource>() { { IntlStyleValues.Long, new RelativeTimeResource( new Dictionary<int, string> { { -1, "last Thursday" }, { 0, "this Thursday" }, { 1, "next Thursday" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} Thursday ago" }, { PluralRulesValues.Other, "{0} Thursdays ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} Thursday" }, { PluralRulesValues.Other, "in {0} Thursdays" } }) }, { IntlStyleValues.Short, new RelativeTimeResource( new Dictionary<int, string> { { -1, "last Thu" }, { 0, "this Thu" }, { 1, "next Thu" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} Thu ago" }, { PluralRulesValues.Other, "{0} Thu ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} Thu" }, { PluralRulesValues.Other, "in {0} Thu" } }) }, { IntlStyleValues.Narrow, new RelativeTimeResource( new Dictionary<int, string> { { -1, "last Th" }, { 0, "this Th" }, { 1, "next Th" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} Th ago" }, { PluralRulesValues.Other, "{0} Th ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} Th" }, { PluralRulesValues.Other, "in {0} Th" } }) } }) }, { RelativeTimeUnitValues.Friday, new ReadOnlyDictionary<IntlStyleValues, IRelativeTimeResource>( new Dictionary<IntlStyleValues, IRelativeTimeResource>() { { IntlStyleValues.Long, new RelativeTimeResource( new Dictionary<int, string> { { -1, "last Friday" }, { 0, "this Friday" }, { 1, "next Friday" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} Friday ago" }, { PluralRulesValues.Other, "{0} Fridays ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} Friday" }, { PluralRulesValues.Other, "in {0} Fridays" } }) }, { IntlStyleValues.Short, new RelativeTimeResource( new Dictionary<int, string> { { -1, "last Fri" }, { 0, "this Fri" }, { 1, "next Fri" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} Fri ago" }, { PluralRulesValues.Other, "{0} Fri ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} Fri" }, { PluralRulesValues.Other, "in {0} Fri" } }) }, { IntlStyleValues.Narrow, new RelativeTimeResource( new Dictionary<int, string> { { -1, "last F" }, { 0, "this F" }, { 1, "next F" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} F ago" }, { PluralRulesValues.Other, "{0} F ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} F" }, { PluralRulesValues.Other, "in {0} F" } }) } }) }, { RelativeTimeUnitValues.Saturday, new ReadOnlyDictionary<IntlStyleValues, IRelativeTimeResource>( new Dictionary<IntlStyleValues, IRelativeTimeResource>() { { IntlStyleValues.Long, new RelativeTimeResource( new Dictionary<int, string> { { -1, "last Saturday" }, { 0, "this Saturday" }, { 1, "next Saturday" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} Saturday ago" }, { PluralRulesValues.Other, "{0} Saturdays ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} Saturday" }, { PluralRulesValues.Other, "in {0} Saturdays" } }) }, { IntlStyleValues.Short, new RelativeTimeResource( new Dictionary<int, string> { { -1, "last Sat" }, { 0, "this Sat" }, { 1, "next Sat" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} Sat ago" }, { PluralRulesValues.Other, "{0} Sat ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} Sat" }, { PluralRulesValues.Other, "in {0} Sat" } }) }, { IntlStyleValues.Narrow, new RelativeTimeResource( new Dictionary<int, string> { { -1, "last Sa" }, { 0, "this Sa" }, { 1, "next Sa" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} Sa ago" }, { PluralRulesValues.Other, "{0} Sa ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} Sa" }, { PluralRulesValues.Other, "in {0} Sa" } }) } }) }, { RelativeTimeUnitValues.Hour, new ReadOnlyDictionary<IntlStyleValues, IRelativeTimeResource>( new Dictionary<IntlStyleValues, IRelativeTimeResource>() { { IntlStyleValues.Long, new RelativeTimeResource( new Dictionary<int, string> { { 0, "this hour" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} hour ago" }, { PluralRulesValues.Other, "{0} hours ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} hour" }, { PluralRulesValues.Other, "in {0} hours" } }) }, { IntlStyleValues.Short, new RelativeTimeResource( new Dictionary<int, string> { { 0, "this hour" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} hr ago" }, { PluralRulesValues.Other, "{0} hr ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} hr" }, { PluralRulesValues.Other, "in {0} hr" } }) }, { IntlStyleValues.Narrow, new RelativeTimeResource( new Dictionary<int, string> { { 0, "this hour" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} hr ago" }, { PluralRulesValues.Other, "{0} hr ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} hr" }, { PluralRulesValues.Other, "in {0} hr" } }) } }) }, { RelativeTimeUnitValues.Minute, new ReadOnlyDictionary<IntlStyleValues, IRelativeTimeResource>( new Dictionary<IntlStyleValues, IRelativeTimeResource>() { { IntlStyleValues.Long, new RelativeTimeResource( new Dictionary<int, string> { { 0, "this minute" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} minute ago" }, { PluralRulesValues.Other, "{0} minutes ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} minute" }, { PluralRulesValues.Other, "in {0} minutes" } }) }, { IntlStyleValues.Short, new RelativeTimeResource( new Dictionary<int, string> { { 0, "this minute" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} min ago" }, { PluralRulesValues.Other, "{0} min ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} min" }, { PluralRulesValues.Other, "in {0} min" } }) }, { IntlStyleValues.Narrow, new RelativeTimeResource( new Dictionary<int, string> { { 0, "this minute" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} min ago" }, { PluralRulesValues.Other, "{0} min ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} min" }, { PluralRulesValues.Other, "in {0} min" } }) } }) }, { RelativeTimeUnitValues.Second, new ReadOnlyDictionary<IntlStyleValues, IRelativeTimeResource>( new Dictionary<IntlStyleValues, IRelativeTimeResource>() { { IntlStyleValues.Long, new RelativeTimeResource( new Dictionary<int, string> { { 0, "now" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} second ago" }, { PluralRulesValues.Other, "{0} seconds ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} second" }, { PluralRulesValues.Other, "in {0} seconds" } }) }, { IntlStyleValues.Short, new RelativeTimeResource( new Dictionary<int, string> { { 0, "now" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} sec ago" }, { PluralRulesValues.Other, "{0} sec ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} sec" }, { PluralRulesValues.Other, "in {0} sec" } }) }, { IntlStyleValues.Narrow, new RelativeTimeResource( new Dictionary<int, string> { { 0, "now" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "{0} sec ago" }, { PluralRulesValues.Other, "{0} sec ago" } }, new Dictionary<PluralRulesValues, string> { { PluralRulesValues.One, "in {0} sec" }, { PluralRulesValues.Other, "in {0} sec" } }) } }) } }) { this.Culture = new CultureInfo("en-fk"); } } }
54.488017
172
0.605078
[ "MIT" ]
pointnet/alrev-intl
packages/Alrev.Intl.RelativeTime/Resources/EnFkRelativeTimeResource.intl.cs
25,010
C#
using System.Threading.Tasks; namespace DisCore.Shared.Commands { public interface ICommand { Task<string> Usage(); Task<string> Summary(); } }
14.461538
34
0.585106
[ "Apache-2.0" ]
AgentBlackout/DisCore
DisCore.Shared/Commands/ICommand.cs
190
C#
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using Microsoft.Diagnostics.Runtime.Utilities; using System; using System.Collections.Generic; using System.IO; using System.Runtime.InteropServices; using System.Text; using System.Threading; namespace Microsoft.Diagnostics.Runtime { internal unsafe class DumpDataReader : IDataReader, IDisposable { private string _fileName; private DumpReader _dumpReader; private List<ModuleInfo> _modules; private string _generatedPath; public DumpDataReader(string file) { if (!File.Exists(file)) throw new FileNotFoundException(file); if (Path.GetExtension(file).ToLower() == ".cab") file = ExtractCab(file); _fileName = file; _dumpReader = new DumpReader(file); } ~DumpDataReader() { Dispose(); } private string ExtractCab(string file) { _generatedPath = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString()); while (Directory.Exists(_generatedPath)) _generatedPath = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString()); Directory.CreateDirectory(_generatedPath); CommandOptions options = new CommandOptions() { NoThrow = true, NoWindow = true }; Command cmd = Command.Run(string.Format("expand -F:*dmp {0} {1}", file, _generatedPath), options); bool error = false; if (cmd.ExitCode != 0) { error = true; } else { file = null; foreach (var item in Directory.GetFiles(_generatedPath)) { string ext = Path.GetExtension(item).ToLower(); if (ext == ".dll" || ext == ".pdb" || ext == ".exe") continue; file = item; break; } error |= file == null; } if (error) { Dispose(); throw new IOException("Failed to extract a crash dump from " + file); } return file; } public bool IsMinidump { get { return _dumpReader.IsMinidump; } } public override string ToString() { return _fileName; } public void Close() { _dumpReader.Dispose(); Dispose(); } public void Dispose() { if (_generatedPath != null) { try { foreach (var file in Directory.GetFiles(_generatedPath)) File.Delete(file); Directory.Delete(_generatedPath, false); } catch { } _generatedPath = null; } } public void Flush() { _modules = null; } public Architecture GetArchitecture() { switch (_dumpReader.ProcessorArchitecture) { case ProcessorArchitecture.PROCESSOR_ARCHITECTURE_ARM: return Architecture.Arm; case ProcessorArchitecture.PROCESSOR_ARCHITECTURE_AMD64: return Architecture.Amd64; case ProcessorArchitecture.PROCESSOR_ARCHITECTURE_INTEL: return Architecture.X86; } return Architecture.Unknown; } public uint GetPointerSize() { switch (GetArchitecture()) { case Architecture.Amd64: return 8; default: return 4; } } public IList<ModuleInfo> EnumerateModules() { if (_modules != null) return _modules; List<ModuleInfo> modules = new List<ModuleInfo>(); foreach (var mod in _dumpReader.EnumerateModules()) { var raw = mod.Raw; ModuleInfo module = new ModuleInfo(this) { FileName = mod.FullName, ImageBase = raw.BaseOfImage, FileSize = raw.SizeOfImage, TimeStamp = raw.TimeDateStamp, Version = GetVersionInfo(mod) }; modules.Add(module); } _modules = modules; return modules; } public void GetVersionInfo(ulong baseAddress, out VersionInfo version) { DumpModule module = _dumpReader.TryLookupModuleByAddress(baseAddress); version = (module != null) ? GetVersionInfo(module) : new VersionInfo(); } private static VersionInfo GetVersionInfo(DumpModule module) { var raw = module.Raw; var version = raw.VersionInfo; int minor = (ushort)version.dwFileVersionMS; int major = (ushort)(version.dwFileVersionMS >> 16); int patch = (ushort)version.dwFileVersionLS; int rev = (ushort)(version.dwFileVersionLS >> 16); var versionInfo = new VersionInfo(major, minor, rev, patch); return versionInfo; } private byte[] _ptrBuffer = new byte[IntPtr.Size]; public ulong ReadPointerUnsafe(ulong addr) { return _dumpReader.ReadPointerUnsafe(addr); } public uint ReadDwordUnsafe(ulong addr) { return _dumpReader.ReadDwordUnsafe(addr); } public bool ReadMemory(ulong address, byte[] buffer, int bytesRequested, out int bytesRead) { bytesRead = _dumpReader.ReadPartialMemory(address, buffer, bytesRequested); return bytesRead > 0; } public bool ReadMemory(ulong address, IntPtr buffer, int bytesRequested, out int bytesRead) { bytesRead = (int)_dumpReader.ReadPartialMemory(address, buffer, (uint)bytesRequested); return bytesRead > 0; } public ulong GetThreadTeb(uint id) { var thread = _dumpReader.GetThread((int)id); if (thread == null) return 0; return thread.Teb; } public IEnumerable<uint> EnumerateAllThreads() { foreach (var dumpThread in _dumpReader.EnumerateThreads()) yield return (uint)dumpThread.ThreadId; } public bool VirtualQuery(ulong addr, out VirtualQueryData vq) { return _dumpReader.VirtualQuery(addr, out vq); } public bool GetThreadContext(uint id, uint contextFlags, uint contextSize, IntPtr context) { var thread = _dumpReader.GetThread((int)id); if (thread == null) return false; thread.GetThreadContext(context, (int)contextSize); return true; } public bool GetThreadContext(uint threadID, uint contextFlags, uint contextSize, byte[] context) { throw new NotImplementedException(); } } }
28.254682
110
0.521474
[ "MIT" ]
chrisnas/clrmd
src/Microsoft.Diagnostics.Runtime/dumpdatareader.cs
7,546
C#
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using UnityEngine; using UnityEngine.UI; namespace XLGraphicsUI.Elements.EffectsUI { public class MotionBlurUI : UIsingleton<MotionBlurUI> { public XLToggle toggle; //public GameObject container; public XLSlider intensity; public XLSlider sampleCount; public XLSlider maximumVelocity; public XLSlider minimumVelocity; public XLSlider depthComparisonExtent; public XLSlider cameraRotationVelocityClamp; public XLToggle cameraMotionBlur; } }
25.041667
55
0.78203
[ "MIT" ]
Amatobahn/Skater-XL-mods
XLGraphicsUI/Elements/EffectsUI/MotionBlurUI.cs
578
C#
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Linq.Expressions; using System.Security.Cryptography.X509Certificates; using System.Xml; using Nuke.Common; using Nuke.Common.Execution; using Nuke.Common.IO; using Nuke.Common.ProjectModel; using Nuke.Common.Tooling; using Nuke.Common.Tools.DotNet; using Nuke.Common.Tools.GitVersion; using Nuke.Common.Tools.SignTool; using Nuke.Common.Utilities.Collections; using Nuke.Common; using Nuke.Common; using Nuke.Common.IO; using Nuke.Common.Tools.DotNet; using Nuke.Common.IO; using Nuke.Common.Tools.MSBuild; using Nuke.Common.Tools.SignTool; using Nuke.Common.Tools.NuGet; using Nuke.Common.IO; using Nuke.Common.IO; using Nuke.Common; using static Nuke.Common.ControlFlow; using static Nuke.Common.Logger; using static Nuke.Common.IO.CompressionTasks; using static Nuke.Common.Tools.DotNet.DotNetTasks; using static Nuke.Common.IO.FileSystemTasks; using static Nuke.Common.Tools.MSBuild.MSBuildTasks; using static Nuke.Common.Tools.SignTool.SignToolTasks; using static Nuke.Common.Tools.NuGet.NuGetTasks; using static Nuke.Common.IO.TextTasks; using static Nuke.Common.IO.XmlTasks; using static Nuke.Common.EnvironmentInfo; class Build : NukeBuild { Target A => _ => _ .Executes(() => { System.Console.WriteLine(); }); Target B => _ => _ .DependsOn(A) .DependentFor(A) .Executes(() => { System.Console.WriteLine(); }); Target C_1 => _ => _ .DependsOn(B) .OnlyWhenStatic(() => staticCondition) .OnlyWhenDynamic(() => dynamicCondition) .ProceedAfterFailure(); }
26.919355
54
0.736369
[ "MIT" ]
ABergBN/nuke
source/Nuke.GlobalTool.Tests/cake-scripts/targets.verified.cs
1,669
C#
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. using System; using System.Reflection; using System.Resources; 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("GoogleTestAdapter.VsPackage.TAfGT")] [assembly: AssemblyDescription("Visual Studio options integration of the Test Adapter for Google Test.")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Microsoft")] [assembly: AssemblyProduct("GoogleTestAdapter.VsPackage.TAfGT")] [assembly: AssemblyCopyright("Copyright © 2017")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] [assembly: CLSCompliant(false)] [assembly: NeutralResourcesLanguage("en-US")] // 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 Revision and Build Numbers // by using the '*' as shown below: [assembly: AssemblyVersion("0.1.0.0")] [assembly: AssemblyFileVersion("0.1.0.0")]
33.475
105
0.760269
[ "MIT" ]
Microsoft/TestAdapterForGoogleTest
GoogleTestAdapter/VsPackage.TAfGT/Properties/AssemblyInfo.cs
1,342
C#
using System; using UnityEngine; public class EllipsePointsChecker : global::PointsChecker { public EllipsePointsChecker(global::UnityEngine.Transform transform, bool hasOffset, float radius1, float radius2) : base(transform, hasOffset) { this.radiusA = radius1; this.radiusB = radius2; } public override bool GetPoint(global::UnityEngine.Vector3 startPoint, float angle, float dist, out global::UnityEngine.Vector3 pos) { float f = angle * 0.0174532924f; float num = this.radiusA * this.radiusB / global::UnityEngine.Mathf.Sqrt(global::UnityEngine.Mathf.Pow(this.radiusB, 2f) + global::UnityEngine.Mathf.Pow(this.radiusA, 2f) * global::UnityEngine.Mathf.Pow(global::UnityEngine.Mathf.Tan(f), 2f)); num *= (((0f > angle || angle >= 90f) && (270f >= angle || angle > 360f)) ? 1f : -1f); float z = global::UnityEngine.Mathf.Tan(f) * num; global::UnityEngine.Vector3 vector = new global::UnityEngine.Vector3(num, 0f, z); vector = this.zoneTransform.rotation * -vector; dist = vector.magnitude; vector /= dist; pos = global::UnityEngine.Vector3.zero; if (!global::PandoraUtils.SendCapsule(startPoint, vector, 0.6f, 1.5f, dist, 0.5f)) { pos = startPoint + vector * dist; return true; } return false; } private float radiusA; private float radiusB; }
36.971429
244
0.716383
[ "CC0-1.0" ]
FreyaFreed/mordheim
Assembly-CSharp/EllipsePointsChecker.cs
1,296
C#
using System.Linq; using ConfigureAppIo.Demos.SayHello.Common; using FluentAssertions; using Xunit; namespace ConfigureAppIo.Demos.SayHello.UnitTests.Common.LanguageTests { public class PersonValidationTests { [Fact] public void SupportedLanguagesEnumerableReturnsExpecetedList() { var expectedResults = new[] {SupportedLanguages.English, SupportedLanguages.French}; SupportedLanguages.AsEnumerable().ToArray().Should().BeEquivalentTo(expectedResults); } } }
27.842105
97
0.725898
[ "MIT" ]
configureappio/SeparateStartup
Common/ConfigureAppIo.Demos.SayHello.UnitTests.Common/LanguageTests/SupportedLanguagesTests.cs
529
C#
using PeopleViewer.Presentation; using System; using System.Windows; namespace PeopleViewer { public partial class MainWindow : Window { PeopleViewModel ViewModel { get; } public MainWindow(PeopleViewModel viewModel) { InitializeComponent(); ViewModel = viewModel ?? throw new ArgumentNullException("'viewModel' parameter cannot be null"); DataContext = ViewModel; } private async void RefreshButton_Click(object sender, RoutedEventArgs e) { await ViewModel.RefreshPeople(); } private void ClearButton_Click(object sender, RoutedEventArgs e) { ViewModel.ClearPeople(); } } }
25.241379
109
0.631148
[ "MIT" ]
jeremybytes/di-dotnet-workshop
MainDemo-Extended/PeopleViewer/MainWindow.xaml.cs
734
C#
// <auto-generated> // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for // license information. // // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. // </auto-generated> namespace Microsoft.Azure.Management.PolicyInsights.Models { using Newtonsoft.Json; using System.Linq; /// <summary> /// Error response. /// </summary> public partial class ErrorResponse { /// <summary> /// Initializes a new instance of the ErrorResponse class. /// </summary> public ErrorResponse() { CustomInit(); } /// <summary> /// Initializes a new instance of the ErrorResponse class. /// </summary> /// <param name="error">The error details.</param> public ErrorResponse(ErrorDefinition error = default(ErrorDefinition)) { Error = error; CustomInit(); } /// <summary> /// An initialization method that performs custom operations like setting defaults /// </summary> partial void CustomInit(); /// <summary> /// Gets or sets the error details. /// </summary> [JsonProperty(PropertyName = "error")] public ErrorDefinition Error { get; set; } } }
27.942308
90
0.602202
[ "MIT" ]
0rland0Wats0n/azure-sdk-for-net
sdk/policyinsights/Microsoft.Azure.Management.PolicyInsights/src/Generated/Models/ErrorResponse.cs
1,453
C#
//----------------------------------------------------------------------------- // Copyright : (c) Chris Moore, 2020 // License : MIT //----------------------------------------------------------------------------- namespace Z0 { using System; using System.Runtime.CompilerServices; using static Root; partial struct ProjectModel { public readonly struct Version : ITextual { public uint Data {get;} [MethodImpl(Inline)] public Version(byte a, byte b = 0, byte c = 0, byte d = 0) => Data = 0; [MethodImpl(Inline)] public Version(uint data) => Data = data; public byte A => (byte)Data; public byte B => (byte)(Data >> 8); public byte C => (byte)(Data >> 16); public byte D => (byte)(Data >> 24); public string Format() { var dst = A.ToString(); if(B != 0) dst += ("." + B.ToString()); if(C != 0) dst += ("." + C.ToString()); if(D != 0) dst += ("." + D.ToString()); return dst; } public override string ToString() => Format(); } } }
24.258621
79
0.347548
[ "BSD-3-Clause" ]
0xCM/z0
src/gen/src/projects/model/parts/Version.cs
1,407
C#
#region License /* Copyright © 2014-2021 European Support Limited 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 using Ginger.Plugin.Platform.Web.Actions; using System; using System.Collections.Generic; using System.Text; namespace Ginger.Plugin.Platform.Web.Elements { /// <summary> /// Exposes the Funationality of ComboBox /// </summary> public interface IComboBox: IGingerWebElement, ISelect { /// <summary> /// Sets Value for for a combobox /// </summary> /// <param name="Value"></param> void SetValue(string Value); } }
28.578947
73
0.720074
[ "Apache-2.0" ]
Ginger-Automation/Ginger
Ginger/GingerPluginPlatforms/Platform/Web/Elements/IComboBox.cs
1,087
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 Aliyun.Acs.Core; using System.Collections.Generic; namespace Aliyun.Acs.EHPC.Model.V20180412 { public class StartClusterResponse : AcsResponse { private string requestId; public string RequestId { get { return requestId; } set { requestId = value; } } } }
27.512195
63
0.718085
[ "Apache-2.0" ]
brightness007/unofficial-aliyun-openapi-net-sdk
aliyun-net-sdk-ehpc/EHPC/Model/V20180412/StartClusterResponse.cs
1,128
C#
using System; using System.Linq; using csmacnz.Coveralls.Parsers; using Xunit; namespace csmacnz.Coveralls.Tests.Chutzpah { public class ChutzpahJsonParserTests { [Fact] public void GenerateSourceFiles_CorrectCoverage() { var fileContents = Reports.ChutzpahSample.ChutzpahExample.Split(new[] { Environment.NewLine }, StringSplitOptions.None); var results = ChutzpahJsonParser.GenerateSourceFiles(fileContents); Assert.Equal(2, results.Count); Assert.Equal(@"D:\path\to\file\file.ts", results.First().FullPath); Assert.Equal(36, results.First().Coverage[0]); Assert.Equal(10, results.First().Coverage[5]); Assert.Null(results.First().Coverage[7]); } } }
31.4
132
0.654777
[ "MIT" ]
CraigChamberlain/coveralls.net
src/csmacnz.Coveralls.Tests/Chutzpah/ChutzpahJsonParserTests.cs
787
C#
using System; using System.Collections.Generic; using System.Text; namespace Common { public static class Extensions { public static Result<TIn, TOut> Apply<TIn, TOut>( this Result<TIn, TOut> result, Func<Result<TIn, TOut>, Result<TIn, TOut>> func) => result.IsOk ? func(result) : result; // Validation is a variation of Apply public static Result<TIn, TOut> Validate<TIn, TOut>( this Result<TIn, TOut> result, Func<TIn, string> func) { var message = func(result.Input); if (string.IsNullOrEmpty(message)) { // all is well, just return result return result; } return result.WithAnotherValidationIssue(message); } public static Result<TIn, TOut> BindOutput<TIn, TOut>(this Result<TIn, TOut> result, Func<TIn, TOut> func) { try { return result.WithOutput(func(result.Input)); } catch (Exception ex) { return result.WithAnotherException(ex); } } } }
26.777778
114
0.523651
[ "MIT" ]
KathleenDollard/sample-class-tracker2
ClassTracker2/Common/Extensions.cs
1,207
C#
using System; //Morghan Kiverago 3/27/2019 // Tshit Design using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace Unit_2_project_4 { /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); for (int x = 0; x < 8; x++) { for (int y = 0; y < 8; y++) { Ellipse e = new Ellipse(); e.Height = 100; e.Width = 100; if (x % 2 == 1 && y % 2 == 0 || x % 2 == 0 && y % 2 == 1) { e.Fill = Brushes.Red; } else { e.Fill = Brushes.Blue; } canvas.Children.Add(e); Canvas.SetTop(e, x * 100); Canvas.SetLeft(e, y * 100); } } for (int x = 0; x < 8; x++) { for (int y = 0; y < 8; y++) { Rectangle r = new Rectangle(); r.Height = 50; r.Width = 50; if (x % 2 == 1 && y % 2 == 0 || x % 2 == 0 && y % 2 == 1) { r.Fill = Brushes.Pink; } else { r.Fill = Brushes.Purple; } canvas.Children.Add(r); Canvas.SetTop(r, x * 100); Canvas.SetLeft(r, y * 100); } } } } }
28
78
0.378942
[ "MIT" ]
CaptainMorghan/Unit-2-Projects
MainWindow.xaml.cs
2,158
C#
using HarmonyLib; using RimWorld; using Verse; using Verse.AI; namespace QuickFast { [StaticConstructorOnStartup] public static class H_MiscPatches { static H_MiscPatches() { } [HarmonyPatch(typeof(Pawn_PathFollower), nameof(Pawn_PathFollower.StartPath))] public static class H_StartPath { public static void Postfix(Pawn_PathFollower __instance) { if (__instance.pawn.Drafted) { return; } PatherCheck(__instance.pawn, __instance.nextCell, __instance.lastCell, true); } } [HarmonyPatch(typeof(Pawn_PathFollower), nameof(Pawn_PathFollower.TryEnterNextPathCell))] [StaticConstructorOnStartup] public static class H_TryEnterNextPathCell { public static void Postfix(Pawn_PathFollower __instance) { if (__instance.pawn.Drafted) { return; } //foreach (var ap in __instance.pawn.drawer.renderer.graphics.apparelGraphics) //{ // Log.Warning(ap.sourceApparel.def.apparel.LastLayer + ""); //} PatherCheck(__instance.pawn, __instance.nextCell, __instance.lastCell, false); } } [HarmonyPatch(typeof(Pawn_DraftController))] [HarmonyPatch(nameof(Pawn_DraftController.Drafted), MethodType.Setter)] public static class H_Drafted { public static void Postfix(Pawn_DraftController __instance) { if (__instance.draftedInt) { SwitchOutdoors(__instance.pawn); } else { if (Settings.DraftedHidingMode || __instance.pawn.Position.UsesOutdoorTemperature(__instance.pawn.MapHeld) is false) { SwitchIndoors(__instance.pawn); } else { SwitchOutdoors(__instance.pawn); } } } } [TweakValue("DubsApparelTweaks")] public static bool TrackApparelHiding = false; public static void SwitchIndoors(Pawn pawn) { if (UnityData.IsInMainThread is false) return; pawn.apparel.Notify_ApparelChanged(); var graphics = pawn?.Drawer?.renderer?.graphics; if (graphics == null) return; if ((Settings.DraftedHidingMode && pawn.Drafted is false) || (Settings.DraftedHidingMode is false && !pawn.Position.UsesOutdoorTemperature(pawn.Map))) { bool Matchstick(ApparelGraphicRecord x) { foreach (var apparelLayerDef in x.sourceApparel.def.apparel.layers) { if (Settings.LayerVis.Contains(apparelLayerDef.defName)) { if (Settings.hatfilter.Contains(x.sourceApparel.def)) { return false; } return true; } } return false; } graphics.apparelGraphics.RemoveAll(Matchstick); if (TrackApparelHiding) { Log.Warning("Apparel hiding check for " + pawn.LabelCap); } //if (Settings.HideJackets is true) //{ // if (graphics.apparelGraphics.Any(x => x.sourceApparel.def.apparel.LastLayer == ApparelLayerDefOf.OnSkin)) // { // graphics.apparelGraphics.RemoveAll(x => x.sourceApparel.def.apparel.LastLayer == ApparelLayerDefOf.Shell); // } //} //if (Settings.HideEquipment is true) //{ // graphics.apparelGraphics.RemoveAll(x => x.sourceApparel.def.apparel.LastLayer == ApparelLayerDefOf.Belt); //} //if (Settings.HideHats is true) //{ // bool Match(ApparelGraphicRecord x) // { // return x.sourceApparel.def.apparel.layers.Any(z => z == Overhead) && !Settings.hatfilter.Contains(x.sourceApparel.def); // } // var hidden = graphics.apparelGraphics.RemoveAll(Match); //} } } public static void SwitchOutdoors(Pawn pawn) { if (UnityData.IsInMainThread is false) return; pawn.apparel.Notify_ApparelChanged(); var graphics = pawn?.Drawer?.renderer?.graphics; if (graphics == null) { return; } //pawn.apparel.Notify_ApparelChanged(); graphics.ClearCache(); graphics.apparelGraphics.Clear(); using (var enumerator = graphics.pawn.apparel.wornApparel.InnerListForReading.GetEnumerator()) { while (enumerator.MoveNext()) { if (ApparelGraphicRecordGetter.TryGetGraphicApparel(enumerator.Current, graphics.pawn.story.bodyType, out var item)) { graphics.apparelGraphics.Add(item); } } } //PortraitsCache.SetDirty(pawn); } public static void PatherCheck(Pawn pawn, IntVec3 nextCell, IntVec3 lastCell, bool startpath) { // if (Settings.HideHats is false && Settings.HideJackets is false) return true; if (UnityData.IsInMainThread is false) return; // if (!pawn.RaceProps.Humanlike) return false; var map = pawn.MapHeld; if (map == null) return; if (pawn.NonHumanlikeOrWildMan()) return; if (!pawn.IsColonist) return; if (!nextCell.InBounds(map) || !lastCell.InBounds(map)) return; if (startpath) { if (Settings.DraftedHidingMode) { if (pawn.Drafted) { SwitchOutdoors(pawn); } else { SwitchIndoors(pawn); } } else { if (nextCell.UsesOutdoorTemperature(pawn.MapHeld)) { SwitchOutdoors(pawn); } else { SwitchIndoors(pawn); } } return; } if (Settings.DraftedHidingMode) { return; } //if (nextCell.UsesOutdoorTemperature(pawn.MapHeld)) //{ // SwitchOutdoors(pawn); //} //else //{ // SwitchIndoors(pawn); //} var last = lastCell.UsesOutdoorTemperature(map); var next = nextCell.UsesOutdoorTemperature(map); if (last && !next) { SwitchIndoors(pawn); } if (!last && next) { SwitchOutdoors(pawn); } } [HarmonyPatch(typeof(JobDriver_Wear), nameof(JobDriver_Wear.Notify_Starting))] public static class h_JobDriver_Wear { public static void Postfix(JobDriver_Wear __instance) { if (Settings.ChangeEquipSpeed) { if (Settings.FlatRate) { __instance.duration = Settings.EquipModTicks; } else { __instance.duration = (int)(__instance.duration * Settings.EquipModPC); } } } } [HarmonyPatch(typeof(JobDriver_RemoveApparel), nameof(JobDriver_RemoveApparel.Notify_Starting))] public static class h_JobDriver_RemoveApparel { public static void Postfix(JobDriver_Wear __instance) { if (Settings.ChangeEquipSpeed) { if (Settings.FlatRate) { __instance.duration = Settings.EquipModTicks; } else { __instance.duration = (int)(__instance.duration * Settings.EquipModPC); } } } } } }
22.59364
153
0.662027
[ "MIT" ]
Dubwise56/QuickFast
Source/H_MiscPatches.cs
6,396
C#
// *** WARNING: this file was generated by the Pulumi SDK Generator. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; namespace Pulumi.AzureNative.Web.V20160801.Outputs { /// <summary> /// Http logs configuration. /// </summary> [OutputType] public sealed class HttpLogsConfigResponse { /// <summary> /// Http logs to azure blob storage configuration. /// </summary> public readonly Outputs.AzureBlobStorageHttpLogsConfigResponse? AzureBlobStorage; /// <summary> /// Http logs to file system configuration. /// </summary> public readonly Outputs.FileSystemHttpLogsConfigResponse? FileSystem; [OutputConstructor] private HttpLogsConfigResponse( Outputs.AzureBlobStorageHttpLogsConfigResponse? azureBlobStorage, Outputs.FileSystemHttpLogsConfigResponse? fileSystem) { AzureBlobStorage = azureBlobStorage; FileSystem = fileSystem; } } }
30.512821
89
0.672269
[ "Apache-2.0" ]
polivbr/pulumi-azure-native
sdk/dotnet/Web/V20160801/Outputs/HttpLogsConfigResponse.cs
1,190
C#
using Microsoft.AspNetCore.Authorization; namespace FoodVault.Api.Configuration.Authorization { public class HasPermissionAuthorizationRequirement : IAuthorizationRequirement { } }
21.666667
82
0.805128
[ "MIT" ]
chrishanzlik/FoodVault
src/Api/Configuration/Authorization/HasPermissionAuthorizationRequirement.cs
197
C#
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Brightcove.MediaFramework.Brightcove.Configuration; using Sitecore; using Sitecore.MediaFramework.Pipelines.MediaGenerateMarkup; namespace Brightcove.MediaFramework.Brightcove.Pipelines.MediaGenerateMarkup { public class GetPlaybackEvents : Sitecore.MediaFramework.Pipelines.MediaGenerateMarkup.GetPlaybackEvents { protected override bool CheckState(MediaGenerateMarkupArgs args) { if (args.MarkupType == MarkupType.Html && Settings.AnalyticsEnabled) return !Context.PageMode.IsExperienceEditorEditing; else return false; } } }
32.347826
108
0.744624
[ "Apache-2.0" ]
KRazguliaev/pmi.sitecore.9.1.brightcove
src/Brightcove.MediaFramework.Brightcove/Pipelines/MediaGenerateMarkup/GetPlaybackEvents.cs
746
C#
// <auto-generated> // automatically generated by the FlatBuffers compiler, do not modify // </auto-generated> [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public enum Character : byte { NONE = 0, MuLan = 1, Rapunzel = 2, Belle = 3, BookFan = 4, Other = 5, Unused = 6, }; public class CharacterUnion { public Character Type { get; set; } public object Value { get; set; } public CharacterUnion() { this.Type = Character.NONE; this.Value = null; } public T As<T>() where T : class { return this.Value as T; } public AttackerT AsMuLan() { return this.As<AttackerT>(); } public static CharacterUnion FromMuLan(AttackerT _mulan) { return new CharacterUnion{ Type = Character.MuLan, Value = _mulan }; } public RapunzelT AsRapunzel() { return this.As<RapunzelT>(); } public static CharacterUnion FromRapunzel(RapunzelT _rapunzel) { return new CharacterUnion{ Type = Character.Rapunzel, Value = _rapunzel }; } public BookReaderT AsBelle() { return this.As<BookReaderT>(); } public static CharacterUnion FromBelle(BookReaderT _belle) { return new CharacterUnion{ Type = Character.Belle, Value = _belle }; } public BookReaderT AsBookFan() { return this.As<BookReaderT>(); } public static CharacterUnion FromBookFan(BookReaderT _bookfan) { return new CharacterUnion{ Type = Character.BookFan, Value = _bookfan }; } public string AsOther() { return this.As<string>(); } public static CharacterUnion FromOther(string _other) { return new CharacterUnion{ Type = Character.Other, Value = _other }; } public string AsUnused() { return this.As<string>(); } public static CharacterUnion FromUnused(string _unused) { return new CharacterUnion{ Type = Character.Unused, Value = _unused }; } public static int Pack(FlatBuffers.FlatBufferBuilder builder, CharacterUnion _o) { switch (_o.Type) { default: return 0; case Character.MuLan: return Attacker.Pack(builder, _o.AsMuLan()).Value; case Character.Rapunzel: return Rapunzel.Pack(builder, _o.AsRapunzel()).Value; case Character.Belle: return BookReader.Pack(builder, _o.AsBelle()).Value; case Character.BookFan: return BookReader.Pack(builder, _o.AsBookFan()).Value; case Character.Other: return builder.CreateString(_o.AsOther()).Value; case Character.Unused: return builder.CreateString(_o.AsUnused()).Value; } } } public class CharacterUnion_JsonConverter : Newtonsoft.Json.JsonConverter { public override bool CanConvert(System.Type objectType) { return objectType == typeof(CharacterUnion) || objectType == typeof(System.Collections.Generic.List<CharacterUnion>); } public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer) { var _olist = value as System.Collections.Generic.List<CharacterUnion>; if (_olist != null) { writer.WriteStartArray(); foreach (var _o in _olist) { this.WriteJson(writer, _o, serializer); } writer.WriteEndArray(); } else { this.WriteJson(writer, value as CharacterUnion, serializer); } } public void WriteJson(Newtonsoft.Json.JsonWriter writer, CharacterUnion _o, Newtonsoft.Json.JsonSerializer serializer) { if (_o == null) return; serializer.Serialize(writer, _o.Value); } public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer) { var _olist = existingValue as System.Collections.Generic.List<CharacterUnion>; if (_olist != null) { for (var _j = 0; _j < _olist.Count; ++_j) { reader.Read(); _olist[_j] = this.ReadJson(reader, _olist[_j], serializer); } reader.Read(); return _olist; } else { return this.ReadJson(reader, existingValue as CharacterUnion, serializer); } } public CharacterUnion ReadJson(Newtonsoft.Json.JsonReader reader, CharacterUnion _o, Newtonsoft.Json.JsonSerializer serializer) { if (_o == null) return null; switch (_o.Type) { default: break; case Character.MuLan: _o.Value = serializer.Deserialize<AttackerT>(reader); break; case Character.Rapunzel: _o.Value = serializer.Deserialize<RapunzelT>(reader); break; case Character.Belle: _o.Value = serializer.Deserialize<BookReaderT>(reader); break; case Character.BookFan: _o.Value = serializer.Deserialize<BookReaderT>(reader); break; case Character.Other: _o.Value = serializer.Deserialize<string>(reader); break; case Character.Unused: _o.Value = serializer.Deserialize<string>(reader); break; } return _o; } }
47.141414
159
0.720591
[ "Apache-2.0" ]
0gap/flatbuffers
tests/union_vector/Character.cs
4,667
C#
using System.Collections.Generic; using Essensoft.Paylink.Alipay.Response; namespace Essensoft.Paylink.Alipay.Request { /// <summary> /// alipay.open.mini.poi.query /// </summary> public class AlipayOpenMiniPoiQueryRequest : IAlipayRequest<AlipayOpenMiniPoiQueryResponse> { /// <summary> /// 小程序查询POI信息 /// </summary> public string BizContent { get; set; } #region IAlipayRequest Members private bool needEncrypt = false; private string apiVersion = "1.0"; private string terminalType; private string terminalInfo; private string prodCode; private string notifyUrl; private string returnUrl; private AlipayObject bizModel; private Dictionary<string, string> udfParams; //add user-defined text parameters public void SetNeedEncrypt(bool needEncrypt) { this.needEncrypt = needEncrypt; } public bool GetNeedEncrypt() { return needEncrypt; } public void SetNotifyUrl(string notifyUrl) { this.notifyUrl = notifyUrl; } public string GetNotifyUrl() { return notifyUrl; } public void SetReturnUrl(string returnUrl) { this.returnUrl = returnUrl; } public string GetReturnUrl() { return returnUrl; } public void SetTerminalType(string terminalType) { this.terminalType = terminalType; } public string GetTerminalType() { return terminalType; } public void SetTerminalInfo(string terminalInfo) { this.terminalInfo = terminalInfo; } public string GetTerminalInfo() { return terminalInfo; } public void SetProdCode(string prodCode) { this.prodCode = prodCode; } public string GetProdCode() { return prodCode; } public string GetApiName() { return "alipay.open.mini.poi.query"; } public void SetApiVersion(string apiVersion) { this.apiVersion = apiVersion; } public string GetApiVersion() { return apiVersion; } public void PutOtherTextParam(string key, string value) { if (udfParams == null) { udfParams = new Dictionary<string, string>(); } udfParams.Add(key, value); } public IDictionary<string, string> GetParameters() { var parameters = new AlipayDictionary { { "biz_content", BizContent } }; if (udfParams != null) { parameters.AddAll(udfParams); } return parameters; } public AlipayObject GetBizModel() { return bizModel; } public void SetBizModel(AlipayObject bizModel) { this.bizModel = bizModel; } #endregion } }
23.311594
95
0.53497
[ "MIT" ]
Frunck8206/payment
src/Essensoft.Paylink.Alipay/Request/AlipayOpenMiniPoiQueryRequest.cs
3,233
C#
using AutoMapper; using MAVN.Service.Campaign.Profiles; using Xunit; namespace MAVN.Service.Campaign.Tests { public class AutoMapperProfileTests { [Fact] public void Mapping_Configuration_Is_Correct() { // arrange var mockMapper = new MapperConfiguration(cfg => { cfg.AddProfile(new ServiceProfile()); }); var mapper = mockMapper.CreateMapper(); // act mapper.ConfigurationProvider.AssertConfigurationIsValid(); // assert Assert.True(true); } } }
21.555556
103
0.603093
[ "MIT" ]
IliyanIlievPH/MAVN.Service.Campaign
tests/MAVN.Service.Campaign.Tests/AutoMapperProfileTests.cs
582
C#
using System; using System.Threading.Tasks; using Android.Graphics.Drawables; using Android.Views; using Android.Widget; using Microsoft.Maui.Graphics; using AButton = AndroidX.AppCompat.Widget.AppCompatButton; using ATextAlignment = Android.Views.TextAlignment; using AView = Android.Views.View; namespace Microsoft.Maui.Handlers { public partial class SwipeItemMenuItemHandler : ElementHandler<ISwipeItemMenuItem, AView> { protected override void ConnectHandler(AView platformView) { base.ConnectHandler(platformView); PlatformView.ViewAttachedToWindow += OnViewAttachedToWindow; } void OnViewAttachedToWindow(object? sender, AView.ViewAttachedToWindowEventArgs e) { UpdateSize(); } protected override void DisconnectHandler(AView platformView) { base.DisconnectHandler(platformView); platformView.ViewAttachedToWindow -= OnViewAttachedToWindow; } public static void MapTextColor(ISwipeItemMenuItemHandler handler, ITextStyle view) { (handler.PlatformView as TextView)?.UpdateTextColor(view); } public static void MapCharacterSpacing(ISwipeItemMenuItemHandler handler, ITextStyle view) { (handler.PlatformView as TextView)?.UpdateCharacterSpacing(view); } public static void MapFont(ISwipeItemMenuItemHandler handler, ITextStyle view) { var fontManager = handler.GetRequiredService<IFontManager>(); (handler.PlatformView as TextView)?.UpdateFont(view, fontManager); } public static void MapText(ISwipeItemMenuItemHandler handler, ISwipeItemMenuItem view) { (handler.PlatformView as TextView)?.UpdateTextPlainText(view); if (handler is SwipeItemMenuItemHandler platformHandler) platformHandler.UpdateSize(); } public static void MapBackground(ISwipeItemMenuItemHandler handler, ISwipeItemMenuItem view) { handler.PlatformView.UpdateBackground(handler.VirtualView.Background); var textColor = handler.VirtualView.GetTextColor()?.ToPlatform(); if (handler.PlatformView is TextView textView) { if (textColor != null) textView.SetTextColor(textColor.Value); textView.TextAlignment = ATextAlignment.Center; } } public static void MapVisibility(ISwipeItemMenuItemHandler handler, ISwipeItemMenuItem view) { var swipeView = handler.PlatformView.Parent.GetParentOfType<MauiSwipeView>(); if (swipeView != null) swipeView.UpdateIsVisibleSwipeItem(view); handler.PlatformView.Visibility = view.Visibility.ToPlatformVisibility(); } protected override AView CreatePlatformElement() { _ = MauiContext?.Context ?? throw new InvalidOperationException($"{nameof(MauiContext)} should have been set by base class."); var swipeButton = new AButton(MauiContext.Context); swipeButton.SetOnTouchListener(null); if (!string.IsNullOrEmpty(VirtualView.AutomationId)) swipeButton.ContentDescription = VirtualView.AutomationId; return swipeButton; } int GetIconSize() { if (VirtualView is not IImageSourcePart imageSourcePart || imageSourcePart.Source == null) return 0; var mauiSwipeView = PlatformView.Parent.GetParentOfType<MauiSwipeView>(); if (mauiSwipeView == null || MauiContext?.Context == null) return 0; int contentHeight = mauiSwipeView.Height; int contentWidth = (int)MauiContext.Context.ToPixels(SwipeViewExtensions.SwipeItemWidth); return Math.Min(contentHeight, contentWidth) / 2; } void UpdateSize() { var textSize = 0; var contentHeight = 0; var mauiSwipeView = PlatformView.Parent.GetParentOfType<MauiSwipeView>(); if (mauiSwipeView == null) return; contentHeight = mauiSwipeView.Height; if (PlatformView is TextView textView) { textSize = !string.IsNullOrEmpty(textView.Text) ? (int)textView.TextSize : 0; var icons = textView.GetCompoundDrawables(); if (icons.Length > 1 && icons[1] != null) { OnSetImageSource(icons[1]); } } var iconSize = GetIconSize(); var buttonPadding = (contentHeight - (iconSize + textSize + 6)) / 2; PlatformView.SetPadding(0, buttonPadding, 0, buttonPadding); } void OnSetImageSource(Drawable? drawable) { if (drawable != null) { var iconSize = GetIconSize(); var textColor = VirtualView.GetTextColor()?.ToPlatform(); int drawableWidth = drawable.IntrinsicWidth; int drawableHeight = drawable.IntrinsicHeight; if (drawableWidth > drawableHeight) { var iconWidth = iconSize; var iconHeight = drawableHeight * iconWidth / drawableWidth; drawable.SetBounds(0, 0, iconWidth, iconHeight); } else { var iconHeight = iconSize; var iconWidth = drawableWidth * iconHeight / drawableHeight; drawable.SetBounds(0, 0, iconWidth, iconHeight); } if (textColor != null) drawable.SetColorFilter(textColor.Value, FilterMode.SrcAtop); } (PlatformView as TextView)?.SetCompoundDrawables(null, drawable, null, null); } } }
29.42515
129
0.743386
[ "MIT" ]
10088/maui
src/Core/src/Handlers/SwipeItemMenuItem/SwipeItemMenuItemHandler.Android.cs
4,916
C#
// // Copyright (c) 2010-2018 Antmicro // // This file is licensed under the MIT License. // Full license text is available in 'licenses/MIT.txt'. // namespace Antmicro.Renode.Core.USB.HID { public enum Protocol { None = 0, Keyboard = 1, Mouse = 2 } }
19.266667
57
0.605536
[ "MIT" ]
UPBIoT/renode-iot
src/Infrastructure/src/Emulator/Main/Peripherals/USB/HID/Protocol.cs
289
C#
using UnityEngine; using UnityEditor; // Inspector for CharacterDefinitions. [CustomEditor(typeof(CharacterDefinition))] public class CharacterDefinitionInspector : Editor { // Render the inspector view. public override void OnInspectorGUI() { base.OnInspectorGUI(); CharacterDefinition characterDefinition = target as CharacterDefinition; GUIStyle labelStyle = GUI.skin.label; labelStyle.fontStyle = FontStyle.Bold; string totalDamageLabelText = string.Format("Total Damage: {0}", characterDefinition.GetTotalDamage()); EditorGUILayout.LabelField(totalDamageLabelText, labelStyle); } }
28.952381
105
0.794408
[ "MIT" ]
weslo/workshop-workflow-tools-unity
Assets/Scripts/Editor/CharacterInspector.cs
610
C#
// ------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. // ------------------------------------------------------------------------------ // **NOTE** This file was generated by a tool and any changes will be overwritten. // <auto-generated/> // Template Source: EntityRequest.cs.tt namespace Microsoft.Graph { using System; using System.Collections.Generic; using System.IO; using System.Net.Http; using System.Threading; using System.Linq.Expressions; /// <summary> /// The type DeviceComplianceScriptRunSummaryRequest. /// </summary> public partial class DeviceComplianceScriptRunSummaryRequest : BaseRequest, IDeviceComplianceScriptRunSummaryRequest { /// <summary> /// Constructs a new DeviceComplianceScriptRunSummaryRequest. /// </summary> /// <param name="requestUrl">The URL for the built request.</param> /// <param name="client">The <see cref="IBaseClient"/> for handling requests.</param> /// <param name="options">Query and header option name value pairs for the request.</param> public DeviceComplianceScriptRunSummaryRequest( string requestUrl, IBaseClient client, IEnumerable<Option> options) : base(requestUrl, client, options) { } /// <summary> /// Creates the specified DeviceComplianceScriptRunSummary using POST. /// </summary> /// <param name="deviceComplianceScriptRunSummaryToCreate">The DeviceComplianceScriptRunSummary to create.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param> /// <returns>The created DeviceComplianceScriptRunSummary.</returns> public async System.Threading.Tasks.Task<DeviceComplianceScriptRunSummary> CreateAsync(DeviceComplianceScriptRunSummary deviceComplianceScriptRunSummaryToCreate, CancellationToken cancellationToken = default) { this.ContentType = CoreConstants.MimeTypeNames.Application.Json; this.Method = HttpMethods.POST; var newEntity = await this.SendAsync<DeviceComplianceScriptRunSummary>(deviceComplianceScriptRunSummaryToCreate, cancellationToken).ConfigureAwait(false); this.InitializeCollectionProperties(newEntity); return newEntity; } /// <summary> /// Creates the specified DeviceComplianceScriptRunSummary using POST and returns a <see cref="GraphResponse{DeviceComplianceScriptRunSummary}"/> object. /// </summary> /// <param name="deviceComplianceScriptRunSummaryToCreate">The DeviceComplianceScriptRunSummary to create.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param> /// <returns>The <see cref="GraphResponse{DeviceComplianceScriptRunSummary}"/> object of the request.</returns> public System.Threading.Tasks.Task<GraphResponse<DeviceComplianceScriptRunSummary>> CreateResponseAsync(DeviceComplianceScriptRunSummary deviceComplianceScriptRunSummaryToCreate, CancellationToken cancellationToken = default) { this.ContentType = CoreConstants.MimeTypeNames.Application.Json; this.Method = HttpMethods.POST; return this.SendAsyncWithGraphResponse<DeviceComplianceScriptRunSummary>(deviceComplianceScriptRunSummaryToCreate, cancellationToken); } /// <summary> /// Deletes the specified DeviceComplianceScriptRunSummary. /// </summary> /// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param> /// <returns>The task to await.</returns> public async System.Threading.Tasks.Task DeleteAsync(CancellationToken cancellationToken = default) { this.Method = HttpMethods.DELETE; await this.SendAsync<DeviceComplianceScriptRunSummary>(null, cancellationToken).ConfigureAwait(false); } /// <summary> /// Deletes the specified DeviceComplianceScriptRunSummary and returns a <see cref="GraphResponse"/> object. /// </summary> /// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param> /// <returns>The task of <see cref="GraphResponse"/> to await.</returns> public System.Threading.Tasks.Task<GraphResponse> DeleteResponseAsync(CancellationToken cancellationToken = default) { this.Method = HttpMethods.DELETE; return this.SendAsyncWithGraphResponse(null, cancellationToken); } /// <summary> /// Gets the specified DeviceComplianceScriptRunSummary. /// </summary> /// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param> /// <returns>The DeviceComplianceScriptRunSummary.</returns> public async System.Threading.Tasks.Task<DeviceComplianceScriptRunSummary> GetAsync(CancellationToken cancellationToken = default) { this.Method = HttpMethods.GET; var retrievedEntity = await this.SendAsync<DeviceComplianceScriptRunSummary>(null, cancellationToken).ConfigureAwait(false); this.InitializeCollectionProperties(retrievedEntity); return retrievedEntity; } /// <summary> /// Gets the specified DeviceComplianceScriptRunSummary and returns a <see cref="GraphResponse{DeviceComplianceScriptRunSummary}"/> object. /// </summary> /// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param> /// <returns>The <see cref="GraphResponse{DeviceComplianceScriptRunSummary}"/> object of the request.</returns> public System.Threading.Tasks.Task<GraphResponse<DeviceComplianceScriptRunSummary>> GetResponseAsync(CancellationToken cancellationToken = default) { this.Method = HttpMethods.GET; return this.SendAsyncWithGraphResponse<DeviceComplianceScriptRunSummary>(null, cancellationToken); } /// <summary> /// Updates the specified DeviceComplianceScriptRunSummary using PATCH. /// </summary> /// <param name="deviceComplianceScriptRunSummaryToUpdate">The DeviceComplianceScriptRunSummary to update.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param> /// <exception cref="ClientException">Thrown when an object returned in a response is used for updating an object in Microsoft Graph.</exception> /// <returns>The updated DeviceComplianceScriptRunSummary.</returns> public async System.Threading.Tasks.Task<DeviceComplianceScriptRunSummary> UpdateAsync(DeviceComplianceScriptRunSummary deviceComplianceScriptRunSummaryToUpdate, CancellationToken cancellationToken = default) { this.ContentType = CoreConstants.MimeTypeNames.Application.Json; this.Method = HttpMethods.PATCH; var updatedEntity = await this.SendAsync<DeviceComplianceScriptRunSummary>(deviceComplianceScriptRunSummaryToUpdate, cancellationToken).ConfigureAwait(false); this.InitializeCollectionProperties(updatedEntity); return updatedEntity; } /// <summary> /// Updates the specified DeviceComplianceScriptRunSummary using PATCH and returns a <see cref="GraphResponse{DeviceComplianceScriptRunSummary}"/> object. /// </summary> /// <param name="deviceComplianceScriptRunSummaryToUpdate">The DeviceComplianceScriptRunSummary to update.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param> /// <exception cref="ClientException">Thrown when an object returned in a response is used for updating an object in Microsoft Graph.</exception> /// <returns>The <see cref="GraphResponse{DeviceComplianceScriptRunSummary}"/> object of the request.</returns> public System.Threading.Tasks.Task<GraphResponse<DeviceComplianceScriptRunSummary>> UpdateResponseAsync(DeviceComplianceScriptRunSummary deviceComplianceScriptRunSummaryToUpdate, CancellationToken cancellationToken = default) { this.ContentType = CoreConstants.MimeTypeNames.Application.Json; this.Method = HttpMethods.PATCH; return this.SendAsyncWithGraphResponse<DeviceComplianceScriptRunSummary>(deviceComplianceScriptRunSummaryToUpdate, cancellationToken); } /// <summary> /// Updates the specified DeviceComplianceScriptRunSummary using PUT. /// </summary> /// <param name="deviceComplianceScriptRunSummaryToUpdate">The DeviceComplianceScriptRunSummary object to update.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param> /// <returns>The task to await.</returns> public async System.Threading.Tasks.Task<DeviceComplianceScriptRunSummary> PutAsync(DeviceComplianceScriptRunSummary deviceComplianceScriptRunSummaryToUpdate, CancellationToken cancellationToken = default) { this.ContentType = CoreConstants.MimeTypeNames.Application.Json; this.Method = HttpMethods.PUT; var updatedEntity = await this.SendAsync<DeviceComplianceScriptRunSummary>(deviceComplianceScriptRunSummaryToUpdate, cancellationToken).ConfigureAwait(false); this.InitializeCollectionProperties(updatedEntity); return updatedEntity; } /// <summary> /// Updates the specified DeviceComplianceScriptRunSummary using PUT and returns a <see cref="GraphResponse{DeviceComplianceScriptRunSummary}"/> object. /// </summary> /// <param name="deviceComplianceScriptRunSummaryToUpdate">The DeviceComplianceScriptRunSummary object to update.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param> /// <returns>The task to await of <see cref="GraphResponse{DeviceComplianceScriptRunSummary}"/>.</returns> public System.Threading.Tasks.Task<GraphResponse<DeviceComplianceScriptRunSummary>> PutResponseAsync(DeviceComplianceScriptRunSummary deviceComplianceScriptRunSummaryToUpdate, CancellationToken cancellationToken = default) { this.ContentType = CoreConstants.MimeTypeNames.Application.Json; this.Method = HttpMethods.PUT; return this.SendAsyncWithGraphResponse<DeviceComplianceScriptRunSummary>(deviceComplianceScriptRunSummaryToUpdate, cancellationToken); } /// <summary> /// Adds the specified expand value to the request. /// </summary> /// <param name="value">The expand value.</param> /// <returns>The request object to send.</returns> public IDeviceComplianceScriptRunSummaryRequest Expand(string value) { this.QueryOptions.Add(new QueryOption("$expand", value)); return this; } /// <summary> /// Adds the specified expand value to the request. /// </summary> /// <param name="expandExpression">The expression from which to calculate the expand value.</param> /// <returns>The request object to send.</returns> public IDeviceComplianceScriptRunSummaryRequest Expand(Expression<Func<DeviceComplianceScriptRunSummary, object>> expandExpression) { if (expandExpression == null) { throw new ArgumentNullException(nameof(expandExpression)); } string error; string value = ExpressionExtractHelper.ExtractMembers(expandExpression, out error); if (value == null) { throw new ArgumentException(error, nameof(expandExpression)); } else { this.QueryOptions.Add(new QueryOption("$expand", value)); } return this; } /// <summary> /// Adds the specified select value to the request. /// </summary> /// <param name="value">The select value.</param> /// <returns>The request object to send.</returns> public IDeviceComplianceScriptRunSummaryRequest Select(string value) { this.QueryOptions.Add(new QueryOption("$select", value)); return this; } /// <summary> /// Adds the specified select value to the request. /// </summary> /// <param name="selectExpression">The expression from which to calculate the select value.</param> /// <returns>The request object to send.</returns> public IDeviceComplianceScriptRunSummaryRequest Select(Expression<Func<DeviceComplianceScriptRunSummary, object>> selectExpression) { if (selectExpression == null) { throw new ArgumentNullException(nameof(selectExpression)); } string error; string value = ExpressionExtractHelper.ExtractMembers(selectExpression, out error); if (value == null) { throw new ArgumentException(error, nameof(selectExpression)); } else { this.QueryOptions.Add(new QueryOption("$select", value)); } return this; } /// <summary> /// Initializes any collection properties after deserialization, like next requests for paging. /// </summary> /// <param name="deviceComplianceScriptRunSummaryToInitialize">The <see cref="DeviceComplianceScriptRunSummary"/> with the collection properties to initialize.</param> private void InitializeCollectionProperties(DeviceComplianceScriptRunSummary deviceComplianceScriptRunSummaryToInitialize) { } } }
56.38
233
0.683079
[ "MIT" ]
ScriptBox99/msgraph-beta-sdk-dotnet
src/Microsoft.Graph/Generated/requests/DeviceComplianceScriptRunSummaryRequest.cs
14,095
C#
using System; using System.IO; using System.Reflection; using System.Xml; using System.Runtime.Serialization; using System.Linq; namespace MusicBeePlugin { [DataContract] public class Settings { private string FilePath { get; set; } public bool IsDirty { get; private set; } // Don't serialize properties so only user set changes are serialized and not default values #region Settings [DataMember] private string _seperator; public string Seperator { get => _seperator ?? "./-_"; set => SetIfChanged("_seperator", value); } [DataMember] private string _smallImageText; public string SmallImageText { get => _smallImageText ?? "[Volume]%"; set => SetIfChanged("_smallImageText", value); } [DataMember] private string _presenceState; public string PresenceState { get => _presenceState ?? "[TrackTitle]"; set => SetIfChanged("_presenceState", value); } [DataMember] private string _presenceDetails; public string PresenceDetails { get => _presenceDetails ?? "[Artist] - [Album]"; set => SetIfChanged("_presenceDetails", value); } [DataMember] private string _presenceTrackCnt; public string PresenceTrackCnt { get => _presenceTrackCnt ?? "[TrackCount]"; set => SetIfChanged("_presenceTrackCnt", value); } [DataMember] private string _presenceTrackNo; public string PresenceTrackNo { get => _presenceTrackNo ?? "[TrackNo]"; set => SetIfChanged("_presenceTrackNo", value); } [DataMember] private bool? _updatePresenceWhenStopped; public bool UpdatePresenceWhenStopped { get => !_updatePresenceWhenStopped.HasValue || _updatePresenceWhenStopped.Value; set => SetIfChanged("_updatePresenceWhenStopped", value); } [DataMember] private bool? _showRemainingTime; public bool ShowRemainingTime { get => _showRemainingTime.HasValue && _showRemainingTime.Value; set => SetIfChanged("_showRemainingTime", value); } [DataMember] private bool? _textOnly; public bool TextOnly { get => _textOnly.HasValue && _textOnly.Value; set => SetIfChanged("_textOnly", value); } [DataMember] private string _largeImageText; public string LargeImageText { get => _largeImageText ?? "MusicBee"; set => SetIfChanged("_largeImageText", value); } #region Custom Stuff [DataMember] private string _clientId; public string ClientId { get => _clientId ?? "409394531948298250"; set => SetIfChanged("_clientId", value); } [DataMember] private string _largeImageId; public string LargeImageId { get => _largeImageId ?? "logo"; set => SetIfChanged("_largeImageId", value); } [DataMember] private string _playingImage; public string PlayingImage { get => _playingImage ?? "play"; set => SetIfChanged("_playingImage", value); } [DataMember] private string _pausedImage; public string PausedImage { get => _pausedImage ?? "pause"; set => SetIfChanged("_pausedImage", value); } [DataMember] private string _stoppedImage; public string StoppedImage { get => _stoppedImage ?? "stop"; set => SetIfChanged("_stoppedImage", value); } [DataMember] private bool? _doNotDisplayInformation; public bool DoNotDisplayInformation { get => _doNotDisplayInformation.HasValue && _doNotDisplayInformation.Value; set => SetIfChanged("_doNotDisplayInformation", value); } #endregion #endregion public static Settings GetInstance(string filePath) { Settings newSettings; try { newSettings = Load(filePath); } catch (Exception e) when (e is IOException || e is XmlException || e is InvalidOperationException) { newSettings = new Settings(); } newSettings.FilePath = filePath; return newSettings; } private void SetIfChanged<T>(string fieldName, T value) { var target = GetType().GetField(fieldName, BindingFlags.NonPublic | BindingFlags.Instance); if (target == null) return; var targetProp = GetType().GetProperty(getPropertyNameForField(target.Name), BindingFlags.Instance | BindingFlags.Public); if (targetProp == null) return; if (targetProp.GetValue(this, null).Equals(value)) return; target.SetValue(this, value); IsDirty = true; } private string getPropertyNameForField(string field) { if (!field.StartsWith("_")) return null; var tmp = field.Remove(0, 1); return tmp.First().ToString().ToUpper() + tmp.Substring(1); } public void Save() { if (!IsDirty) return; if (Path.GetDirectoryName(FilePath) != null && !Directory.Exists(Path.GetDirectoryName(FilePath))) { Directory.CreateDirectory(Path.GetDirectoryName(FilePath) ?? throw new InvalidOperationException()); } using (var writer = XmlWriter.Create(FilePath)) { var serializer = new DataContractSerializer(GetType()); serializer.WriteObject(writer, this); writer.Flush(); } } private static Settings Load(string filePath) { using (var stream = File.OpenRead(filePath)) { var serializer = new DataContractSerializer(typeof(Settings)); return serializer.ReadObject(stream) as Settings; } } public void Delete() { if (File.Exists(FilePath)) { File.Delete(FilePath); } if (Path.GetDirectoryName(FilePath) != null && Directory.Exists(Path.GetDirectoryName(FilePath))) { Directory.Delete(Path.GetDirectoryName(FilePath) ?? throw new InvalidOperationException()); } Clear(); } public void Clear() { var properties = GetType().GetProperties(); foreach (var propertyInfo in properties) { if (propertyInfo.PropertyType == typeof(string) && propertyInfo.Name != "FilePath") { propertyInfo.SetValue(this, null, null); } } // field is used for boolean settings because nullable is used internally and property would be non-nullable var fields = GetType().GetFields(BindingFlags.NonPublic | BindingFlags.Instance); foreach (var fieldInfo in fields) { if (!fieldInfo.Name.StartsWith("_")) continue; if (fieldInfo.FieldType == typeof(bool?)) { fieldInfo.SetValue(this, null); } } IsDirty = false; } } }
29.727626
134
0.559424
[ "Apache-2.0" ]
doujincafe/doujincafe-discordbee
Settings.cs
7,642
C#
using System; using System.CodeDom.Compiler; using System.ComponentModel; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Xml.Schema; using System.Xml.Serialization; namespace Workday.AcademicFoundation { [GeneratedCode("System.Xml", "4.6.1590.0"), DesignerCategory("code"), DebuggerStepThrough, XmlType(Namespace = "urn:com.workday/bsvc")] [Serializable] public class Education_Test_ResultObjectIDType : INotifyPropertyChanged { private string typeField; private string valueField; [method: CompilerGenerated] [CompilerGenerated] public event PropertyChangedEventHandler PropertyChanged; [XmlAttribute(Form = XmlSchemaForm.Qualified)] public string type { get { return this.typeField; } set { this.typeField = value; this.RaisePropertyChanged("type"); } } [XmlText] public string Value { get { return this.valueField; } set { this.valueField = value; this.RaisePropertyChanged("Value"); } } protected void RaisePropertyChanged(string propertyName) { PropertyChangedEventHandler propertyChanged = this.PropertyChanged; if (propertyChanged != null) { propertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } } }
20.885246
136
0.729984
[ "MIT" ]
matteofabbri/Workday.WebServices
Workday.AcademicFoundation/Education_Test_ResultObjectIDType.cs
1,274
C#
using System; using System.Collections.Generic; using System.IO; using System.Linq; using UnityEditor; using UnityEditor.Build.Reporting; using UnityEngine; namespace UnityBuilderAction { public static class BuildScript { private static readonly string Eol = Environment.NewLine; private static readonly string[] Secrets = {"androidKeystorePass", "androidKeyaliasName", "androidKeyaliasPass"}; public static void Build() { // Gather values from args Dictionary<string, string> options = GetValidatedOptions(); // Set version for this build PlayerSettings.bundleVersion = options["buildVersion"]; PlayerSettings.macOS.buildNumber = options["buildVersion"]; PlayerSettings.Android.bundleVersionCode = int.Parse(options["androidVersionCode"]); // Apply build target var buildTarget = (BuildTarget)Enum.Parse(typeof(BuildTarget), options["buildTarget"]); switch (buildTarget) { case BuildTarget.Android: { EditorUserBuildSettings.buildAppBundle = options["customBuildPath"].EndsWith(".aab"); if (options.TryGetValue("androidKeystoreName", out string keystoreName) && !string.IsNullOrEmpty(keystoreName)) PlayerSettings.Android.keystoreName = keystoreName; if (options.TryGetValue("androidKeystorePass", out string keystorePass) && !string.IsNullOrEmpty(keystorePass)) PlayerSettings.Android.keystorePass = keystorePass; if (options.TryGetValue("androidKeyaliasName", out string keyaliasName) && !string.IsNullOrEmpty(keyaliasName)) PlayerSettings.Android.keyaliasName = keyaliasName; if (options.TryGetValue("androidKeyaliasPass", out string keyaliasPass) && !string.IsNullOrEmpty(keyaliasPass)) PlayerSettings.Android.keyaliasPass = keyaliasPass; break; } case BuildTarget.StandaloneOSX: PlayerSettings.SetScriptingBackend(BuildTargetGroup.Standalone, ScriptingImplementation.Mono2x); break; } BuildPackageInternal(true); } private static Dictionary<string, string> GetValidatedOptions() { ParseCommandLineArguments(out Dictionary<string, string> validatedOptions); if (!validatedOptions.TryGetValue("projectPath", out string _)) { Console.WriteLine("Missing argument -projectPath"); EditorApplication.Exit(110); } if (!validatedOptions.TryGetValue("buildTarget", out string buildTarget)) { Console.WriteLine("Missing argument -buildTarget"); EditorApplication.Exit(120); } if (!Enum.IsDefined(typeof(BuildTarget), buildTarget ?? string.Empty)) { EditorApplication.Exit(121); } if (!validatedOptions.TryGetValue("customBuildPath", out string _)) { Console.WriteLine("Missing argument -customBuildPath"); EditorApplication.Exit(130); } const string defaultCustomBuildName = "TestBuild"; if (!validatedOptions.TryGetValue("customBuildName", out string customBuildName)) { Console.WriteLine($"Missing argument -customBuildName, defaulting to {defaultCustomBuildName}."); validatedOptions.Add("customBuildName", defaultCustomBuildName); } else if (customBuildName == "") { Console.WriteLine($"Invalid argument -customBuildName, defaulting to {defaultCustomBuildName}."); validatedOptions.Add("customBuildName", defaultCustomBuildName); } return validatedOptions; } private static void ParseCommandLineArguments(out Dictionary<string, string> providedArguments) { providedArguments = new Dictionary<string, string>(); string[] args = Environment.GetCommandLineArgs(); Console.WriteLine( $"{Eol}" + $"###########################{Eol}" + $"# Parsing settings #{Eol}" + $"###########################{Eol}" + $"{Eol}" ); // Extract flags with optional values for (int current = 0, next = 1; current < args.Length; current++, next++) { // Parse flag bool isFlag = args[current].StartsWith("-"); if (!isFlag) continue; string flag = args[current].TrimStart('-'); // Parse optional value bool flagHasValue = next < args.Length && !args[next].StartsWith("-"); string value = flagHasValue ? args[next].TrimStart('-') : ""; bool secret = Secrets.Contains(flag); string displayValue = secret ? "*HIDDEN*" : "\"" + value + "\""; // Assign Console.WriteLine($"Found flag \"{flag}\" with value {displayValue}."); providedArguments.Add(flag, value); } } [MenuItem("File/Build Package", priority = 220)] public static void BuildPackage() { BuildPackageInternal(false); } private static void BuildPackageInternal(bool exit) { try { var packageDir = Path.Combine(Environment.CurrentDirectory, "build"); if (!Directory.Exists(packageDir)) Directory.CreateDirectory(packageDir); AssetDatabase.ExportPackage( "Packages/pl.lochalhost.procedural-generator", Path.Combine(packageDir, "ProceduralGenerator.unitypackage"), ExportPackageOptions.Recurse | ExportPackageOptions.IncludeDependencies ); if (exit) ExitWithResult(BuildResult.Succeeded); } catch (Exception e) { if (exit) ExitWithResult(BuildResult.Failed); else Debug.LogException(e); } } private static void ExitWithResult(BuildResult result) { switch (result) { case BuildResult.Succeeded: Console.WriteLine("Build succeeded!"); EditorApplication.Exit(0); break; case BuildResult.Failed: Console.WriteLine("Build failed!"); EditorApplication.Exit(101); break; case BuildResult.Cancelled: Console.WriteLine("Build cancelled!"); EditorApplication.Exit(102); break; case BuildResult.Unknown: default: Console.WriteLine("Build result is unknown!"); EditorApplication.Exit(103); break; } } } }
41.032967
116
0.542582
[ "MIT" ]
michalusio/Procedural-Generator
Assets/Editor/UnityBuilderAction.cs
7,468
C#
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Windows; using System.Windows.Automation; using System.Windows.Automation.Peers; using System.Windows.Controls; using Microsoft.VisualStudio.PlatformUI; namespace NuGet.PackageManagement.UI { /// <summary> /// This control is used as list items in the package list. Its DataContext is /// <see cref="PackageItemViewModel"/>. /// </summary> public partial class PackageItemControl : UserControl { public PackageItemControl() { InitializeComponent(); } // Whenever the checkbox in the item is checked, the containing item will raise a // UIA event to convey the fact that the toggle state of the item has changed. The // event must be raised regardless of whether the toggle state of the item changed // in response to keyboard, mouse, or programmatic input. private void CheckBox_Toggled(object sender, RoutedEventArgs e) { var itemCheckBox = sender as CheckBox; var itemContainer = itemCheckBox?.FindAncestor<ListBoxItem>(); if (itemContainer is null) { return; } var newValue = (e.RoutedEvent == CheckBox.CheckedEvent); var oldValue = !newValue; // Assume the state has actually toggled. AutomationPeer peer = UIElementAutomationPeer.FromElement(itemContainer); peer?.RaisePropertyChangedEvent( TogglePatternIdentifiers.ToggleStateProperty, oldValue ? ToggleState.On : ToggleState.Off, newValue ? ToggleState.On : ToggleState.Off); } } }
39.521739
111
0.657316
[ "Apache-2.0" ]
AntonC9018/NuGet.Client
src/NuGet.Clients/NuGet.PackageManagement.UI/Xamls/PackageItemControl.xaml.cs
1,818
C#
using amrts_map.Dialogs; using ModernWpf.Controls; using Newtonsoft.Json; using Ookii.Dialogs.Wpf; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace amrts_map { public class Project { public static string DefaultName = "ArmyMenMap1"; public static string DefaultLocation = Environment.ExpandEnvironmentVariables(@"%userprofile%\Documents\Projects"); public static string DefaultMapLocation = Environment.ExpandEnvironmentVariables(@"%ProgramFiles(x86)%\3DO\Army Men RTS\missions\mp\8ally.x"); public static string FileTypeName = "Map Project"; public static string FileExtension = "amramp"; public static string MapTypeName = "Army Men RTS Map File"; public static string MapExtension = "x"; public static OpenedProject New(string name = null, string projectPath = null, string mapFilePath = null) { OpenedProject newProject = new OpenedProject(); if (name == null || projectPath == null || mapFilePath == null) return newProject; string projectRoot = Path.GetFullPath(Path.Combine(projectPath, name)); if (Directory.Exists(projectRoot)) throw new IOException("The directory already exists!"); if (!File.Exists(mapFilePath)) throw new FileNotFoundException("The map file doesn't exist!"); newProject.Project["Name"] = name; newProject.Project["Path"] = String.Format(@"{0}\{1}.{2}", projectRoot, name, FileExtension); newProject.Project["Root"] = projectRoot; newProject.PathVars["Cache"] = String.Format(@"{0}\{1}\", projectRoot, "cache"); newProject.PathVars["Edit"] = String.Format(@"{0}\{1}\", projectRoot, "edit"); newProject.PathVars["Export"] = String.Format(@"{0}\{1}\", projectRoot, "export"); string mapExtensionFilePath = Path.ChangeExtension(mapFilePath, ".x-e"); newProject.Map["x"] = Path.Combine(newProject.PathVars["Cache"], Path.GetFileName(mapFilePath)); newProject.Map["x_edit"] = Path.Combine(newProject.PathVars["Edit"], Path.GetFileNameWithoutExtension(mapFilePath) + @"_x\"); newProject.Map["x_export"] = Path.Combine(newProject.PathVars["Export"], Path.GetFileName(mapFilePath)); if (File.Exists(mapExtensionFilePath)) { newProject.Map["x-e"] = Path.ChangeExtension(newProject.Map["x"], ".x-e"); newProject.Map["x-e_edit"] = Path.Combine(newProject.PathVars["Edit"], Path.GetFileNameWithoutExtension(mapFilePath) + @"_x-e\"); newProject.Map["x-e_export"] = Path.ChangeExtension(newProject.Map["x_export"], ".x-e"); } else newProject.Map["x-e"] = newProject.Map["x-e_edit"] = newProject.Map["x-e_export"] = null; foreach (KeyValuePair<string, string> entry in newProject.PathVars) Directory.CreateDirectory(entry.Value); File.Copy(mapFilePath, newProject.Map["x"]); if (newProject.Map["x-e"] != null) File.Copy(mapExtensionFilePath, newProject.Map["x-e"]); UnpackMap(newProject); Save(newProject); return newProject; } public static OpenedProject Open(string projectPath) { if (!File.Exists(projectPath)) throw new FileNotFoundException("The map project doesn't exist!"); // The object has to be created beforehand to assign non-serialized variables OpenedProject obj = new OpenedProject(); obj.Reset(); // Suppresses the warning about the unnecessary assignment above obj = JsonConvert.DeserializeObject<OpenedProject>(File.ReadAllText(projectPath)); // Set the values of variables that were not deserialized obj.Project = new Dictionary<string, string>() { { "Name", Path.GetFileNameWithoutExtension(projectPath) }, { "Path", projectPath }, { "Root", Path.GetDirectoryName(projectPath) } }; // Get full path of the files (parts of the serialized object contain relative paths) obj.ChangePathType("absolute"); return obj; } public static void Save(OpenedProject openedProject) { // Use relative paths for serialization openedProject.ChangePathType("relative"); try { File.WriteAllText(openedProject.Project["Path"], JsonConvert.SerializeObject(openedProject, Formatting.Indented)); } finally { // Switch back to absolute paths for the program to use openedProject.ChangePathType("absolute"); } } public static void SaveAs(OpenedProject openedProject) { VistaFolderBrowserDialog projectNewLocation = Dialog.BrowseFolder("Save Project As..."); if (projectNewLocation != null) DirectoryMethods.Copy(DirectoryMethods.GetParentDirectory(openedProject.Project["Path"]), projectNewLocation.SelectedPath); } public static void UnpackMap(OpenedProject openedProject) { if (openedProject.IsKeyValid("x") && File.Exists(openedProject.Map["x"])) DrPack.Bridge.Run.Extract(openedProject.Map["x"], openedProject.Map["x_edit"]); if (openedProject.IsKeyValid("x-e") && File.Exists(openedProject.Map["x-e"])) DrPack.Bridge.Run.Extract(openedProject.Map["x-e"], openedProject.Map["x-e_edit"]); } public static void PackMap(OpenedProject openedProject) { if (openedProject.IsKeyValid("x") && Directory.Exists(openedProject.Map["x_edit"])) DrPack.Bridge.Run.Create(openedProject.Map["x_export"], openedProject.Map["x_edit"]); if (openedProject.IsKeyValid("x-e") && Directory.Exists(openedProject.Map["x-e_edit"])) DrPack.Bridge.Run.Create(openedProject.Map["x-e_export"], openedProject.Map["x-e_edit"]); } public static async void AddFile(OpenedProject openedProject, string[] importedFiles = null) { if (importedFiles == null) { VistaFileDialog fileToAdd = Dialog.OpenFile("Add Existing Item...", "All Files|*.*"); if (fileToAdd == null) return; importedFiles = new string[] { fileToAdd.FileName }; } string destinationType; ContentDialogResult packFileResult = await Dialog.Show("Where should the selected file(s) be packed?", null, new string[] { "Save to .x", "Save to .x-e", "Cancel" }); switch (packFileResult) { case ContentDialogResult.Primary: destinationType = openedProject.Map["x_edit"]; break; case ContentDialogResult.Secondary: destinationType = openedProject.Map["x-e_edit"]; break; default: return; } object[] overwriteFileResult = null; foreach (string fileSource in importedFiles) { if (!File.Exists(fileSource)) return; string fileSourceName = Path.GetFileName(fileSource); string fileDest = String.Format(@"{0}\{1}", destinationType, fileSourceName); if (File.Exists(fileDest)) { if (overwriteFileResult == null || !(bool)overwriteFileResult[1]) overwriteFileResult = await Dialog.ShowWithCheckbox($"The file already exists:\r\n{fileSourceName}\r\n\r\nOverwrite?", null, DialogButton.YesNoCancel, ContentDialogButton.Primary, "Apply to all occurences"); switch ((ContentDialogResult)overwriteFileResult[0]) { case ContentDialogResult.Primary: File.Delete(fileDest); File.Copy(fileSource, fileDest); break; case ContentDialogResult.Secondary: break; case ContentDialogResult.None: default: return; } } else { File.Copy(fileSource, fileDest); } } } public static void DiscardChanges(OpenedProject openedProject) { DirectoryMethods.Clean(openedProject.PathVars["Edit"]); UnpackMap(openedProject); } public static void CleanExport(OpenedProject openedProject) { DirectoryMethods.Clean(openedProject.PathVars["Export"]); } public static void Build(OpenedProject openedProject) { if (openedProject.IsKeyValid("x") && File.Exists(openedProject.Map["x_export"])) File.Delete(openedProject.Map["x_export"]); if (openedProject.IsKeyValid("x-e", true) && File.Exists(openedProject.Map["x-e_export"])) File.Delete(openedProject.Map["x-e_export"]); PackMap(openedProject); } public static void Close(OpenedProject openedProject) { openedProject.Reset(); } } }
47.883838
231
0.598882
[ "MIT" ]
DavidL344/amrts-assistant
amrts-map/src/common/Project.cs
9,483
C#
using AzR.Core.Config; using System.ComponentModel.DataAnnotations; namespace AzR.Student.Core.Models { public class Student : IBaseEntity { [Key] public int Id { get; set; } [StringLength(256)] public string Name { get; set; } [StringLength(128)] public string Email { get; set; } [StringLength(128)] public string Phone { get; set; } } }
21
44
0.592857
[ "MIT" ]
ashiquzzaman/azr-admin
Development/AzRAdmin/Plugins/Example/AzR.Student.Core/Models/Student.cs
422
C#
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using saboteur.Interfaces; using saboteur.ViewModels.Episode; namespace saboteur.Controllers { public class EpisodeController : Controller { private readonly IGameDataService _gameData; public EpisodeController(IGameDataService gameData) { _gameData = gameData; } [Route("Episode/Watch/{country}/{countrySeasonNum}/{episodeNum}")] public IActionResult Watch(string country, int countrySeasonNum, int episodeNum, bool preQuiz = true) { var vm = new WatchEpisodeViewModel(); var season = _gameData.GetSeasonByCountryNum(country, countrySeasonNum); vm.Episode = _gameData.GetEpisodeBySeason(season.SeasonId, episodeNum); vm.PreQuiz = preQuiz; return View(vm); } } }
30.451613
109
0.681144
[ "MIT" ]
gschro/saboteur
saboteur/Controllers/EpisodeController.cs
946
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 Sticky.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); public static Settings Default { get { return defaultInstance; } } } }
40.259259
152
0.565777
[ "MIT" ]
MaxMEllon/Sticky
Sticky/Properties/Settings.Designer.cs
1,089
C#
namespace MercadoPagoCore.Client.AdvancedPayment { /// <summary> /// Refund creation request data. /// </summary> public class AdvancedPaymentRefundCreateRequest { /// <summary> /// Amount to be refunded. /// </summary> public decimal? Amount { get; set; } } }
22.714286
51
0.584906
[ "MIT" ]
cantte/MercadoPagoCore
MercadoPagoCore/Client/AdvancedPayment/AdvancedPaymentRefundCreateRequest.cs
320
C#
// Copyright 1998-2018 Epic Games, Inc. All Rights Reserved. using UnrealBuildTool; using System.IO; public class UDPWrapper : ModuleRules { public UDPWrapper(ReadOnlyTargetRules Target) : base(Target) { PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; PublicIncludePaths.AddRange( new string[] { Path.Combine(ModuleDirectory, "Public"), // ... add public include paths required here ... } ); PrivateIncludePaths.AddRange( new string[] { Path.Combine(ModuleDirectory, "Private"), // ... add other private include paths required here ... } ); PublicDependencyModuleNames.AddRange( new string[] { "Core", "Sockets", "Networking" // ... add other public dependencies that you statically link with here ... } ); PrivateDependencyModuleNames.AddRange( new string[] { "CoreUObject", "Engine", "Slate", "SlateCore" // ... add private dependencies that you statically link with here ... } ); DynamicallyLoadedModuleNames.AddRange( new string[] { // ... add any modules that your module loads dynamically here ... } ); } }
21.067797
80
0.613837
[ "MIT" ]
Thibault-Brocheton/udp-ue4
Source/UDPWrapper/UDPWrapper.Build.cs
1,243
C#
using Microsoft.Azure.Documents; using Microsoft.Azure.Documents.Client; using Microsoft.Extensions.Configuration; using System; using System.Threading.Tasks; using NUnit.Framework; using SimpleEventStore.Tests.Events; namespace SimpleEventStore.AzureDocumentDb.Tests { [TestFixture] public class AzureDocumentDbEventStoreLogging { [Test] public async Task when_a_write_operation_is_successful_the_log_callback_is_called() { ResponseInformation response = null; var sut = new EventStore(await CreateStorageEngine(t => response = t)); var streamId = Guid.NewGuid().ToString(); await sut.AppendToStream(streamId, 0, new EventData(Guid.NewGuid(), new OrderCreated("TEST-ORDER"))); Assert.NotNull(response); TestContext.Out.WriteLine($"Charge: {response.RequestCharge}"); TestContext.Out.WriteLine($"Quota Usage: {response.CurrentResourceQuotaUsage}"); TestContext.Out.WriteLine($"Max Resource Quote: {response.MaxResourceQuota}"); TestContext.Out.WriteLine($"Response headers: {response.ResponseHeaders}"); } [Test] public async Task when_a_read_operation_is_successful_the_log_callback_is_called() { var logCount = 0; var sut = new EventStore(await CreateStorageEngine(t => logCount++)); var streamId = Guid.NewGuid().ToString(); await sut.AppendToStream(streamId, 0, new EventData(Guid.NewGuid(), new OrderCreated("TEST-ORDER"))); await sut.ReadStreamForwards(streamId); Assert.That(logCount, Is.EqualTo(2)); } private static async Task<IStorageEngine> CreateStorageEngine(Action<ResponseInformation> onSuccessCallback, string databaseName = "LoggingTests") { var config = new ConfigurationBuilder() .AddJsonFile("appsettings.json") .Build(); var documentDbUri = config["Uri"]; var authKey = config["AuthKey"]; var consistencyLevel = config["ConsistencyLevel"]; if (!Enum.TryParse(consistencyLevel, true, out ConsistencyLevel consistencyLevelEnum)) { throw new Exception($"The ConsistencyLevel value {consistencyLevel} is not supported"); } var client = new DocumentClient(new Uri(documentDbUri), authKey); return await new AzureDocumentDbStorageEngineBuilder(client, databaseName) .UseCollection(o => { o.ConsistencyLevel = consistencyLevelEnum; o.CollectionRequestUnits = 400; }) .UseLogging(o => { o.Success = onSuccessCallback; }) .Build() .Initialise(); } } }
38.72
154
0.621556
[ "MIT" ]
GivePenny/SimpleEventStore
SimpleEventStore.AzureDocumentDb.Tests/AzureDocumentDbEventStoreLogging.cs
2,906
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 lightsail-2016-11-28.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.Lightsail.Model { /// <summary> /// Describes information about ports for an Amazon Lightsail instance. /// </summary> public partial class InstancePortInfo { private AccessDirection _accessDirection; private string _accessFrom; private PortAccessType _accessType; private List<string> _cidrListAliases = new List<string>(); private List<string> _cidrs = new List<string>(); private string _commonName; private int? _fromPort; private List<string> _ipv6Cidrs = new List<string>(); private NetworkProtocol _protocol; private int? _toPort; /// <summary> /// Gets and sets the property AccessDirection. /// <para> /// The access direction (<code>inbound</code> or <code>outbound</code>). /// </para> /// <note> /// <para> /// Lightsail currently supports only <code>inbound</code> access direction. /// </para> /// </note> /// </summary> public AccessDirection AccessDirection { get { return this._accessDirection; } set { this._accessDirection = value; } } // Check to see if AccessDirection property is set internal bool IsSetAccessDirection() { return this._accessDirection != null; } /// <summary> /// Gets and sets the property AccessFrom. /// <para> /// The location from which access is allowed. For example, <code>Anywhere (0.0.0.0/0)</code>, /// or <code>Custom</code> if a specific IP address or range of IP addresses is allowed. /// </para> /// </summary> public string AccessFrom { get { return this._accessFrom; } set { this._accessFrom = value; } } // Check to see if AccessFrom property is set internal bool IsSetAccessFrom() { return this._accessFrom != null; } /// <summary> /// Gets and sets the property AccessType. /// <para> /// The type of access (<code>Public</code> or <code>Private</code>). /// </para> /// </summary> public PortAccessType AccessType { get { return this._accessType; } set { this._accessType = value; } } // Check to see if AccessType property is set internal bool IsSetAccessType() { return this._accessType != null; } /// <summary> /// Gets and sets the property CidrListAliases. /// <para> /// An alias that defines access for a preconfigured range of IP addresses. /// </para> /// /// <para> /// The only alias currently supported is <code>lightsail-connect</code>, which allows /// IP addresses of the browser-based RDP/SSH client in the Lightsail console to connect /// to your instance. /// </para> /// </summary> public List<string> CidrListAliases { get { return this._cidrListAliases; } set { this._cidrListAliases = value; } } // Check to see if CidrListAliases property is set internal bool IsSetCidrListAliases() { return this._cidrListAliases != null && this._cidrListAliases.Count > 0; } /// <summary> /// Gets and sets the property Cidrs. /// <para> /// The IPv4 address, or range of IPv4 addresses (in CIDR notation) that are allowed to /// connect to an instance through the ports, and the protocol. /// </para> /// <note> /// <para> /// The <code>ipv6Cidrs</code> parameter lists the IPv6 addresses that are allowed to /// connect to an instance. /// </para> /// </note> /// <para> /// For more information about CIDR block notation, see <a href="https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation">Classless /// Inter-Domain Routing</a> on <i>Wikipedia</i>. /// </para> /// </summary> public List<string> Cidrs { get { return this._cidrs; } set { this._cidrs = value; } } // Check to see if Cidrs property is set internal bool IsSetCidrs() { return this._cidrs != null && this._cidrs.Count > 0; } /// <summary> /// Gets and sets the property CommonName. /// <para> /// The common name of the port information. /// </para> /// </summary> public string CommonName { get { return this._commonName; } set { this._commonName = value; } } // Check to see if CommonName property is set internal bool IsSetCommonName() { return this._commonName != null; } /// <summary> /// Gets and sets the property FromPort. /// <para> /// The first port in a range of open ports on an instance. /// </para> /// /// <para> /// Allowed ports: /// </para> /// <ul> <li> /// <para> /// TCP and UDP - <code>0</code> to <code>65535</code> /// </para> /// </li> <li> /// <para> /// ICMP - The ICMP type for IPv4 addresses. For example, specify <code>8</code> as the /// <code>fromPort</code> (ICMP type), and <code>-1</code> as the <code>toPort</code> /// (ICMP code), to enable ICMP Ping. For more information, see <a href="https://en.wikipedia.org/wiki/Internet_Control_Message_Protocol#Control_messages">Control /// Messages</a> on <i>Wikipedia</i>. /// </para> /// </li> <li> /// <para> /// ICMPv6 - The ICMP type for IPv6 addresses. For example, specify <code>128</code> as /// the <code>fromPort</code> (ICMPv6 type), and <code>0</code> as <code>toPort</code> /// (ICMPv6 code). For more information, see <a href="https://en.wikipedia.org/wiki/Internet_Control_Message_Protocol_for_IPv6">Internet /// Control Message Protocol for IPv6</a>. /// </para> /// </li> </ul> /// </summary> [AWSProperty(Min=-1, Max=65535)] public int FromPort { get { return this._fromPort.GetValueOrDefault(); } set { this._fromPort = value; } } // Check to see if FromPort property is set internal bool IsSetFromPort() { return this._fromPort.HasValue; } /// <summary> /// Gets and sets the property Ipv6Cidrs. /// <para> /// The IPv6 address, or range of IPv6 addresses (in CIDR notation) that are allowed to /// connect to an instance through the ports, and the protocol. Only devices with an IPv6 /// address can connect to an instance through IPv6; otherwise, IPv4 should be used. /// </para> /// <note> /// <para> /// The <code>cidrs</code> parameter lists the IPv4 addresses that are allowed to connect /// to an instance. /// </para> /// </note> /// <para> /// For more information about CIDR block notation, see <a href="https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation">Classless /// Inter-Domain Routing</a> on <i>Wikipedia</i>. /// </para> /// </summary> public List<string> Ipv6Cidrs { get { return this._ipv6Cidrs; } set { this._ipv6Cidrs = value; } } // Check to see if Ipv6Cidrs property is set internal bool IsSetIpv6Cidrs() { return this._ipv6Cidrs != null && this._ipv6Cidrs.Count > 0; } /// <summary> /// Gets and sets the property Protocol. /// <para> /// The IP protocol name. /// </para> /// /// <para> /// The name can be one of the following: /// </para> /// <ul> <li> /// <para> /// <code>tcp</code> - Transmission Control Protocol (TCP) provides reliable, ordered, /// and error-checked delivery of streamed data between applications running on hosts /// communicating by an IP network. If you have an application that doesn't require reliable /// data stream service, use UDP instead. /// </para> /// </li> <li> /// <para> /// <code>all</code> - All transport layer protocol types. For more general information, /// see <a href="https://en.wikipedia.org/wiki/Transport_layer">Transport layer</a> on /// <i>Wikipedia</i>. /// </para> /// </li> <li> /// <para> /// <code>udp</code> - With User Datagram Protocol (UDP), computer applications can send /// messages (or datagrams) to other hosts on an Internet Protocol (IP) network. Prior /// communications are not required to set up transmission channels or data paths. Applications /// that don't require reliable data stream service can use UDP, which provides a connectionless /// datagram service that emphasizes reduced latency over reliability. If you do require /// reliable data stream service, use TCP instead. /// </para> /// </li> <li> /// <para> /// <code>icmp</code> - Internet Control Message Protocol (ICMP) is used to send error /// messages and operational information indicating success or failure when communicating /// with an instance. For example, an error is indicated when an instance could not be /// reached. When you specify <code>icmp</code> as the <code>protocol</code>, you must /// specify the ICMP type using the <code>fromPort</code> parameter, and ICMP code using /// the <code>toPort</code> parameter. /// </para> /// </li> </ul> /// </summary> public NetworkProtocol Protocol { get { return this._protocol; } set { this._protocol = value; } } // Check to see if Protocol property is set internal bool IsSetProtocol() { return this._protocol != null; } /// <summary> /// Gets and sets the property ToPort. /// <para> /// The last port in a range of open ports on an instance. /// </para> /// /// <para> /// Allowed ports: /// </para> /// <ul> <li> /// <para> /// TCP and UDP - <code>0</code> to <code>65535</code> /// </para> /// </li> <li> /// <para> /// ICMP - The ICMP code for IPv4 addresses. For example, specify <code>8</code> as the /// <code>fromPort</code> (ICMP type), and <code>-1</code> as the <code>toPort</code> /// (ICMP code), to enable ICMP Ping. For more information, see <a href="https://en.wikipedia.org/wiki/Internet_Control_Message_Protocol#Control_messages">Control /// Messages</a> on <i>Wikipedia</i>. /// </para> /// </li> <li> /// <para> /// ICMPv6 - The ICMP code for IPv6 addresses. For example, specify <code>128</code> as /// the <code>fromPort</code> (ICMPv6 type), and <code>0</code> as <code>toPort</code> /// (ICMPv6 code). For more information, see <a href="https://en.wikipedia.org/wiki/Internet_Control_Message_Protocol_for_IPv6">Internet /// Control Message Protocol for IPv6</a>. /// </para> /// </li> </ul> /// </summary> [AWSProperty(Min=-1, Max=65535)] public int ToPort { get { return this._toPort.GetValueOrDefault(); } set { this._toPort = value; } } // Check to see if ToPort property is set internal bool IsSetToPort() { return this._toPort.HasValue; } } }
38.51585
171
0.546727
[ "Apache-2.0" ]
philasmar/aws-sdk-net
sdk/src/Services/Lightsail/Generated/Model/InstancePortInfo.cs
13,365
C#
using System; using System.IO; using Aitgmbh.Tapio.Developerapp.Web.Configurations; using Aitgmbh.Tapio.Developerapp.Web.Repositories; using Aitgmbh.Tapio.Developerapp.Web.Scenarios.MachineOverview; using Aitgmbh.Tapio.Developerapp.Web.Services; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; namespace Aitgmbh.Tapio.Developerapp.Web { public class Startup { public Startup(IConfiguration configuration) { Configuration = configuration; } public IConfiguration Configuration { get; } public void ConfigureServices(IServiceCollection services) { services .AddSingleton<IScenarioCrawler, ScenarioCrawler>() .AddSingleton<IScenarioRepository, ScenarioRepository>() .AddSingleton<ITokenProvider, TokenProvider>() .AddSingleton<OptionsValidator>() .AddMvc() .SetCompatibilityVersion(CompatibilityVersion.Version_2_2); services.AddHttpClient<IMachineOverviewService, MachineOverviewService>(); services .AddOptions<TapioCloudCredentials>() .Bind(Configuration.GetSection("TapioCloud")) .ValidateDataAnnotations() #pragma warning disable S4055 // Literals should not be passed as localized parameters .Validate(c => Guid.TryParse(c.ClientId, out _), @"The client secret must be a valid Guid"); #pragma warning restore S4055 // Literals should not be passed as localized parameters } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. #pragma warning disable S2325 // Methods and properties that don't access instance data should be static public void Configure(IApplicationBuilder app, IHostingEnvironment env, OptionsValidator optionsValidator) #pragma warning restore S2325 // Methods and properties that don't access instance data should be static { if (optionsValidator == null) { throw new ArgumentNullException(nameof(optionsValidator)); } if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseHsts(); } optionsValidator.Validate(); app.Use(async (context, next) => { var path = context.Request.Path; if (!path.StartsWithSegments("/api", StringComparison.Ordinal) && !path.StartsWithSegments("/hubs", StringComparison.Ordinal) && !Path.HasExtension(path)) { context.Request.Path = "/index.html"; } await next(); }); app.UseDefaultFiles(); app.UseStaticFiles(); app.UseHttpsRedirection(); app.UseMvc(); } } /// <summary> /// Provides fail fast behavior for configurations on start up. /// </summary> public class OptionsValidator { private readonly IOptions<TapioCloudCredentials> _tapioCloud; public OptionsValidator(IOptions<TapioCloudCredentials> tapioCloud) { _tapioCloud = tapioCloud; } public void Validate() { _ = _tapioCloud.Value; } } }
34.708738
170
0.629091
[ "MIT" ]
LarissaKoehne/tapiodeveloperapp
src/web/Startup.cs
3,575
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.AspNet.Mvc.ModelBinding.Validation { public class ModelValidationResult { public ModelValidationResult(string memberName, string message) { MemberName = memberName ?? string.Empty; Message = message ?? string.Empty; } public string MemberName { get; private set; } public string Message { get; private set; } } }
30.473684
111
0.670121
[ "Apache-2.0" ]
VGGeorgiev/Mvc
src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/Validation/ModelValidationResult.cs
579
C#
namespace ILG.Codex.CodexR4 { partial class Form1 { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); Infragistics.Win.Appearance appearance1 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance2 = new Infragistics.Win.Appearance(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); Infragistics.Win.Appearance appearance3 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance4 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance5 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance6 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance7 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance8 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance9 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance10 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance11 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance12 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance13 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance14 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance15 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance16 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance17 = new Infragistics.Win.Appearance(); Infragistics.Win.UltraWinTabControl.UltraTab ultraTab18 = new Infragistics.Win.UltraWinTabControl.UltraTab(); Infragistics.Win.Appearance appearance18 = new Infragistics.Win.Appearance(); Infragistics.Win.UltraWinTabControl.UltraTab ultraTab1 = new Infragistics.Win.UltraWinTabControl.UltraTab(); Infragistics.Win.Appearance appearance19 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance20 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance21 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance61 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance62 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance63 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance64 = new Infragistics.Win.Appearance(); Infragistics.Win.ValueListItem valueListItem5 = new Infragistics.Win.ValueListItem(); Infragistics.Win.ValueListItem valueListItem6 = new Infragistics.Win.ValueListItem(); Infragistics.Win.ValueListItem valueListItem7 = new Infragistics.Win.ValueListItem(); Infragistics.Win.Appearance appearance24 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance25 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance26 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance28 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance29 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance30 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance31 = new Infragistics.Win.Appearance(); Infragistics.Win.UltraWinTabControl.UltraTab ultraTab2 = new Infragistics.Win.UltraWinTabControl.UltraTab(); Infragistics.Win.Appearance appearance32 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance33 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance34 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance35 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance36 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance37 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance38 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance39 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance40 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance23 = new Infragistics.Win.Appearance(); Infragistics.Win.UltraWinTabControl.UltraTab ultraTab5 = new Infragistics.Win.UltraWinTabControl.UltraTab(); Infragistics.Win.UltraWinTabControl.UltraTab ultraTab8 = new Infragistics.Win.UltraWinTabControl.UltraTab(); Infragistics.Win.UltraWinTabControl.UltraTab ultraTab13 = new Infragistics.Win.UltraWinTabControl.UltraTab(); Infragistics.Win.Appearance appearance27 = new Infragistics.Win.Appearance(); Infragistics.Win.UltraWinTabControl.UltraTab ultraTab9 = new Infragistics.Win.UltraWinTabControl.UltraTab(); Infragistics.Win.UltraWinTabControl.UltraTab ultraTab10 = new Infragistics.Win.UltraWinTabControl.UltraTab(); Infragistics.Win.UltraWinTabControl.UltraTab ultraTab14 = new Infragistics.Win.UltraWinTabControl.UltraTab(); Infragistics.Win.Appearance appearance43 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance45 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance46 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance47 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance48 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance49 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance50 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance51 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance52 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance53 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance54 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance55 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance22 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance41 = new Infragistics.Win.Appearance(); Infragistics.Win.UltraWinTabControl.UltraTab ultraTab3 = new Infragistics.Win.UltraWinTabControl.UltraTab(); Infragistics.Win.UltraWinTabControl.UltraTab ultraTab4 = new Infragistics.Win.UltraWinTabControl.UltraTab(); Infragistics.Win.Appearance appearance42 = new Infragistics.Win.Appearance(); Infragistics.Win.UltraWinTabControl.UltraTab ultraTab17 = new Infragistics.Win.UltraWinTabControl.UltraTab(); Infragistics.Win.Appearance appearance44 = new Infragistics.Win.Appearance(); Infragistics.Win.UltraWinTabControl.UltraTab ultraTab15 = new Infragistics.Win.UltraWinTabControl.UltraTab(); Infragistics.Win.Appearance appearance56 = new Infragistics.Win.Appearance(); Infragistics.Win.UltraWinToolbars.UltraToolbar ultraToolbar1 = new Infragistics.Win.UltraWinToolbars.UltraToolbar("UltraToolbar1"); Infragistics.Win.UltraWinToolbars.PopupMenuTool popupMenuTool7 = new Infragistics.Win.UltraWinToolbars.PopupMenuTool("ფაილი"); Infragistics.Win.UltraWinToolbars.PopupMenuTool popupMenuTool8 = new Infragistics.Win.UltraWinToolbars.PopupMenuTool("დახმარება"); Infragistics.Win.Appearance appearance57 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance58 = new Infragistics.Win.Appearance(); Infragistics.Win.UltraWinToolbars.PopupMenuTool popupMenuTool3 = new Infragistics.Win.UltraWinToolbars.PopupMenuTool("Help"); Infragistics.Win.Appearance appearance59 = new Infragistics.Win.Appearance(); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool2 = new Infragistics.Win.UltraWinToolbars.ButtonTool("FeedBack"); Infragistics.Win.UltraWinToolbars.PopupMenuTool popupMenuTool4 = new Infragistics.Win.UltraWinToolbars.PopupMenuTool("ConfigurationMenu"); Infragistics.Win.Appearance appearance60 = new Infragistics.Win.Appearance(); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool5 = new Infragistics.Win.UltraWinToolbars.ButtonTool("Config"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool6 = new Infragistics.Win.UltraWinToolbars.ButtonTool("About"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool7 = new Infragistics.Win.UltraWinToolbars.ButtonTool("Manual"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool8 = new Infragistics.Win.UltraWinToolbars.ButtonTool("FeedBack"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool9 = new Infragistics.Win.UltraWinToolbars.ButtonTool("Web"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool10 = new Infragistics.Win.UltraWinToolbars.ButtonTool("Config"); Infragistics.Win.UltraWinToolbars.PopupMenuTool popupMenuTool5 = new Infragistics.Win.UltraWinToolbars.PopupMenuTool("ფაილი"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool12 = new Infragistics.Win.UltraWinToolbars.ButtonTool("Exit"); Infragistics.Win.UltraWinToolbars.PopupMenuTool popupMenuTool6 = new Infragistics.Win.UltraWinToolbars.PopupMenuTool("დახმარება"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool13 = new Infragistics.Win.UltraWinToolbars.ButtonTool("Manual"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool14 = new Infragistics.Win.UltraWinToolbars.ButtonTool("Web"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool15 = new Infragistics.Win.UltraWinToolbars.ButtonTool("About"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool11 = new Infragistics.Win.UltraWinToolbars.ButtonTool("Exit"); Infragistics.Win.UltraWinToolbars.PopupMenuTool popupMenuTool1 = new Infragistics.Win.UltraWinToolbars.PopupMenuTool("InstallListBox"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool17 = new Infragistics.Win.UltraWinToolbars.ButtonTool("InstallCopy"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool18 = new Infragistics.Win.UltraWinToolbars.ButtonTool("Install_CopyAll"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool19 = new Infragistics.Win.UltraWinToolbars.ButtonTool("Install_Clear"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool3 = new Infragistics.Win.UltraWinToolbars.ButtonTool("InstallCopy"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool4 = new Infragistics.Win.UltraWinToolbars.ButtonTool("Install_CopyAll"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool16 = new Infragistics.Win.UltraWinToolbars.ButtonTool("Install_Clear"); Infragistics.Win.UltraWinToolbars.PopupMenuTool popupMenuTool2 = new Infragistics.Win.UltraWinToolbars.PopupMenuTool("LocalDBMenu"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool20 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LocalDBInstance"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool1 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LocalDBInstance"); Infragistics.Win.UltraWinToolbars.PopupMenuTool popupMenuTool9 = new Infragistics.Win.UltraWinToolbars.PopupMenuTool("SpecificActions"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool24 = new Infragistics.Win.UltraWinToolbars.ButtonTool("DropCodexUsers"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool25 = new Infragistics.Win.UltraWinToolbars.ButtonTool("DropCodexXUsers"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool26 = new Infragistics.Win.UltraWinToolbars.ButtonTool("DropFullTextIndexes"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool21 = new Infragistics.Win.UltraWinToolbars.ButtonTool("DropCodexUsers"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool22 = new Infragistics.Win.UltraWinToolbars.ButtonTool("DropCodexXUsers"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool23 = new Infragistics.Win.UltraWinToolbars.ButtonTool("DropFullTextIndexes"); this.ultraTabPageControl16 = new Infragistics.Win.UltraWinTabControl.UltraTabPageControl(); this.Frame_Install_Config_Frame2 = new Infragistics.Win.Misc.UltraPanel(); this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); this.Button_Install_Config_DataBaseInfo = new Infragistics.Win.Misc.UltraButton(); this.Button_Install_Config_Save = new Infragistics.Win.Misc.UltraButton(); this.Edit_Install_Config_DataBaseInfo = new Infragistics.Win.UltraWinEditors.UltraTextEditor(); this.Icon_Install_Config_DataBaseInfo = new Infragistics.Win.UltraWinEditors.UltraPictureBox(); this.Icon_Install_Config_OpenFolder = new Infragistics.Win.UltraWinEditors.UltraPictureBox(); this.Label_Install_Config_InfoFille = new Infragistics.Win.Misc.UltraLabel(); this.Label_Install_Config_WhereToCopy = new Infragistics.Win.Misc.UltraLabel(); this.Button_Install_Config_WhereTo = new Infragistics.Win.Misc.UltraButton(); this.Edit_Install_Config_WhereTo = new Infragistics.Win.UltraWinEditors.UltraTextEditor(); this.ultraTabPageControl3 = new Infragistics.Win.UltraWinTabControl.UltraTabPageControl(); this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel(); this.CheckBox_CodexDSXUsers = new Infragistics.Win.UltraWinEditors.UltraCheckEditor(); this.ultraLabel3 = new Infragistics.Win.Misc.UltraLabel(); this.ultraLabel2 = new Infragistics.Win.Misc.UltraLabel(); this.FullTextSearch = new Infragistics.Win.UltraWinEditors.UltraCheckEditor(); this.ultraPictureBox4 = new Infragistics.Win.UltraWinEditors.UltraPictureBox(); this.CheckBox_CodexDSUsers = new Infragistics.Win.UltraWinEditors.UltraCheckEditor(); this.ultraPictureBox2 = new Infragistics.Win.UltraWinEditors.UltraPictureBox(); this.ultraTabPageControl5 = new Infragistics.Win.UltraWinTabControl.UltraTabPageControl(); this.tableLayoutPanel10 = new System.Windows.Forms.TableLayoutPanel(); this.Button_Browse2_Make_Config_Servers = new Infragistics.Win.Misc.UltraButton(); this.Icon3_Make_Config_Database = new Infragistics.Win.UltraWinEditors.UltraPictureBox(); this.EditBox_Destination_Make_Config_Servers = new Infragistics.Win.UltraWinEditors.UltraTextEditor(); this.Icon2_Make_Config_Database = new Infragistics.Win.UltraWinEditors.UltraPictureBox(); this.Button_Browse1_Make_Config_Servers = new Infragistics.Win.Misc.UltraButton(); this.Label3_Install_Config_Database = new Infragistics.Win.Misc.UltraLabel(); this.Button_Save_Make_Config_Servers = new Infragistics.Win.Misc.UltraButton(); this.EditBox_Source_Make_Config_Servers = new Infragistics.Win.UltraWinEditors.UltraTextEditor(); this.Label2_Install_Config_Database = new Infragistics.Win.Misc.UltraLabel(); this.ultraTabPageControl1 = new Infragistics.Win.UltraWinTabControl.UltraTabPageControl(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.Icon_Install_Welcome = new Infragistics.Win.UltraWinEditors.UltraPictureBox(); this.Frame_Install_Welcome = new Infragistics.Win.Misc.UltraPanel(); this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); this.Icon_Install_Welcome_Frame_LabelCaption = new Infragistics.Win.Misc.UltraLabel(); this.Icon_Install_Welcome_Frame_LabelTop = new Infragistics.Win.Misc.UltraLabel(); this.Label_Install_Caption_Welcome = new Infragistics.Win.Misc.UltraLabel(); this.ultraTabPageControl4 = new Infragistics.Win.UltraWinTabControl.UltraTabPageControl(); this.tableLayoutPanel8 = new System.Windows.Forms.TableLayoutPanel(); this.ultraPictureBox1 = new Infragistics.Win.UltraWinEditors.UltraPictureBox(); this.ultraTabControl1 = new Infragistics.Win.UltraWinTabControl.UltraTabControl(); this.ultraTabSharedControlsPage7 = new Infragistics.Win.UltraWinTabControl.UltraTabSharedControlsPage(); this.ultraLabel1 = new Infragistics.Win.Misc.UltraLabel(); this.Button_Install_Config_Connect = new Infragistics.Win.Misc.UltraButton(); this.linkLabel2 = new System.Windows.Forms.LinkLabel(); this.Edit_Install_Config_Servers = new Infragistics.Win.UltraWinEditors.UltraTextEditor(); this.ultraLabel5 = new Infragistics.Win.Misc.UltraLabel(); this.Installlation_Scenarious_Label = new Infragistics.Win.Misc.UltraLabel(); this.Database_Installation_Scenario = new Infragistics.Win.UltraWinEditors.UltraComboEditor(); this.Install_Page_Step1 = new Infragistics.Win.UltraWinTabControl.UltraTabPageControl(); this.tableLayoutPanel5 = new System.Windows.Forms.TableLayoutPanel(); this.Link_SpecificActions = new System.Windows.Forms.LinkLabel(); this.Icon_Install_Spet1 = new Infragistics.Win.UltraWinEditors.UltraPictureBox(); this.Label_Install_Caption_Step1 = new Infragistics.Win.Misc.UltraLabel(); this.Install_Group_Step1 = new Infragistics.Win.Misc.UltraGroupBox(); this.Install_listBox_Step1 = new System.Windows.Forms.ListBox(); this.linkLabel1 = new System.Windows.Forms.LinkLabel(); this.Install_StartButton_Step1 = new Infragistics.Win.Misc.UltraButton(); this.ultraTabPageControl14 = new Infragistics.Win.UltraWinTabControl.UltraTabPageControl(); this.tableLayoutPanel7 = new System.Windows.Forms.TableLayoutPanel(); this.Icon_Make_Welcome = new Infragistics.Win.UltraWinEditors.UltraPictureBox(); this.Frame_Make_Welcome = new Infragistics.Win.Misc.UltraPanel(); this.ultraButton1 = new Infragistics.Win.Misc.UltraButton(); this.Icon_Make_Welcome_Frame_LabelCaption = new Infragistics.Win.Misc.UltraLabel(); this.Icon_Make_Welcome_Frame_LabelTop = new Infragistics.Win.Misc.UltraLabel(); this.Label_Make_Caption_Welcome = new Infragistics.Win.Misc.UltraLabel(); this.ultraTabPageControl15 = new Infragistics.Win.UltraWinTabControl.UltraTabPageControl(); this.tableLayoutPanel11 = new System.Windows.Forms.TableLayoutPanel(); this.Creation_Scenarious_Label = new Infragistics.Win.Misc.UltraLabel(); this.linkLabel3 = new System.Windows.Forms.LinkLabel(); this.ultraTabControl3 = new Infragistics.Win.UltraWinTabControl.UltraTabControl(); this.ultraTabSharedControlsPage3 = new Infragistics.Win.UltraWinTabControl.UltraTabSharedControlsPage(); this.ultraPictureBox3 = new Infragistics.Win.UltraWinEditors.UltraPictureBox(); this.Label_Make_Config_Caption = new Infragistics.Win.Misc.UltraLabel(); this.Button_Connect_Make_Config_Servers = new Infragistics.Win.Misc.UltraButton(); this.Combo_Make_Config_Servers = new Infragistics.Win.UltraWinEditors.UltraTextEditor(); this.Label1_Install_Config_Database = new Infragistics.Win.Misc.UltraLabel(); this.DatabaseImageCreator_Page3 = new Infragistics.Win.UltraWinTabControl.UltraTabPageControl(); this.tableLayoutPanel12 = new System.Windows.Forms.TableLayoutPanel(); this.linkLabel4 = new System.Windows.Forms.LinkLabel(); this.Icon_Make_Step1 = new Infragistics.Win.UltraWinEditors.UltraPictureBox(); this.Label_Make_Caption_Step1 = new Infragistics.Win.Misc.UltraLabel(); this.Frame_Make_Step1 = new Infragistics.Win.Misc.UltraGroupBox(); this.tableLayoutPanel13 = new System.Windows.Forms.TableLayoutPanel(); this.Label_Make_Frame_Step1 = new Infragistics.Win.Misc.UltraLabel(); this.TextEdit_Make_Step1 = new Infragistics.Win.UltraWinEditors.UltraTextEditor(); this.Button_Make_Step1 = new Infragistics.Win.Misc.UltraButton(); this.Check_Drop_Create = new Infragistics.Win.UltraWinEditors.UltraCheckEditor(); this.ultraTabPageControl12 = new Infragistics.Win.UltraWinTabControl.UltraTabPageControl(); this.DataBaseInstaller = new Infragistics.Win.UltraWinTabControl.UltraTabControl(); this.ultraTabSharedControlsPage1 = new Infragistics.Win.UltraWinTabControl.UltraTabSharedControlsPage(); this.ultraTabPageControl13 = new Infragistics.Win.UltraWinTabControl.UltraTabPageControl(); this.DatabaseImageCreator = new Infragistics.Win.UltraWinTabControl.UltraTabControl(); this.ultraTabSharedControlsPage6 = new Infragistics.Win.UltraWinTabControl.UltraTabSharedControlsPage(); this.ultraTabPageControl2 = new Infragistics.Win.UltraWinTabControl.UltraTabPageControl(); this.tableLayoutPanel14 = new System.Windows.Forms.TableLayoutPanel(); this.Button_Back = new Infragistics.Win.Misc.UltraButton(); this.Button_Close = new Infragistics.Win.Misc.UltraButton(); this.Button_Next = new Infragistics.Win.Misc.UltraButton(); this.ultraTabPageControl11 = new Infragistics.Win.UltraWinTabControl.UltraTabPageControl(); this.tableLayoutPanel9 = new System.Windows.Forms.TableLayoutPanel(); this.InfoLabel_SqlServer = new Infragistics.Win.Misc.UltraLabel(); this.InfoValueLabelFullText = new Infragistics.Win.Misc.UltraLabel(); this.InfoValueLabelCollation = new Infragistics.Win.Misc.UltraLabel(); this.InfoLabel_Collation = new Infragistics.Win.Misc.UltraLabel(); this.InfoLabel_SqlVersion = new Infragistics.Win.Misc.UltraLabel(); this.InfoValueLabel_ProductVersion = new Infragistics.Win.Misc.UltraLabel(); this.InfoValueLabel_InstanceName = new Infragistics.Win.Misc.UltraLabel(); this.InfoLabel_FullText = new Infragistics.Win.Misc.UltraLabel(); this.tableLayoutPanel6 = new System.Windows.Forms.TableLayoutPanel(); this.ultraButton19 = new Infragistics.Win.Misc.UltraButton(); this.ultraLabel22 = new Infragistics.Win.Misc.UltraLabel(); this.ultraLabel23 = new Infragistics.Win.Misc.UltraLabel(); this.Form1_Fill_Panel = new System.Windows.Forms.Panel(); this.GeneralTab = new Infragistics.Win.UltraWinTabControl.UltraTabControl(); this.ultraTabSharedControlsPage5 = new Infragistics.Win.UltraWinTabControl.UltraTabSharedControlsPage(); this.ultraTabControl2 = new Infragistics.Win.UltraWinTabControl.UltraTabControl(); this.ultraTabSharedControlsPage2 = new Infragistics.Win.UltraWinTabControl.UltraTabSharedControlsPage(); this.LeftPannel = new Infragistics.Win.UltraWinTabControl.UltraTabControl(); this.ultraTabSharedControlsPage4 = new Infragistics.Win.UltraWinTabControl.UltraTabSharedControlsPage(); this._Form1_Toolbars_Dock_Area_Left = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea(); this.ultraToolbarsManager1 = new Infragistics.Win.UltraWinToolbars.UltraToolbarsManager(this.components); this._Form1_Toolbars_Dock_Area_Right = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea(); this._Form1_Toolbars_Dock_Area_Top = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea(); this._Form1_Toolbars_Dock_Area_Bottom = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea(); this.richTextBox7 = new System.Windows.Forms.RichTextBox(); this.ultraToolTipManager1 = new Infragistics.Win.UltraWinToolTip.UltraToolTipManager(this.components); this.ultraTabPageControl16.SuspendLayout(); this.Frame_Install_Config_Frame2.ClientArea.SuspendLayout(); this.Frame_Install_Config_Frame2.SuspendLayout(); this.tableLayoutPanel3.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.Edit_Install_Config_DataBaseInfo)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.Edit_Install_Config_WhereTo)).BeginInit(); this.ultraTabPageControl3.SuspendLayout(); this.tableLayoutPanel4.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.CheckBox_CodexDSXUsers)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.FullTextSearch)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.CheckBox_CodexDSUsers)).BeginInit(); this.ultraTabPageControl5.SuspendLayout(); this.tableLayoutPanel10.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.EditBox_Destination_Make_Config_Servers)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.EditBox_Source_Make_Config_Servers)).BeginInit(); this.ultraTabPageControl1.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout(); this.Frame_Install_Welcome.ClientArea.SuspendLayout(); this.Frame_Install_Welcome.SuspendLayout(); this.tableLayoutPanel2.SuspendLayout(); this.ultraTabPageControl4.SuspendLayout(); this.tableLayoutPanel8.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.ultraTabControl1)).BeginInit(); this.ultraTabControl1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.Edit_Install_Config_Servers)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.Database_Installation_Scenario)).BeginInit(); this.Install_Page_Step1.SuspendLayout(); this.tableLayoutPanel5.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.Install_Group_Step1)).BeginInit(); this.Install_Group_Step1.SuspendLayout(); this.ultraTabPageControl14.SuspendLayout(); this.tableLayoutPanel7.SuspendLayout(); this.Frame_Make_Welcome.ClientArea.SuspendLayout(); this.Frame_Make_Welcome.SuspendLayout(); this.ultraTabPageControl15.SuspendLayout(); this.tableLayoutPanel11.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.ultraTabControl3)).BeginInit(); this.ultraTabControl3.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.Combo_Make_Config_Servers)).BeginInit(); this.DatabaseImageCreator_Page3.SuspendLayout(); this.tableLayoutPanel12.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.Frame_Make_Step1)).BeginInit(); this.Frame_Make_Step1.SuspendLayout(); this.tableLayoutPanel13.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.TextEdit_Make_Step1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.Check_Drop_Create)).BeginInit(); this.ultraTabPageControl12.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.DataBaseInstaller)).BeginInit(); this.DataBaseInstaller.SuspendLayout(); this.ultraTabPageControl13.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.DatabaseImageCreator)).BeginInit(); this.DatabaseImageCreator.SuspendLayout(); this.ultraTabPageControl2.SuspendLayout(); this.tableLayoutPanel14.SuspendLayout(); this.ultraTabPageControl11.SuspendLayout(); this.tableLayoutPanel9.SuspendLayout(); this.tableLayoutPanel6.SuspendLayout(); this.Form1_Fill_Panel.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.GeneralTab)).BeginInit(); this.GeneralTab.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.ultraTabControl2)).BeginInit(); this.ultraTabControl2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.LeftPannel)).BeginInit(); this.LeftPannel.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.ultraToolbarsManager1)).BeginInit(); this.SuspendLayout(); // // ultraTabPageControl16 // this.ultraTabPageControl16.Controls.Add(this.Frame_Install_Config_Frame2); this.ultraTabPageControl16.Location = new System.Drawing.Point(1, 25); this.ultraTabPageControl16.Name = "ultraTabPageControl16"; this.ultraTabPageControl16.Size = new System.Drawing.Size(622, 209); // // Frame_Install_Config_Frame2 // appearance1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(57)))), ((int)(((byte)(116)))), ((int)(((byte)(176))))); this.Frame_Install_Config_Frame2.Appearance = appearance1; this.Frame_Install_Config_Frame2.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid; // // Frame_Install_Config_Frame2.ClientArea // this.Frame_Install_Config_Frame2.ClientArea.Controls.Add(this.tableLayoutPanel3); this.Frame_Install_Config_Frame2.Dock = System.Windows.Forms.DockStyle.Fill; this.Frame_Install_Config_Frame2.Location = new System.Drawing.Point(0, 0); this.Frame_Install_Config_Frame2.Name = "Frame_Install_Config_Frame2"; this.Frame_Install_Config_Frame2.Size = new System.Drawing.Size(622, 209); this.Frame_Install_Config_Frame2.TabIndex = 23; this.Frame_Install_Config_Frame2.UseAppStyling = false; this.Frame_Install_Config_Frame2.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; // // tableLayoutPanel3 // this.tableLayoutPanel3.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.tableLayoutPanel3.ColumnCount = 4; this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel3.Controls.Add(this.Button_Install_Config_DataBaseInfo, 3, 3); this.tableLayoutPanel3.Controls.Add(this.Button_Install_Config_Save, 3, 0); this.tableLayoutPanel3.Controls.Add(this.Edit_Install_Config_DataBaseInfo, 1, 3); this.tableLayoutPanel3.Controls.Add(this.Icon_Install_Config_DataBaseInfo, 0, 3); this.tableLayoutPanel3.Controls.Add(this.Icon_Install_Config_OpenFolder, 0, 1); this.tableLayoutPanel3.Controls.Add(this.Label_Install_Config_InfoFille, 1, 2); this.tableLayoutPanel3.Controls.Add(this.Label_Install_Config_WhereToCopy, 1, 0); this.tableLayoutPanel3.Controls.Add(this.Button_Install_Config_WhereTo, 3, 1); this.tableLayoutPanel3.Controls.Add(this.Edit_Install_Config_WhereTo, 1, 1); this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel3.Location = new System.Drawing.Point(0, 0); this.tableLayoutPanel3.Name = "tableLayoutPanel3"; this.tableLayoutPanel3.RowCount = 5; this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel3.Size = new System.Drawing.Size(620, 207); this.tableLayoutPanel3.TabIndex = 33; // // Button_Install_Config_DataBaseInfo // this.Button_Install_Config_DataBaseInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.Button_Install_Config_DataBaseInfo.ButtonStyle = Infragistics.Win.UIElementButtonStyle.Office2013ScrollbarButton; this.Button_Install_Config_DataBaseInfo.Location = new System.Drawing.Point(504, 94); this.Button_Install_Config_DataBaseInfo.Margin = new System.Windows.Forms.Padding(6, 6, 6, 3); this.Button_Install_Config_DataBaseInfo.Name = "Button_Install_Config_DataBaseInfo"; this.Button_Install_Config_DataBaseInfo.Padding = new System.Drawing.Size(6, 0); this.Button_Install_Config_DataBaseInfo.Size = new System.Drawing.Size(110, 25); this.Button_Install_Config_DataBaseInfo.TabIndex = 4; this.Button_Install_Config_DataBaseInfo.Text = "არჩევა"; this.Button_Install_Config_DataBaseInfo.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; this.Button_Install_Config_DataBaseInfo.Click += new System.EventHandler(this.ultraButton8_Click); // // Button_Install_Config_Save // this.Button_Install_Config_Save.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); appearance2.Image = ((object)(resources.GetObject("appearance2.Image"))); this.Button_Install_Config_Save.Appearance = appearance2; this.Button_Install_Config_Save.ButtonStyle = Infragistics.Win.UIElementButtonStyle.FlatBorderless; this.Button_Install_Config_Save.Location = new System.Drawing.Point(589, 0); this.Button_Install_Config_Save.Margin = new System.Windows.Forms.Padding(0); this.Button_Install_Config_Save.Name = "Button_Install_Config_Save"; this.Button_Install_Config_Save.Padding = new System.Drawing.Size(4, 0); this.Button_Install_Config_Save.Size = new System.Drawing.Size(31, 24); this.Button_Install_Config_Save.TabIndex = 23; this.Button_Install_Config_Save.UseAppStyling = false; this.Button_Install_Config_Save.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; this.Button_Install_Config_Save.Click += new System.EventHandler(this.ultraButton20_Click); // // Edit_Install_Config_DataBaseInfo // this.tableLayoutPanel3.SetColumnSpan(this.Edit_Install_Config_DataBaseInfo, 2); this.Edit_Install_Config_DataBaseInfo.DisplayStyle = Infragistics.Win.EmbeddableElementDisplayStyle.Office2013; this.Edit_Install_Config_DataBaseInfo.Font = new System.Drawing.Font("MS Reference Sans Serif", 8.25F); this.Edit_Install_Config_DataBaseInfo.Location = new System.Drawing.Point(52, 92); this.Edit_Install_Config_DataBaseInfo.Margin = new System.Windows.Forms.Padding(6, 6, 6, 3); this.Edit_Install_Config_DataBaseInfo.Name = "Edit_Install_Config_DataBaseInfo"; this.Edit_Install_Config_DataBaseInfo.Size = new System.Drawing.Size(439, 22); this.Edit_Install_Config_DataBaseInfo.TabIndex = 3; // // Icon_Install_Config_DataBaseInfo // this.Icon_Install_Config_DataBaseInfo.AutoSize = true; this.Icon_Install_Config_DataBaseInfo.BackColor = System.Drawing.Color.Transparent; this.Icon_Install_Config_DataBaseInfo.BorderShadowColor = System.Drawing.Color.Empty; this.Icon_Install_Config_DataBaseInfo.BorderStyle = Infragistics.Win.UIElementBorderStyle.None; this.Icon_Install_Config_DataBaseInfo.Image = ((object)(resources.GetObject("Icon_Install_Config_DataBaseInfo.Image"))); this.Icon_Install_Config_DataBaseInfo.ImageTransparentColor = System.Drawing.Color.Transparent; this.Icon_Install_Config_DataBaseInfo.Location = new System.Drawing.Point(3, 89); this.Icon_Install_Config_DataBaseInfo.Name = "Icon_Install_Config_DataBaseInfo"; this.Icon_Install_Config_DataBaseInfo.Padding = new System.Drawing.Size(4, 0); this.Icon_Install_Config_DataBaseInfo.Size = new System.Drawing.Size(40, 32); this.Icon_Install_Config_DataBaseInfo.TabIndex = 6; this.Icon_Install_Config_DataBaseInfo.UseAppStyling = false; // // Icon_Install_Config_OpenFolder // appearance3.BorderColor = System.Drawing.Color.Transparent; this.Icon_Install_Config_OpenFolder.Appearance = appearance3; this.Icon_Install_Config_OpenFolder.AutoSize = true; this.Icon_Install_Config_OpenFolder.BackColor = System.Drawing.Color.Transparent; this.Icon_Install_Config_OpenFolder.BorderShadowColor = System.Drawing.Color.Empty; this.Icon_Install_Config_OpenFolder.Image = ((object)(resources.GetObject("Icon_Install_Config_OpenFolder.Image"))); this.Icon_Install_Config_OpenFolder.Location = new System.Drawing.Point(3, 27); this.Icon_Install_Config_OpenFolder.Name = "Icon_Install_Config_OpenFolder"; this.Icon_Install_Config_OpenFolder.Padding = new System.Drawing.Size(4, 0); this.Icon_Install_Config_OpenFolder.Size = new System.Drawing.Size(40, 32); this.Icon_Install_Config_OpenFolder.TabIndex = 22; this.Icon_Install_Config_OpenFolder.UseAppStyling = false; // // Label_Install_Config_InfoFille // appearance4.BackColor = System.Drawing.Color.Transparent; this.Label_Install_Config_InfoFille.Appearance = appearance4; this.Label_Install_Config_InfoFille.AutoSize = true; this.tableLayoutPanel3.SetColumnSpan(this.Label_Install_Config_InfoFille, 2); this.Label_Install_Config_InfoFille.Location = new System.Drawing.Point(49, 65); this.Label_Install_Config_InfoFille.Name = "Label_Install_Config_InfoFille"; this.Label_Install_Config_InfoFille.Size = new System.Drawing.Size(287, 18); this.Label_Install_Config_InfoFille.TabIndex = 5; this.Label_Install_Config_InfoFille.Text = "საიდან კოპირდება (მონაცემთა ბაზის Info ფაილი)"; // // Label_Install_Config_WhereToCopy // appearance5.BackColor = System.Drawing.Color.Transparent; this.Label_Install_Config_WhereToCopy.Appearance = appearance5; this.Label_Install_Config_WhereToCopy.AutoSize = true; this.Label_Install_Config_WhereToCopy.Location = new System.Drawing.Point(49, 3); this.Label_Install_Config_WhereToCopy.Name = "Label_Install_Config_WhereToCopy"; this.Label_Install_Config_WhereToCopy.Size = new System.Drawing.Size(93, 18); this.Label_Install_Config_WhereToCopy.TabIndex = 3; this.Label_Install_Config_WhereToCopy.Text = "სად კოპირდება "; // // Button_Install_Config_WhereTo // this.Button_Install_Config_WhereTo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.Button_Install_Config_WhereTo.ButtonStyle = Infragistics.Win.UIElementButtonStyle.Office2013ScrollbarButton; this.Button_Install_Config_WhereTo.Location = new System.Drawing.Point(504, 32); this.Button_Install_Config_WhereTo.Margin = new System.Windows.Forms.Padding(6, 6, 6, 3); this.Button_Install_Config_WhereTo.Name = "Button_Install_Config_WhereTo"; this.Button_Install_Config_WhereTo.Padding = new System.Drawing.Size(6, 0); this.Button_Install_Config_WhereTo.Size = new System.Drawing.Size(110, 25); this.Button_Install_Config_WhereTo.TabIndex = 2; this.Button_Install_Config_WhereTo.Text = "არჩევა"; this.Button_Install_Config_WhereTo.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; this.Button_Install_Config_WhereTo.Click += new System.EventHandler(this.ultraButton7_Click); // // Edit_Install_Config_WhereTo // this.tableLayoutPanel3.SetColumnSpan(this.Edit_Install_Config_WhereTo, 2); this.Edit_Install_Config_WhereTo.DisplayStyle = Infragistics.Win.EmbeddableElementDisplayStyle.Office2013; this.Edit_Install_Config_WhereTo.Font = new System.Drawing.Font("MS Reference Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.Edit_Install_Config_WhereTo.Location = new System.Drawing.Point(52, 30); this.Edit_Install_Config_WhereTo.Margin = new System.Windows.Forms.Padding(6, 6, 6, 3); this.Edit_Install_Config_WhereTo.Name = "Edit_Install_Config_WhereTo"; this.Edit_Install_Config_WhereTo.Size = new System.Drawing.Size(440, 22); this.Edit_Install_Config_WhereTo.TabIndex = 1; // // ultraTabPageControl3 // this.ultraTabPageControl3.Controls.Add(this.tableLayoutPanel4); this.ultraTabPageControl3.Location = new System.Drawing.Point(-10000, -10000); this.ultraTabPageControl3.Name = "ultraTabPageControl3"; this.ultraTabPageControl3.Size = new System.Drawing.Size(622, 209); // // tableLayoutPanel4 // this.tableLayoutPanel4.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.tableLayoutPanel4.ColumnCount = 3; this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel4.Controls.Add(this.CheckBox_CodexDSXUsers, 1, 2); this.tableLayoutPanel4.Controls.Add(this.ultraLabel3, 1, 4); this.tableLayoutPanel4.Controls.Add(this.ultraLabel2, 1, 1); this.tableLayoutPanel4.Controls.Add(this.FullTextSearch, 1, 5); this.tableLayoutPanel4.Controls.Add(this.ultraPictureBox4, 0, 5); this.tableLayoutPanel4.Controls.Add(this.CheckBox_CodexDSUsers, 1, 3); this.tableLayoutPanel4.Controls.Add(this.ultraPictureBox2, 0, 2); this.tableLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel4.Location = new System.Drawing.Point(0, 0); this.tableLayoutPanel4.Name = "tableLayoutPanel4"; this.tableLayoutPanel4.RowCount = 6; this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel4.Size = new System.Drawing.Size(622, 209); this.tableLayoutPanel4.TabIndex = 33; // // CheckBox_CodexDSXUsers // appearance6.BackColor = System.Drawing.Color.Transparent; this.CheckBox_CodexDSXUsers.Appearance = appearance6; this.CheckBox_CodexDSXUsers.AutoSize = true; this.CheckBox_CodexDSXUsers.BackColor = System.Drawing.Color.Transparent; this.CheckBox_CodexDSXUsers.BackColorInternal = System.Drawing.Color.Transparent; this.CheckBox_CodexDSXUsers.ButtonStyle = Infragistics.Win.UIElementButtonStyle.Windows8Button; this.tableLayoutPanel4.SetColumnSpan(this.CheckBox_CodexDSXUsers, 2); this.CheckBox_CodexDSXUsers.GlyphInfo = Infragistics.Win.UIElementDrawParams.Office2013CheckBoxGlyphInfo; this.CheckBox_CodexDSXUsers.Location = new System.Drawing.Point(33, 27); this.CheckBox_CodexDSXUsers.Name = "CheckBox_CodexDSXUsers"; this.CheckBox_CodexDSXUsers.Size = new System.Drawing.Size(393, 21); this.CheckBox_CodexDSXUsers.TabIndex = 39; this.CheckBox_CodexDSXUsers.Text = "SQL Server ის მომხარებლები CodexDSXUser (With Strong Password) "; this.CheckBox_CodexDSXUsers.UseAppStyling = false; this.CheckBox_CodexDSXUsers.CheckedChanged += new System.EventHandler(this.CheckBox_CodexXUsers_CheckedChanged); // // ultraLabel3 // appearance7.FontData.BoldAsString = "True"; appearance7.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(28)))), ((int)(((byte)(100)))), ((int)(((byte)(65))))); this.ultraLabel3.Appearance = appearance7; this.ultraLabel3.AutoSize = true; this.ultraLabel3.Location = new System.Drawing.Point(33, 81); this.ultraLabel3.Name = "ultraLabel3"; this.ultraLabel3.Size = new System.Drawing.Size(89, 18); this.ultraLabel3.TabIndex = 35; this.ultraLabel3.Text = "FullText Search"; // // ultraLabel2 // appearance8.FontData.BoldAsString = "True"; appearance8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(28)))), ((int)(((byte)(100)))), ((int)(((byte)(65))))); this.ultraLabel2.Appearance = appearance8; this.ultraLabel2.AutoSize = true; this.ultraLabel2.Location = new System.Drawing.Point(33, 3); this.ultraLabel2.Name = "ultraLabel2"; this.ultraLabel2.Size = new System.Drawing.Size(97, 18); this.ultraLabel2.TabIndex = 34; this.ultraLabel2.Text = "SQL Server Users"; // // FullTextSearch // appearance9.BackColor = System.Drawing.Color.White; this.FullTextSearch.Appearance = appearance9; this.FullTextSearch.AutoSize = true; this.FullTextSearch.BackColor = System.Drawing.Color.White; this.FullTextSearch.BackColorInternal = System.Drawing.Color.Transparent; this.FullTextSearch.ButtonStyle = Infragistics.Win.UIElementButtonStyle.Office2013ScrollbarButton; this.tableLayoutPanel4.SetColumnSpan(this.FullTextSearch, 2); this.FullTextSearch.GlyphInfo = Infragistics.Win.UIElementDrawParams.Office2013CheckBoxGlyphInfo; this.FullTextSearch.Location = new System.Drawing.Point(33, 105); this.FullTextSearch.Name = "FullTextSearch"; this.FullTextSearch.Size = new System.Drawing.Size(237, 21); this.FullTextSearch.TabIndex = 3; this.FullTextSearch.Text = "სტრულტექსტოვანი კატალოგის შემნა"; this.FullTextSearch.UseAppStyling = false; this.FullTextSearch.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; this.FullTextSearch.CheckedChanged += new System.EventHandler(this.FullTextSearch_CheckedChanged); // // ultraPictureBox4 // this.ultraPictureBox4.AutoSize = true; this.ultraPictureBox4.BackColor = System.Drawing.Color.Transparent; this.ultraPictureBox4.BorderShadowColor = System.Drawing.Color.Empty; this.ultraPictureBox4.BorderStyle = Infragistics.Win.UIElementBorderStyle.None; this.ultraPictureBox4.Image = ((object)(resources.GetObject("ultraPictureBox4.Image"))); this.ultraPictureBox4.ImageTransparentColor = System.Drawing.Color.Transparent; this.ultraPictureBox4.Location = new System.Drawing.Point(3, 105); this.ultraPictureBox4.Name = "ultraPictureBox4"; this.ultraPictureBox4.Padding = new System.Drawing.Size(4, 0); this.ultraPictureBox4.Size = new System.Drawing.Size(24, 16); this.ultraPictureBox4.TabIndex = 35; this.ultraPictureBox4.UseAppStyling = false; // // CheckBox_CodexDSUsers // appearance10.BackColor = System.Drawing.Color.Transparent; this.CheckBox_CodexDSUsers.Appearance = appearance10; this.CheckBox_CodexDSUsers.AutoSize = true; this.CheckBox_CodexDSUsers.BackColor = System.Drawing.Color.Transparent; this.CheckBox_CodexDSUsers.BackColorInternal = System.Drawing.Color.Transparent; this.CheckBox_CodexDSUsers.ButtonStyle = Infragistics.Win.UIElementButtonStyle.Windows8Button; this.tableLayoutPanel4.SetColumnSpan(this.CheckBox_CodexDSUsers, 2); this.CheckBox_CodexDSUsers.GlyphInfo = Infragistics.Win.UIElementDrawParams.Office2013CheckBoxGlyphInfo; this.CheckBox_CodexDSUsers.Location = new System.Drawing.Point(33, 54); this.CheckBox_CodexDSUsers.Name = "CheckBox_CodexDSUsers"; this.CheckBox_CodexDSUsers.Size = new System.Drawing.Size(397, 21); this.CheckBox_CodexDSUsers.TabIndex = 28; this.CheckBox_CodexDSUsers.Text = "SQL Server ის მომხარებლები CodexDSUser (ძველი ვერსიებისთვის)"; this.CheckBox_CodexDSUsers.UseAppStyling = false; this.CheckBox_CodexDSUsers.CheckedChanged += new System.EventHandler(this.CodexUsers_CheckedChanged); // // ultraPictureBox2 // this.ultraPictureBox2.AutoSize = true; this.ultraPictureBox2.BackColor = System.Drawing.Color.Transparent; this.ultraPictureBox2.BorderShadowColor = System.Drawing.Color.Empty; this.ultraPictureBox2.BorderStyle = Infragistics.Win.UIElementBorderStyle.None; this.ultraPictureBox2.Image = ((object)(resources.GetObject("ultraPictureBox2.Image"))); this.ultraPictureBox2.ImageTransparentColor = System.Drawing.Color.Transparent; this.ultraPictureBox2.Location = new System.Drawing.Point(3, 27); this.ultraPictureBox2.Name = "ultraPictureBox2"; this.ultraPictureBox2.Padding = new System.Drawing.Size(4, 0); this.ultraPictureBox2.Size = new System.Drawing.Size(24, 16); this.ultraPictureBox2.TabIndex = 38; this.ultraPictureBox2.UseAppStyling = false; // // ultraTabPageControl5 // this.ultraTabPageControl5.Controls.Add(this.tableLayoutPanel10); this.ultraTabPageControl5.Location = new System.Drawing.Point(1, 25); this.ultraTabPageControl5.Name = "ultraTabPageControl5"; this.ultraTabPageControl5.Size = new System.Drawing.Size(622, 194); // // tableLayoutPanel10 // this.tableLayoutPanel10.ColumnCount = 3; this.tableLayoutPanel10.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel10.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel10.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel10.Controls.Add(this.Button_Browse2_Make_Config_Servers, 2, 3); this.tableLayoutPanel10.Controls.Add(this.Icon3_Make_Config_Database, 0, 3); this.tableLayoutPanel10.Controls.Add(this.EditBox_Destination_Make_Config_Servers, 1, 3); this.tableLayoutPanel10.Controls.Add(this.Icon2_Make_Config_Database, 0, 1); this.tableLayoutPanel10.Controls.Add(this.Button_Browse1_Make_Config_Servers, 2, 1); this.tableLayoutPanel10.Controls.Add(this.Label3_Install_Config_Database, 1, 2); this.tableLayoutPanel10.Controls.Add(this.Button_Save_Make_Config_Servers, 2, 0); this.tableLayoutPanel10.Controls.Add(this.EditBox_Source_Make_Config_Servers, 1, 1); this.tableLayoutPanel10.Controls.Add(this.Label2_Install_Config_Database, 1, 0); this.tableLayoutPanel10.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel10.Location = new System.Drawing.Point(0, 0); this.tableLayoutPanel10.Name = "tableLayoutPanel10"; this.tableLayoutPanel10.RowCount = 4; this.tableLayoutPanel10.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel10.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel10.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel10.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel10.Size = new System.Drawing.Size(622, 194); this.tableLayoutPanel10.TabIndex = 0; // // Button_Browse2_Make_Config_Servers // this.Button_Browse2_Make_Config_Servers.ButtonStyle = Infragistics.Win.UIElementButtonStyle.Office2010ScrollbarButton; this.Button_Browse2_Make_Config_Servers.Location = new System.Drawing.Point(530, 97); this.Button_Browse2_Make_Config_Servers.Margin = new System.Windows.Forms.Padding(6, 3, 6, 3); this.Button_Browse2_Make_Config_Servers.Name = "Button_Browse2_Make_Config_Servers"; this.Button_Browse2_Make_Config_Servers.Size = new System.Drawing.Size(86, 25); this.Button_Browse2_Make_Config_Servers.TabIndex = 2; this.Button_Browse2_Make_Config_Servers.Text = "არჩევა"; this.Button_Browse2_Make_Config_Servers.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; this.Button_Browse2_Make_Config_Servers.Click += new System.EventHandler(this.ultraButton2_Click_1); // // Icon3_Make_Config_Database // this.Icon3_Make_Config_Database.AutoSize = true; this.Icon3_Make_Config_Database.BackColor = System.Drawing.Color.Transparent; this.Icon3_Make_Config_Database.BorderShadowColor = System.Drawing.Color.Empty; this.Icon3_Make_Config_Database.BorderStyle = Infragistics.Win.UIElementBorderStyle.None; this.Icon3_Make_Config_Database.Image = ((object)(resources.GetObject("Icon3_Make_Config_Database.Image"))); this.Icon3_Make_Config_Database.ImageTransparentColor = System.Drawing.Color.Transparent; this.Icon3_Make_Config_Database.Location = new System.Drawing.Point(3, 97); this.Icon3_Make_Config_Database.Name = "Icon3_Make_Config_Database"; this.Icon3_Make_Config_Database.Padding = new System.Drawing.Size(4, 0); this.Icon3_Make_Config_Database.Size = new System.Drawing.Size(40, 32); this.Icon3_Make_Config_Database.TabIndex = 6; this.Icon3_Make_Config_Database.UseAppStyling = false; // // EditBox_Destination_Make_Config_Servers // this.EditBox_Destination_Make_Config_Servers.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.EditBox_Destination_Make_Config_Servers.DisplayStyle = Infragistics.Win.EmbeddableElementDisplayStyle.Office2013; this.EditBox_Destination_Make_Config_Servers.Font = new System.Drawing.Font("MS Reference Sans Serif", 8.25F); this.EditBox_Destination_Make_Config_Servers.Location = new System.Drawing.Point(49, 97); this.EditBox_Destination_Make_Config_Servers.Name = "EditBox_Destination_Make_Config_Servers"; this.EditBox_Destination_Make_Config_Servers.Size = new System.Drawing.Size(472, 22); this.EditBox_Destination_Make_Config_Servers.TabIndex = 1; // // Icon2_Make_Config_Database // appearance11.BorderColor = System.Drawing.Color.Transparent; this.Icon2_Make_Config_Database.Appearance = appearance11; this.Icon2_Make_Config_Database.AutoSize = true; this.Icon2_Make_Config_Database.BorderShadowColor = System.Drawing.Color.Empty; this.Icon2_Make_Config_Database.Image = ((object)(resources.GetObject("Icon2_Make_Config_Database.Image"))); this.Icon2_Make_Config_Database.Location = new System.Drawing.Point(3, 35); this.Icon2_Make_Config_Database.Name = "Icon2_Make_Config_Database"; this.Icon2_Make_Config_Database.Padding = new System.Drawing.Size(4, 0); this.Icon2_Make_Config_Database.Size = new System.Drawing.Size(40, 32); this.Icon2_Make_Config_Database.TabIndex = 22; // // Button_Browse1_Make_Config_Servers // this.Button_Browse1_Make_Config_Servers.ButtonStyle = Infragistics.Win.UIElementButtonStyle.Office2010ScrollbarButton; this.Button_Browse1_Make_Config_Servers.Location = new System.Drawing.Point(530, 35); this.Button_Browse1_Make_Config_Servers.Margin = new System.Windows.Forms.Padding(6, 3, 6, 3); this.Button_Browse1_Make_Config_Servers.Name = "Button_Browse1_Make_Config_Servers"; this.Button_Browse1_Make_Config_Servers.Size = new System.Drawing.Size(86, 25); this.Button_Browse1_Make_Config_Servers.TabIndex = 4; this.Button_Browse1_Make_Config_Servers.Text = "არჩევა"; this.Button_Browse1_Make_Config_Servers.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; this.Button_Browse1_Make_Config_Servers.Click += new System.EventHandler(this.ultraButton9_Click_1); // // Label3_Install_Config_Database // appearance12.BackColor = System.Drawing.Color.Transparent; this.Label3_Install_Config_Database.Appearance = appearance12; this.Label3_Install_Config_Database.AutoSize = true; this.Label3_Install_Config_Database.Location = new System.Drawing.Point(49, 73); this.Label3_Install_Config_Database.Name = "Label3_Install_Config_Database"; this.Label3_Install_Config_Database.Size = new System.Drawing.Size(199, 18); this.Label3_Install_Config_Database.TabIndex = 3; this.Label3_Install_Config_Database.Text = "სად იქმნდება საინსტალაციო ბაზა"; // // Button_Save_Make_Config_Servers // this.Button_Save_Make_Config_Servers.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); appearance13.Image = ((object)(resources.GetObject("appearance13.Image"))); this.Button_Save_Make_Config_Servers.Appearance = appearance13; this.Button_Save_Make_Config_Servers.ButtonStyle = Infragistics.Win.UIElementButtonStyle.Office2013Button; this.Button_Save_Make_Config_Servers.Location = new System.Drawing.Point(594, 4); this.Button_Save_Make_Config_Servers.Margin = new System.Windows.Forms.Padding(3, 4, 4, 4); this.Button_Save_Make_Config_Servers.Name = "Button_Save_Make_Config_Servers"; this.Button_Save_Make_Config_Servers.Size = new System.Drawing.Size(24, 24); this.Button_Save_Make_Config_Servers.TabIndex = 23; this.Button_Save_Make_Config_Servers.UseAppStyling = false; this.Button_Save_Make_Config_Servers.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; this.Button_Save_Make_Config_Servers.Click += new System.EventHandler(this.ultraButton3_Click_1); // // EditBox_Source_Make_Config_Servers // this.EditBox_Source_Make_Config_Servers.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.EditBox_Source_Make_Config_Servers.DisplayStyle = Infragistics.Win.EmbeddableElementDisplayStyle.Office2013; this.EditBox_Source_Make_Config_Servers.Font = new System.Drawing.Font("MS Reference Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.EditBox_Source_Make_Config_Servers.Location = new System.Drawing.Point(52, 41); this.EditBox_Source_Make_Config_Servers.Margin = new System.Windows.Forms.Padding(6, 6, 6, 3); this.EditBox_Source_Make_Config_Servers.Name = "EditBox_Source_Make_Config_Servers"; this.EditBox_Source_Make_Config_Servers.Size = new System.Drawing.Size(466, 22); this.EditBox_Source_Make_Config_Servers.TabIndex = 3; // // Label2_Install_Config_Database // this.Label2_Install_Config_Database.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); appearance14.BackColor = System.Drawing.Color.Transparent; this.Label2_Install_Config_Database.Appearance = appearance14; this.Label2_Install_Config_Database.AutoSize = true; this.Label2_Install_Config_Database.Location = new System.Drawing.Point(49, 11); this.Label2_Install_Config_Database.Name = "Label2_Install_Config_Database"; this.Label2_Install_Config_Database.Size = new System.Drawing.Size(169, 18); this.Label2_Install_Config_Database.TabIndex = 5; this.Label2_Install_Config_Database.Text = "მონაცემთა ბაზის Info ფაილი"; // // ultraTabPageControl1 // this.ultraTabPageControl1.Controls.Add(this.tableLayoutPanel1); this.ultraTabPageControl1.Location = new System.Drawing.Point(-10000, -10000); this.ultraTabPageControl1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.ultraTabPageControl1.Name = "ultraTabPageControl1"; this.ultraTabPageControl1.Size = new System.Drawing.Size(632, 377); // // tableLayoutPanel1 // this.tableLayoutPanel1.ColumnCount = 3; this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel1.Controls.Add(this.Icon_Install_Welcome, 0, 0); this.tableLayoutPanel1.Controls.Add(this.Frame_Install_Welcome, 0, 1); this.tableLayoutPanel1.Controls.Add(this.Label_Install_Caption_Welcome, 1, 0); this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Top; this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.RowCount = 3; this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); this.tableLayoutPanel1.Size = new System.Drawing.Size(632, 209); this.tableLayoutPanel1.TabIndex = 11; // // Icon_Install_Welcome // this.Icon_Install_Welcome.AutoSize = true; this.Icon_Install_Welcome.BackColor = System.Drawing.Color.Transparent; this.Icon_Install_Welcome.BorderShadowColor = System.Drawing.Color.Empty; this.Icon_Install_Welcome.BorderStyle = Infragistics.Win.UIElementBorderStyle.None; this.Icon_Install_Welcome.Image = ((object)(resources.GetObject("Icon_Install_Welcome.Image"))); this.Icon_Install_Welcome.ImageTransparentColor = System.Drawing.Color.Transparent; this.Icon_Install_Welcome.Location = new System.Drawing.Point(3, 12); this.Icon_Install_Welcome.Margin = new System.Windows.Forms.Padding(3, 12, 3, 3); this.Icon_Install_Welcome.Name = "Icon_Install_Welcome"; this.Icon_Install_Welcome.Padding = new System.Drawing.Size(12, 0); this.Icon_Install_Welcome.Size = new System.Drawing.Size(88, 64); this.Icon_Install_Welcome.TabIndex = 4; this.Icon_Install_Welcome.UseAppStyling = false; this.Icon_Install_Welcome.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; // // Frame_Install_Welcome // appearance15.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(57)))), ((int)(((byte)(116)))), ((int)(((byte)(176))))); this.Frame_Install_Welcome.Appearance = appearance15; this.Frame_Install_Welcome.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid; // // Frame_Install_Welcome.ClientArea // this.Frame_Install_Welcome.ClientArea.Controls.Add(this.tableLayoutPanel2); this.tableLayoutPanel1.SetColumnSpan(this.Frame_Install_Welcome, 3); this.Frame_Install_Welcome.Location = new System.Drawing.Point(8, 82); this.Frame_Install_Welcome.Margin = new System.Windows.Forms.Padding(8, 3, 8, 6); this.Frame_Install_Welcome.Name = "Frame_Install_Welcome"; this.Frame_Install_Welcome.Size = new System.Drawing.Size(613, 81); this.Frame_Install_Welcome.TabIndex = 10; this.Frame_Install_Welcome.UseAppStyling = false; this.Frame_Install_Welcome.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; // // tableLayoutPanel2 // this.tableLayoutPanel2.ColumnCount = 1; this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel2.Controls.Add(this.Icon_Install_Welcome_Frame_LabelCaption, 0, 1); this.tableLayoutPanel2.Controls.Add(this.Icon_Install_Welcome_Frame_LabelTop, 0, 0); this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel2.Location = new System.Drawing.Point(0, 0); this.tableLayoutPanel2.Name = "tableLayoutPanel2"; this.tableLayoutPanel2.RowCount = 2; this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel2.Size = new System.Drawing.Size(611, 79); this.tableLayoutPanel2.TabIndex = 12; // // Icon_Install_Welcome_Frame_LabelCaption // appearance16.BackColor = System.Drawing.Color.Transparent; this.Icon_Install_Welcome_Frame_LabelCaption.Appearance = appearance16; this.Icon_Install_Welcome_Frame_LabelCaption.Dock = System.Windows.Forms.DockStyle.Fill; this.Icon_Install_Welcome_Frame_LabelCaption.Location = new System.Drawing.Point(3, 34); this.Icon_Install_Welcome_Frame_LabelCaption.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.Icon_Install_Welcome_Frame_LabelCaption.Name = "Icon_Install_Welcome_Frame_LabelCaption"; this.Icon_Install_Welcome_Frame_LabelCaption.Padding = new System.Drawing.Size(4, 0); this.Icon_Install_Welcome_Frame_LabelCaption.Size = new System.Drawing.Size(605, 45); this.Icon_Install_Welcome_Frame_LabelCaption.TabIndex = 2; this.Icon_Install_Welcome_Frame_LabelCaption.Text = "პროგრამა აკოპირებს კოდექსი DS 1.6 ის ბაზას, მითითებულ დირექტორიაში და არეგისტრირე" + "ბს მას SQL Server 2014 ზე."; // // Icon_Install_Welcome_Frame_LabelTop // this.Icon_Install_Welcome_Frame_LabelTop.AutoSize = true; this.Icon_Install_Welcome_Frame_LabelTop.Dock = System.Windows.Forms.DockStyle.Fill; this.Icon_Install_Welcome_Frame_LabelTop.Font = new System.Drawing.Font("Sylfaen", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.Icon_Install_Welcome_Frame_LabelTop.Location = new System.Drawing.Point(3, 4); this.Icon_Install_Welcome_Frame_LabelTop.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.Icon_Install_Welcome_Frame_LabelTop.Name = "Icon_Install_Welcome_Frame_LabelTop"; this.Icon_Install_Welcome_Frame_LabelTop.Padding = new System.Drawing.Size(4, 2); this.Icon_Install_Welcome_Frame_LabelTop.Size = new System.Drawing.Size(605, 22); this.Icon_Install_Welcome_Frame_LabelTop.TabIndex = 0; this.Icon_Install_Welcome_Frame_LabelTop.Text = "პროგრამა დააინსტალირებს კოდექს DS 1.6 ის მონაცემთა ბაზას"; // // Label_Install_Caption_Welcome // appearance17.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(28)))), ((int)(((byte)(100)))), ((int)(((byte)(65))))); this.Label_Install_Caption_Welcome.Appearance = appearance17; this.Label_Install_Caption_Welcome.AutoSize = true; this.Label_Install_Caption_Welcome.Font = new System.Drawing.Font("Sylfaen", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.Label_Install_Caption_Welcome.Location = new System.Drawing.Point(97, 12); this.Label_Install_Caption_Welcome.Margin = new System.Windows.Forms.Padding(3, 12, 3, 3); this.Label_Install_Caption_Welcome.Name = "Label_Install_Caption_Welcome"; this.Label_Install_Caption_Welcome.Size = new System.Drawing.Size(462, 31); this.Label_Install_Caption_Welcome.TabIndex = 0; this.Label_Install_Caption_Welcome.Text = "კოდექსი DS 1.6 მონაცემთა ბაზის ინსტალაცია"; // // ultraTabPageControl4 // this.ultraTabPageControl4.Controls.Add(this.tableLayoutPanel8); this.ultraTabPageControl4.Location = new System.Drawing.Point(-10000, -10000); this.ultraTabPageControl4.Name = "ultraTabPageControl4"; this.ultraTabPageControl4.Size = new System.Drawing.Size(632, 377); // // tableLayoutPanel8 // this.tableLayoutPanel8.ColumnCount = 4; this.tableLayoutPanel8.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel8.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel8.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel8.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel8.Controls.Add(this.ultraPictureBox1, 0, 0); this.tableLayoutPanel8.Controls.Add(this.ultraTabControl1, 0, 4); this.tableLayoutPanel8.Controls.Add(this.ultraLabel1, 1, 0); this.tableLayoutPanel8.Controls.Add(this.Button_Install_Config_Connect, 3, 2); this.tableLayoutPanel8.Controls.Add(this.linkLabel2, 3, 0); this.tableLayoutPanel8.Controls.Add(this.Edit_Install_Config_Servers, 3, 1); this.tableLayoutPanel8.Controls.Add(this.ultraLabel5, 2, 1); this.tableLayoutPanel8.Controls.Add(this.Installlation_Scenarious_Label, 0, 1); this.tableLayoutPanel8.Controls.Add(this.Database_Installation_Scenario, 0, 2); this.tableLayoutPanel8.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel8.Location = new System.Drawing.Point(0, 0); this.tableLayoutPanel8.Name = "tableLayoutPanel8"; this.tableLayoutPanel8.RowCount = 5; this.tableLayoutPanel8.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel8.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel8.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel8.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel8.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel8.Size = new System.Drawing.Size(632, 377); this.tableLayoutPanel8.TabIndex = 37; // // ultraPictureBox1 // this.ultraPictureBox1.AutoSize = true; this.ultraPictureBox1.BackColor = System.Drawing.Color.Transparent; this.ultraPictureBox1.BorderShadowColor = System.Drawing.Color.Empty; this.ultraPictureBox1.BorderStyle = Infragistics.Win.UIElementBorderStyle.None; this.ultraPictureBox1.Image = ((object)(resources.GetObject("ultraPictureBox1.Image"))); this.ultraPictureBox1.Location = new System.Drawing.Point(3, 3); this.ultraPictureBox1.Name = "ultraPictureBox1"; this.ultraPictureBox1.Padding = new System.Drawing.Size(12, 8); this.ultraPictureBox1.Size = new System.Drawing.Size(72, 64); this.ultraPictureBox1.TabIndex = 24; this.ultraPictureBox1.UseAppStyling = false; this.ultraPictureBox1.Click += new System.EventHandler(this.ultraPictureBox1_Click_1); // // ultraTabControl1 // this.tableLayoutPanel8.SetColumnSpan(this.ultraTabControl1, 4); this.ultraTabControl1.Controls.Add(this.ultraTabSharedControlsPage7); this.ultraTabControl1.Controls.Add(this.ultraTabPageControl16); this.ultraTabControl1.Controls.Add(this.ultraTabPageControl3); this.ultraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill; this.ultraTabControl1.Location = new System.Drawing.Point(3, 137); this.ultraTabControl1.Name = "ultraTabControl1"; this.ultraTabControl1.SharedControlsPage = this.ultraTabSharedControlsPage7; this.ultraTabControl1.Size = new System.Drawing.Size(626, 237); this.ultraTabControl1.TabIndex = 29; appearance18.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(57)))), ((int)(((byte)(116)))), ((int)(((byte)(176))))); ultraTab18.ClientAreaAppearance = appearance18; ultraTab18.TabPage = this.ultraTabPageControl16; ultraTab18.Text = "ბაზის კოპირება"; appearance19.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(57)))), ((int)(((byte)(116)))), ((int)(((byte)(176))))); ultraTab1.ClientAreaAppearance = appearance19; ultraTab1.TabPage = this.ultraTabPageControl3; ultraTab1.Text = "ოფციები"; this.ultraTabControl1.Tabs.AddRange(new Infragistics.Win.UltraWinTabControl.UltraTab[] { ultraTab18, ultraTab1}); // // ultraTabSharedControlsPage7 // this.ultraTabSharedControlsPage7.Location = new System.Drawing.Point(-10000, -10000); this.ultraTabSharedControlsPage7.Name = "ultraTabSharedControlsPage7"; this.ultraTabSharedControlsPage7.Size = new System.Drawing.Size(622, 209); // // ultraLabel1 // appearance20.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(28)))), ((int)(((byte)(100)))), ((int)(((byte)(65))))); this.ultraLabel1.Appearance = appearance20; this.ultraLabel1.AutoSize = true; this.tableLayoutPanel8.SetColumnSpan(this.ultraLabel1, 2); this.ultraLabel1.Font = new System.Drawing.Font("Sylfaen", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.ultraLabel1.Location = new System.Drawing.Point(81, 3); this.ultraLabel1.Name = "ultraLabel1"; this.ultraLabel1.Padding = new System.Drawing.Size(12, 8); this.ultraLabel1.Size = new System.Drawing.Size(330, 47); this.ultraLabel1.TabIndex = 25; this.ultraLabel1.Text = "მონაცემთა ბაზის ინსტალაცია"; // // Button_Install_Config_Connect // this.Button_Install_Config_Connect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.Button_Install_Config_Connect.ButtonStyle = Infragistics.Win.UIElementButtonStyle.Office2013ScrollbarButton; this.Button_Install_Config_Connect.Location = new System.Drawing.Point(513, 106); this.Button_Install_Config_Connect.Margin = new System.Windows.Forms.Padding(8, 6, 8, 3); this.Button_Install_Config_Connect.Name = "Button_Install_Config_Connect"; this.Button_Install_Config_Connect.Size = new System.Drawing.Size(111, 25); this.Button_Install_Config_Connect.TabIndex = 31; this.Button_Install_Config_Connect.Text = "დაკავშირება"; this.Button_Install_Config_Connect.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; this.Button_Install_Config_Connect.Click += new System.EventHandler(this.Button_Install_Config_Connect_Click); // // linkLabel2 // this.linkLabel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.linkLabel2.AutoSize = true; this.linkLabel2.BackColor = System.Drawing.Color.Transparent; this.linkLabel2.DisabledLinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(57)))), ((int)(((byte)(116)))), ((int)(((byte)(176))))); this.linkLabel2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.linkLabel2.LinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(57)))), ((int)(((byte)(116)))), ((int)(((byte)(176))))); this.linkLabel2.Location = new System.Drawing.Point(417, 55); this.linkLabel2.Name = "linkLabel2"; this.linkLabel2.Size = new System.Drawing.Size(80, 15); this.linkLabel2.TabIndex = 32; this.linkLabel2.TabStop = true; this.linkLabel2.Text = "Configuration"; this.linkLabel2.VisitedLinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(57)))), ((int)(((byte)(116)))), ((int)(((byte)(176))))); this.linkLabel2.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel2_LinkClicked_2); // // Edit_Install_Config_Servers // this.Edit_Install_Config_Servers.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); appearance21.FontData.Name = "Microsoft Sans Serif"; appearance21.FontData.SizeInPoints = 8.25F; this.Edit_Install_Config_Servers.Appearance = appearance21; this.ultraToolbarsManager1.SetContextMenuUltra(this.Edit_Install_Config_Servers, "LocalDBMenu"); this.Edit_Install_Config_Servers.DisplayStyle = Infragistics.Win.EmbeddableElementDisplayStyle.Office2013; this.Edit_Install_Config_Servers.Location = new System.Drawing.Point(422, 76); this.Edit_Install_Config_Servers.Margin = new System.Windows.Forms.Padding(8, 6, 8, 3); this.Edit_Install_Config_Servers.Name = "Edit_Install_Config_Servers"; this.Edit_Install_Config_Servers.Size = new System.Drawing.Size(202, 21); this.Edit_Install_Config_Servers.TabIndex = 37; // // ultraLabel5 // this.ultraLabel5.Anchor = System.Windows.Forms.AnchorStyles.Right; appearance61.BackColor = System.Drawing.Color.Transparent; this.ultraLabel5.Appearance = appearance61; this.ultraLabel5.AutoSize = true; this.ultraLabel5.Font = new System.Drawing.Font("MS Reference Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.ultraLabel5.Location = new System.Drawing.Point(334, 73); this.ultraLabel5.Name = "ultraLabel5"; this.ultraLabel5.Padding = new System.Drawing.Size(4, 4); this.ultraLabel5.Size = new System.Drawing.Size(77, 23); this.ultraLabel5.TabIndex = 36; this.ultraLabel5.Text = "SQL Server"; // // Installlation_Scenarious_Label // this.Installlation_Scenarious_Label.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); appearance62.BackColor = System.Drawing.Color.Transparent; this.Installlation_Scenarious_Label.Appearance = appearance62; this.Installlation_Scenarious_Label.AutoSize = true; this.tableLayoutPanel8.SetColumnSpan(this.Installlation_Scenarious_Label, 2); this.Installlation_Scenarious_Label.Location = new System.Drawing.Point(12, 79); this.Installlation_Scenarious_Label.Margin = new System.Windows.Forms.Padding(12, 3, 3, 3); this.Installlation_Scenarious_Label.Name = "Installlation_Scenarious_Label"; this.Installlation_Scenarious_Label.Size = new System.Drawing.Size(144, 18); this.Installlation_Scenarious_Label.TabIndex = 35; this.Installlation_Scenarious_Label.Text = "ინსტალაციის სცენარები"; // // Database_Installation_Scenario // appearance63.FontData.Name = "MS Reference Sans Serif"; this.Database_Installation_Scenario.Appearance = appearance63; this.Database_Installation_Scenario.BorderStyle = Infragistics.Win.UIElementBorderStyle.None; appearance64.BackColor = System.Drawing.Color.White; this.Database_Installation_Scenario.ButtonAppearance = appearance64; this.Database_Installation_Scenario.ButtonStyle = Infragistics.Win.UIElementButtonStyle.FlatBorderless; this.tableLayoutPanel8.SetColumnSpan(this.Database_Installation_Scenario, 3); this.Database_Installation_Scenario.DisplayStyle = Infragistics.Win.EmbeddableElementDisplayStyle.Office2013; this.Database_Installation_Scenario.DropDownStyle = Infragistics.Win.DropDownStyle.DropDownList; valueListItem5.DataValue = "1"; valueListItem5.DisplayText = "LocalDB Workstation"; valueListItem6.DataValue = "0"; valueListItem6.DisplayText = "SQL Server/Express Server"; valueListItem7.DataValue = "2"; valueListItem7.DisplayText = "SQL Server/Express Internal"; this.Database_Installation_Scenario.Items.AddRange(new Infragistics.Win.ValueListItem[] { valueListItem5, valueListItem6, valueListItem7}); this.Database_Installation_Scenario.Location = new System.Drawing.Point(12, 103); this.Database_Installation_Scenario.Margin = new System.Windows.Forms.Padding(12, 3, 3, 3); this.Database_Installation_Scenario.Name = "Database_Installation_Scenario"; this.Database_Installation_Scenario.Size = new System.Drawing.Size(256, 20); this.Database_Installation_Scenario.TabIndex = 34; this.Database_Installation_Scenario.UseAppStyling = false; this.Database_Installation_Scenario.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; this.Database_Installation_Scenario.SelectionChanged += new System.EventHandler(this.Database_Installation_Scenario_SelectionChanged); // // Install_Page_Step1 // this.Install_Page_Step1.Controls.Add(this.tableLayoutPanel5); this.Install_Page_Step1.Location = new System.Drawing.Point(0, 0); this.Install_Page_Step1.Name = "Install_Page_Step1"; this.Install_Page_Step1.Size = new System.Drawing.Size(632, 377); // // tableLayoutPanel5 // this.tableLayoutPanel5.ColumnCount = 3; this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel5.Controls.Add(this.Link_SpecificActions, 0, 2); this.tableLayoutPanel5.Controls.Add(this.Icon_Install_Spet1, 0, 0); this.tableLayoutPanel5.Controls.Add(this.Label_Install_Caption_Step1, 1, 0); this.tableLayoutPanel5.Controls.Add(this.Install_Group_Step1, 0, 1); this.tableLayoutPanel5.Controls.Add(this.linkLabel1, 2, 0); this.tableLayoutPanel5.Controls.Add(this.Install_StartButton_Step1, 2, 2); this.tableLayoutPanel5.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel5.Location = new System.Drawing.Point(0, 0); this.tableLayoutPanel5.Name = "tableLayoutPanel5"; this.tableLayoutPanel5.RowCount = 3; this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); this.tableLayoutPanel5.Size = new System.Drawing.Size(632, 377); this.tableLayoutPanel5.TabIndex = 32; // // Link_SpecificActions // this.Link_SpecificActions.ActiveLinkColor = System.Drawing.Color.Silver; this.Link_SpecificActions.AutoSize = true; this.Link_SpecificActions.BackColor = System.Drawing.Color.Transparent; this.ultraToolbarsManager1.SetContextMenuUltra(this.Link_SpecificActions, "SpecificActions"); this.Link_SpecificActions.DisabledLinkColor = System.Drawing.Color.Gray; this.Link_SpecificActions.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.Link_SpecificActions.LinkColor = System.Drawing.Color.Gray; this.Link_SpecificActions.Location = new System.Drawing.Point(8, 340); this.Link_SpecificActions.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0); this.Link_SpecificActions.Name = "Link_SpecificActions"; this.Link_SpecificActions.Size = new System.Drawing.Size(92, 15); this.Link_SpecificActions.TabIndex = 34; this.Link_SpecificActions.TabStop = true; this.Link_SpecificActions.Text = "Specific Actions"; this.Link_SpecificActions.VisitedLinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(57)))), ((int)(((byte)(116)))), ((int)(((byte)(176))))); this.Link_SpecificActions.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.Link_SpecificActions_LinkClicked); // // Icon_Install_Spet1 // this.Icon_Install_Spet1.AutoSize = true; this.Icon_Install_Spet1.BackColor = System.Drawing.Color.Transparent; this.Icon_Install_Spet1.BorderShadowColor = System.Drawing.Color.Empty; this.Icon_Install_Spet1.BorderStyle = Infragistics.Win.UIElementBorderStyle.None; this.Icon_Install_Spet1.Image = ((object)(resources.GetObject("Icon_Install_Spet1.Image"))); this.Icon_Install_Spet1.Location = new System.Drawing.Point(3, 3); this.Icon_Install_Spet1.Name = "Icon_Install_Spet1"; this.Icon_Install_Spet1.Padding = new System.Drawing.Size(12, 8); this.Icon_Install_Spet1.Size = new System.Drawing.Size(72, 64); this.Icon_Install_Spet1.TabIndex = 11; this.Icon_Install_Spet1.UseAppStyling = false; // // Label_Install_Caption_Step1 // appearance24.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(28)))), ((int)(((byte)(100)))), ((int)(((byte)(65))))); this.Label_Install_Caption_Step1.Appearance = appearance24; this.Label_Install_Caption_Step1.AutoSize = true; this.Label_Install_Caption_Step1.Font = new System.Drawing.Font("Sylfaen", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.Label_Install_Caption_Step1.Location = new System.Drawing.Point(120, 12); this.Label_Install_Caption_Step1.Margin = new System.Windows.Forms.Padding(12, 12, 3, 3); this.Label_Install_Caption_Step1.Name = "Label_Install_Caption_Step1"; this.Label_Install_Caption_Step1.Size = new System.Drawing.Size(306, 31); this.Label_Install_Caption_Step1.TabIndex = 3; this.Label_Install_Caption_Step1.Text = "მონაცემთა ბაზის ინსტალაცია"; // // Install_Group_Step1 // appearance25.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(57)))), ((int)(((byte)(116)))), ((int)(((byte)(176))))); appearance25.BorderColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(57)))), ((int)(((byte)(116)))), ((int)(((byte)(176))))); appearance25.ForeColor = System.Drawing.Color.White; this.Install_Group_Step1.Appearance = appearance25; this.tableLayoutPanel5.SetColumnSpan(this.Install_Group_Step1, 3); this.Install_Group_Step1.Controls.Add(this.Install_listBox_Step1); this.Install_Group_Step1.Dock = System.Windows.Forms.DockStyle.Fill; this.Install_Group_Step1.ForeColor = System.Drawing.Color.White; this.Install_Group_Step1.HeaderBorderStyle = Infragistics.Win.UIElementBorderStyle.None; this.Install_Group_Step1.Location = new System.Drawing.Point(12, 74); this.Install_Group_Step1.Margin = new System.Windows.Forms.Padding(12, 4, 12, 4); this.Install_Group_Step1.Name = "Install_Group_Step1"; this.Install_Group_Step1.Size = new System.Drawing.Size(608, 262); this.Install_Group_Step1.TabIndex = 12; this.Install_Group_Step1.Text = "მონაცემთა ბაზა"; this.Install_Group_Step1.UseAppStyling = false; // // Install_listBox_Step1 // this.ultraToolbarsManager1.SetContextMenuUltra(this.Install_listBox_Step1, "InstallListBox"); this.Install_listBox_Step1.Dock = System.Windows.Forms.DockStyle.Fill; this.Install_listBox_Step1.FormattingEnabled = true; this.Install_listBox_Step1.HorizontalScrollbar = true; this.Install_listBox_Step1.ItemHeight = 16; this.Install_listBox_Step1.Location = new System.Drawing.Point(3, 20); this.Install_listBox_Step1.Margin = new System.Windows.Forms.Padding(8); this.Install_listBox_Step1.Name = "Install_listBox_Step1"; this.Install_listBox_Step1.Size = new System.Drawing.Size(602, 239); this.Install_listBox_Step1.TabIndex = 0; // // linkLabel1 // this.linkLabel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.linkLabel1.AutoSize = true; this.linkLabel1.BackColor = System.Drawing.Color.Transparent; this.linkLabel1.DisabledLinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(57)))), ((int)(((byte)(116)))), ((int)(((byte)(176))))); this.linkLabel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.linkLabel1.LinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(57)))), ((int)(((byte)(116)))), ((int)(((byte)(176))))); this.linkLabel1.Location = new System.Drawing.Point(561, 55); this.linkLabel1.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0); this.linkLabel1.Name = "linkLabel1"; this.linkLabel1.Size = new System.Drawing.Size(63, 15); this.linkLabel1.TabIndex = 33; this.linkLabel1.TabStop = true; this.linkLabel1.Text = "Get Status"; this.linkLabel1.VisitedLinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(57)))), ((int)(((byte)(116)))), ((int)(((byte)(176))))); this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); // // Install_StartButton_Step1 // this.Install_StartButton_Step1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); appearance26.Image = ((object)(resources.GetObject("appearance26.Image"))); this.Install_StartButton_Step1.Appearance = appearance26; this.Install_StartButton_Step1.ButtonStyle = Infragistics.Win.UIElementButtonStyle.Office2013ScrollbarButton; this.Install_StartButton_Step1.Location = new System.Drawing.Point(509, 344); this.Install_StartButton_Step1.Margin = new System.Windows.Forms.Padding(12, 4, 16, 8); this.Install_StartButton_Step1.Name = "Install_StartButton_Step1"; this.Install_StartButton_Step1.Size = new System.Drawing.Size(107, 25); this.Install_StartButton_Step1.TabIndex = 4; this.Install_StartButton_Step1.Text = "პროცესი"; this.Install_StartButton_Step1.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; this.Install_StartButton_Step1.Click += new System.EventHandler(this.ultraButton4_Click); // // ultraTabPageControl14 // this.ultraTabPageControl14.Controls.Add(this.tableLayoutPanel7); this.ultraTabPageControl14.Location = new System.Drawing.Point(0, 0); this.ultraTabPageControl14.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.ultraTabPageControl14.Name = "ultraTabPageControl14"; this.ultraTabPageControl14.Size = new System.Drawing.Size(632, 377); // // tableLayoutPanel7 // this.tableLayoutPanel7.ColumnCount = 3; this.tableLayoutPanel7.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel7.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel7.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel7.Controls.Add(this.Icon_Make_Welcome, 0, 0); this.tableLayoutPanel7.Controls.Add(this.Frame_Make_Welcome, 0, 1); this.tableLayoutPanel7.Controls.Add(this.Label_Make_Caption_Welcome, 1, 0); this.tableLayoutPanel7.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel7.Location = new System.Drawing.Point(0, 0); this.tableLayoutPanel7.Name = "tableLayoutPanel7"; this.tableLayoutPanel7.RowCount = 3; this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel7.Size = new System.Drawing.Size(632, 377); this.tableLayoutPanel7.TabIndex = 19; // // Icon_Make_Welcome // this.Icon_Make_Welcome.AutoSize = true; this.Icon_Make_Welcome.BackColor = System.Drawing.Color.Transparent; this.Icon_Make_Welcome.BorderShadowColor = System.Drawing.Color.Empty; this.Icon_Make_Welcome.BorderStyle = Infragistics.Win.UIElementBorderStyle.None; this.Icon_Make_Welcome.Image = ((object)(resources.GetObject("Icon_Make_Welcome.Image"))); this.Icon_Make_Welcome.ImageTransparentColor = System.Drawing.Color.Transparent; this.Icon_Make_Welcome.Location = new System.Drawing.Point(3, 12); this.Icon_Make_Welcome.Margin = new System.Windows.Forms.Padding(3, 12, 3, 3); this.Icon_Make_Welcome.Name = "Icon_Make_Welcome"; this.Icon_Make_Welcome.Padding = new System.Drawing.Size(12, 0); this.Icon_Make_Welcome.Size = new System.Drawing.Size(88, 64); this.Icon_Make_Welcome.TabIndex = 4; this.Icon_Make_Welcome.UseAppStyling = false; this.Icon_Make_Welcome.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; // // Frame_Make_Welcome // appearance28.BorderColor = System.Drawing.Color.Gray; this.Frame_Make_Welcome.Appearance = appearance28; this.Frame_Make_Welcome.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid; // // Frame_Make_Welcome.ClientArea // this.Frame_Make_Welcome.ClientArea.Controls.Add(this.ultraButton1); this.Frame_Make_Welcome.ClientArea.Controls.Add(this.Icon_Make_Welcome_Frame_LabelCaption); this.Frame_Make_Welcome.ClientArea.Controls.Add(this.Icon_Make_Welcome_Frame_LabelTop); this.tableLayoutPanel7.SetColumnSpan(this.Frame_Make_Welcome, 3); this.Frame_Make_Welcome.Dock = System.Windows.Forms.DockStyle.Fill; this.Frame_Make_Welcome.Location = new System.Drawing.Point(12, 82); this.Frame_Make_Welcome.Margin = new System.Windows.Forms.Padding(12, 3, 12, 6); this.Frame_Make_Welcome.Name = "Frame_Make_Welcome"; this.Frame_Make_Welcome.Size = new System.Drawing.Size(621, 68); this.Frame_Make_Welcome.TabIndex = 10; this.Frame_Make_Welcome.UseAppStyling = false; this.Frame_Make_Welcome.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; // // ultraButton1 // this.ultraButton1.ButtonStyle = Infragistics.Win.UIElementButtonStyle.FlatBorderless; this.ultraButton1.Location = new System.Drawing.Point(569, 3); this.ultraButton1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.ultraButton1.Name = "ultraButton1"; this.ultraButton1.Size = new System.Drawing.Size(24, 24); this.ultraButton1.TabIndex = 18; this.ultraButton1.UseAppStyling = false; this.ultraButton1.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; // // Icon_Make_Welcome_Frame_LabelCaption // appearance29.BackColor = System.Drawing.Color.Transparent; this.Icon_Make_Welcome_Frame_LabelCaption.Appearance = appearance29; this.Icon_Make_Welcome_Frame_LabelCaption.AutoSize = true; this.Icon_Make_Welcome_Frame_LabelCaption.Dock = System.Windows.Forms.DockStyle.Top; this.Icon_Make_Welcome_Frame_LabelCaption.Location = new System.Drawing.Point(0, 34); this.Icon_Make_Welcome_Frame_LabelCaption.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.Icon_Make_Welcome_Frame_LabelCaption.Name = "Icon_Make_Welcome_Frame_LabelCaption"; this.Icon_Make_Welcome_Frame_LabelCaption.Padding = new System.Drawing.Size(12, 0); this.Icon_Make_Welcome_Frame_LabelCaption.Size = new System.Drawing.Size(619, 18); this.Icon_Make_Welcome_Frame_LabelCaption.TabIndex = 2; this.Icon_Make_Welcome_Frame_LabelCaption.Text = "შექმნილი საინსტალაციო კოდექსი DS 1.6 ის ბაზა, იმუშავებს SQL Server 2014 ზე."; // // Icon_Make_Welcome_Frame_LabelTop // this.Icon_Make_Welcome_Frame_LabelTop.AutoSize = true; this.Icon_Make_Welcome_Frame_LabelTop.Dock = System.Windows.Forms.DockStyle.Top; this.Icon_Make_Welcome_Frame_LabelTop.Font = new System.Drawing.Font("Sylfaen", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.Icon_Make_Welcome_Frame_LabelTop.Location = new System.Drawing.Point(0, 0); this.Icon_Make_Welcome_Frame_LabelTop.Margin = new System.Windows.Forms.Padding(12, 4, 3, 4); this.Icon_Make_Welcome_Frame_LabelTop.Name = "Icon_Make_Welcome_Frame_LabelTop"; this.Icon_Make_Welcome_Frame_LabelTop.Padding = new System.Drawing.Size(12, 8); this.Icon_Make_Welcome_Frame_LabelTop.Size = new System.Drawing.Size(619, 34); this.Icon_Make_Welcome_Frame_LabelTop.TabIndex = 0; this.Icon_Make_Welcome_Frame_LabelTop.Text = "პროგრამა შექმნის კოდექს DS 1.6 ის მონაცემთა ბაზის საინტალაციოს"; // // Label_Make_Caption_Welcome // appearance30.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(28)))), ((int)(((byte)(100)))), ((int)(((byte)(65))))); this.Label_Make_Caption_Welcome.Appearance = appearance30; this.Label_Make_Caption_Welcome.AutoSize = true; this.Label_Make_Caption_Welcome.Font = new System.Drawing.Font("Sylfaen", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.Label_Make_Caption_Welcome.Location = new System.Drawing.Point(97, 3); this.Label_Make_Caption_Welcome.Name = "Label_Make_Caption_Welcome"; this.Label_Make_Caption_Welcome.Padding = new System.Drawing.Size(0, 12); this.Label_Make_Caption_Welcome.Size = new System.Drawing.Size(467, 52); this.Label_Make_Caption_Welcome.TabIndex = 0; this.Label_Make_Caption_Welcome.Text = "კოდექსი DS 1.6 ის მონაცემთა ბაზის საინსტალაციო"; // // ultraTabPageControl15 // this.ultraTabPageControl15.Controls.Add(this.tableLayoutPanel11); this.ultraTabPageControl15.Font = new System.Drawing.Font("Sylfaen", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.ultraTabPageControl15.Location = new System.Drawing.Point(-10000, -10000); this.ultraTabPageControl15.Margin = new System.Windows.Forms.Padding(6, 6, 6, 3); this.ultraTabPageControl15.Name = "ultraTabPageControl15"; this.ultraTabPageControl15.Size = new System.Drawing.Size(632, 377); // // tableLayoutPanel11 // this.tableLayoutPanel11.ColumnCount = 4; this.tableLayoutPanel11.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel11.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel11.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel11.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel11.Controls.Add(this.Creation_Scenarious_Label, 0, 2); this.tableLayoutPanel11.Controls.Add(this.linkLabel3, 3, 1); this.tableLayoutPanel11.Controls.Add(this.ultraTabControl3, 0, 4); this.tableLayoutPanel11.Controls.Add(this.ultraPictureBox3, 0, 0); this.tableLayoutPanel11.Controls.Add(this.Label_Make_Config_Caption, 1, 0); this.tableLayoutPanel11.Controls.Add(this.Button_Connect_Make_Config_Servers, 3, 3); this.tableLayoutPanel11.Controls.Add(this.Combo_Make_Config_Servers, 3, 2); this.tableLayoutPanel11.Controls.Add(this.Label1_Install_Config_Database, 2, 2); this.tableLayoutPanel11.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel11.Location = new System.Drawing.Point(0, 0); this.tableLayoutPanel11.Name = "tableLayoutPanel11"; this.tableLayoutPanel11.RowCount = 5; this.tableLayoutPanel11.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel11.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel11.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel11.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel11.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel11.Size = new System.Drawing.Size(632, 377); this.tableLayoutPanel11.TabIndex = 38; this.tableLayoutPanel11.Paint += new System.Windows.Forms.PaintEventHandler(this.tableLayoutPanel11_Paint); // // Creation_Scenarious_Label // this.Creation_Scenarious_Label.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); appearance31.BackColor = System.Drawing.Color.Transparent; this.Creation_Scenarious_Label.Appearance = appearance31; this.Creation_Scenarious_Label.AutoSize = true; this.tableLayoutPanel11.SetColumnSpan(this.Creation_Scenarious_Label, 2); this.Creation_Scenarious_Label.Location = new System.Drawing.Point(12, 94); this.Creation_Scenarious_Label.Margin = new System.Windows.Forms.Padding(12, 3, 3, 3); this.Creation_Scenarious_Label.Name = "Creation_Scenarious_Label"; this.Creation_Scenarious_Label.Size = new System.Drawing.Size(109, 18); this.Creation_Scenarious_Label.TabIndex = 36; this.Creation_Scenarious_Label.Text = "შექმნის სცენარები"; this.Creation_Scenarious_Label.Visible = false; // // linkLabel3 // this.linkLabel3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.linkLabel3.AutoSize = true; this.linkLabel3.BackColor = System.Drawing.Color.Transparent; this.linkLabel3.DisabledLinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(57)))), ((int)(((byte)(116)))), ((int)(((byte)(176))))); this.linkLabel3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.linkLabel3.LinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(57)))), ((int)(((byte)(116)))), ((int)(((byte)(176))))); this.linkLabel3.Location = new System.Drawing.Point(417, 70); this.linkLabel3.Name = "linkLabel3"; this.linkLabel3.Size = new System.Drawing.Size(80, 15); this.linkLabel3.TabIndex = 39; this.linkLabel3.TabStop = true; this.linkLabel3.Text = "Configuration"; this.linkLabel3.VisitedLinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(57)))), ((int)(((byte)(116)))), ((int)(((byte)(176))))); this.linkLabel3.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel3_LinkClicked); // // ultraTabControl3 // this.tableLayoutPanel11.SetColumnSpan(this.ultraTabControl3, 4); this.ultraTabControl3.Controls.Add(this.ultraTabSharedControlsPage3); this.ultraTabControl3.Controls.Add(this.ultraTabPageControl5); this.ultraTabControl3.Dock = System.Windows.Forms.DockStyle.Fill; this.ultraTabControl3.Location = new System.Drawing.Point(3, 152); this.ultraTabControl3.Name = "ultraTabControl3"; this.ultraTabControl3.SharedControlsPage = this.ultraTabSharedControlsPage3; this.ultraTabControl3.Size = new System.Drawing.Size(626, 222); this.ultraTabControl3.TabIndex = 24; ultraTab2.TabPage = this.ultraTabPageControl5; ultraTab2.Text = "ბაზების კოპირება"; this.ultraTabControl3.Tabs.AddRange(new Infragistics.Win.UltraWinTabControl.UltraTab[] { ultraTab2}); // // ultraTabSharedControlsPage3 // this.ultraTabSharedControlsPage3.Location = new System.Drawing.Point(-10000, -10000); this.ultraTabSharedControlsPage3.Name = "ultraTabSharedControlsPage3"; this.ultraTabSharedControlsPage3.Size = new System.Drawing.Size(622, 194); // // ultraPictureBox3 // appearance32.BackColor = System.Drawing.Color.Transparent; appearance32.BorderColor = System.Drawing.Color.Transparent; this.ultraPictureBox3.Appearance = appearance32; this.ultraPictureBox3.AutoSize = true; this.ultraPictureBox3.BorderShadowColor = System.Drawing.Color.Empty; this.ultraPictureBox3.Image = ((object)(resources.GetObject("ultraPictureBox3.Image"))); this.ultraPictureBox3.Location = new System.Drawing.Point(3, 3); this.ultraPictureBox3.Name = "ultraPictureBox3"; this.ultraPictureBox3.Padding = new System.Drawing.Size(12, 8); this.ultraPictureBox3.Size = new System.Drawing.Size(72, 64); this.ultraPictureBox3.TabIndex = 37; // // Label_Make_Config_Caption // appearance33.ForeColor = System.Drawing.Color.Black; this.Label_Make_Config_Caption.Appearance = appearance33; this.Label_Make_Config_Caption.AutoSize = true; this.tableLayoutPanel11.SetColumnSpan(this.Label_Make_Config_Caption, 3); this.Label_Make_Config_Caption.Font = new System.Drawing.Font("Sylfaen", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.Label_Make_Config_Caption.Location = new System.Drawing.Point(81, 3); this.Label_Make_Config_Caption.Name = "Label_Make_Config_Caption"; this.Label_Make_Config_Caption.Padding = new System.Drawing.Size(12, 8); this.Label_Make_Config_Caption.Size = new System.Drawing.Size(435, 43); this.Label_Make_Config_Caption.TabIndex = 2; this.Label_Make_Config_Caption.Text = "მონაცემთა ბაზის საინსტალაციოს ფორმირება"; // // Button_Connect_Make_Config_Servers // this.Button_Connect_Make_Config_Servers.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.Button_Connect_Make_Config_Servers.ButtonStyle = Infragistics.Win.UIElementButtonStyle.Office2013Button; this.Button_Connect_Make_Config_Servers.Location = new System.Drawing.Point(538, 121); this.Button_Connect_Make_Config_Servers.Margin = new System.Windows.Forms.Padding(8, 6, 8, 3); this.Button_Connect_Make_Config_Servers.Name = "Button_Connect_Make_Config_Servers"; this.Button_Connect_Make_Config_Servers.Size = new System.Drawing.Size(86, 25); this.Button_Connect_Make_Config_Servers.TabIndex = 31; this.Button_Connect_Make_Config_Servers.Text = "დაკავშირება"; this.Button_Connect_Make_Config_Servers.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; this.Button_Connect_Make_Config_Servers.Click += new System.EventHandler(this.ultraButton11_Click); // // Combo_Make_Config_Servers // this.Combo_Make_Config_Servers.Anchor = System.Windows.Forms.AnchorStyles.Left; appearance34.FontData.Name = "Microsoft Sans Serif"; appearance34.FontData.SizeInPoints = 8.25F; this.Combo_Make_Config_Servers.Appearance = appearance34; this.Combo_Make_Config_Servers.AutoSize = false; this.ultraToolbarsManager1.SetContextMenuUltra(this.Combo_Make_Config_Servers, "LocalDBMenu"); this.Combo_Make_Config_Servers.DisplayStyle = Infragistics.Win.EmbeddableElementDisplayStyle.Office2013; this.Combo_Make_Config_Servers.Location = new System.Drawing.Point(422, 91); this.Combo_Make_Config_Servers.Margin = new System.Windows.Forms.Padding(8, 6, 8, 3); this.Combo_Make_Config_Servers.Name = "Combo_Make_Config_Servers"; this.Combo_Make_Config_Servers.Size = new System.Drawing.Size(202, 21); this.Combo_Make_Config_Servers.TabIndex = 39; // // Label1_Install_Config_Database // this.Label1_Install_Config_Database.Anchor = System.Windows.Forms.AnchorStyles.Right; appearance35.BackColor = System.Drawing.Color.Transparent; this.Label1_Install_Config_Database.Appearance = appearance35; this.Label1_Install_Config_Database.AutoSize = true; this.Label1_Install_Config_Database.Font = new System.Drawing.Font("MS Reference Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.Label1_Install_Config_Database.Location = new System.Drawing.Point(342, 92); this.Label1_Install_Config_Database.Name = "Label1_Install_Config_Database"; this.Label1_Install_Config_Database.Size = new System.Drawing.Size(69, 15); this.Label1_Install_Config_Database.TabIndex = 3; this.Label1_Install_Config_Database.Text = "SQL Server "; // // DatabaseImageCreator_Page3 // this.DatabaseImageCreator_Page3.Controls.Add(this.tableLayoutPanel12); this.DatabaseImageCreator_Page3.Controls.Add(this.Check_Drop_Create); this.DatabaseImageCreator_Page3.Location = new System.Drawing.Point(-10000, -10000); this.DatabaseImageCreator_Page3.Name = "DatabaseImageCreator_Page3"; this.DatabaseImageCreator_Page3.Size = new System.Drawing.Size(632, 377); // // tableLayoutPanel12 // this.tableLayoutPanel12.ColumnCount = 3; this.tableLayoutPanel12.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel12.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel12.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); this.tableLayoutPanel12.Controls.Add(this.linkLabel4, 1, 1); this.tableLayoutPanel12.Controls.Add(this.Icon_Make_Step1, 0, 0); this.tableLayoutPanel12.Controls.Add(this.Label_Make_Caption_Step1, 1, 0); this.tableLayoutPanel12.Controls.Add(this.Frame_Make_Step1, 0, 2); this.tableLayoutPanel12.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel12.Location = new System.Drawing.Point(0, 0); this.tableLayoutPanel12.Name = "tableLayoutPanel12"; this.tableLayoutPanel12.RowCount = 3; this.tableLayoutPanel12.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel12.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); this.tableLayoutPanel12.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel12.Size = new System.Drawing.Size(632, 377); this.tableLayoutPanel12.TabIndex = 26; // // linkLabel4 // this.linkLabel4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.linkLabel4.AutoSize = true; this.linkLabel4.BackColor = System.Drawing.Color.Transparent; this.tableLayoutPanel12.SetColumnSpan(this.linkLabel4, 2); this.linkLabel4.DisabledLinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(57)))), ((int)(((byte)(116)))), ((int)(((byte)(176))))); this.linkLabel4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.linkLabel4.LinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(57)))), ((int)(((byte)(116)))), ((int)(((byte)(176))))); this.linkLabel4.Location = new System.Drawing.Point(561, 75); this.linkLabel4.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0); this.linkLabel4.Name = "linkLabel4"; this.linkLabel4.Size = new System.Drawing.Size(63, 15); this.linkLabel4.TabIndex = 34; this.linkLabel4.TabStop = true; this.linkLabel4.Text = "Get Status"; this.linkLabel4.VisitedLinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(57)))), ((int)(((byte)(116)))), ((int)(((byte)(176))))); this.linkLabel4.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel4_LinkClicked); // // Icon_Make_Step1 // appearance36.BackColor = System.Drawing.Color.Transparent; appearance36.BorderColor = System.Drawing.Color.Transparent; this.Icon_Make_Step1.Appearance = appearance36; this.Icon_Make_Step1.AutoSize = true; this.Icon_Make_Step1.BorderShadowColor = System.Drawing.Color.Empty; this.Icon_Make_Step1.Image = ((object)(resources.GetObject("Icon_Make_Step1.Image"))); this.Icon_Make_Step1.Location = new System.Drawing.Point(3, 3); this.Icon_Make_Step1.Name = "Icon_Make_Step1"; this.Icon_Make_Step1.Padding = new System.Drawing.Size(12, 8); this.Icon_Make_Step1.Size = new System.Drawing.Size(72, 64); this.Icon_Make_Step1.TabIndex = 23; // // Label_Make_Caption_Step1 // appearance37.ForeColor = System.Drawing.Color.Black; this.Label_Make_Caption_Step1.Appearance = appearance37; this.Label_Make_Caption_Step1.AutoSize = true; this.Label_Make_Caption_Step1.Font = new System.Drawing.Font("Sylfaen", 14F); this.Label_Make_Caption_Step1.Location = new System.Drawing.Point(81, 3); this.Label_Make_Caption_Step1.Name = "Label_Make_Caption_Step1"; this.Label_Make_Caption_Step1.Padding = new System.Drawing.Size(12, 8); this.Label_Make_Caption_Step1.Size = new System.Drawing.Size(383, 43); this.Label_Make_Caption_Step1.TabIndex = 3; this.Label_Make_Caption_Step1.Text = "ბაზის საინსტალაციოს შექმნის პროცესი"; // // Frame_Make_Step1 // appearance38.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(57)))), ((int)(((byte)(116)))), ((int)(((byte)(176))))); this.Frame_Make_Step1.Appearance = appearance38; this.tableLayoutPanel12.SetColumnSpan(this.Frame_Make_Step1, 3); this.Frame_Make_Step1.Controls.Add(this.tableLayoutPanel13); this.Frame_Make_Step1.Dock = System.Windows.Forms.DockStyle.Fill; this.Frame_Make_Step1.Location = new System.Drawing.Point(4, 94); this.Frame_Make_Step1.Margin = new System.Windows.Forms.Padding(4); this.Frame_Make_Step1.Name = "Frame_Make_Step1"; this.Frame_Make_Step1.Size = new System.Drawing.Size(624, 279); this.Frame_Make_Step1.TabIndex = 12; this.Frame_Make_Step1.UseAppStyling = false; // // tableLayoutPanel13 // this.tableLayoutPanel13.ColumnCount = 1; this.tableLayoutPanel13.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel13.Controls.Add(this.Label_Make_Frame_Step1, 0, 0); this.tableLayoutPanel13.Controls.Add(this.TextEdit_Make_Step1, 0, 1); this.tableLayoutPanel13.Controls.Add(this.Button_Make_Step1, 0, 2); this.tableLayoutPanel13.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel13.Location = new System.Drawing.Point(3, 3); this.tableLayoutPanel13.Name = "tableLayoutPanel13"; this.tableLayoutPanel13.Padding = new System.Windows.Forms.Padding(4); this.tableLayoutPanel13.RowCount = 3; this.tableLayoutPanel13.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel13.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel13.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel13.Size = new System.Drawing.Size(618, 273); this.tableLayoutPanel13.TabIndex = 53; // // Label_Make_Frame_Step1 // this.Label_Make_Frame_Step1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); appearance39.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(57)))), ((int)(((byte)(116)))), ((int)(((byte)(176))))); appearance39.ForeColor = System.Drawing.Color.Black; this.Label_Make_Frame_Step1.Appearance = appearance39; this.Label_Make_Frame_Step1.BorderStyleInner = Infragistics.Win.UIElementBorderStyle.Solid; this.Label_Make_Frame_Step1.Location = new System.Drawing.Point(8, 8); this.Label_Make_Frame_Step1.Margin = new System.Windows.Forms.Padding(4); this.Label_Make_Frame_Step1.Name = "Label_Make_Frame_Step1"; this.Label_Make_Frame_Step1.Padding = new System.Drawing.Size(4, 4); this.Label_Make_Frame_Step1.Size = new System.Drawing.Size(602, 23); this.Label_Make_Frame_Step1.TabIndex = 52; // // TextEdit_Make_Step1 // this.TextEdit_Make_Step1.DisplayStyle = Infragistics.Win.EmbeddableElementDisplayStyle.Office2013; this.TextEdit_Make_Step1.Dock = System.Windows.Forms.DockStyle.Fill; this.TextEdit_Make_Step1.HideSelection = false; this.TextEdit_Make_Step1.Location = new System.Drawing.Point(7, 38); this.TextEdit_Make_Step1.Multiline = true; this.TextEdit_Make_Step1.Name = "TextEdit_Make_Step1"; this.TextEdit_Make_Step1.ReadOnly = true; this.TextEdit_Make_Step1.Scrollbars = System.Windows.Forms.ScrollBars.Both; this.TextEdit_Make_Step1.Size = new System.Drawing.Size(604, 193); this.TextEdit_Make_Step1.TabIndex = 51; this.TextEdit_Make_Step1.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; // // Button_Make_Step1 // this.Button_Make_Step1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); appearance40.Image = ((object)(resources.GetObject("appearance40.Image"))); this.Button_Make_Step1.Appearance = appearance40; this.Button_Make_Step1.ButtonStyle = Infragistics.Win.UIElementButtonStyle.Office2013ScrollbarButton; this.Button_Make_Step1.Location = new System.Drawing.Point(504, 240); this.Button_Make_Step1.Margin = new System.Windows.Forms.Padding(3, 6, 3, 4); this.Button_Make_Step1.Name = "Button_Make_Step1"; this.Button_Make_Step1.Size = new System.Drawing.Size(107, 25); this.Button_Make_Step1.TabIndex = 4; this.Button_Make_Step1.Text = "პროცესი"; this.Button_Make_Step1.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; this.Button_Make_Step1.Click += new System.EventHandler(this.ultraButton_Process_Click); // // Check_Drop_Create // this.Check_Drop_Create.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.Check_Drop_Create.AutoSize = true; this.Check_Drop_Create.BackColor = System.Drawing.Color.Transparent; this.Check_Drop_Create.BackColorInternal = System.Drawing.Color.Transparent; this.Check_Drop_Create.Checked = true; this.Check_Drop_Create.CheckState = System.Windows.Forms.CheckState.Checked; this.Check_Drop_Create.GlyphInfo = Infragistics.Win.UIElementDrawParams.Office2013CheckBoxGlyphInfo; this.Check_Drop_Create.Location = new System.Drawing.Point(-731, 346); this.Check_Drop_Create.Name = "Check_Drop_Create"; this.Check_Drop_Create.Size = new System.Drawing.Size(172, 21); this.Check_Drop_Create.TabIndex = 25; this.Check_Drop_Create.Text = "Drop All Active Connections"; this.Check_Drop_Create.UseAppStyling = false; this.Check_Drop_Create.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; // // ultraTabPageControl12 // this.ultraTabPageControl12.Controls.Add(this.DataBaseInstaller); this.ultraTabPageControl12.Location = new System.Drawing.Point(1, 22); this.ultraTabPageControl12.Name = "ultraTabPageControl12"; this.ultraTabPageControl12.Size = new System.Drawing.Size(632, 377); // // DataBaseInstaller // appearance23.BackColor = System.Drawing.Color.White; this.DataBaseInstaller.Appearance = appearance23; this.DataBaseInstaller.Controls.Add(this.ultraTabSharedControlsPage1); this.DataBaseInstaller.Controls.Add(this.ultraTabPageControl1); this.DataBaseInstaller.Controls.Add(this.Install_Page_Step1); this.DataBaseInstaller.Controls.Add(this.ultraTabPageControl4); this.DataBaseInstaller.Dock = System.Windows.Forms.DockStyle.Fill; this.DataBaseInstaller.Location = new System.Drawing.Point(0, 0); this.DataBaseInstaller.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.DataBaseInstaller.Name = "DataBaseInstaller"; this.DataBaseInstaller.SharedControlsPage = this.ultraTabSharedControlsPage1; this.DataBaseInstaller.Size = new System.Drawing.Size(632, 377); this.DataBaseInstaller.Style = Infragistics.Win.UltraWinTabControl.UltraTabControlStyle.Wizard; this.DataBaseInstaller.TabIndex = 0; ultraTab5.Key = "0"; ultraTab5.TabPage = this.ultraTabPageControl1; ultraTab5.Text = "tab1"; ultraTab8.TabPage = this.ultraTabPageControl4; ultraTab8.Text = "tab9"; ultraTab13.Key = "2"; ultraTab13.TabPage = this.Install_Page_Step1; ultraTab13.Text = "tab3"; this.DataBaseInstaller.Tabs.AddRange(new Infragistics.Win.UltraWinTabControl.UltraTab[] { ultraTab5, ultraTab8, ultraTab13}); this.DataBaseInstaller.UseAppStyling = false; // // ultraTabSharedControlsPage1 // this.ultraTabSharedControlsPage1.Location = new System.Drawing.Point(-10000, -10000); this.ultraTabSharedControlsPage1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.ultraTabSharedControlsPage1.Name = "ultraTabSharedControlsPage1"; this.ultraTabSharedControlsPage1.Size = new System.Drawing.Size(632, 377); // // ultraTabPageControl13 // this.ultraTabPageControl13.Controls.Add(this.DatabaseImageCreator); this.ultraTabPageControl13.Location = new System.Drawing.Point(-10000, -10000); this.ultraTabPageControl13.Name = "ultraTabPageControl13"; this.ultraTabPageControl13.Size = new System.Drawing.Size(632, 377); // // DatabaseImageCreator // appearance27.BackColor = System.Drawing.Color.White; this.DatabaseImageCreator.Appearance = appearance27; this.DatabaseImageCreator.Controls.Add(this.ultraTabSharedControlsPage6); this.DatabaseImageCreator.Controls.Add(this.ultraTabPageControl14); this.DatabaseImageCreator.Controls.Add(this.ultraTabPageControl15); this.DatabaseImageCreator.Controls.Add(this.DatabaseImageCreator_Page3); this.DatabaseImageCreator.Dock = System.Windows.Forms.DockStyle.Fill; this.DatabaseImageCreator.Location = new System.Drawing.Point(0, 0); this.DatabaseImageCreator.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.DatabaseImageCreator.Name = "DatabaseImageCreator"; this.DatabaseImageCreator.SharedControlsPage = this.ultraTabSharedControlsPage6; this.DatabaseImageCreator.Size = new System.Drawing.Size(632, 377); this.DatabaseImageCreator.Style = Infragistics.Win.UltraWinTabControl.UltraTabControlStyle.Wizard; this.DatabaseImageCreator.TabIndex = 1; ultraTab9.TabPage = this.ultraTabPageControl14; ultraTab9.Text = "tab1"; ultraTab10.TabPage = this.ultraTabPageControl15; ultraTab10.Text = "tab2"; ultraTab14.TabPage = this.DatabaseImageCreator_Page3; ultraTab14.Text = "tab3"; this.DatabaseImageCreator.Tabs.AddRange(new Infragistics.Win.UltraWinTabControl.UltraTab[] { ultraTab9, ultraTab10, ultraTab14}); // // ultraTabSharedControlsPage6 // this.ultraTabSharedControlsPage6.Location = new System.Drawing.Point(-10000, -10000); this.ultraTabSharedControlsPage6.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.ultraTabSharedControlsPage6.Name = "ultraTabSharedControlsPage6"; this.ultraTabSharedControlsPage6.Size = new System.Drawing.Size(632, 377); // // ultraTabPageControl2 // this.ultraTabPageControl2.Controls.Add(this.tableLayoutPanel14); this.ultraTabPageControl2.Location = new System.Drawing.Point(0, 0); this.ultraTabPageControl2.Name = "ultraTabPageControl2"; this.ultraTabPageControl2.Size = new System.Drawing.Size(634, 47); // // tableLayoutPanel14 // this.tableLayoutPanel14.AutoSize = true; this.tableLayoutPanel14.ColumnCount = 3; this.tableLayoutPanel14.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel14.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel14.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel14.Controls.Add(this.Button_Back, 0, 0); this.tableLayoutPanel14.Controls.Add(this.Button_Close, 2, 0); this.tableLayoutPanel14.Controls.Add(this.Button_Next, 1, 0); this.tableLayoutPanel14.Dock = System.Windows.Forms.DockStyle.Right; this.tableLayoutPanel14.Location = new System.Drawing.Point(265, 0); this.tableLayoutPanel14.Name = "tableLayoutPanel14"; this.tableLayoutPanel14.RowCount = 1; this.tableLayoutPanel14.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel14.Size = new System.Drawing.Size(369, 47); this.tableLayoutPanel14.TabIndex = 3; // // Button_Back // this.Button_Back.ButtonStyle = Infragistics.Win.UIElementButtonStyle.Office2013Button; this.Button_Back.Location = new System.Drawing.Point(6, 8); this.Button_Back.Margin = new System.Windows.Forms.Padding(6, 8, 6, 3); this.Button_Back.Name = "Button_Back"; this.Button_Back.Size = new System.Drawing.Size(107, 25); this.Button_Back.TabIndex = 1; this.Button_Back.Text = "< უკან"; this.Button_Back.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; this.Button_Back.Click += new System.EventHandler(this.ultraButton2_Click); // // Button_Close // this.Button_Close.ButtonStyle = Infragistics.Win.UIElementButtonStyle.Office2013Button; this.Button_Close.Location = new System.Drawing.Point(250, 8); this.Button_Close.Margin = new System.Windows.Forms.Padding(12, 8, 12, 3); this.Button_Close.Name = "Button_Close"; this.Button_Close.Size = new System.Drawing.Size(107, 25); this.Button_Close.TabIndex = 0; this.Button_Close.Text = "დახურვა"; this.Button_Close.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; this.Button_Close.Click += new System.EventHandler(this.ultraButton1_Click); // // Button_Next // appearance43.ImageHAlign = Infragistics.Win.HAlign.Right; this.Button_Next.Appearance = appearance43; this.Button_Next.ButtonStyle = Infragistics.Win.UIElementButtonStyle.Office2013Button; this.Button_Next.Location = new System.Drawing.Point(125, 8); this.Button_Next.Margin = new System.Windows.Forms.Padding(6, 8, 6, 3); this.Button_Next.Name = "Button_Next"; this.Button_Next.Size = new System.Drawing.Size(107, 25); this.Button_Next.TabIndex = 2; this.Button_Next.Text = "შემდეგი >"; this.Button_Next.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; this.Button_Next.Click += new System.EventHandler(this.ultraButton3_Click); // // ultraTabPageControl11 // this.ultraTabPageControl11.Controls.Add(this.tableLayoutPanel9); this.ultraTabPageControl11.Controls.Add(this.tableLayoutPanel6); this.ultraTabPageControl11.Location = new System.Drawing.Point(0, 0); this.ultraTabPageControl11.Name = "ultraTabPageControl11"; this.ultraTabPageControl11.Size = new System.Drawing.Size(161, 447); // // tableLayoutPanel9 // this.tableLayoutPanel9.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.tableLayoutPanel9.ColumnCount = 2; this.tableLayoutPanel9.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel9.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel9.Controls.Add(this.InfoLabel_SqlServer, 0, 1); this.tableLayoutPanel9.Controls.Add(this.InfoValueLabelFullText, 1, 5); this.tableLayoutPanel9.Controls.Add(this.InfoValueLabelCollation, 0, 8); this.tableLayoutPanel9.Controls.Add(this.InfoLabel_Collation, 0, 7); this.tableLayoutPanel9.Controls.Add(this.InfoLabel_SqlVersion, 0, 3); this.tableLayoutPanel9.Controls.Add(this.InfoValueLabel_ProductVersion, 1, 3); this.tableLayoutPanel9.Controls.Add(this.InfoValueLabel_InstanceName, 0, 2); this.tableLayoutPanel9.Controls.Add(this.InfoLabel_FullText, 0, 5); this.tableLayoutPanel9.Dock = System.Windows.Forms.DockStyle.Top; this.tableLayoutPanel9.Location = new System.Drawing.Point(0, 58); this.tableLayoutPanel9.Name = "tableLayoutPanel9"; this.tableLayoutPanel9.RowCount = 9; this.tableLayoutPanel9.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 50F)); this.tableLayoutPanel9.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel9.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel9.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel9.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel9.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel9.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel9.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel9.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel9.Size = new System.Drawing.Size(161, 198); this.tableLayoutPanel9.TabIndex = 27; // // InfoLabel_SqlServer // appearance45.BackColor = System.Drawing.Color.Transparent; appearance45.FontData.Name = "Microsoft Sans Serif"; appearance45.ForeColor = System.Drawing.Color.White; this.InfoLabel_SqlServer.Appearance = appearance45; this.InfoLabel_SqlServer.AutoSize = true; this.InfoLabel_SqlServer.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.InfoLabel_SqlServer.Location = new System.Drawing.Point(6, 54); this.InfoLabel_SqlServer.Margin = new System.Windows.Forms.Padding(6, 4, 3, 4); this.InfoLabel_SqlServer.Name = "InfoLabel_SqlServer"; this.InfoLabel_SqlServer.Size = new System.Drawing.Size(107, 14); this.InfoLabel_SqlServer.TabIndex = 19; this.InfoLabel_SqlServer.Text = "Sql Server Instance"; this.InfoLabel_SqlServer.UseAppStyling = false; this.InfoLabel_SqlServer.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; // // InfoValueLabelFullText // appearance46.BackColor = System.Drawing.Color.Transparent; appearance46.ForeColor = System.Drawing.Color.White; this.InfoValueLabelFullText.Appearance = appearance46; this.InfoValueLabelFullText.Dock = System.Windows.Forms.DockStyle.Fill; this.InfoValueLabelFullText.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.InfoValueLabelFullText.Location = new System.Drawing.Point(119, 120); this.InfoValueLabelFullText.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.InfoValueLabelFullText.Name = "InfoValueLabelFullText"; this.InfoValueLabelFullText.Size = new System.Drawing.Size(155, 14); this.InfoValueLabelFullText.TabIndex = 22; this.InfoValueLabelFullText.Text = "[FullText]"; this.InfoValueLabelFullText.UseAppStyling = false; this.InfoValueLabelFullText.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; // // InfoValueLabelCollation // appearance47.BackColor = System.Drawing.Color.Transparent; appearance47.FontData.Name = "Microsoft Sans Serif"; appearance47.ForeColor = System.Drawing.Color.White; this.InfoValueLabelCollation.Appearance = appearance47; this.InfoValueLabelCollation.AutoSize = true; this.InfoValueLabelCollation.Dock = System.Windows.Forms.DockStyle.Fill; this.InfoValueLabelCollation.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.InfoValueLabelCollation.Location = new System.Drawing.Point(6, 164); this.InfoValueLabelCollation.Margin = new System.Windows.Forms.Padding(6, 4, 3, 4); this.InfoValueLabelCollation.Name = "InfoValueLabelCollation"; this.InfoValueLabelCollation.Size = new System.Drawing.Size(107, 30); this.InfoValueLabelCollation.TabIndex = 24; this.InfoValueLabelCollation.Text = "[Collation]"; this.InfoValueLabelCollation.UseAppStyling = false; this.InfoValueLabelCollation.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; // // InfoLabel_Collation // appearance48.BackColor = System.Drawing.Color.Transparent; appearance48.FontData.Name = "Microsoft Sans Serif"; appearance48.ForeColor = System.Drawing.Color.White; this.InfoLabel_Collation.Appearance = appearance48; this.InfoLabel_Collation.AutoSize = true; this.InfoLabel_Collation.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.InfoLabel_Collation.Location = new System.Drawing.Point(6, 142); this.InfoLabel_Collation.Margin = new System.Windows.Forms.Padding(6, 4, 3, 4); this.InfoLabel_Collation.Name = "InfoLabel_Collation"; this.InfoLabel_Collation.Size = new System.Drawing.Size(50, 14); this.InfoLabel_Collation.TabIndex = 25; this.InfoLabel_Collation.Text = "Collation"; this.InfoLabel_Collation.UseAppStyling = false; this.InfoLabel_Collation.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; // // InfoLabel_SqlVersion // appearance49.BackColor = System.Drawing.Color.Transparent; appearance49.FontData.Name = "Microsoft Sans Serif"; appearance49.ForeColor = System.Drawing.Color.White; this.InfoLabel_SqlVersion.Appearance = appearance49; this.InfoLabel_SqlVersion.AutoSize = true; this.InfoLabel_SqlVersion.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.InfoLabel_SqlVersion.Location = new System.Drawing.Point(6, 98); this.InfoLabel_SqlVersion.Margin = new System.Windows.Forms.Padding(6, 4, 3, 4); this.InfoLabel_SqlVersion.Name = "InfoLabel_SqlVersion"; this.InfoLabel_SqlVersion.Size = new System.Drawing.Size(44, 14); this.InfoLabel_SqlVersion.TabIndex = 21; this.InfoLabel_SqlVersion.Text = "Version"; this.InfoLabel_SqlVersion.UseAppStyling = false; this.InfoLabel_SqlVersion.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; // // InfoValueLabel_ProductVersion // appearance50.BackColor = System.Drawing.Color.Transparent; appearance50.FontData.Name = "Microsoft Sans Serif"; appearance50.ForeColor = System.Drawing.Color.White; this.InfoValueLabel_ProductVersion.Appearance = appearance50; this.InfoValueLabel_ProductVersion.AutoSize = true; this.InfoValueLabel_ProductVersion.Dock = System.Windows.Forms.DockStyle.Fill; this.InfoValueLabel_ProductVersion.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.InfoValueLabel_ProductVersion.Location = new System.Drawing.Point(119, 98); this.InfoValueLabel_ProductVersion.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.InfoValueLabel_ProductVersion.Name = "InfoValueLabel_ProductVersion"; this.InfoValueLabel_ProductVersion.Size = new System.Drawing.Size(155, 14); this.InfoValueLabel_ProductVersion.TabIndex = 20; this.InfoValueLabel_ProductVersion.Text = "[ProductVersion]"; this.InfoValueLabel_ProductVersion.UseAppStyling = false; this.InfoValueLabel_ProductVersion.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; // // InfoValueLabel_InstanceName // appearance51.BackColor = System.Drawing.Color.Transparent; appearance51.FontData.Name = "Microsoft Sans Serif"; appearance51.ForeColor = System.Drawing.Color.White; this.InfoValueLabel_InstanceName.Appearance = appearance51; this.InfoValueLabel_InstanceName.Dock = System.Windows.Forms.DockStyle.Fill; this.InfoValueLabel_InstanceName.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.InfoValueLabel_InstanceName.Location = new System.Drawing.Point(6, 76); this.InfoValueLabel_InstanceName.Margin = new System.Windows.Forms.Padding(6, 4, 3, 4); this.InfoValueLabel_InstanceName.Name = "InfoValueLabel_InstanceName"; this.InfoValueLabel_InstanceName.Size = new System.Drawing.Size(107, 14); this.InfoValueLabel_InstanceName.TabIndex = 18; this.InfoValueLabel_InstanceName.Text = "[Instance Name]"; this.InfoValueLabel_InstanceName.UseAppStyling = false; this.InfoValueLabel_InstanceName.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; // // InfoLabel_FullText // appearance52.BackColor = System.Drawing.Color.Transparent; appearance52.FontData.Name = "Microsoft Sans Serif"; appearance52.ForeColor = System.Drawing.Color.White; this.InfoLabel_FullText.Appearance = appearance52; this.InfoLabel_FullText.AutoSize = true; this.InfoLabel_FullText.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.InfoLabel_FullText.Location = new System.Drawing.Point(6, 120); this.InfoLabel_FullText.Margin = new System.Windows.Forms.Padding(6, 4, 3, 4); this.InfoLabel_FullText.Name = "InfoLabel_FullText"; this.InfoLabel_FullText.Size = new System.Drawing.Size(46, 14); this.InfoLabel_FullText.TabIndex = 23; this.InfoLabel_FullText.Text = "FullText"; this.InfoLabel_FullText.UseAppStyling = false; this.InfoLabel_FullText.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; // // tableLayoutPanel6 // this.tableLayoutPanel6.AutoSize = true; this.tableLayoutPanel6.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.tableLayoutPanel6.ColumnCount = 2; this.tableLayoutPanel6.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel6.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 96F)); this.tableLayoutPanel6.Controls.Add(this.ultraButton19, 1, 0); this.tableLayoutPanel6.Controls.Add(this.ultraLabel22, 0, 0); this.tableLayoutPanel6.Controls.Add(this.ultraLabel23, 0, 1); this.tableLayoutPanel6.Dock = System.Windows.Forms.DockStyle.Top; this.tableLayoutPanel6.Location = new System.Drawing.Point(0, 0); this.tableLayoutPanel6.Name = "tableLayoutPanel6"; this.tableLayoutPanel6.RowCount = 2; this.tableLayoutPanel6.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel6.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel6.Size = new System.Drawing.Size(161, 58); this.tableLayoutPanel6.TabIndex = 26; // // ultraButton19 // this.ultraButton19.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); appearance53.Image = ((object)(resources.GetObject("appearance53.Image"))); this.ultraButton19.Appearance = appearance53; this.ultraButton19.ButtonStyle = Infragistics.Win.UIElementButtonStyle.FlatBorderless; this.ultraButton19.Location = new System.Drawing.Point(139, 4); this.ultraButton19.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.ultraButton19.Name = "ultraButton19"; this.ultraButton19.Size = new System.Drawing.Size(23, 24); this.ultraButton19.TabIndex = 18; this.ultraButton19.UseAppStyling = false; this.ultraButton19.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; this.ultraButton19.Click += new System.EventHandler(this.ultraButton19_Click); // // ultraLabel22 // appearance54.BackColor = System.Drawing.Color.Transparent; appearance54.ForeColor = System.Drawing.Color.White; this.ultraLabel22.Appearance = appearance54; this.ultraLabel22.AutoSize = true; this.ultraLabel22.Location = new System.Drawing.Point(6, 4); this.ultraLabel22.Margin = new System.Windows.Forms.Padding(6, 4, 3, 4); this.ultraLabel22.Name = "ultraLabel22"; this.ultraLabel22.Size = new System.Drawing.Size(60, 18); this.ultraLabel22.TabIndex = 17; this.ultraLabel22.Text = "კოდექსის"; this.ultraLabel22.UseAppStyling = false; this.ultraLabel22.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; // // ultraLabel23 // appearance55.BackColor = System.Drawing.Color.Transparent; appearance55.ForeColor = System.Drawing.Color.White; this.ultraLabel23.Appearance = appearance55; this.ultraLabel23.AutoSize = true; this.tableLayoutPanel6.SetColumnSpan(this.ultraLabel23, 2); this.ultraLabel23.Location = new System.Drawing.Point(6, 36); this.ultraLabel23.Margin = new System.Windows.Forms.Padding(6, 4, 3, 4); this.ultraLabel23.Name = "ultraLabel23"; this.ultraLabel23.Size = new System.Drawing.Size(144, 18); this.ultraLabel23.TabIndex = 15; this.ultraLabel23.Text = "ბაზების ინსტალიატორი"; this.ultraLabel23.UseAppStyling = false; this.ultraLabel23.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; // // Form1_Fill_Panel // this.Form1_Fill_Panel.Controls.Add(this.GeneralTab); this.Form1_Fill_Panel.Controls.Add(this.ultraTabControl2); this.Form1_Fill_Panel.Controls.Add(this.LeftPannel); this.Form1_Fill_Panel.Cursor = System.Windows.Forms.Cursors.Default; this.Form1_Fill_Panel.Dock = System.Windows.Forms.DockStyle.Fill; this.Form1_Fill_Panel.Location = new System.Drawing.Point(1, 31); this.Form1_Fill_Panel.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.Form1_Fill_Panel.Name = "Form1_Fill_Panel"; this.Form1_Fill_Panel.Size = new System.Drawing.Size(795, 447); this.Form1_Fill_Panel.TabIndex = 0; // // GeneralTab // appearance22.BackColor = System.Drawing.Color.White; appearance22.BorderColor = System.Drawing.Color.Silver; appearance22.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(28)))), ((int)(((byte)(100)))), ((int)(((byte)(65))))); this.GeneralTab.Appearance = appearance22; this.GeneralTab.Controls.Add(this.ultraTabSharedControlsPage5); this.GeneralTab.Controls.Add(this.ultraTabPageControl12); this.GeneralTab.Controls.Add(this.ultraTabPageControl13); this.GeneralTab.Dock = System.Windows.Forms.DockStyle.Fill; this.GeneralTab.Location = new System.Drawing.Point(161, 0); this.GeneralTab.Name = "GeneralTab"; appearance41.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(28)))), ((int)(((byte)(100)))), ((int)(((byte)(65))))); appearance41.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(28)))), ((int)(((byte)(100)))), ((int)(((byte)(65))))); appearance41.ForeColor = System.Drawing.Color.White; this.GeneralTab.SelectedTabAppearance = appearance41; this.GeneralTab.SharedControlsPage = this.ultraTabSharedControlsPage5; this.GeneralTab.Size = new System.Drawing.Size(634, 400); this.GeneralTab.Style = Infragistics.Win.UltraWinTabControl.UltraTabControlStyle.Flat; this.GeneralTab.TabIndex = 10; ultraTab3.TabPage = this.ultraTabPageControl12; ultraTab3.Text = "ბაზის ინსტალაცია"; ultraTab4.TabPage = this.ultraTabPageControl13; ultraTab4.Text = "საინსტალაციოს შექმნა"; this.GeneralTab.Tabs.AddRange(new Infragistics.Win.UltraWinTabControl.UltraTab[] { ultraTab3, ultraTab4}); this.GeneralTab.UseAppStyling = false; this.GeneralTab.UseFlatMode = Infragistics.Win.DefaultableBoolean.True; this.GeneralTab.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; this.GeneralTab.ViewStyle = Infragistics.Win.UltraWinTabControl.ViewStyle.Standard; this.GeneralTab.SelectedTabChanged += new Infragistics.Win.UltraWinTabControl.SelectedTabChangedEventHandler(this.GeneralTab_SelectedTabChanged); // // ultraTabSharedControlsPage5 // this.ultraTabSharedControlsPage5.Location = new System.Drawing.Point(-10000, -10000); this.ultraTabSharedControlsPage5.Name = "ultraTabSharedControlsPage5"; this.ultraTabSharedControlsPage5.Size = new System.Drawing.Size(632, 377); // // ultraTabControl2 // appearance42.BackColor = System.Drawing.Color.White; this.ultraTabControl2.Appearance = appearance42; this.ultraTabControl2.Controls.Add(this.ultraTabSharedControlsPage2); this.ultraTabControl2.Controls.Add(this.ultraTabPageControl2); this.ultraTabControl2.Dock = System.Windows.Forms.DockStyle.Bottom; this.ultraTabControl2.Location = new System.Drawing.Point(161, 400); this.ultraTabControl2.Name = "ultraTabControl2"; this.ultraTabControl2.SharedControlsPage = this.ultraTabSharedControlsPage2; this.ultraTabControl2.Size = new System.Drawing.Size(634, 47); this.ultraTabControl2.Style = Infragistics.Win.UltraWinTabControl.UltraTabControlStyle.Wizard; this.ultraTabControl2.TabIndex = 1; ultraTab17.TabPage = this.ultraTabPageControl2; ultraTab17.Text = "tab1"; this.ultraTabControl2.Tabs.AddRange(new Infragistics.Win.UltraWinTabControl.UltraTab[] { ultraTab17}); // // ultraTabSharedControlsPage2 // this.ultraTabSharedControlsPage2.Location = new System.Drawing.Point(-10000, -10000); this.ultraTabSharedControlsPage2.Name = "ultraTabSharedControlsPage2"; this.ultraTabSharedControlsPage2.Size = new System.Drawing.Size(634, 47); // // LeftPannel // appearance44.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(28)))), ((int)(((byte)(100)))), ((int)(((byte)(65))))); appearance44.ImageBackgroundStyle = Infragistics.Win.ImageBackgroundStyle.Stretched; this.LeftPannel.Appearance = appearance44; this.LeftPannel.Controls.Add(this.ultraTabSharedControlsPage4); this.LeftPannel.Controls.Add(this.ultraTabPageControl11); this.LeftPannel.Dock = System.Windows.Forms.DockStyle.Left; this.LeftPannel.Location = new System.Drawing.Point(0, 0); this.LeftPannel.Name = "LeftPannel"; this.LeftPannel.SharedControlsPage = this.ultraTabSharedControlsPage4; this.LeftPannel.Size = new System.Drawing.Size(161, 447); this.LeftPannel.Style = Infragistics.Win.UltraWinTabControl.UltraTabControlStyle.Wizard; this.LeftPannel.TabIndex = 9; ultraTab15.TabPage = this.ultraTabPageControl11; ultraTab15.Text = "tab1"; this.LeftPannel.Tabs.AddRange(new Infragistics.Win.UltraWinTabControl.UltraTab[] { ultraTab15}); this.LeftPannel.UseAppStyling = false; this.LeftPannel.UseFlatMode = Infragistics.Win.DefaultableBoolean.True; this.LeftPannel.UseOsThemes = Infragistics.Win.DefaultableBoolean.False; // // ultraTabSharedControlsPage4 // this.ultraTabSharedControlsPage4.Location = new System.Drawing.Point(-10000, -10000); this.ultraTabSharedControlsPage4.Name = "ultraTabSharedControlsPage4"; this.ultraTabSharedControlsPage4.Size = new System.Drawing.Size(161, 447); // // _Form1_Toolbars_Dock_Area_Left // this._Form1_Toolbars_Dock_Area_Left.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping; this._Form1_Toolbars_Dock_Area_Left.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); this._Form1_Toolbars_Dock_Area_Left.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Left; this._Form1_Toolbars_Dock_Area_Left.ForeColor = System.Drawing.SystemColors.ControlText; this._Form1_Toolbars_Dock_Area_Left.InitialResizeAreaExtent = 1; this._Form1_Toolbars_Dock_Area_Left.Location = new System.Drawing.Point(0, 31); this._Form1_Toolbars_Dock_Area_Left.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this._Form1_Toolbars_Dock_Area_Left.Name = "_Form1_Toolbars_Dock_Area_Left"; this._Form1_Toolbars_Dock_Area_Left.Size = new System.Drawing.Size(1, 447); this._Form1_Toolbars_Dock_Area_Left.ToolbarsManager = this.ultraToolbarsManager1; this._Form1_Toolbars_Dock_Area_Left.UseAppStyling = false; // // ultraToolbarsManager1 // this.ultraToolbarsManager1.DesignerFlags = 1; this.ultraToolbarsManager1.DockWithinContainer = this; this.ultraToolbarsManager1.DockWithinContainerBaseType = typeof(System.Windows.Forms.Form); this.ultraToolbarsManager1.FormDisplayStyle = Infragistics.Win.UltraWinToolbars.FormDisplayStyle.RoundedFixed; appearance56.FontData.BoldAsString = "True"; appearance56.FontData.Name = "Sylfaen"; appearance56.FontData.SizeInPoints = 9.25F; this.ultraToolbarsManager1.Ribbon.CaptionAreaAppearance = appearance56; this.ultraToolbarsManager1.ShowFullMenusDelay = 500; this.ultraToolbarsManager1.Style = Infragistics.Win.UltraWinToolbars.ToolbarStyle.Office2013; ultraToolbar1.DockedColumn = 0; ultraToolbar1.DockedRow = 0; ultraToolbar1.FloatingSize = new System.Drawing.Size(276, 24); ultraToolbar1.NonInheritedTools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] { popupMenuTool7, popupMenuTool8}); ultraToolbar1.Settings.AllowCustomize = Infragistics.Win.DefaultableBoolean.False; ultraToolbar1.Settings.AllowFloating = Infragistics.Win.DefaultableBoolean.False; ultraToolbar1.Settings.AllowHiding = Infragistics.Win.DefaultableBoolean.False; appearance57.FontData.Name = "Sylfaen"; appearance57.FontData.SizeInPoints = 9.25F; ultraToolbar1.Settings.Appearance = appearance57; ultraToolbar1.Settings.FillEntireRow = Infragistics.Win.DefaultableBoolean.True; ultraToolbar1.Settings.GrabHandleStyle = Infragistics.Win.UltraWinToolbars.GrabHandleStyle.None; appearance58.FontData.Name = "Sylfaen"; appearance58.FontData.SizeInPoints = 9.25F; ultraToolbar1.Settings.ToolAppearance = appearance58; ultraToolbar1.Text = "MainBar"; ultraToolbar1.Visible = false; this.ultraToolbarsManager1.Toolbars.AddRange(new Infragistics.Win.UltraWinToolbars.UltraToolbar[] { ultraToolbar1}); popupMenuTool3.DropDownArrowStyle = Infragistics.Win.UltraWinToolbars.DropDownArrowStyle.None; appearance59.Image = global::ILG.Codex.CodexR4.Properties.Resources.help_32x32; popupMenuTool3.SharedPropsInternal.AppearancesLarge.Appearance = appearance59; popupMenuTool3.SharedPropsInternal.Caption = "დახმარება"; popupMenuTool3.SharedPropsInternal.Category = "Menu"; popupMenuTool3.SharedPropsInternal.CustomizerCaption = "HelpMenu"; popupMenuTool3.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText; buttonTool2.InstanceProps.IsFirstInGroup = true; popupMenuTool3.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] { buttonTool2}); appearance60.Image = global::ILG.Codex.CodexR4.Properties.Resources.app_32x32; popupMenuTool4.SharedPropsInternal.AppearancesLarge.Appearance = appearance60; popupMenuTool4.SharedPropsInternal.Caption = "კონფიგურაცია"; popupMenuTool4.SharedPropsInternal.Category = "Menu"; popupMenuTool4.SharedPropsInternal.CustomizerCaption = "ConfigurationMenu"; popupMenuTool4.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText; popupMenuTool4.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] { buttonTool5}); buttonTool6.SharedPropsInternal.Caption = "პროგრამის შესახებ"; buttonTool6.SharedPropsInternal.Category = "Help"; buttonTool6.SharedPropsInternal.CustomizerCaption = "პროგრამის შესახებ"; buttonTool7.SharedPropsInternal.Caption = "დახმარება"; buttonTool7.SharedPropsInternal.Category = "Help"; buttonTool7.SharedPropsInternal.CustomizerCaption = "დახმარება"; buttonTool8.SharedPropsInternal.Caption = "დაგვიკავშირდით"; buttonTool8.SharedPropsInternal.Category = "Help"; buttonTool8.SharedPropsInternal.CustomizerCaption = "დაგვიკავშირდით"; buttonTool9.SharedPropsInternal.Caption = "კოდექსის Web საიტი"; buttonTool9.SharedPropsInternal.Category = "Help"; buttonTool9.SharedPropsInternal.CustomizerCaption = "კოდექსის Web საიტი"; buttonTool10.SharedPropsInternal.Caption = "კონფიგურაცია"; buttonTool10.SharedPropsInternal.Category = "Config"; buttonTool10.SharedPropsInternal.CustomizerCaption = "კონფიგურაცია"; popupMenuTool5.DropDownArrowStyle = Infragistics.Win.UltraWinToolbars.DropDownArrowStyle.None; popupMenuTool5.SharedPropsInternal.Caption = "ფაილი"; popupMenuTool5.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] { buttonTool12}); popupMenuTool6.DropDownArrowStyle = Infragistics.Win.UltraWinToolbars.DropDownArrowStyle.None; popupMenuTool6.SharedPropsInternal.Caption = "დახმარება"; buttonTool15.InstanceProps.IsFirstInGroup = true; popupMenuTool6.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] { buttonTool13, buttonTool14, buttonTool15}); buttonTool11.SharedPropsInternal.Caption = "გამოსვლა"; popupMenuTool1.SharedPropsInternal.Caption = "InstallListBox"; buttonTool18.InstanceProps.IsFirstInGroup = true; buttonTool19.InstanceProps.IsFirstInGroup = true; popupMenuTool1.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] { buttonTool17, buttonTool18, buttonTool19}); buttonTool3.SharedPropsInternal.Caption = "კოპირება"; buttonTool3.SharedPropsInternal.CustomizerCaption = "კოპირება"; buttonTool4.SharedPropsInternal.Caption = "ყველაფრის კოპირება"; buttonTool4.SharedPropsInternal.CustomizerCaption = "ყველაფრის კოპირება"; buttonTool16.SharedPropsInternal.Caption = "გასუფთავება"; buttonTool16.SharedPropsInternal.CustomizerCaption = "გასუფთავება"; popupMenuTool2.SharedPropsInternal.Caption = "LocalDBMenu"; popupMenuTool2.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] { buttonTool20}); buttonTool1.SharedPropsInternal.Caption = "LocalDB Instance Name"; popupMenuTool9.SharedPropsInternal.Caption = "SpecificActions"; popupMenuTool9.SharedPropsInternal.Category = "SpecificActions"; popupMenuTool9.SharedPropsInternal.CustomizerCaption = "SpecificActions"; popupMenuTool9.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] { buttonTool24, buttonTool25, buttonTool26}); buttonTool21.SharedPropsInternal.Caption = "Drop Codex Users (Old Users)"; buttonTool21.SharedPropsInternal.Category = "SpecificActions"; buttonTool22.SharedPropsInternal.Caption = "Drop Codex XUsers (With a Stopng Password)"; buttonTool22.SharedPropsInternal.Category = "SpecificActions"; buttonTool23.SharedPropsInternal.Caption = "Drop Full Text Indexes"; buttonTool23.SharedPropsInternal.Category = "SpecificActions"; this.ultraToolbarsManager1.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] { popupMenuTool3, popupMenuTool4, buttonTool6, buttonTool7, buttonTool8, buttonTool9, buttonTool10, popupMenuTool5, popupMenuTool6, buttonTool11, popupMenuTool1, buttonTool3, buttonTool4, buttonTool16, popupMenuTool2, buttonTool1, popupMenuTool9, buttonTool21, buttonTool22, buttonTool23}); this.ultraToolbarsManager1.UseAppStyling = false; this.ultraToolbarsManager1.ToolClick += new Infragistics.Win.UltraWinToolbars.ToolClickEventHandler(this.ultraToolbarsManager1_ToolClick); // // _Form1_Toolbars_Dock_Area_Right // this._Form1_Toolbars_Dock_Area_Right.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping; this._Form1_Toolbars_Dock_Area_Right.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); this._Form1_Toolbars_Dock_Area_Right.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Right; this._Form1_Toolbars_Dock_Area_Right.ForeColor = System.Drawing.SystemColors.ControlText; this._Form1_Toolbars_Dock_Area_Right.InitialResizeAreaExtent = 1; this._Form1_Toolbars_Dock_Area_Right.Location = new System.Drawing.Point(796, 31); this._Form1_Toolbars_Dock_Area_Right.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this._Form1_Toolbars_Dock_Area_Right.Name = "_Form1_Toolbars_Dock_Area_Right"; this._Form1_Toolbars_Dock_Area_Right.Size = new System.Drawing.Size(1, 447); this._Form1_Toolbars_Dock_Area_Right.ToolbarsManager = this.ultraToolbarsManager1; this._Form1_Toolbars_Dock_Area_Right.UseAppStyling = false; // // _Form1_Toolbars_Dock_Area_Top // this._Form1_Toolbars_Dock_Area_Top.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping; this._Form1_Toolbars_Dock_Area_Top.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); this._Form1_Toolbars_Dock_Area_Top.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Top; this._Form1_Toolbars_Dock_Area_Top.ForeColor = System.Drawing.SystemColors.ControlText; this._Form1_Toolbars_Dock_Area_Top.Location = new System.Drawing.Point(0, 0); this._Form1_Toolbars_Dock_Area_Top.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this._Form1_Toolbars_Dock_Area_Top.Name = "_Form1_Toolbars_Dock_Area_Top"; this._Form1_Toolbars_Dock_Area_Top.Size = new System.Drawing.Size(797, 31); this._Form1_Toolbars_Dock_Area_Top.ToolbarsManager = this.ultraToolbarsManager1; this._Form1_Toolbars_Dock_Area_Top.UseAppStyling = false; // // _Form1_Toolbars_Dock_Area_Bottom // this._Form1_Toolbars_Dock_Area_Bottom.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping; this._Form1_Toolbars_Dock_Area_Bottom.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); this._Form1_Toolbars_Dock_Area_Bottom.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Bottom; this._Form1_Toolbars_Dock_Area_Bottom.ForeColor = System.Drawing.SystemColors.ControlText; this._Form1_Toolbars_Dock_Area_Bottom.InitialResizeAreaExtent = 1; this._Form1_Toolbars_Dock_Area_Bottom.Location = new System.Drawing.Point(0, 478); this._Form1_Toolbars_Dock_Area_Bottom.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this._Form1_Toolbars_Dock_Area_Bottom.Name = "_Form1_Toolbars_Dock_Area_Bottom"; this._Form1_Toolbars_Dock_Area_Bottom.Size = new System.Drawing.Size(797, 1); this._Form1_Toolbars_Dock_Area_Bottom.ToolbarsManager = this.ultraToolbarsManager1; this._Form1_Toolbars_Dock_Area_Bottom.UseAppStyling = false; // // richTextBox7 // this.richTextBox7.BackColor = System.Drawing.Color.White; this.richTextBox7.Location = new System.Drawing.Point(11, 31); this.richTextBox7.Name = "richTextBox7"; this.richTextBox7.ReadOnly = true; this.richTextBox7.Size = new System.Drawing.Size(598, 106); this.richTextBox7.TabIndex = 0; this.richTextBox7.Text = resources.GetString("richTextBox7.Text"); // // ultraToolTipManager1 // this.ultraToolTipManager1.ContainingControl = this; // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 16F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(797, 479); this.Controls.Add(this.Form1_Fill_Panel); this.Controls.Add(this._Form1_Toolbars_Dock_Area_Left); this.Controls.Add(this._Form1_Toolbars_Dock_Area_Right); this.Controls.Add(this._Form1_Toolbars_Dock_Area_Bottom); this.Controls.Add(this._Form1_Toolbars_Dock_Area_Top); this.Font = new System.Drawing.Font("Sylfaen", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "Form1"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "კოდექსი DS 1.6 მონაცემთა ბაზის ინსტალაცია"; this.Load += new System.EventHandler(this.Form1_Load); this.ultraTabPageControl16.ResumeLayout(false); this.Frame_Install_Config_Frame2.ClientArea.ResumeLayout(false); this.Frame_Install_Config_Frame2.ResumeLayout(false); this.tableLayoutPanel3.ResumeLayout(false); this.tableLayoutPanel3.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.Edit_Install_Config_DataBaseInfo)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.Edit_Install_Config_WhereTo)).EndInit(); this.ultraTabPageControl3.ResumeLayout(false); this.tableLayoutPanel4.ResumeLayout(false); this.tableLayoutPanel4.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.CheckBox_CodexDSXUsers)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.FullTextSearch)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.CheckBox_CodexDSUsers)).EndInit(); this.ultraTabPageControl5.ResumeLayout(false); this.tableLayoutPanel10.ResumeLayout(false); this.tableLayoutPanel10.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.EditBox_Destination_Make_Config_Servers)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.EditBox_Source_Make_Config_Servers)).EndInit(); this.ultraTabPageControl1.ResumeLayout(false); this.tableLayoutPanel1.ResumeLayout(false); this.tableLayoutPanel1.PerformLayout(); this.Frame_Install_Welcome.ClientArea.ResumeLayout(false); this.Frame_Install_Welcome.ResumeLayout(false); this.tableLayoutPanel2.ResumeLayout(false); this.tableLayoutPanel2.PerformLayout(); this.ultraTabPageControl4.ResumeLayout(false); this.tableLayoutPanel8.ResumeLayout(false); this.tableLayoutPanel8.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.ultraTabControl1)).EndInit(); this.ultraTabControl1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.Edit_Install_Config_Servers)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.Database_Installation_Scenario)).EndInit(); this.Install_Page_Step1.ResumeLayout(false); this.tableLayoutPanel5.ResumeLayout(false); this.tableLayoutPanel5.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.Install_Group_Step1)).EndInit(); this.Install_Group_Step1.ResumeLayout(false); this.ultraTabPageControl14.ResumeLayout(false); this.tableLayoutPanel7.ResumeLayout(false); this.tableLayoutPanel7.PerformLayout(); this.Frame_Make_Welcome.ClientArea.ResumeLayout(false); this.Frame_Make_Welcome.ClientArea.PerformLayout(); this.Frame_Make_Welcome.ResumeLayout(false); this.ultraTabPageControl15.ResumeLayout(false); this.tableLayoutPanel11.ResumeLayout(false); this.tableLayoutPanel11.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.ultraTabControl3)).EndInit(); this.ultraTabControl3.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.Combo_Make_Config_Servers)).EndInit(); this.DatabaseImageCreator_Page3.ResumeLayout(false); this.DatabaseImageCreator_Page3.PerformLayout(); this.tableLayoutPanel12.ResumeLayout(false); this.tableLayoutPanel12.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.Frame_Make_Step1)).EndInit(); this.Frame_Make_Step1.ResumeLayout(false); this.tableLayoutPanel13.ResumeLayout(false); this.tableLayoutPanel13.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.TextEdit_Make_Step1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.Check_Drop_Create)).EndInit(); this.ultraTabPageControl12.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.DataBaseInstaller)).EndInit(); this.DataBaseInstaller.ResumeLayout(false); this.ultraTabPageControl13.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.DatabaseImageCreator)).EndInit(); this.DatabaseImageCreator.ResumeLayout(false); this.ultraTabPageControl2.ResumeLayout(false); this.ultraTabPageControl2.PerformLayout(); this.tableLayoutPanel14.ResumeLayout(false); this.ultraTabPageControl11.ResumeLayout(false); this.ultraTabPageControl11.PerformLayout(); this.tableLayoutPanel9.ResumeLayout(false); this.tableLayoutPanel9.PerformLayout(); this.tableLayoutPanel6.ResumeLayout(false); this.tableLayoutPanel6.PerformLayout(); this.Form1_Fill_Panel.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.GeneralTab)).EndInit(); this.GeneralTab.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.ultraTabControl2)).EndInit(); this.ultraTabControl2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.LeftPannel)).EndInit(); this.LeftPannel.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.ultraToolbarsManager1)).EndInit(); this.ResumeLayout(false); } #endregion private Infragistics.Win.UltraWinTabControl.UltraTabControl DataBaseInstaller; private Infragistics.Win.UltraWinTabControl.UltraTabSharedControlsPage ultraTabSharedControlsPage1; private Infragistics.Win.UltraWinTabControl.UltraTabPageControl ultraTabPageControl1; private Infragistics.Win.UltraWinToolbars.UltraToolbarsManager ultraToolbarsManager1; private System.Windows.Forms.Panel Form1_Fill_Panel; private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _Form1_Toolbars_Dock_Area_Left; private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _Form1_Toolbars_Dock_Area_Right; private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _Form1_Toolbars_Dock_Area_Top; private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _Form1_Toolbars_Dock_Area_Bottom; private Infragistics.Win.Misc.UltraLabel Label_Install_Caption_Welcome; private Infragistics.Win.UltraWinTabControl.UltraTabControl ultraTabControl2; private Infragistics.Win.UltraWinTabControl.UltraTabSharedControlsPage ultraTabSharedControlsPage2; private Infragistics.Win.UltraWinTabControl.UltraTabPageControl ultraTabPageControl2; private Infragistics.Win.UltraWinTabControl.UltraTabPageControl Install_Page_Step1; private Infragistics.Win.Misc.UltraLabel Label_Install_Caption_Step1; private Infragistics.Win.UltraWinEditors.UltraPictureBox Icon_Install_Spet1; private Infragistics.Win.Misc.UltraLabel Label_Install_Config_InfoFille; private Infragistics.Win.Misc.UltraButton Button_Install_Config_DataBaseInfo; private Infragistics.Win.UltraWinEditors.UltraTextEditor Edit_Install_Config_DataBaseInfo; private Infragistics.Win.Misc.UltraLabel Label_Install_Config_WhereToCopy; private Infragistics.Win.Misc.UltraButton Button_Install_Config_WhereTo; private Infragistics.Win.UltraWinEditors.UltraTextEditor Edit_Install_Config_WhereTo; private Infragistics.Win.UltraWinEditors.UltraPictureBox Icon_Install_Welcome; private Infragistics.Win.UltraWinEditors.UltraPictureBox Icon_Install_Config_DataBaseInfo; private Infragistics.Win.Misc.UltraGroupBox Install_Group_Step1; private Infragistics.Win.Misc.UltraButton Install_StartButton_Step1; private System.Windows.Forms.ListBox Install_listBox_Step1; private System.Windows.Forms.RichTextBox richTextBox7; private Infragistics.Win.Misc.UltraButton Button_Next; private Infragistics.Win.Misc.UltraButton Button_Back; private Infragistics.Win.Misc.UltraButton Button_Close; private Infragistics.Win.Misc.UltraPanel Frame_Install_Welcome; private Infragistics.Win.Misc.UltraLabel Icon_Install_Welcome_Frame_LabelTop; private Infragistics.Win.Misc.UltraLabel Icon_Install_Welcome_Frame_LabelCaption; private Infragistics.Win.Misc.UltraButton Button_Install_Config_Connect; private Infragistics.Win.UltraWinToolTip.UltraToolTipManager ultraToolTipManager1; private Infragistics.Win.Misc.UltraPanel Frame_Install_Config_Frame2; private Infragistics.Win.UltraWinEditors.UltraPictureBox Icon_Install_Config_OpenFolder; private Infragistics.Win.Misc.UltraButton ultraButton19; private Infragistics.Win.Misc.UltraButton Button_Install_Config_Save; private Infragistics.Win.Misc.UltraLabel InfoValueLabel_InstanceName; private Infragistics.Win.Misc.UltraLabel InfoLabel_SqlServer; private Infragistics.Win.Misc.UltraLabel InfoLabel_SqlVersion; private Infragistics.Win.Misc.UltraLabel InfoValueLabel_ProductVersion; private Infragistics.Win.Misc.UltraLabel InfoLabel_Collation; private Infragistics.Win.Misc.UltraLabel InfoValueLabelCollation; private Infragistics.Win.Misc.UltraLabel InfoLabel_FullText; private Infragistics.Win.Misc.UltraLabel InfoValueLabelFullText; private Infragistics.Win.UltraWinTabControl.UltraTabControl LeftPannel; private Infragistics.Win.UltraWinTabControl.UltraTabSharedControlsPage ultraTabSharedControlsPage4; private Infragistics.Win.UltraWinTabControl.UltraTabPageControl ultraTabPageControl11; private Infragistics.Win.Misc.UltraLabel ultraLabel22; private Infragistics.Win.Misc.UltraLabel ultraLabel23; private Infragistics.Win.UltraWinTabControl.UltraTabControl GeneralTab; private Infragistics.Win.UltraWinTabControl.UltraTabSharedControlsPage ultraTabSharedControlsPage5; private Infragistics.Win.UltraWinTabControl.UltraTabPageControl ultraTabPageControl12; private Infragistics.Win.UltraWinTabControl.UltraTabPageControl ultraTabPageControl13; private Infragistics.Win.UltraWinTabControl.UltraTabControl DatabaseImageCreator; private Infragistics.Win.UltraWinTabControl.UltraTabSharedControlsPage ultraTabSharedControlsPage6; private Infragistics.Win.UltraWinTabControl.UltraTabPageControl ultraTabPageControl14; private Infragistics.Win.Misc.UltraPanel Frame_Make_Welcome; private Infragistics.Win.Misc.UltraButton ultraButton1; private Infragistics.Win.Misc.UltraLabel Icon_Make_Welcome_Frame_LabelTop; private Infragistics.Win.Misc.UltraLabel Icon_Make_Welcome_Frame_LabelCaption; private Infragistics.Win.UltraWinEditors.UltraPictureBox Icon_Make_Welcome; private Infragistics.Win.Misc.UltraLabel Label_Make_Caption_Welcome; private Infragistics.Win.UltraWinTabControl.UltraTabPageControl ultraTabPageControl15; private Infragistics.Win.UltraWinEditors.UltraPictureBox Icon3_Make_Config_Database; private Infragistics.Win.Misc.UltraButton Button_Browse2_Make_Config_Servers; private Infragistics.Win.Misc.UltraLabel Label3_Install_Config_Database; private Infragistics.Win.UltraWinEditors.UltraTextEditor EditBox_Destination_Make_Config_Servers; private Infragistics.Win.Misc.UltraButton Button_Save_Make_Config_Servers; private Infragistics.Win.Misc.UltraButton Button_Browse1_Make_Config_Servers; private Infragistics.Win.UltraWinEditors.UltraPictureBox Icon2_Make_Config_Database; private Infragistics.Win.UltraWinEditors.UltraTextEditor EditBox_Source_Make_Config_Servers; private Infragistics.Win.Misc.UltraLabel Label2_Install_Config_Database; private Infragistics.Win.Misc.UltraLabel Label1_Install_Config_Database; private Infragistics.Win.Misc.UltraButton Button_Connect_Make_Config_Servers; private Infragistics.Win.Misc.UltraLabel Label_Make_Config_Caption; private Infragistics.Win.UltraWinTabControl.UltraTabPageControl DatabaseImageCreator_Page3; private Infragistics.Win.UltraWinEditors.UltraPictureBox Icon_Make_Step1; private Infragistics.Win.Misc.UltraButton Button_Make_Step1; private Infragistics.Win.Misc.UltraGroupBox Frame_Make_Step1; private Infragistics.Win.Misc.UltraLabel Label_Make_Frame_Step1; private Infragistics.Win.UltraWinEditors.UltraTextEditor TextEdit_Make_Step1; private Infragistics.Win.Misc.UltraLabel Label_Make_Caption_Step1; private Infragistics.Win.UltraWinEditors.UltraCheckEditor Check_Drop_Create; private Infragistics.Win.UltraWinTabControl.UltraTabPageControl ultraTabPageControl4; private Infragistics.Win.UltraWinEditors.UltraCheckEditor FullTextSearch; private Infragistics.Win.UltraWinEditors.UltraCheckEditor CheckBox_CodexDSUsers; private Infragistics.Win.Misc.UltraLabel ultraLabel1; private Infragistics.Win.UltraWinEditors.UltraPictureBox ultraPictureBox1; private Infragistics.Win.UltraWinTabControl.UltraTabControl ultraTabControl1; private Infragistics.Win.UltraWinTabControl.UltraTabSharedControlsPage ultraTabSharedControlsPage7; private Infragistics.Win.UltraWinTabControl.UltraTabPageControl ultraTabPageControl16; private System.Windows.Forms.LinkLabel linkLabel2; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel4; private Infragistics.Win.UltraWinTabControl.UltraTabPageControl ultraTabPageControl3; private Infragistics.Win.Misc.UltraLabel ultraLabel2; private Infragistics.Win.UltraWinEditors.UltraPictureBox ultraPictureBox4; private Infragistics.Win.Misc.UltraLabel ultraLabel3; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel5; private Infragistics.Win.Misc.UltraLabel Installlation_Scenarious_Label; private Infragistics.Win.UltraWinEditors.UltraComboEditor Database_Installation_Scenario; private Infragistics.Win.Misc.UltraLabel ultraLabel5; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel7; private Infragistics.Win.UltraWinEditors.UltraPictureBox ultraPictureBox2; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel8; private Infragistics.Win.UltraWinEditors.UltraTextEditor Edit_Install_Config_Servers; private System.Windows.Forms.LinkLabel linkLabel1; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel6; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel9; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel11; private System.Windows.Forms.LinkLabel linkLabel3; private Infragistics.Win.UltraWinTabControl.UltraTabControl ultraTabControl3; private Infragistics.Win.UltraWinTabControl.UltraTabSharedControlsPage ultraTabSharedControlsPage3; private Infragistics.Win.UltraWinTabControl.UltraTabPageControl ultraTabPageControl5; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel10; private Infragistics.Win.UltraWinEditors.UltraPictureBox ultraPictureBox3; private Infragistics.Win.UltraWinEditors.UltraTextEditor Combo_Make_Config_Servers; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel12; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel13; private System.Windows.Forms.LinkLabel linkLabel4; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel14; private Infragistics.Win.Misc.UltraLabel Creation_Scenarious_Label; private Infragistics.Win.UltraWinEditors.UltraCheckEditor CheckBox_CodexDSXUsers; private System.Windows.Forms.LinkLabel Link_SpecificActions; } }
72.723445
199
0.695919
[ "Unlicense" ]
IrakliLomidze/CodexDS16
DataTools/DatabaseInstallerDS.RC2/DatabaseInstallerDS/Form1.Designer.cs
193,867
C#
using System.Runtime.InteropServices; using UnityEngine; using OpenCvSharp; namespace Leap.Unity.AR.Testing { public class OpenCVStereoWebcam : MonoBehaviour { public int deviceNumber = 0; public Renderer leftDisplay, rightDisplay; public bool updateScreenAutomatically = true; [System.NonSerialized] public byte[] leftData, rightData; [System.NonSerialized] public Mat leftImage, rightImage; public VideoCapture cap; Mat webcamImage, grayImage, leftImageSlice, rightImageSlice; Texture2D leftTexture, rightTexture; void Start() { cap = new OpenCvSharp.VideoCapture(deviceNumber); //cap.Fps = 30; cap.FrameWidth = 1280; cap.FrameHeight = 480; cap.AutoExposure = 0; cap.Exposure = -4; webcamImage = new Mat(cap.FrameHeight, cap.FrameWidth, MatType.CV_8UC3); grayImage = new Mat(cap.FrameHeight, cap.FrameWidth, MatType.CV_8UC1); leftImageSlice = new Mat(cap.FrameHeight, cap.FrameWidth / 2, MatType.CV_8UC1); rightImageSlice = new Mat(cap.FrameHeight, cap.FrameWidth / 2, MatType.CV_8UC1); leftImage = new Mat(cap.FrameHeight, cap.FrameWidth / 2, MatType.CV_8UC1); rightImage = new Mat(cap.FrameHeight, cap.FrameWidth / 2, MatType.CV_8UC1); leftData = new byte[cap.FrameHeight * cap.FrameWidth / 2]; rightData = new byte[cap.FrameHeight * cap.FrameWidth / 2]; } void Update() { if (Time.frameCount % 2 == deviceNumber) return; //Should multithread the cap.Read() operation, it can take anywhere from 6 to 25ms if (cap.IsOpened() && cap.Read(webcamImage)) { // Convert to Grayscale (1 byte per pixel; makes things nicer) Cv2.CvtColor(webcamImage, grayImage, ColorConversionCodes.BGR2GRAY); // Get the Left Image Data leftImageSlice = new Mat(grayImage, new OpenCvSharp.Rect(0, 0, cap.FrameWidth / 2, cap.FrameHeight)); leftImageSlice.CopyTo(leftImage); Marshal.Copy(leftImage.Data, leftData, 0, cap.FrameHeight * cap.FrameWidth / 2); // Display the Left Image Texture if(updateScreenAutomatically) updateScreen(leftImage, true); // Get the Right Image Data rightImageSlice = new Mat(grayImage, new OpenCvSharp.Rect(cap.FrameWidth / 2, 0, cap.FrameWidth / 2, cap.FrameHeight)); rightImageSlice.CopyTo(rightImage); Marshal.Copy(rightImage.Data, rightData, 0, cap.FrameHeight * cap.FrameWidth / 2); // Display the Right Image Texture if (updateScreenAutomatically) updateScreen(rightImage, false); } } private void OnDestroy() { cap.Release(); webcamImage.Release(); grayImage.Release(); leftImageSlice.Release(); rightImageSlice.Release(); leftImage.Release(); rightImage.Release(); } public void updateScreen(Mat image, bool isLeft) { Renderer display = isLeft ? leftDisplay : rightDisplay; // Display the Right Image Texture if (display != null) { if (isLeft) { fillTexture(image, ref leftTexture); } else { fillTexture(image, ref rightTexture); } display.material.mainTexture = isLeft ? leftTexture : rightTexture; } } public void changeDeviceNumber(int newDeviceNumber) { if (cap.IsOpened()) cap.Release(); cap = null; deviceNumber = newDeviceNumber; cap = new OpenCvSharp.VideoCapture(deviceNumber); } public static void fillTexture(Mat input, ref Texture2D output, byte[] bytes = null) { bool textureGood = (output != null && output.width == input.Width && output.height == input.Height && ((input.Type() == MatType.CV_8UC3 && output.format == TextureFormat.RGB24) || (input.Type() == MatType.CV_8UC1 && output.format == TextureFormat.R8))); if (!textureGood) { TextureFormat format = (input.Type() == MatType.CV_8UC3) ? TextureFormat.RGB24 : TextureFormat.R8; output = new Texture2D(input.Width, input.Height, format, false); } if (bytes == null) { output.LoadRawTextureData(input.Data, input.Width * input.Height * ((input.Type() == MatType.CV_8UC3) ? 3 : 1)); } else { output.LoadRawTextureData(bytes); } output.Apply(); } } }
40.563636
128
0.634917
[ "MIT" ]
HyperLethalVector/ProjectEsky-UnityIntegration
Assets/Plugins/LeapMotion/North Star/Scripts/Calibration/OpenCVStereoWebcam.cs
4,464
C#
using System.Collections.Generic; using System.Threading.Tasks; #nullable enable namespace Couchbase.Management.Views { public interface IViewIndexManager { Task<DesignDocument> GetDesignDocumentAsync(string designDocName, DesignDocumentNamespace @namespace, GetDesignDocumentOptions? options = null); Task<IEnumerable<DesignDocument>> GetAllDesignDocumentsAsync(DesignDocumentNamespace @namespace, GetAllDesignDocumentsOptions? options = null); Task UpsertDesignDocumentAsync(DesignDocument indexData, DesignDocumentNamespace @namespace, UpsertDesignDocumentOptions? options = null); Task DropDesignDocumentAsync(string designDocName, DesignDocumentNamespace @namespace, DropDesignDocumentOptions? options = null); Task PublishDesignDocumentAsync(string designDocName, PublishDesignDocumentOptions? options = null); } } /* ************************************************************ * * @author Couchbase <info@couchbase.com> * @copyright 2021 Couchbase, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * ************************************************************/
41.170732
152
0.699645
[ "Apache-2.0" ]
Zeroshi/couchbase-net-client
src/Couchbase/Management/Views/IViewIndexManager.cs
1,688
C#
namespace Synology.Api.Client.ApiDescription { public interface IApisInfo { IApiInfo InfoApi { get; set; } IApiInfo AuthApi { get; set; } IApiInfo DownloadStationTaskApi { get; set; } IApiInfo FileStationCopyMoveApi { get; set; } IApiInfo FileStationExtractApi { get; set; } IApiInfo FileStationListApi { get; set; } IApiInfo FileStationUploadApi { get; set; } } }
22
53
0.634091
[ "MIT" ]
plneto/Synology.Api.Client
src/Synology.Api.Client/ApiDescription/IApisInfo.cs
442
C#
using System; using System.IO; using System.Text; using System.Collections.Generic; namespace SilentOrbit.ProtocolBuffers { static class ProtoParser { /// <summary> /// Parse a single .proto file. /// Return true if successful/no errors. /// </summary> public static void Parse(string path, ProtoCollection p) { //Preparation for parsing //Real parsing is done in ParseMessages lastComment.Clear(); //Read entire file and pass it into a TokenReader string t = ""; using (TextReader reader = new StreamReader(path, Encoding.UTF8)) { while (true) { string line = reader.ReadLine(); if (line == null) break; t += line + "\n"; } } TokenReader tr = new TokenReader(t, path); try { ParseMessages(tr, p); } catch (EndOfStreamException) { return; } } static readonly List<string> lastComment = new List<string>(); /// <summary> /// Return true if token was a comment /// </summary> static bool ParseComment(string token) { if (token.StartsWith("//")) { lastComment.Add(token.Substring(2)); return true; } if (token.StartsWith("/*")) { lastComment.Add(token.Substring(2)); return true; } return false; } static void ParseMessages(TokenReader tr, ProtoCollection p) { string package = "Example"; while (true) { string token = tr.ReadNextComment(); if (ParseComment(token)) continue; try { switch (token) { case ";": lastComment.Clear(); continue; case "message": ParseMessage(tr, p, package); break; case "enum": ParseEnum(tr, p, package); break; case "option": //Save options ParseOption(tr, p); break; case "import": //Ignored tr.ReadNext(); tr.ReadNextOrThrow(";"); break; case "package": package = tr.ReadNext(); tr.ReadNextOrThrow(";"); break; case "syntax": //This is not a supported protobuf keyword, used in Google internally tr.ReadNextOrThrow("="); tr.ReadNext(); tr.ReadNextOrThrow(";"); break; case "extend": ParseExtend(tr, p, package); break; default: throw new ProtoFormatException("Unexpected/not implemented: " + token, tr); } } catch (EndOfStreamException) { throw new ProtoFormatException("Unexpected EOF", tr); } } } static void ParseMessage(TokenReader tr, ProtoMessage parent, string package) { var msg = new ProtoMessage(parent, package); LocalParser.ParseComments(msg, lastComment, tr); msg.ProtoName = tr.ReadNext(); tr.ReadNextOrThrow("{"); try { while (ParseField(tr, msg)) continue; } catch (Exception e) { throw new ProtoFormatException(e.Message, e, tr); } parent.Messages.Add(msg.ProtoName, msg); } static void ParseExtend(TokenReader tr, ProtoMessage parent, string package) { var msg = new ProtoMessage(parent, package); LocalParser.ParseComments(msg, lastComment, tr); msg.ProtoName = tr.ReadNext(); tr.ReadNextOrThrow("{"); try { while (ParseField(tr, msg)) continue; } catch (Exception e) { throw new ProtoFormatException(e.Message, e, tr); } //Not implemented //parent.Messages.Add(msg.ProtoName, msg); } static bool ParseField(TokenReader tr, ProtoMessage m) { string rule = tr.ReadNextComment(); while (true) { if (ParseComment(rule) == false) break; rule = tr.ReadNextComment(); } Field f = new Field(tr); //Rule switch (rule) { case ";": lastComment.Clear(); return true; case "}": lastComment.Clear(); return false; case "required": f.Rule = FieldRule.Required; break; case "optional": f.Rule = FieldRule.Optional; break; case "repeated": f.Rule = FieldRule.Repeated; break; case "option": //Save options ParseOption(tr, m); return true; case "message": ParseMessage(tr, m, m.Package + "." + m.ProtoName); return true; case "enum": ParseEnum(tr, m, m.Package + "." + m.ProtoName); return true; case "extensions": ParseExtensions(tr, m); return true; default: throw new ProtoFormatException("unknown rule: " + rule, tr); } //Field comments LocalParser.ParseComments(f, lastComment, tr); //Type f.ProtoTypeName = tr.ReadNext(); //Name f.ProtoName = tr.ReadNext(); //ID tr.ReadNextOrThrow("="); f.ID = int.Parse(tr.ReadNext()); if (19000 <= f.ID && f.ID <= 19999) throw new ProtoFormatException("Can't use reserved field ID 19000-19999", tr); if (f.ID > (1 << 29) - 1) throw new ProtoFormatException("Maximum field id is 2^29 - 1", tr); //Add Field to message m.Fields.Add(f.ID, f); //Determine if extra options string extra = tr.ReadNext(); if (extra == ";") return true; //Field options if (extra != "[") throw new ProtoFormatException("Expected: [ got " + extra, tr); ParseFieldOptions(tr, f); return true; } static void ParseFieldOptions(TokenReader tr, Field f) { while (true) { string key = tr.ReadNext(); tr.ReadNextOrThrow("="); string val = tr.ReadNext(); ParseFieldOption(key, val, f); string optionSep = tr.ReadNext(); if (optionSep == "]") break; if (optionSep == ",") continue; throw new ProtoFormatException(@"Expected "","" or ""]"" got " + tr.NextCharacter, tr); } tr.ReadNextOrThrow(";"); } static void ParseFieldOption(string key, string val, Field f) { switch (key) { case "default": f.OptionDefault = val; break; case "packed": f.OptionPacked = Boolean.Parse(val); break; case "deprecated": f.OptionDeprecated = Boolean.Parse(val); break; case "pooled": f.OptionPooled = Boolean.Parse(val); break; default: Console.WriteLine("Warning: Unknown field option: " + key); break; } } /// <summary> /// File or Message options /// </summary> static void ParseOption(TokenReader tr, ProtoMessage m) { //Read name string key = tr.ReadNext(); if (tr.ReadNext() != "=") throw new ProtoFormatException("Expected: = got " + tr.NextCharacter, tr); //Read value string value = tr.ReadNext(); if (tr.ReadNext() != ";") throw new ProtoFormatException("Expected: ; got " + tr.NextCharacter, tr); //null = ignore option if (m == null) return; switch (key) { //None at the moment //case "namespace": // m.OptionNamespace = value; // break; default: Console.WriteLine("Warning: Unknown option: " + key + " = " + value); break; } } static void ParseEnum(TokenReader tr, ProtoMessage parent, string package) { ProtoEnum me = new ProtoEnum(parent, package); LocalParser.ParseComments(me, lastComment, tr); me.ProtoName = tr.ReadNext(); parent.Enums.Add(me.ProtoName, me); //must be after .ProtoName is read if (tr.ReadNext() != "{") throw new ProtoFormatException("Expected: {", tr); while (true) { string name = tr.ReadNextComment(); if (ParseComment(name)) continue; if (name == "}") return; //Ignore options if (name == "option") { ParseOption(tr, null); lastComment.Clear(); continue; } ParseEnumValue(tr, me, name); } } static void ParseEnumValue(TokenReader tr, ProtoEnum parent, string name) { if (tr.ReadNext() != "=") throw new ProtoFormatException("Expected: =", tr); int id = int.Parse(tr.ReadNext()); var value = new ProtoEnumValue(name, id, lastComment); parent.Enums.Add(value); string extra = tr.ReadNext(); if (extra == ";") return; if (extra != "[") throw new ProtoFormatException("Expected: ; or [", tr); ParseEnumValueOptions(tr, value); } static void ParseEnumValueOptions(TokenReader tr, ProtoEnumValue evalue) { while (true) { string key = tr.ReadNext(); tr.ReadNextOrThrow("="); string val = tr.ReadNext(); ParseEnumValueOptions(key, val, evalue); string optionSep = tr.ReadNext(); if (optionSep == "]") break; if (optionSep == ",") continue; throw new ProtoFormatException(@"Expected "","" or ""]"" got " + tr.NextCharacter, tr); } tr.ReadNextOrThrow(";"); } static void ParseEnumValueOptions(string key, string val, ProtoEnumValue f) { //TODO } static void ParseExtensions(TokenReader tr, ProtoMessage m) { //extensions 100 to max; tr.ReadNext(); //100 tr.ReadNextOrThrow("to"); tr.ReadNext(); //number or max tr.ReadNextOrThrow(";"); } } }
32.064198
109
0.409595
[ "ECL-2.0", "Apache-2.0" ]
Facepunch/RustProtoBuf
CodeGenerator/ProtoParser.cs
12,986
C#
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Bee.Eee.Utility.Logging { /// <summary> /// The different defined logging levels. /// </summary> public enum Level : int { Info = 0, Debug = 1, Warn = 2, Error = 3, Notify = 4, Exception = 5 }; }
24.285714
100
0.667647
[ "MIT" ]
sls1j/caveSpy
Utility/Logging/LoggingLevels.cs
342
C#
using Cloud.Storage.Azure.Tables.Partitioning; using Cloud.Storage.Tables; using Microsoft.Azure; using Microsoft.WindowsAzure.Storage.Table; using System; using System.Threading.Tasks; namespace Cloud.Storage.Azure.Tables { public class TableStorageClient : ITableStorageClient { private static string PartitionTableName = "Partitions"; static TableStorageClient() { var usePartitionTableSetting = string.Empty; try { usePartitionTableSetting = CloudConfigurationManager.GetSetting("UsePartitionTable"); } catch { } if (!string.IsNullOrWhiteSpace(usePartitionTableSetting)) { UsePartitionTable = bool.Parse(usePartitionTableSetting); } else { UsePartitionTable = true; } } public async Task<ITable> GetTable(string tableName, bool createIfNotExists = false) { var azureTable = await GetAzureTable(tableName, createIfNotExists); return new Table(azureTable); } public static async Task<CloudTable> GetAzureTable(string tableName, bool createIfNotExists = false) { var table = TableClient.GetTableReference(tableName); if (createIfNotExists) { await table.CreateIfNotExistsAsync(); } return table; } public static bool UsePartitionTable { get; private set; } public static CloudTableClient TableClient { get { return mTableClient.Value; } } public static PartitionTable PartitionTable { get { return mPartitionTable.Value; } } private static Lazy<CloudTableClient> mTableClient = new Lazy<CloudTableClient>(() => StorageClient.StorageAccount.CreateCloudTableClient()); private static Lazy<PartitionTable> mPartitionTable = new Lazy<PartitionTable>(() => new PartitionTable(GetAzureTable(PartitionTableName, true).Result)); } }
28.258065
155
0.752854
[ "MIT" ]
bstark23/Cloud.Storage
src/Cloud.Storage.Azure/Tables/TableStorageClient.cs
1,754
C#
using GangOfFour.Core.Entities.Sales; namespace GangOfFour.Core.Interfaces.Repositories { public interface ICustomerRepository { Customer GetCustomerByFullName(string firstName, string lastName); } }
24.555556
74
0.764706
[ "MIT" ]
theMickster/joy-of-csharp
src/GangOfFour/GangOfFour.Core/Interfaces/Repositories/ICustomerRepository.cs
223
C#
// // The MIT License(MIT) // // Copyright(c) 2014 Demonsaw LLC // // 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 DemonSaw.Machine { using DemonSaw.Data; using System.Threading; public sealed class UploadQueueMachine : QueueMachine { // Properties public override int ActiveItems { get { return UploadMachine.Count; } } public override int MaxActiveItems { get { return 5; } } // Interface protected override void Process() { if ((Queue.Count > 0) && Available) { lock (Queue) { UploadData data = (UploadData) Queue.Dequeue(); if (data.Queued) { data.Enabled = true; UploadMachine machine = new UploadMachine(data) { Id = data.Id }; machine.SetLogHandlers(RequestHandler, ResponseHandler, CommandHandler); data.Start(machine); } } Thread.Sleep(0); } } } }
33.087719
81
0.716861
[ "MIT" ]
demonsaw/Code
ds1/WpfClient/Machine/UploadQueueMachine.cs
1,888
C#
using System.Collections.Generic; using Machine.Specifications; namespace Stripe.Tests { public class when_creating_a_bank_account { private static StripeCustomer _stripeCustomer; private static BankAccountService _bankAccountService; private static BankAccountCreateOptions _bankAccountCreateOptions; private static CustomerBankAccount _customerBankAccount; Establish context = () => { _stripeCustomer = new StripeCustomerService().Create(test_data.stripe_customer_create_options.ValidCard()); _bankAccountService = new BankAccountService(); _bankAccountCreateOptions = test_data.bank_account_create_options.ValidBankAccount(); }; Because of = () => _customerBankAccount = _bankAccountService.Create(_stripeCustomer.Id, _bankAccountCreateOptions); It should_not_be_null = () => _customerBankAccount.ShouldNotBeNull(); It should_have_the_correct_country = () => _customerBankAccount.Country.ShouldEqual(_bankAccountCreateOptions.SourceBankAccount.Country); It should_have_the_correct_currency = () => _customerBankAccount.Currency.ShouldEqual(_bankAccountCreateOptions.SourceBankAccount.Currency); It should_have_the_correct_account_holder_name = () => _customerBankAccount.AccountHolderName.ShouldEqual(_bankAccountCreateOptions.SourceBankAccount.AccountHolderName); It should_have_the_correct_account_holder_type = () => _customerBankAccount.AccountHolderType.ShouldEqual(_bankAccountCreateOptions.SourceBankAccount.AccountHolderType); It should_have_the_correct_metadata = () => _customerBankAccount.Metadata.ShouldEqual(_bankAccountCreateOptions.SourceBankAccount.Metadata); } }
41.818182
126
0.742935
[ "Apache-2.0" ]
dimarobert/stripe.net
src/Stripe.Tests/bank_accounts/when_creating_a_bank_account.cs
1,842
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("12.VowelOrDigit")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("12.VowelOrDigit")] [assembly: AssemblyCopyright("Copyright © 2017")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("ef9dc7fd-837c-4f65-940c-c0b457258e07")] // 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.918919
84
0.744833
[ "MIT" ]
yangra/SoftUni
TechModule/Programming Fundamentals/02.DataTypesAndVariables - Exercises/12.VowelOrDigit/Properties/AssemblyInfo.cs
1,406
C#
using AutoMapper; using MediatR; using Microsoft.Extensions.Logging; using Ordering.Application.Contracts.Persistance; using Ordering.Application.Exceptions; using Ordering.Domain.Entities; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; namespace Ordering.Application.Features.Orders.Commands.DeleteOrder { public class DeleteOrderCommandHandler : IRequestHandler<DeleteOrderCommand> { private readonly IOrderRepository _orderRepository; private readonly IMapper _mapper; private readonly ILogger<DeleteOrderCommandHandler> _logger; public DeleteOrderCommandHandler(IOrderRepository orderRepository, IMapper mapper, ILogger<DeleteOrderCommandHandler> logger) { _orderRepository = orderRepository ?? throw new ArgumentNullException(nameof(orderRepository)); _mapper = mapper ?? throw new ArgumentNullException(nameof(mapper)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); } public async Task<Unit> Handle(DeleteOrderCommand request, CancellationToken cancellationToken) { var orderToDelete = await _orderRepository.GetByIdAsync(request.Id); if (orderToDelete == null) { throw new NotFoundException(nameof(Order), request.Id); } await _orderRepository.DeleteAsync(orderToDelete); _logger.LogInformation($"Order {orderToDelete.Id} is successfully deleted."); return Unit.Value; } } }
36.909091
133
0.719212
[ "MIT" ]
Daniel-stk/ECommerce
Microservices/Ordering/Ordering.Application/Features/Orders/Commands/DeleteOrder/DeleteOrderCommandHandler.cs
1,626
C#
using System; namespace _2016ODataInEF.Areas.HelpPage { /// <summary> /// This represents an invalid sample on the help page. There's a display template named InvalidSample associated with this class. /// </summary> public class InvalidSample { public InvalidSample(string errorMessage) { if (errorMessage == null) { throw new ArgumentNullException("errorMessage"); } ErrorMessage = errorMessage; } public string ErrorMessage { get; private set; } public override bool Equals(object obj) { InvalidSample other = obj as InvalidSample; return other != null && ErrorMessage == other.ErrorMessage; } public override int GetHashCode() { return ErrorMessage.GetHashCode(); } public override string ToString() { return ErrorMessage; } } }
26.378378
134
0.576844
[ "MIT" ]
tkopacz/2016SQLDay
05OData/2016ODataInEF/2016ODataInEF/Areas/HelpPage/SampleGeneration/InvalidSample.cs
976
C#
using System.Collections.Generic; namespace JsonScribe { public static class Extensions { public static JsonLiteral ToJsonLiteral(this string value) => InternalToJsonLiteral(value); public static JsonArray ToJsonArray(this string[] value) => new JsonArray(value); public static JsonArray ToJsonArray(this IEnumerable<string> value) => new JsonArray(value); public static JsonLiteral ToJsonLiteral(this int value) => InternalToJsonLiteral(value); public static JsonArray ToJsonArray(this int[] value) => new JsonArray(value); public static JsonArray ToJsonArray(this IEnumerable<int> value) => new JsonArray(value); public static JsonLiteral ToJsonLiteral(this bool value) => InternalToJsonLiteral(value); public static JsonArray ToJsonArray(this bool[] value) => new JsonArray(value); public static JsonArray ToJsonArray(this IEnumerable<bool> value) => new JsonArray(value); public static JsonLiteral ToJsonLiteral(this double value) => InternalToJsonLiteral(value); public static JsonArray ToJsonArray(this double[] value) => new JsonArray(value); public static JsonArray ToJsonArray(this IEnumerable<double> value) => new JsonArray(value); public static JsonArray ToJsonArray(this object[] value) => new JsonArray(value); public static JsonArray ToJsonArray(this IEnumerable<object> value) => new JsonArray(value); private static JsonLiteral InternalToJsonLiteral(object value) => new JsonLiteral(value); } }
56.214286
100
0.722999
[ "MIT" ]
DallasP9124/JsonLite
JsonScribe/Extensions.cs
1,576
C#
using Newtonsoft.Json; using System.Collections.Generic; using System.Net; namespace PuppeteerSharp.Messaging { internal class RequestInterceptedResponse { public string InterceptionId { get; set; } public Payload Request { get; set; } public string FrameId { get; set; } public ResourceType ResourceType { get; set; } public bool IsNavigationRequest { get; set; } [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public Dictionary<string, object> ResponseHeaders { get; set; } [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public HttpStatusCode ResponseStatusCode { get; set; } [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public string RedirectUrl { get; set; } [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public AuthChallengeData AuthChallenge { get; set; } internal class AuthChallengeData { [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public string Source { get; set; } public string Origin { get; set; } public string Scheme { get; set; } public string Realm { get; set; } } } }
34.297297
72
0.658786
[ "MIT" ]
JamesMaclean-sc/puppeteer-sharp
lib/PuppeteerSharp/Messaging/RequestInterceptedResponse.cs
1,271
C#
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace IntroToTagHelpers.Services { // This class is used by the application to send Email and SMS // when you turn on two-factor authentication in ASP.NET Identity. // For more details see this link http://go.microsoft.com/fwlink/?LinkID=532713 public class AuthMessageSender : IEmailSender, ISmsSender { public Task SendEmailAsync(string email, string subject, string message) { // Plug in your email service here to send an email. return Task.FromResult(0); } public Task SendSmsAsync(string number, string message) { // Plug in your SMS service here to send a text message. return Task.FromResult(0); } } }
32.076923
83
0.666667
[ "Apache-2.0" ]
Acidburn0zzz/Docs-6
mvc/views/tag-helpers/intro/sample/IntroToTagHelpers/src/IntroToTagHelpers/Services/MessageServices.cs
836
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. namespace TerraFX.Interop.DirectX; /// <include file='D3D12_INDEX_BUFFER_STRIP_CUT_VALUE.xml' path='doc/member[@name="D3D12_INDEX_BUFFER_STRIP_CUT_VALUE"]/*' /> public enum D3D12_INDEX_BUFFER_STRIP_CUT_VALUE { /// <include file='D3D12_INDEX_BUFFER_STRIP_CUT_VALUE.xml' path='doc/member[@name="D3D12_INDEX_BUFFER_STRIP_CUT_VALUE.D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_DISABLED"]/*' /> D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_DISABLED = 0, /// <include file='D3D12_INDEX_BUFFER_STRIP_CUT_VALUE.xml' path='doc/member[@name="D3D12_INDEX_BUFFER_STRIP_CUT_VALUE.D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_0xFFFF"]/*' /> D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_0xFFFF = 1, /// <include file='D3D12_INDEX_BUFFER_STRIP_CUT_VALUE.xml' path='doc/member[@name="D3D12_INDEX_BUFFER_STRIP_CUT_VALUE.D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_0xFFFFFFFF"]/*' /> D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_0xFFFFFFFF = 2, }
59
175
0.804237
[ "MIT" ]
reflectronic/terrafx.interop.windows
sources/Interop/Windows/DirectX/um/d3d12/D3D12_INDEX_BUFFER_STRIP_CUT_VALUE.cs
1,182
C#
namespace dxDrawLib.Server.Helpers { internal class Helpers { public static int Clamp( int value, int min, int max ) => value <= min ? min : value >= max ? max : value; } }
22.666667
115
0.578431
[ "MIT" ]
KingSyBozz/dxDrawLib
dxDrawLib/src/Server/Helpers/Helpers.cs
206
C#
using System; using System.Net.Http; using System.Text; using System.Threading; using System.Threading.Tasks; using DG.Tweening; using TMPro; using UnityEngine; using UnityEngine.SceneManagement; namespace Runtime { public class GameWinController : MonoBehaviour { [SerializeField] private CanvasGroup canvasGroup1; [SerializeField] private CanvasGroup canvasGroup2; [SerializeField] private TextMeshProUGUI scoreText1; [SerializeField] private TextMeshProUGUI scoreText2; [SerializeField] private TMP_InputField nameField; private int score; private void Start() { score = PlayerPrefs.GetInt("Score"); PlayerPrefs.DeleteKey("Score"); PlayerPrefs.Save(); scoreText1.text = $"SCORE: {score}"; scoreText2.text = $"SCORE: {score}"; } public void OnExitClicked() { SceneManager.LoadScene(1); } public void OnWantsToSaveScoreClicked() { canvasGroup1.DOFade(0.0f, 0.25f); canvasGroup2.DOFade(1.0f, 0.25f); } public void OnSaveScoreClicked() { if(string.IsNullOrEmpty(nameField.text)) return; var thread = new Thread(async () => { await AddAWS(nameField.text); SceneManager.LoadScene(1); }); thread.Start(); } private async Task AddAWS(string playerName) { var guid = Guid.NewGuid().ToString(); using var httpClient = new HttpClient(); var uri = new Uri("https://edgjs1jvk1.execute-api.eu-central-1.amazonaws.com/default/add-scoreboard"); var response = await httpClient.PutAsync(uri, new StringContent($"{{\"score\": \"{score}\", \"name\": \"{playerName}\", \"guid\": \"{guid}\"}}", Encoding.UTF8)); Debug.Log($"[{response.StatusCode}] {response.ReasonPhrase}"); Debug.Log(await response.Content.ReadAsStringAsync()); } } }
34.672414
173
0.610641
[ "MIT" ]
TeodorVecerdi/saxion_project_show_off
Project Show Off/Assets/Scripts/Runtime/UI/Game Over/GameWinController.cs
2,013
C#
using UnityEngine; using System.Collections; public class RandomTime : MonoBehaviour { public GameObject longHand,shortHand; int time; // Use this for initialization void Start () { time = (int)Random.Range (1.0F, 11.0F); shortHand.transform.Rotate (0, 0, time*-30); } // Update is called once per frame void Update () { } }
19.111111
46
0.69186
[ "BSD-3-Clause" ]
BuildmLearn/Mobile-applications
Tell the Time/Assets/Scripts/Stage2/RandomTime.cs
346
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("Controls")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Controls")] [assembly: AssemblyCopyright("Copyright © 2013")] [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("cece3e70-0701-48dc-9a3b-066613deb91f")] // 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 Revision and Build Numbers // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
37.472222
84
0.74722
[ "Apache-2.0" ]
dmitry-a-morozov/fsharp-wpf-mvc-series
Appendix - Silverlight5/SampleApp.Controls/Properties/AssemblyInfo.cs
1,352
C#
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using BattleTeam.PythonComponents.Team; using BattleTeam.Shared; using WaveEngine.Common.Math; using WaveEngine.Framework; using WaveEngine.Framework.Graphics; using WaveEngine.Framework.Physics2D; namespace BattleTeam.Entities.Behaviors { internal class GunnerBehavior : CharacterBehavior { private static readonly Vector2 GunBarrelRelativePosition = new Vector2(15, 0); internal GunnerBehavior(Member member) : base(member) { } [RequiredComponent] private readonly Transform2D trans2D = null; [RequiredComponent] private readonly RectangleCollider rectangleCollider = null; protected override RectangleCollider RectangleCollider => this.rectangleCollider; protected override Transform2D Trans2D => this.trans2D; internal override void UseAttack() { Vector2 gunBarrelPosition = (GunBarrelRelativePosition * this.Trans2D.Scale).Rotate(this.Member.GetRotation()) + this.Trans2D.Position; Vector2 bulletDirection = new Vector2(0, -1).Rotate(this.Member.GetRotation()); this.EntityManager.Add(Characters.CreateBullet(this.Member, gunBarrelPosition, this.Trans2D.Rotation, bulletDirection)); } } }
31.375
138
0.79761
[ "MIT" ]
Lucrecious/Battle-Team
game/battle_team/Entities/Behaviors/GunnerBehavior.cs
1,257
C#
using EPlast.BLL.DTO.Account; using Microsoft.AspNetCore.Identity; using System.Threading.Tasks; namespace EPlast.BLL.Interfaces { public interface IAuthEmailService { /// <summary> /// Confirming Email after registration /// </summary> /// <param name="userId"></param> /// <param name="code"></param> /// <returns>Result of confirming email in system</returns> Task<IdentityResult> ConfirmEmailAsync(string userId, string code); /// <summary> /// Sending email reminder /// </summary> /// <param name="citiesUrl"></param> /// <param name="userDTO"></param> /// <returns>Result of sending email</returns> Task<bool> SendEmailGreetingAsync(string email); /// <summary> /// Sending email reminder to join city /// </summary> /// <param name="email"></param> /// <param name="userId">User Id</param> /// <returns>Result of sending email</returns> Task<bool> SendEmailJoinToCityReminderAsync(string email, string userId); /// <summary> /// Sending email for registration /// </summary> /// <param name="confirmationLink"></param> /// <param name="userDto"></param> /// <returns>Result of sending email</returns> Task<bool> SendEmailRegistrAsync(string email); /// <summary> /// Sending email for password reset /// </summary> /// <param name="confirmationLink"></param> /// <param name="forgotPasswordDto"></param> /// <returns>Result of sending email</returns> Task SendEmailResetingAsync(string confirmationLink, ForgotPasswordDto forgotPasswordDto); } }
35.04
98
0.599886
[ "MIT" ]
ita-social-projects/EPlas
EPlast/EPlast.BLL/Interfaces/Auth/IAuthEmailService.cs
1,754
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> //------------------------------------------------------------------------------ using System; using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("VehicleLib")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] [assembly: System.Reflection.AssemblyProductAttribute("VehicleLib")] [assembly: System.Reflection.AssemblyTitleAttribute("VehicleLib")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] // Generated by the MSBuild WriteCodeFragment class.
40.916667
80
0.647658
[ "MIT" ]
olga-yuz/SensorProject
VehicleLib/obj/Release/net5.0/VehicleLib.AssemblyInfo.cs
982
C#
using System.Linq; using System.Reflection; namespace AutoMapper { public class ConstructorParameterMap { public ConstructorParameterMap(ParameterInfo parameter, IMemberGetter[] sourceResolvers) { Parameter = parameter; SourceResolvers = sourceResolvers; } public ParameterInfo Parameter { get; private set; } public IMemberGetter[] SourceResolvers { get; private set; } public ResolutionResult ResolveValue(ResolutionContext context) { var result = new ResolutionResult(context); return SourceResolvers.Aggregate(result, (current, resolver) => resolver.Resolve(current)); } } }
28.192308
104
0.641201
[ "MIT" ]
Venzhyk/AutoMapper
src/AutoMapper/ConstructorParameterMap.cs
733
C#
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { [TLObject(1653390447)] public class TLSendMessageChooseContactAction : TLAbsSendMessageAction { public override int Constructor { get { return 1653390447; } } public void ComputeFlags() { } public override void DeserializeBody(BinaryReader br) { } public override void SerializeBody(BinaryWriter bw) { bw.Write(this.Constructor); } } }
17.45
74
0.587393
[ "MIT" ]
slctr/Men.Telegram.ClientApi
Men.Telegram.ClientApi/TL/TL/TLSendMessageChooseContactAction.cs
698
C#
using System; using System.Collections.Generic; using System.Text; namespace Math_Library { public class Matrix4 { public float m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44; public Matrix4() { m11 = 1; m12 = 0; m13 = 0; m14 = 0; m21 = 0; m22 = 1; m23 = 0; m24 = 0; m31 = 0; m32 = 0; m33 = 1; m34 = 0; m41 = 0; m42 = 0; m43 = 0; m44 = 1; } public Matrix4(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44) { this.m11 = m11; this.m12 = m12; this.m13 = m13; this.m14 = m14; this.m21 = m21; this.m22 = m22; this.m23 = m23; this.m24 = m24; this.m31 = m31; this.m32 = m32; this.m33 = m33; this.m34 = m34; this.m41 = m41; this.m42 = m42; this.m43 = m43; this.m44 = m44; } public static Matrix4 CreateRotation(float radians) { return new Matrix4((float)Math.Cos(radians), (float)Math.Sin(radians), 0, (float)Math.Sin(radians), (float)Math.Cos(radians), 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0); } public static Matrix4 CreateTranslation(Vector4 position) { return new Matrix4 ( 1, 0, position.X, 0, 1, position.Y, 0, 0, 1, position.Z, 0 ,0, 0, 0, 1,0 ); } public static Matrix4 CreateScale(Vector4 scale) { return new Matrix4 ( scale.X, 0, 0, 0, scale.Y, 0, 0, 0, 1, scale.Z, 0, 0, 0, 0, 0,1); } public static Matrix4 operator +(Matrix4 Ihs, Matrix4 rhs) { return new Matrix4(Ihs.m11 + rhs.m11, Ihs.m12 + rhs.m12, Ihs.m13 + rhs.m13, Ihs.m14 + rhs.m14, Ihs.m21 + rhs.m21, Ihs.m22 + rhs.m22, Ihs.m23 + rhs.m23, Ihs.m24 + rhs.m24, Ihs.m31 + rhs.m31, Ihs.m32 + rhs.m32, Ihs.m33 + rhs.m33, Ihs.m34 + rhs.m34, Ihs.m41 + rhs.m41, Ihs.m42 + rhs.m42, Ihs.m43 + rhs.m43, Ihs.m44 + rhs.m44); } public static Matrix4 operator -(Matrix4 Ihs, Matrix4 rhs) { return new Matrix4(Ihs.m11 - rhs.m11, Ihs.m12 - rhs.m12, Ihs.m13 - rhs.m13, Ihs.m14 - rhs.m14, Ihs.m21 - rhs.m21, Ihs.m22 - rhs.m22, Ihs.m23 - rhs.m23, Ihs.m24 - rhs.m24, Ihs.m31 - rhs.m31, Ihs.m32 - rhs.m32, Ihs.m33 - rhs.m33, Ihs.m34 - rhs.m34, Ihs.m41 - rhs.m41, Ihs.m42 - rhs.m42, Ihs.m43 - rhs.m43, Ihs.m44 - rhs.m44); } public static Matrix4 operator *(Matrix4 Ihs, Matrix4 rhs) { return new Matrix4( Ihs.m11 * rhs.m11 + Ihs.m12 * rhs.m21 + Ihs.m13 * rhs.m31 + Ihs.m14 * rhs.m41, +Ihs.m11 * rhs.m12 + Ihs.m12 * rhs.m22 + Ihs.m13 * rhs.m32 + Ihs.m14 * rhs.m42, +Ihs.m11 * rhs.m13 + Ihs.m12 * rhs.m23 + Ihs.m13 * rhs.m33 + Ihs.m14 * rhs.m43, +Ihs.m11 * rhs.m14 + Ihs.m12 * rhs.m24 + Ihs.m13 * rhs.m34 + Ihs.m14 * rhs.m44, Ihs.m21 * rhs.m11 + Ihs.m22 * rhs.m21 + Ihs.m23 * rhs.m31 + Ihs.m24 * rhs.m41, +Ihs.m21 * rhs.m12 + Ihs.m22 * rhs.m22 + Ihs.m23 * rhs.m32 + Ihs.m24 * rhs.m42, +Ihs.m21 * rhs.m13 + Ihs.m22 * rhs.m23 + Ihs.m23 * rhs.m33 + Ihs.m24 * rhs.m43, +Ihs.m21 * rhs.m14 + Ihs.m22 * rhs.m24 + Ihs.m23 * rhs.m34 + Ihs.m24 * rhs.m44, Ihs.m31 * rhs.m11 + Ihs.m32 * rhs.m21 + Ihs.m33 * rhs.m31 + Ihs.m34 * rhs.m41, + Ihs.m31 * rhs.m12 + Ihs.m32 * rhs.m22 + Ihs.m33 * rhs.m32 + Ihs.m34 * rhs.m42, +Ihs.m31 * rhs.m13 + Ihs.m32 * rhs.m23 + Ihs.m33 * rhs.m33 + Ihs.m34 * rhs.m43, + Ihs.m31 * rhs.m14 + Ihs.m32 * rhs.m24 + Ihs.m33 * rhs.m34 + Ihs.m34 * rhs.m44, Ihs.m41 * rhs.m11 + Ihs.m42 * rhs.m12 + Ihs.m43 * rhs.m13 + Ihs.m44 * rhs.m14, + Ihs.m41 * rhs.m12 + Ihs.m42 * rhs.m22 + Ihs.m43 * rhs.m32 + Ihs.m44 * rhs.m24, +Ihs.m41 * rhs.m13 + Ihs.m42 * rhs.m23 + Ihs.m43 * rhs.m33 + Ihs.m44 * rhs.m34, +Ihs.m41 * rhs.m14 + Ihs.m42 * rhs.m24 + Ihs.m43 * rhs.m34 + Ihs.m44 * rhs.m44); } public static Matrix4 CreateRotationZ() { return; } public static Matrix4 CreateRotationY(float _y) { return; } public static Matrix4 CreateRotationX(float _x) { return; } } }
46.7
336
0.503426
[ "MIT" ]
thebotfly/MathForGames2022
Matrix4.cs
4,672
C#
namespace MLAgents.Sensor { public enum SensorCompressionType { None, PNG } /// <summary> /// Sensor interface for generating observations. /// For custom implementations, it is recommended to SensorBase instead. /// </summary> public interface ISensor { /// <summary> /// Returns the size of the observations that will be generated. /// For example, a sensor that observes the velocity of a rigid body (in 3D) would return new {3}. /// A sensor that returns an RGB image would return new [] {Width, Height, 3} /// </summary> /// <returns></returns> int[] GetObservationShape(); /// <summary> /// Write the observation data directly to the WriteAdapter. /// This is considered an advanced interface; for a simpler approach, use SensorBase and override WriteFloats instead. /// Note that this (and GetCompressedObservation) may be called multiple times per agent step, so should not /// mutate any internal state. /// </summary> /// <param name="adapater"></param> /// <returns>The number of elements written</returns> int Write(WriteAdapter adapater); /// <summary> /// Return a compressed representation of the observation. For small observations, this should generally not be /// implemented. However, compressing large observations (such as visual results) can significantly improve /// model training time. /// </summary> /// <returns></returns> byte[] GetCompressedObservation(); /// <summary> /// Update any internal state of the sensor. This is called once per each agent step. /// </summary> void Update(); /// <summary> /// Return the compression type being used. If no compression is used, return SensorCompressionType.None /// </summary> /// <returns></returns> SensorCompressionType GetCompressionType(); /// <summary> /// Get the name of the sensor. This is used to ensure deterministic sorting of the sensors on an Agent, /// so the naming must be consistent across all sensors and agents. /// </summary> /// <returns>The name of the sensor</returns> string GetName(); } public static class SensorExtensions { /// <summary> /// Get the total number of elements in the ISensor's observation (i.e. the product of the shape elements). /// </summary> /// <param name="sensor"></param> /// <returns></returns> public static int ObservationSize(this ISensor sensor) { var shape = sensor.GetObservationShape(); int count = 1; for (var i = 0; i < shape.Length; i++) { count *= shape[i]; } return count; } } }
36.8375
126
0.595182
[ "Apache-2.0" ]
107587084/ml-agents
com.unity.ml-agents/Runtime/Sensor/ISensor.cs
2,947
C#
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace CrowdAnalyzer.Models { public class CamFrameSummary { public CamFrameSummary() { AgeGenderDistribution = new AgeGenderDistribution { MaleDistribution = new AgeDistribution(), FemaleDistribution = new AgeDistribution() }; } public int TotalDetectedFaces { get; set; } public int TotalMales { get; set; } public int TotalFemales { get; set; } public AgeGenderDistribution AgeGenderDistribution { get; set; } } }
26.96
72
0.62908
[ "MIT" ]
mohaom/IntelligentExperiences.OnContainers
src/services/CrowdAnalyzer/Models/CamFrameSummary.cs
676
C#
using Html2Amp.Sanitization.Implementation; using Html2Amp.UnitTests.Helpers; using Microsoft.VisualStudio.TestTools.UnitTesting; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Html2Amp.UnitTests.StyleAttributeSanitizerTests { [TestClass] public class StyleAttributeSanitizer_Sanitize_Should { [TestMethod] public void ThorwArgumentNullException_WhenElementIsNull() { // Assert Ensure.ArgumentExceptionIsThrown(() => new StyleAttributeSanitizer().Sanitize(null, null), "htmlElement"); } [TestMethod] public void RemoveStyleAttribute() { // Arange var element = ElementFactory.Create("div"); element.SetAttribute("style", "color: red;"); // Act var actualResult = new StyleAttributeSanitizer().Sanitize(ElementFactory.Document, element); // Assert Assert.IsFalse(actualResult.HasAttribute("style")); } } }
25.972222
109
0.765775
[ "Apache-2.0" ]
mustakimali/Html2Amp
Html2Amp.UnitTests/StyleAttributeSanitizerTests/StyleAttributeSanitizer_Sanitize_Should.cs
937
C#
using System.Collections.Immutable; using System.Linq; using System.Threading.Tasks; using ChilliCream.Testing; using HotChocolate.Execution; using HotChocolate.Execution.Processing; using HotChocolate.Language; using HotChocolate.Types; using Microsoft.Extensions.DependencyInjection; using Xunit; namespace HotChocolate.Stitching.Processing { public class FooTests { [Fact] public async Task Count_Provided_Fields_Of_A_Query() { var schemaFile = FileResource.Open("insurance_schema.graphql"); var queryFile = FileResource.Open("me_query.graphql"); ISchema schema = await new ServiceCollection() .AddGraphQL() .AddDocumentFromString(schemaFile) .UseField(next => context => default) .BuildSchemaAsync(); DocumentNode query = Utf8GraphQLParser.Parse(queryFile); IPreparedOperation operation = OperationCompiler.Compile( "abc", query, query.Definitions.OfType<OperationDefinitionNode>().First(), schema, schema.QueryType); SelectionSetNode provided = Utf8GraphQLParser.Syntax.ParseSelectionSet( @"{ id name consultant { consultantId @field(type: ""Consultant"" field: ""id"") name } }"); ObjectType customer = schema.GetType<ObjectType>("Customer"); ISelection root = operation.GetRootSelectionSet().Selections.First(); ISelectionSet selectionSet = operation.GetSelectionSet(root.SelectionSet!, customer); var context = new MatchSelectionsContext( schema, operation, selectionSet.Selections.ToDictionary(t => t.Field.Name.Value), ImmutableStack<IOutputType>.Empty.Push(customer)); var visitor = new MatchSelectionsVisitor(); visitor.Visit(provided, context); Assert.Equal(4, context.Count); } [Fact] public async Task Count_Provided_Fields_Of_A_Query_With_Fragment() { var schemaFile = FileResource.Open("insurance_schema.graphql"); var queryFile = FileResource.Open("me_query_with_fragment.graphql"); ISchema schema = await new ServiceCollection() .AddGraphQL() .AddDocumentFromString(schemaFile) .UseField(next => context => default) .BuildSchemaAsync(); DocumentNode query = Utf8GraphQLParser.Parse(queryFile); IPreparedOperation operation = OperationCompiler.Compile( "abc", query, query.Definitions.OfType<OperationDefinitionNode>().First(), schema, schema.QueryType); SelectionSetNode provided = Utf8GraphQLParser.Syntax.ParseSelectionSet( @"{ id name consultant { consultantId @field(type: ""Consultant"" field: ""id"") name } }"); ObjectType customer = schema.GetType<ObjectType>("Customer"); ISelection root = operation.GetRootSelectionSet().Selections.First(); ISelectionSet selectionSet = operation.GetSelectionSet(root.SelectionSet!, customer); var context = new MatchSelectionsContext( schema, operation, selectionSet, ImmutableStack<IOutputType>.Empty.Push(customer)); var visitor = new MatchSelectionsVisitor(); visitor.Visit(provided, context); Assert.Equal(4, context.Count); } } }
35.201754
97
0.561425
[ "MIT" ]
RohrerF/hotchocolate
src/HotChocolate/__remove/Stitching2/test/Stitching.Tests/FooTests.cs
4,013
C#
using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using Disqord; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Unix.Common; using Unix.Data.Models.Core; using Unix.Data.Models.Moderation; namespace Unix.Data; public class UnixContext : DbContext { public UnixConfiguration UnixConfig = new(); protected override void OnModelCreating(ModelBuilder modelBuilder) { var snowflakeConverter = new ValueConverter<Snowflake, ulong>( static snowflake => snowflake, static @ulong => new Snowflake(@ulong)); modelBuilder.UseValueConverterForType<Snowflake>(snowflakeConverter); modelBuilder.Entity<GuildConfiguration>() .Property(x => x.WhitelistedInvites) .HasPostgresArrayConversion<ulong, decimal>(ulongs => Convert.ToDecimal(ulongs), decimals => Convert.ToUInt64(decimals)); modelBuilder.Entity<GuildConfiguration>() .Property(x => x.SelfAssignableRoles) .HasPostgresArrayConversion<ulong, decimal>(ulongs => Convert.ToDecimal(ulongs), decimals => Convert.ToUInt64(decimals)); } protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { optionsBuilder.UseNpgsql(UnixConfig.ConnectionString); } public DbSet<GuildConfiguration> GuildConfigurations { get; set; } public DbSet<Tag> Tags { get; set; } public DbSet<Reminder> Reminders { get; set; } public DbSet<Infraction> Infractions { get; set; } public DbSet<ReactionRole> ReactionRoles { get; set; } }
39.069767
134
0.710119
[ "MIT" ]
n-Ultima/UnixBot
Unix.Data/UnixContext.cs
1,682
C#
// ReSharper disable once CheckNamespace namespace Fluent { using System; using System.Windows; using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Media; using Fluent.Internal; /// <summary> /// Represent panel with ribbon group. /// It is automatically adjusting size of controls /// </summary> public class RibbonGroupsContainer : Panel, IScrollInfo { private struct MeasureCache { public MeasureCache(Size availableSize, Size desiredSize) { this.AvailableSize = availableSize; this.DesiredSize = desiredSize; } public Size AvailableSize { get; } public Size DesiredSize { get; } } private MeasureCache measureCache; #region Reduce Order /// <summary> /// Gets or sets reduce order of group in the ribbon panel. /// It must be enumerated with comma from the first to reduce to /// the last to reduce (use Control.Name as group name in the enum). /// Enclose in parentheses as (Control.Name) to reduce/enlarge /// scalable elements in the given group /// </summary> public string ReduceOrder { get { return (string)this.GetValue(ReduceOrderProperty); } set { this.SetValue(ReduceOrderProperty, value); } } /// <summary> /// Using a DependencyProperty as the backing store for ReduceOrder. /// This enables animation, styling, binding, etc... /// </summary> public static readonly DependencyProperty ReduceOrderProperty = DependencyProperty.Register(nameof(ReduceOrder), typeof(string), typeof(RibbonGroupsContainer), new PropertyMetadata(OnReduceOrderChanged)); // handles ReduseOrder property changed private static void OnReduceOrderChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { var ribbonPanel = (RibbonGroupsContainer)d; for (var i = ribbonPanel.reduceOrderIndex; i < ribbonPanel.reduceOrder.Length - 1; i++) { ribbonPanel.IncreaseGroupBoxSize(ribbonPanel.reduceOrder[i]); } ribbonPanel.reduceOrder = ((string)e.NewValue).Split(new[] { ',', ' ' }, StringSplitOptions.RemoveEmptyEntries); var newReduceOrderIndex = ribbonPanel.reduceOrder.Length - 1; ribbonPanel.reduceOrderIndex = newReduceOrderIndex; ribbonPanel.InvalidateMeasure(); ribbonPanel.InvalidateArrange(); } #endregion #region Fields private string[] reduceOrder = new string[0]; private int reduceOrderIndex; #endregion #region Initialization /// <summary> /// Default constructor /// </summary> public RibbonGroupsContainer() { this.Focusable = false; } #endregion #region Layout Overridings /// <inheritdoc /> protected override UIElementCollection CreateUIElementCollection(FrameworkElement logicalParent) { return new UIElementCollection(this, /*Parent as FrameworkElement*/this); } /// <inheritdoc /> protected override Size MeasureOverride(Size availableSize) { var desiredSize = this.GetChildrenDesiredSizeIntermediate(); if (this.reduceOrder.Length == 0 // Check cached measure to prevent "flicker" || (this.measureCache.AvailableSize == availableSize && this.measureCache.DesiredSize == desiredSize)) { this.VerifyScrollData(availableSize.Width, desiredSize.Width); return desiredSize; } // If we have more available space - try to expand groups while (desiredSize.Width <= availableSize.Width) { var hasMoreVariants = this.reduceOrderIndex < this.reduceOrder.Length - 1; if (hasMoreVariants == false) { break; } // Increase size of another item this.reduceOrderIndex++; this.IncreaseGroupBoxSize(this.reduceOrder[this.reduceOrderIndex]); desiredSize = this.GetChildrenDesiredSizeIntermediate(); } // If not enough space - go to next variant while (desiredSize.Width > availableSize.Width) { var hasMoreVariants = this.reduceOrderIndex >= 0; if (hasMoreVariants == false) { break; } // Decrease size of another item this.DecreaseGroupBoxSize(this.reduceOrder[this.reduceOrderIndex]); this.reduceOrderIndex--; desiredSize = this.GetChildrenDesiredSizeIntermediate(); } // Set find values foreach (var item in this.InternalChildren) { var groupBox = item as RibbonGroupBox; if (groupBox == null) { continue; } if (groupBox.State != groupBox.StateIntermediate || groupBox.Scale != groupBox.ScaleIntermediate) { groupBox.SuppressCacheReseting = true; groupBox.State = groupBox.StateIntermediate; groupBox.Scale = groupBox.ScaleIntermediate; groupBox.InvalidateLayout(); groupBox.Measure(new Size(double.PositiveInfinity, availableSize.Height)); groupBox.SuppressCacheReseting = false; } // Something wrong with cache? if (groupBox.DesiredSizeIntermediate != groupBox.DesiredSize) { // Reset cache and reinvoke measure groupBox.ClearCache(); return this.MeasureOverride(availableSize); } } this.measureCache = new MeasureCache(availableSize, desiredSize); this.VerifyScrollData(availableSize.Width, desiredSize.Width); return desiredSize; } private Size GetChildrenDesiredSizeIntermediate() { double width = 0; double height = 0; foreach (UIElement child in this.InternalChildren) { var groupBox = child as RibbonGroupBox; if (groupBox == null) { continue; } var desiredSize = groupBox.DesiredSizeIntermediate; width += desiredSize.Width; height = Math.Max(height, desiredSize.Height); } return new Size(width, height); } // Increase size of the item private void IncreaseGroupBoxSize(string name) { var groupBox = this.FindGroup(name); var scale = name.StartsWith("(", StringComparison.OrdinalIgnoreCase); if (groupBox == null) { return; } if (scale) { groupBox.ScaleIntermediate++; } else { groupBox.StateIntermediate = groupBox.StateIntermediate != RibbonGroupBoxState.Large ? groupBox.StateIntermediate - 1 : RibbonGroupBoxState.Large; } } // Decrease size of the item private void DecreaseGroupBoxSize(string name) { var groupBox = this.FindGroup(name); var scale = name.StartsWith("(", StringComparison.OrdinalIgnoreCase); if (groupBox == null) { return; } if (scale) { groupBox.ScaleIntermediate--; } else { groupBox.StateIntermediate = groupBox.StateIntermediate != RibbonGroupBoxState.Collapsed ? groupBox.StateIntermediate + 1 : groupBox.StateIntermediate; } } private RibbonGroupBox FindGroup(string name) { if (name.StartsWith("(", StringComparison.OrdinalIgnoreCase)) { name = name.Substring(1, name.Length - 2); } foreach (FrameworkElement child in this.InternalChildren) { if (child.Name == name) { return child as RibbonGroupBox; } } return null; } /// <inheritdoc /> protected override Size ArrangeOverride(Size finalSize) { var finalRect = new Rect(finalSize) { X = -this.HorizontalOffset }; foreach (UIElement item in this.InternalChildren) { finalRect.Width = item.DesiredSize.Width; finalRect.Height = Math.Max(finalSize.Height, item.DesiredSize.Height); item.Arrange(finalRect); finalRect.X += item.DesiredSize.Width; } return finalSize; } #endregion #region IScrollInfo Members /// <inheritdoc /> public ScrollViewer ScrollOwner { get { return this.ScrollData.ScrollOwner; } set { this.ScrollData.ScrollOwner = value; } } /// <inheritdoc /> public void SetHorizontalOffset(double offset) { var newValue = CoerceOffset(ValidateInputOffset(offset, nameof(this.HorizontalOffset)), this.scrollData.ExtentWidth, this.scrollData.ViewportWidth); if (DoubleUtil.AreClose(this.ScrollData.OffsetX, newValue) == false) { this.scrollData.OffsetX = newValue; this.InvalidateArrange(); } } /// <inheritdoc /> public double ExtentWidth { get { return this.ScrollData.ExtentWidth; } } /// <inheritdoc /> public double HorizontalOffset { get { return this.ScrollData.OffsetX; } } /// <inheritdoc /> public double ViewportWidth { get { return this.ScrollData.ViewportWidth; } } /// <inheritdoc /> public void LineLeft() { this.SetHorizontalOffset(this.HorizontalOffset - 16.0); } /// <inheritdoc /> public void LineRight() { this.SetHorizontalOffset(this.HorizontalOffset + 16.0); } /// <inheritdoc /> public Rect MakeVisible(Visual visual, Rect rectangle) { // We can only work on visuals that are us or children. // An empty rect has no size or position. We can't meaningfully use it. if (rectangle.IsEmpty || visual == null || ReferenceEquals(visual, this) || !this.IsAncestorOf(visual)) { return Rect.Empty; } // Compute the child's rect relative to (0,0) in our coordinate space. var childTransform = visual.TransformToAncestor(this); rectangle = childTransform.TransformBounds(rectangle); // Initialize the viewport var viewport = new Rect(this.HorizontalOffset, rectangle.Top, this.ViewportWidth, rectangle.Height); rectangle.X += viewport.X; // Compute the offsets required to minimally scroll the child maximally into view. var minX = ComputeScrollOffsetWithMinimalScroll(viewport.Left, viewport.Right, rectangle.Left, rectangle.Right); // We have computed the scrolling offsets; scroll to them. this.SetHorizontalOffset(minX); // Compute the visible rectangle of the child relative to the viewport. viewport.X = minX; rectangle.Intersect(viewport); rectangle.X -= viewport.X; // Return the rectangle return rectangle; } private static double ComputeScrollOffsetWithMinimalScroll( double topView, double bottomView, double topChild, double bottomChild) { // # CHILD POSITION CHILD SIZE SCROLL REMEDY // 1 Above viewport <= viewport Down Align top edge of child & viewport // 2 Above viewport > viewport Down Align bottom edge of child & viewport // 3 Below viewport <= viewport Up Align bottom edge of child & viewport // 4 Below viewport > viewport Up Align top edge of child & viewport // 5 Entirely within viewport NA No scroll. // 6 Spanning viewport NA No scroll. // // Note: "Above viewport" = childTop above viewportTop, childBottom above viewportBottom // "Below viewport" = childTop below viewportTop, childBottom below viewportBottom // These child thus may overlap with the viewport, but will scroll the same direction /*bool fAbove = DoubleUtil.LessThan(topChild, topView) && DoubleUtil.LessThan(bottomChild, bottomView); bool fBelow = DoubleUtil.GreaterThan(bottomChild, bottomView) && DoubleUtil.GreaterThan(topChild, topView);*/ var fAbove = (topChild < topView) && (bottomChild < bottomView); var fBelow = (bottomChild > bottomView) && (topChild > topView); var fLarger = bottomChild - topChild > bottomView - topView; // Handle Cases: 1 & 4 above if ((fAbove && !fLarger) || (fBelow && fLarger)) { return topChild; } // Handle Cases: 2 & 3 above if (fAbove || fBelow) { return bottomChild - (bottomView - topView); } // Handle cases: 5 & 6 above. return topView; } /// <summary> /// Not implemented /// </summary> public void MouseWheelDown() { } /// <summary> /// Not implemented /// </summary> public void MouseWheelLeft() { } /// <summary> /// Not implemented /// </summary> public void MouseWheelRight() { } /// <summary> /// Not implemented /// </summary> public void MouseWheelUp() { } /// <summary> /// Not implemented /// </summary> public void LineDown() { } /// <summary> /// Not implemented /// </summary> public void LineUp() { } /// <summary> /// Not implemented /// </summary> public void PageDown() { } /// <summary> /// Not implemented /// </summary> public void PageLeft() { } /// <summary> /// Not implemented /// </summary> public void PageRight() { } /// <summary> /// Not implemented /// </summary> public void PageUp() { } /// <summary> /// Not implemented /// </summary> public void SetVerticalOffset(double offset) { } /// <inheritdoc /> public bool CanVerticallyScroll { get { return false; } set { } } /// <inheritdoc /> public bool CanHorizontallyScroll { get { return true; } set { } } /// <summary> /// Not implemented /// </summary> public double ExtentHeight { get { return 0.0; } } /// <summary> /// Not implemented /// </summary> public double VerticalOffset { get { return 0.0; } } /// <summary> /// Not implemented /// </summary> public double ViewportHeight { get { return 0.0; } } // Gets scroll data info private ScrollData ScrollData { get { return this.scrollData ?? (this.scrollData = new ScrollData()); } } // Scroll data info private ScrollData scrollData; // Validates input offset private static double ValidateInputOffset(double offset, string parameterName) { if (double.IsNaN(offset)) { throw new ArgumentOutOfRangeException(parameterName); } return Math.Max(0.0, offset); } // Verifies scrolling data using the passed viewport and extent as newly computed values. // Checks the X/Y offset and coerces them into the range [0, Extent - ViewportSize] // If extent, viewport, or the newly coerced offsets are different than the existing offset, // cachces are updated and InvalidateScrollInfo() is called. private void VerifyScrollData(double viewportWidth, double extentWidth) { var isValid = true; if (double.IsInfinity(viewportWidth)) { viewportWidth = extentWidth; } var offsetX = CoerceOffset(this.ScrollData.OffsetX, extentWidth, viewportWidth); isValid &= DoubleUtil.AreClose(viewportWidth, this.ScrollData.ViewportWidth); isValid &= DoubleUtil.AreClose(extentWidth, this.ScrollData.ExtentWidth); isValid &= DoubleUtil.AreClose(this.ScrollData.OffsetX, offsetX); this.ScrollData.ViewportWidth = viewportWidth; this.ScrollData.ExtentWidth = extentWidth; this.ScrollData.OffsetX = offsetX; if (isValid == false) { this.ScrollOwner?.InvalidateScrollInfo(); } } // Returns an offset coerced into the [0, Extent - Viewport] range. private static double CoerceOffset(double offset, double extent, double viewport) { if (offset > extent - viewport) { offset = extent - viewport; } if (offset < 0) { offset = 0; } return offset; } #endregion } }
31.479201
160
0.532269
[ "MIT" ]
GerHobbelt/Fluent.Ribbon
Fluent.Ribbon/Controls/RibbonGroupsContainer.cs
18,919
C#
using GoogleApi.Entities.Maps.Geocoding.Common.Enums; using Newtonsoft.Json; namespace GoogleApi.Entities.Common { /// <summary> /// Geometry. /// </summary> public class Geometry { /// <summary> /// Location contains the geocoded latitude,longitude value. /// For normal address lookups, this field is typically the most important. /// </summary> [JsonProperty("location")] public virtual Location Location { get; set; } /// <summary> /// Bounds (optionally returned) stores the bounding box which can fully contain the returned result. /// Note that these bounds may not match the recommended viewport. (For example, San Francisco includes the Farallon islands, /// which are technically part of the city, but probably should not be returned in the viewport.) /// </summary> [JsonProperty("bounds")] public virtual ViewPort Bounds { get; set; } /// <summary> /// Viewport contains the recommended viewport for displaying the returned result, specified as two latitude,longitude values defining /// the southwest and northeast corner of the viewport bounding box. /// Generally the viewport is used to frame a result when displaying it to a user. /// </summary> [JsonProperty("viewport")] public virtual ViewPort ViewPort { get; set; } /// <summary> /// Location type stores additional data about the specified location. /// </summary> [JsonProperty("location_type")] public virtual GeometryLocationType LocationType { get; set; } } }
41.75
143
0.647904
[ "MIT" ]
Prologh/GoogleApi
GoogleApi/Entities/Common/Geometry.cs
1,672
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 Newtonsoft.Json; using Aliyun.Acs.Core; namespace Aliyun.Acs.Cbn.Model.V20170912 { public class CreateFlowlogResponse : AcsResponse { private string requestId; private string success; private string flowLogId; public string RequestId { get { return requestId; } set { requestId = value; } } public string Success { get { return success; } set { success = value; } } public string FlowLogId { get { return flowLogId; } set { flowLogId = value; } } } }
20.56338
63
0.669178
[ "Apache-2.0" ]
pengweiqhca/aliyun-openapi-net-sdk
aliyun-net-sdk-cbn/Cbn/Model/V20170912/CreateFlowlogResponse.cs
1,460
C#
using CMS; using CMS.Base.Web.UI; using CMS.UIControls; using URLRedirection.Extenders; [assembly: RegisterCustomClass("RedirectionExtender", typeof(RedirectionExtender))] namespace URLRedirection.Extenders { public class RedirectionExtender : ControlExtender<UniGrid> { public override void OnInit() { Control.OnExternalDataBound += Control_OnExternalDataBound; } private object Control_OnExternalDataBound(object sender, string sourceName, object parameter) { if (sourceName == "targeturl") { string targeturl = parameter.ToString(); if (targeturl.Length > 80) { targeturl = targeturl.Substring(0, 55) + "...<strong>(Edit to see full URL)</strong>"; } return targeturl; } else if (sourceName == "description") { string description = parameter.ToString(); if (description.Length > 300) { description = description.Substring(0, 300) + "...<strong>(Edit to see full description)</strong>"; } return description; } return parameter; } } }
31.634146
119
0.552814
[ "MIT" ]
KenticoDevTrev/KenticoURLRedirectionModule
K12.0/Source-Admin/RedirectionExtender.cs
1,299
C#
using System; using osu.Framework; using osu.Framework.Platform; using osu.Game.Tests; namespace osu.Game.Rulesets.Tau.Tests { public static class VisualTestRunner { [STAThread] public static int Main(string[] args) { using (DesktopGameHost host = Host.GetSuitableHost(@"osu", true)) { host.Run(new OsuTestBrowser()); return 0; } } } }
21.454545
78
0.538136
[ "MIT" ]
Altenhh/tau
osu.Game.Rulesets.Tau.Tests/VisualTestRunner.cs
453
C#
using System; using System.Collections.Generic; using System.Net; using System.Net.Sockets; using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Renci.SshNet.Channels; using Renci.SshNet.Common; namespace Renci.SshNet.Tests.Classes { [TestClass] public class ForwardedPortDynamicTest_Start_PortStarted { private Mock<ISession> _sessionMock; private Mock<IConnectionInfo> _connectionInfoMock; private Mock<IChannelDirectTcpip> _channelMock; private ForwardedPortDynamic _forwardedPort; private IList<EventArgs> _closingRegister; private IList<ExceptionEventArgs> _exceptionRegister; private IPEndPoint _endpoint; private InvalidOperationException _actualException; [TestInitialize] public void Setup() { Arrange(); Act(); } [TestCleanup] public void Cleanup() { if (_forwardedPort != null) { _forwardedPort.Dispose(); _forwardedPort = null; } } protected void Arrange() { _closingRegister = new List<EventArgs>(); _exceptionRegister = new List<ExceptionEventArgs>(); _endpoint = new IPEndPoint(IPAddress.Loopback, 8122); _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict); _sessionMock = new Mock<ISession>(MockBehavior.Strict); _channelMock = new Mock<IChannelDirectTcpip>(MockBehavior.Strict); _connectionInfoMock.Setup(p => p.Timeout).Returns(TimeSpan.FromSeconds(15)); _sessionMock.Setup(p => p.IsConnected).Returns(true); _sessionMock.Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object); _sessionMock.Setup(p => p.CreateChannelDirectTcpip()).Returns(_channelMock.Object); _forwardedPort = new ForwardedPortDynamic(_endpoint.Address.ToString(), (uint)_endpoint.Port); _forwardedPort.Closing += (sender, args) => _closingRegister.Add(args); _forwardedPort.Exception += (sender, args) => _exceptionRegister.Add(args); _forwardedPort.Session = _sessionMock.Object; _forwardedPort.Start(); } protected void Act() { try { _forwardedPort.Start(); Assert.Fail(); } catch (InvalidOperationException ex) { _actualException = ex; } } [TestMethod] public void StartShouldThrowInvalidOperatationException() { Assert.IsNotNull(_actualException); Assert.AreEqual("Forwarded port is already started.", _actualException.Message); } [TestMethod] public void IsStartedShouldReturnTrue() { Assert.IsTrue(_forwardedPort.IsStarted); } [TestMethod] public void ForwardedPortShouldAcceptNewConnections() { using (var client = new Socket(_endpoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp)) { client.Connect(_endpoint); } } [TestMethod] public void ClosingShouldNotHaveFired() { Assert.AreEqual(0, _closingRegister.Count); } [TestMethod] public void ExceptionShouldNotHaveFired() { Assert.AreEqual(0, _exceptionRegister.Count); } } }
31.891892
106
0.608757
[ "MIT" ]
0xced/SSH.NET
src/Renci.SshNet.Tests/Classes/ForwardedPortDynamicTest_Start_PortStarted.cs
3,542
C#