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
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; namespace Pulumi.Aws.WafV2.Inputs { public sealed class RuleGroupRuleStatementNotStatementStatementNotStatementStatementXssMatchStatementTextTransformationArgs : Pulumi.ResourceArgs { /// <summary> /// The relative processing order for multiple transformations that are defined for a rule statement. AWS WAF processes all transformations, from lowest priority to highest, before inspecting the transformed content. /// </summary> [Input("priority", required: true)] public Input<int> Priority { get; set; } = null!; /// <summary> /// The transformation to apply, you can specify the following types: `NONE`, `COMPRESS_WHITE_SPACE`, `HTML_ENTITY_DECODE`, `LOWERCASE`, `CMD_LINE`, `URL_DECODE`. See the [documentation](https://docs.aws.amazon.com/waf/latest/APIReference/API_TextTransformation.html) for more details. /// </summary> [Input("type", required: true)] public Input<string> Type { get; set; } = null!; public RuleGroupRuleStatementNotStatementStatementNotStatementStatementXssMatchStatementTextTransformationArgs() { } } }
45.84375
293
0.718473
[ "ECL-2.0", "Apache-2.0" ]
Otanikotani/pulumi-aws
sdk/dotnet/WafV2/Inputs/RuleGroupRuleStatementNotStatementStatementNotStatementStatementXssMatchStatementTextTransformationArgs.cs
1,467
C#
// ------------------------------------------------------------------------------ // <auto-generated> // This file was generated by Extensibility Tools v1.10.211 // </auto-generated> // ------------------------------------------------------------------------------ namespace DependinatorVse { static class Vsix { public const string Id = "0117fbb8-b3c3-4baf-858e-d7ed140c01f4"; public const string Name = "Dependinator"; public const string Description = @"Visualize program structure and dependencies in a map like view to make it easier to understand and refactor the architecture."; public const string Language = "en-US"; public const string Version = "1.0"; public const string Author = "Michael Reichenauer"; public const string Tags = "Visualize, structure, architecture, code, refactor, dependencies"; } }
44.842105
168
0.588028
[ "MIT" ]
michael-reichenauer/Dependinator
DependinatorVse/source.extension.cs
852
C#
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Linq; using Microsoft.CodeAnalysis.CSharp.Test.Utilities; using Microsoft.CodeAnalysis.Test.Utilities; using Roslyn.Test.Utilities; using Xunit; namespace Microsoft.CodeAnalysis.CSharp.UnitTests { public class ParserErrorMessageTests : CSharpTestBase { #region "Targeted Error Tests - please arrange tests in the order of error code" [WorkItem(536666, "DevDiv")] [Fact] public void CS0071ERR_ExplicitEventFieldImpl() { // Diff errors var test = @" public delegate void D(); interface Itest { event D E; } class Test : Itest { event D ITest.E() // CS0071 { } public static int Main() { return 1; } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_ExplicitEventFieldImpl, "."), Diagnostic(ErrorCode.ERR_MemberNeedsType, "E")); } // Infinite loop [Fact] public void CS0073ERR_AddRemoveMustHaveBody() { var test = @" using System; class C { event Action E { add; remove; } } abstract class A { public abstract event Action E { add; remove; } } "; CreateCompilationWithMscorlib(test).VerifyDiagnostics( // (5,25): error CS0073: An add or remove accessor must have a body // event Action E { add; remove; } Diagnostic(ErrorCode.ERR_AddRemoveMustHaveBody, ";"), // (5,33): error CS0073: An add or remove accessor must have a body // event Action E { add; remove; } Diagnostic(ErrorCode.ERR_AddRemoveMustHaveBody, ";"), // (9,41): error CS0073: An add or remove accessor must have a body // public abstract event Action E { add; remove; } Diagnostic(ErrorCode.ERR_AddRemoveMustHaveBody, ";"), // (9,49): error CS0073: An add or remove accessor must have a body // public abstract event Action E { add; remove; } Diagnostic(ErrorCode.ERR_AddRemoveMustHaveBody, ";")); } [Fact] public void CS0080ERR_ConstraintOnlyAllowedOnGenericDecl() { var test = @" interface I {} class C where C : I // CS0080 - C is not generic class { } public class Test { public static int Main () { return 1; } } "; CreateCompilationWithMscorlib(test).VerifyDiagnostics( // (3,9): error CS0080: Constraints are not allowed on non-generic declarations Diagnostic(ErrorCode.ERR_ConstraintOnlyAllowedOnGenericDecl, "where").WithLocation(3, 9)); } [WorkItem(527827, "DevDiv")] [Fact] public void CS0080ERR_ConstraintOnlyAllowedOnGenericDecl_2() { var test = @" class C where C : I { } "; CreateCompilationWithMscorlib(test).VerifyDiagnostics( // (3,5): error CS0080: Constraints are not allowed on non-generic declarations // where C : I Diagnostic(ErrorCode.ERR_ConstraintOnlyAllowedOnGenericDecl, "where")); } [Fact] public void CS0107ERR_BadMemberProtection() { var test = @" public class C { private internal void f() {} public static int Main() { return 1; } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_BadMemberProtection, "internal")); } [Fact, WorkItem(543622, "DevDiv")] public void CS0116ERR__NamespaceUnexpected() { var test = @"{ get { ParseDefaultDir(); } }"; // Extra errors ParseAndValidate(test, // (1,1): error CS1022: Type or namespace definition, or end-of-file expected // { Diagnostic(ErrorCode.ERR_EOFExpected, "{"), // (3,5): error CS1022: Type or namespace definition, or end-of-file expected // { Diagnostic(ErrorCode.ERR_EOFExpected, "{"), // (3,6): error CS1520: Method must have a return type // { Diagnostic(ErrorCode.ERR_MemberNeedsType, ""), // (2,5): error CS0116: A namespace does not directly contain members such as fields or methods // get Diagnostic(ErrorCode.ERR_NamespaceUnexpected, "get"), // (5,5): error CS1022: Type or namespace definition, or end-of-file expected // } Diagnostic(ErrorCode.ERR_EOFExpected, "}"), // (6,1): error CS1022: Type or namespace definition, or end-of-file expected // } Diagnostic(ErrorCode.ERR_EOFExpected, "}")); } [Fact] public void CS0145ERR_ConstValueRequired() { var test = @" namespace x { public class a { public static int Main() { return 1; } } public class b : a { public const int i; } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_ConstValueRequired, "i")); } [WorkItem(536667, "DevDiv")] [Fact] public void CS0150ERR_ConstantExpected() { var test = @" using namespace System; public class mine { public enum e1 {one=1, two=2, three= }; public static int Main() { return 1; } }; } "; ParseAndValidate(test, // (2,7): error CS1041: Identifier expected; 'namespace' is a keyword // using namespace System; Diagnostic(ErrorCode.ERR_IdentifierExpectedKW, "namespace").WithArguments("", "namespace"), // (2,23): error CS1514: { expected // using namespace System; Diagnostic(ErrorCode.ERR_LbraceExpected, ";"), // (4,42): error CS0150: A constant value is expected // public enum e1 {one=1, two=2, three= }; Diagnostic(ErrorCode.ERR_ConstantExpected, "")); } [WorkItem(862028, "DevDiv/Personal")] [Fact] public void CS0178ERR_InvalidArray() { // Diff errors var test = @" class A { public static int Main() { int[] arr = new int[5][5; return 1; } } "; ParseAndValidate(test, // (6,32): error CS0178: Invalid rank specifier: expected ',' or ']' // int[] arr = new int[5][5; Diagnostic(ErrorCode.ERR_InvalidArray, "5"), // (6,33): error CS1003: Syntax error, ',' expected // int[] arr = new int[5][5; Diagnostic(ErrorCode.ERR_SyntaxError, ";").WithArguments(",", ";"), // (6,33): error CS0443: Syntax error; value expected // int[] arr = new int[5][5; Diagnostic(ErrorCode.ERR_ValueExpected, ""), // (6,33): error CS1003: Syntax error, ']' expected // int[] arr = new int[5][5; Diagnostic(ErrorCode.ERR_SyntaxError, ";").WithArguments("]", ";")); } [WorkItem(862031, "DevDiv/Personal")] [Fact] public void CS0201ERR_IllegalStatement() { var test = @" class A { public static int Main() { (a) => a; (a, b) => { }; int x = 0; int y = 0; x + y; x == 1; } } "; ParseAndValidate(test); } [Fact] public void CS0230ERR_BadForeachDecl() { var test = @" class MyClass { public static int Main() { int[] myarray = new int[3] {10,2,3}; foreach (int in myarray) // CS0230 { } return 1; } } "; ParseAndValidate(test, // (7,22): error CS1001: Identifier expected // foreach (int in myarray) // CS0230 Diagnostic(ErrorCode.ERR_IdentifierExpected, "in"), // (7,22): error CS0230: Type and identifier are both required in a foreach statement // foreach (int in myarray) // CS0230 Diagnostic(ErrorCode.ERR_BadForeachDecl, "in") ); } [Fact] public void CS0230ERR_BadForeachDecl02() { // TODO: Extra error var test = @" public class Test { static void Main(string[] args) { int[] myarray = new int[3] { 1, 2, 3 }; foreach (x in myarray) { }// Invalid } } "; ParseAndValidate(test, // (7,20): error CS1001: Identifier expected // foreach (x in myarray) { }// Invalid Diagnostic(ErrorCode.ERR_IdentifierExpected, "in"), // (7,20): error CS0230: Type and identifier are both required in a foreach statement // foreach (x in myarray) { }// Invalid Diagnostic(ErrorCode.ERR_BadForeachDecl, "in")); } [Fact] public void CS0230ERR_BadForeachDecl03() { // TODO: Extra error var test = @" public class Test { static void Main(string[] args) { st[][] myarray = new st[1000][]; foreach (st[] in myarray) { } } } public struct st { } "; ParseAndValidate(test, // (7,23): error CS1001: Identifier expected // foreach (st[] in myarray) { } Diagnostic(ErrorCode.ERR_IdentifierExpected, "in"), // (7,23): error CS0230: Type and identifier are both required in a foreach statement // foreach (st[] in myarray) { } Diagnostic(ErrorCode.ERR_BadForeachDecl, "in")); } [Fact] public void CS0231ERR_ParamsLast() { var test = @" using System; public class MyClass { public void MyMeth(params int[] values, int i) {} public static int Main() { return 1; } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_ParamsLast, "params int[] values")); } [Fact] public void CS0257ERR_VarargsLast() { var test = @" class Foo { public void Bar(__arglist, int b) { } } "; ParseAndValidate(test, // (4,19): error CS0257: An __arglist parameter must be the last parameter in a formal parameter list // public void Bar(__arglist, int b) Diagnostic(ErrorCode.ERR_VarargsLast, "__arglist")); } [WorkItem(536668, "DevDiv")] [Fact] public void CS0267ERR_PartialMisplaced() { // Diff error var test = @" partial public class C // CS0267 { } public class Test { public static int Main () { return 1; } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_PartialMisplaced, "partial") ); } [Fact] public void CS0267ERR_PartialMisplaced_Enum() { var test = @" partial enum E { } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_PartialMisplaced, "partial")); } [Fact] public void CS0267ERR_PartialMisplaced_Delegate() { var test = @" partial delegate E { } "; // Extra errors ParseAndValidate(test, // (2,1): error CS0267: The 'partial' modifier can only appear immediately before 'class', 'struct', 'interface', or 'void' // partial delegate E { } Diagnostic(ErrorCode.ERR_PartialMisplaced, "partial"), // (2,20): error CS1001: Identifier expected // partial delegate E { } Diagnostic(ErrorCode.ERR_IdentifierExpected, "{"), // (2,20): error CS1003: Syntax error, '(' expected // partial delegate E { } Diagnostic(ErrorCode.ERR_SyntaxError, "{").WithArguments("(", "{"), // (2,20): error CS1026: ) expected // partial delegate E { } Diagnostic(ErrorCode.ERR_CloseParenExpected, "{"), // (2,20): error CS1002: ; expected // partial delegate E { } Diagnostic(ErrorCode.ERR_SemicolonExpected, "{"), // (2,20): error CS1022: Type or namespace definition, or end-of-file expected // partial delegate E { } Diagnostic(ErrorCode.ERR_EOFExpected, "{"), // (2,22): error CS1022: Type or namespace definition, or end-of-file expected // partial delegate E { } Diagnostic(ErrorCode.ERR_EOFExpected, "}")); } // TODO: Extra errors [Fact] public void CS0270ERR_ArraySizeInDeclaration() { var test = @" public class MyClass { enum E { } public static void Main() { int myarray[2]; MyClass m[0]; byte b[13,5]; double d[14,5,6]; E e[,50]; } } "; ParseAndValidate(test, // (7,20): error CS0650: Bad array declarator: To declare a managed array the rank specifier precedes the variable's identifier. To declare a fixed size buffer field, use the fixed keyword before the field type. // int myarray[2]; Diagnostic(ErrorCode.ERR_CStyleArray, "[2]"), // (7,21): error CS0270: Array size cannot be specified in a variable declaration (try initializing with a 'new' expression) // int myarray[2]; Diagnostic(ErrorCode.ERR_ArraySizeInDeclaration, "2"), // (8,18): error CS0650: Bad array declarator: To declare a managed array the rank specifier precedes the variable's identifier. To declare a fixed size buffer field, use the fixed keyword before the field type. // MyClass m[0]; Diagnostic(ErrorCode.ERR_CStyleArray, "[0]"), // (8,19): error CS0270: Array size cannot be specified in a variable declaration (try initializing with a 'new' expression) // MyClass m[0]; Diagnostic(ErrorCode.ERR_ArraySizeInDeclaration, "0"), // (9,15): error CS0650: Bad array declarator: To declare a managed array the rank specifier precedes the variable's identifier. To declare a fixed size buffer field, use the fixed keyword before the field type. // byte b[13,5]; Diagnostic(ErrorCode.ERR_CStyleArray, "[13,5]"), // (9,16): error CS0270: Array size cannot be specified in a variable declaration (try initializing with a 'new' expression) // byte b[13,5]; Diagnostic(ErrorCode.ERR_ArraySizeInDeclaration, "13"), // (9,19): error CS0270: Array size cannot be specified in a variable declaration (try initializing with a 'new' expression) // byte b[13,5]; Diagnostic(ErrorCode.ERR_ArraySizeInDeclaration, "5"), // (10,17): error CS0650: Bad array declarator: To declare a managed array the rank specifier precedes the variable's identifier. To declare a fixed size buffer field, use the fixed keyword before the field type. // double d[14,5,6]; Diagnostic(ErrorCode.ERR_CStyleArray, "[14,5,6]"), // (10,18): error CS0270: Array size cannot be specified in a variable declaration (try initializing with a 'new' expression) // double d[14,5,6]; Diagnostic(ErrorCode.ERR_ArraySizeInDeclaration, "14"), // (10,21): error CS0270: Array size cannot be specified in a variable declaration (try initializing with a 'new' expression) // double d[14,5,6]; Diagnostic(ErrorCode.ERR_ArraySizeInDeclaration, "5"), // (10,23): error CS0270: Array size cannot be specified in a variable declaration (try initializing with a 'new' expression) // double d[14,5,6]; Diagnostic(ErrorCode.ERR_ArraySizeInDeclaration, "6"), // (11,12): error CS0650: Bad array declarator: To declare a managed array the rank specifier precedes the variable's identifier. To declare a fixed size buffer field, use the fixed keyword before the field type. // E e[,50]; Diagnostic(ErrorCode.ERR_CStyleArray, "[,50]"), // (11,13): error CS0443: Syntax error; value expected // E e[,50]; Diagnostic(ErrorCode.ERR_ValueExpected, ""), // (11,14): error CS0270: Array size cannot be specified in a variable declaration (try initializing with a 'new' expression) // E e[,50]; Diagnostic(ErrorCode.ERR_ArraySizeInDeclaration, "50")); } [Fact] public void CS0401ERR_NewBoundMustBeLast() { var test = @" interface IA { } class C<T> where T : new(), IA // CS0401 - should be T : IA, new() { } public class Test { public static int Main () { return 1; } } "; CreateCompilationWithMscorlib(test).VerifyDiagnostics( // (5,22): error CS0401: The new() constraint must be the last constraint specified Diagnostic(ErrorCode.ERR_NewBoundMustBeLast, "new").WithLocation(5, 22)); } [Fact] public void CS0439ERR_ExternAfterElements() { var test = @" using System; extern alias MyType; // CS0439 // To resolve the error, make the extern alias the first line in the file. public class Test { public static void Main() { } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_ExternAfterElements, "extern")); } [WorkItem(862086, "DevDiv/Personal")] [Fact] public void CS0443ERR_ValueExpected() { var test = @" using System; class MyClass { public static void Main() { int[,] x = new int[1,5]; if (x[] == 5) {} // CS0443 // if (x[0, 0] == 5) {} } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_ValueExpected, "]")); } [Fact] public void CS0443ERR_ValueExpected_MultiDimensional() { var test = @" using System; class MyClass { public static void Main() { int[,] x = new int[1,5]; if (x[,] == 5) {} // CS0443 // if (x[0, 0] == 5) {} } } "; ParseAndValidate(test, // (8,15): error CS0443: Syntax error; value expected // if (x[,] == 5) {} // CS0443 Diagnostic(ErrorCode.ERR_ValueExpected, ","), // (8,16): error CS0443: Syntax error; value expected // if (x[,] == 5) {} // CS0443 Diagnostic(ErrorCode.ERR_ValueExpected, "]")); } [Fact] public void CS0449ERR_RefValBoundMustBeFirst() { var test = @" interface I {} class C4 { public void F1<T>() where T : class, struct, I {} // CS0449 public void F2<T>() where T : I, struct {} // CS0449 public void F3<T>() where T : I, class {} // CS0449 // OK public void F4<T>() where T : class {} public void F5<T>() where T : struct {} public void F6<T>() where T : I {} } "; CreateCompilationWithMscorlib(test).VerifyDiagnostics( // (5,41): error CS0449: The 'class' or 'struct' constraint must come before any other constraints Diagnostic(ErrorCode.ERR_RefValBoundMustBeFirst, "struct").WithLocation(5, 41), // (6,37): error CS0449: The 'class' or 'struct' constraint must come before any other constraints Diagnostic(ErrorCode.ERR_RefValBoundMustBeFirst, "struct").WithLocation(6, 37), // (7,37): error CS0449: The 'class' or 'struct' constraint must come before any other constraints Diagnostic(ErrorCode.ERR_RefValBoundMustBeFirst, "class").WithLocation(7, 37)); } [Fact] public void CS0451ERR_NewBoundWithVal() { var test = @" public class C4 { public void F4<T>() where T : struct, new() {} // CS0451 } // OK public class C5 { public void F5<T>() where T : struct {} } public class C6 { public void F6<T>() where T : new() {} } "; CreateCompilationWithMscorlib(test).VerifyDiagnostics( // (4,42): error CS0451: The 'new()' constraint cannot be used with the 'struct' constraint Diagnostic(ErrorCode.ERR_NewBoundWithVal, "new").WithLocation(4, 42)); } [WorkItem(862089, "DevDiv/Personal")] [Fact] public void CS0460ERR_OverrideWithConstraints() { var source = @"interface I { void M1<T>() where T : I; void M2<T, U>(); } abstract class A { internal virtual void M1<T>() where T : class { } internal abstract void M2<T>() where T : struct; internal abstract void M3<T>(); } abstract class B : A, I { void I.M1<T>() where T : I { } void I.M2<T,U>() where U : T { } internal override void M1<T>() where T : class { } internal override void M2<T>() where T : new() { } internal override abstract void M3<U>() where U : A; internal override abstract void M4<T>() where T : struct; }"; CreateCompilationWithMscorlib(source).VerifyDiagnostics( // (14,20): error CS0460: Constraints for override and explicit interface implementation methods are inherited from the base method, so they cannot be specified directly Diagnostic(ErrorCode.ERR_OverrideWithConstraints, "where").WithLocation(14, 20), // (15,22): error CS0460: Constraints for override and explicit interface implementation methods are inherited from the base method, so they cannot be specified directly Diagnostic(ErrorCode.ERR_OverrideWithConstraints, "where").WithLocation(15, 22), // (16,37): error CS0460: Constraints for override and explicit interface implementation methods are inherited from the base method, so they cannot be specified directly Diagnostic(ErrorCode.ERR_OverrideWithConstraints, "where").WithLocation(16, 37), // (17,36): error CS0460: Constraints for override and explicit interface implementation methods are inherited from the base method, so they cannot be specified directly Diagnostic(ErrorCode.ERR_OverrideWithConstraints, "where").WithLocation(17, 36), // (18,45): error CS0460: Constraints for override and explicit interface implementation methods are inherited from the base method, so they cannot be specified directly Diagnostic(ErrorCode.ERR_OverrideWithConstraints, "where").WithLocation(18, 45), // (19,37): error CS0115: 'B.M4<T>()': no suitable method found to override Diagnostic(ErrorCode.ERR_OverrideNotExpected, "M4").WithArguments("B.M4<T>()").WithLocation(19, 37), // (19,45): error CS0460: Constraints for override and explicit interface implementation methods are inherited from the base method, so they cannot be specified directly Diagnostic(ErrorCode.ERR_OverrideWithConstraints, "where").WithLocation(19, 45)); } [WorkItem(862094, "DevDiv/Personal")] [Fact] public void CS0514ERR_StaticConstructorWithExplicitConstructorCall() { var test = @" namespace x { public class clx { public clx(int i){} } public class cly : clx { // static does not have an object, therefore base cannot be called. // objects must be known at compiler time static cly() : base(0){} // sc0514 } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_StaticConstructorWithExplicitConstructorCall, "base").WithArguments("cly")); } [Fact] public void CS0514ERR_StaticConstructorWithExplicitConstructorCall2() { var test = @" class C { C() { } static C() : this() { } //CS0514 } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_StaticConstructorWithExplicitConstructorCall, "this").WithArguments("C")); } [Fact] public void CS0574ERR_BadDestructorName() { var test = @" namespace x { public class iii { ~iiii(){} public static void Main() { } } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_BadDestructorName, "iiii")); } // Extra same errors [Fact] public void CS0650ERR_CStyleArray() { var test = @" public class MyClass { public static void Main() { int myarray[2]; MyClass m[0]; byte b[13,5]; double d[14,5,6]; } } "; ParseAndValidate(test, // (6,20): error CS0650: Bad array declarator: To declare a managed array the rank specifier precedes the variable's identifier. To declare a fixed size buffer field, use the fixed keyword before the field type. // int myarray[2]; Diagnostic(ErrorCode.ERR_CStyleArray, "[2]"), // (6,21): error CS0270: Array size cannot be specified in a variable declaration (try initializing with a 'new' expression) // int myarray[2]; Diagnostic(ErrorCode.ERR_ArraySizeInDeclaration, "2"), // (7,18): error CS0650: Bad array declarator: To declare a managed array the rank specifier precedes the variable's identifier. To declare a fixed size buffer field, use the fixed keyword before the field type. // MyClass m[0]; Diagnostic(ErrorCode.ERR_CStyleArray, "[0]"), // (7,19): error CS0270: Array size cannot be specified in a variable declaration (try initializing with a 'new' expression) // MyClass m[0]; Diagnostic(ErrorCode.ERR_ArraySizeInDeclaration, "0"), // (8,15): error CS0650: Bad array declarator: To declare a managed array the rank specifier precedes the variable's identifier. To declare a fixed size buffer field, use the fixed keyword before the field type. // byte b[13,5]; Diagnostic(ErrorCode.ERR_CStyleArray, "[13,5]"), // (8,16): error CS0270: Array size cannot be specified in a variable declaration (try initializing with a 'new' expression) // byte b[13,5]; Diagnostic(ErrorCode.ERR_ArraySizeInDeclaration, "13"), // (8,19): error CS0270: Array size cannot be specified in a variable declaration (try initializing with a 'new' expression) // byte b[13,5]; Diagnostic(ErrorCode.ERR_ArraySizeInDeclaration, "5"), // (9,17): error CS0650: Bad array declarator: To declare a managed array the rank specifier precedes the variable's identifier. To declare a fixed size buffer field, use the fixed keyword before the field type. // double d[14,5,6]; Diagnostic(ErrorCode.ERR_CStyleArray, "[14,5,6]"), // (9,18): error CS0270: Array size cannot be specified in a variable declaration (try initializing with a 'new' expression) // double d[14,5,6]; Diagnostic(ErrorCode.ERR_ArraySizeInDeclaration, "14"), // (9,21): error CS0270: Array size cannot be specified in a variable declaration (try initializing with a 'new' expression) // double d[14,5,6]; Diagnostic(ErrorCode.ERR_ArraySizeInDeclaration, "5"), // (9,23): error CS0270: Array size cannot be specified in a variable declaration (try initializing with a 'new' expression) // double d[14,5,6]; Diagnostic(ErrorCode.ERR_ArraySizeInDeclaration, "6") ); } [Fact, WorkItem(535883, "DevDiv")] public void CS0687ERR_AliasQualAsExpression() { var test = @" class Test { public static int Main() { int i = global::MyType(); // CS0687 return 1; } } "; // Semantic error // (6,25): error CS0400: The type or namespace name 'MyType' could not be found in the global namespace (are you missing an assembly reference?) CreateCompilationWithMscorlib(test).VerifyDiagnostics( Diagnostic(ErrorCode.ERR_GlobalSingleTypeNameNotFound, "MyType").WithArguments("MyType", "<global namespace>") ); } [WorkItem(542478, "DevDiv")] [Fact] public void CS0706ERR_BadConstraintType() { var source = @"interface IA<T, U, V> where U : T* where V : T[] { } interface IB<T> { void M<U, V>() where U : T* where V : T[]; }"; CreateCompilationWithMscorlib(source).VerifyDiagnostics( // (2,15): error CS0706: Invalid constraint type. A type used as a constraint must be an interface, a non-sealed class or a type parameter. Diagnostic(ErrorCode.ERR_BadConstraintType, "T*").WithLocation(2, 15), // (3,15): error CS0706: Invalid constraint type. A type used as a constraint must be an interface, a non-sealed class or a type parameter. Diagnostic(ErrorCode.ERR_BadConstraintType, "T[]").WithLocation(3, 15), // (9,19): error CS0706: Invalid constraint type. A type used as a constraint must be an interface, a non-sealed class or a type parameter. Diagnostic(ErrorCode.ERR_BadConstraintType, "T*").WithLocation(9, 19), // (10,19): error CS0706: Invalid constraint type. A type used as a constraint must be an interface, a non-sealed class or a type parameter. Diagnostic(ErrorCode.ERR_BadConstraintType, "T[]").WithLocation(10, 19), // CONSIDER: Dev10 doesn't report these cascading errors. // (2,15): error CS0214: Pointers and fixed size buffers may only be used in an unsafe context Diagnostic(ErrorCode.ERR_UnsafeNeeded, "T*"), // (2,15): error CS0208: Cannot take the address of, get the size of, or declare a pointer to a managed type ('T') Diagnostic(ErrorCode.ERR_ManagedAddr, "T*").WithArguments("T"), // (9,19): error CS0214: Pointers and fixed size buffers may only be used in an unsafe context Diagnostic(ErrorCode.ERR_UnsafeNeeded, "T*"), // (9,19): error CS0208: Cannot take the address of, get the size of, or declare a pointer to a managed type ('T') Diagnostic(ErrorCode.ERR_ManagedAddr, "T*").WithArguments("T")); } [Fact] public void CS0742ERR_ExpectedSelectOrGroup() { var test = @" using System; using System.Linq; public class C { public static int Main() { int[] array = { 1, 2, 3 }; var c = from num in array; return 1; } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_ExpectedSelectOrGroup, ";")); } [Fact] public void CS0743ERR_ExpectedContextualKeywordOn() { var test = @" using System; using System.Linq; public class C { public static int Main() { int[] array1 = { 1, 2, 3 ,4, 5, 6,}; int[] array2 = { 5, 6, 7, 8, 9 }; var c = from x in array1 join y in array2 x equals y select x; return 1; } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_ExpectedContextualKeywordOn, "x") ); } [Fact] public void CS0744ERR_ExpectedContextualKeywordEquals() { var test = @" using System; using System.Linq; public class C { public static int Main() { int[] array1 = { 1, 2, 3 ,4, 5, 6,}; int[] array2 = { 5, 6, 7, 8, 9 }; var c = from x in array1 join y in array2 on x y select x; return 1; } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_ExpectedContextualKeywordEquals, "y")); } [WorkItem(862121, "DevDiv/Personal")] [Fact] public void CS0745ERR_ExpectedContextualKeywordBy() { var test = @" using System; using System.Linq; public class C { public static int Main() { int[] array1 = { 1, 2, 3 ,4, 5, 6,}; int[] array2 = { 5, 6, 7, 8, 9 }; var c = from x in array1 join y in array2 on x equals y group x y; return 1; } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_ExpectedContextualKeywordBy, "y")); } [Fact] public void CS0746ERR_InvalidAnonymousTypeMemberDeclarator() { var test = @" using System; public class C { public static int Main() { int i = 1; var t = new { a.b = 1 }; return 1; } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_InvalidAnonymousTypeMemberDeclarator, "a.b = 1")); } [Fact] public void CS0746ERR_InvalidAnonymousTypeMemberDeclarator_2() { var test = @" using System; public class C { public static void Main() { string s = """"; var t = new { s.Length = 1 }; } } "; ParseAndValidate(test, // (8,23): error CS0746: Invalid anonymous type member declarator. Anonymous type members must be declared with a member assignment, simple name or member access. // var t = new { s.Length = 1 }; Diagnostic(ErrorCode.ERR_InvalidAnonymousTypeMemberDeclarator, "s.Length = 1")); } [Fact] public void CS0746ERR_InvalidAnonymousTypeMemberDeclarator_3() { var test = @" using System; public class C { public static void Main() { string s = """"; var t = new { s.ToString() = 1 }; } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_InvalidAnonymousTypeMemberDeclarator, "s.ToString() = 1")); } [Fact] public void CS0748ERR_InconsistentLambdaParameterUsage() { var test = @" class C { delegate T Func<T>(); delegate T Func<A0, T>(A0 a0); delegate T Func<A0, A1, T>(A0 a0, A1 a1); delegate T Func<A0, A1, A2, A3, T>(A0 a0, A1 a1, A2 a2, A3 a3); static void X() { Func<int,int> f1 = (int x, y) => 1; // err: mixed parameters Func<int,int> f2 = (x, int y) => 1; // err: mixed parameters Func<int,int> f3 = (int x, int y, z) => 1; // err: mixed parameters Func<int,int> f4 = (int x, y, int z) => 1; // err: mixed parameters Func<int,int> f5 = (x, int y, int z) => 1; // err: mixed parameters Func<int,int> f6 = (x, y, int z) => 1; // err: mixed parameters } } "; ParseAndValidate(test, // (10,41): error CS0748: Inconsistent lambda parameter usage; parameter types must be all explicit or all implicit // Func<int,int> f1 = (int x, y) => 1; // err: mixed parameters Diagnostic(ErrorCode.ERR_InconsistentLambdaParameterUsage, "y"), // (11,37): error CS0748: Inconsistent lambda parameter usage; parameter types must be all explicit or all implicit // Func<int,int> f2 = (x, int y) => 1; // err: mixed parameters Diagnostic(ErrorCode.ERR_InconsistentLambdaParameterUsage, "int"), // (12,48): error CS0748: Inconsistent lambda parameter usage; parameter types must be all explicit or all implicit // Func<int,int> f3 = (int x, int y, z) => 1; // err: mixed parameters Diagnostic(ErrorCode.ERR_InconsistentLambdaParameterUsage, "z"), // (13,41): error CS0748: Inconsistent lambda parameter usage; parameter types must be all explicit or all implicit // Func<int,int> f4 = (int x, y, int z) => 1; // err: mixed parameters Diagnostic(ErrorCode.ERR_InconsistentLambdaParameterUsage, "y"), // (14,37): error CS0748: Inconsistent lambda parameter usage; parameter types must be all explicit or all implicit // Func<int,int> f5 = (x, int y, int z) => 1; // err: mixed parameters Diagnostic(ErrorCode.ERR_InconsistentLambdaParameterUsage, "int"), // (14,44): error CS0748: Inconsistent lambda parameter usage; parameter types must be all explicit or all implicit // Func<int,int> f5 = (x, int y, int z) => 1; // err: mixed parameters Diagnostic(ErrorCode.ERR_InconsistentLambdaParameterUsage, "int"), // (15,40): error CS0748: Inconsistent lambda parameter usage; parameter types must be all explicit or all implicit // Func<int,int> f6 = (x, y, int z) => 1; // err: mixed parameters Diagnostic(ErrorCode.ERR_InconsistentLambdaParameterUsage, "int")); } [WorkItem(535915, "DevDiv")] [Fact] public void CS0839ERR_MissingArgument() { // Diff error var test = @" using System; namespace TestNamespace { class Test { static int Add(int i, int j) { return i + j; } static int Main() { int i = Test.Add( , 5); return 1; } } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_MissingArgument, "")); } [WorkItem(863064, "DevDiv/Personal")] [Fact] public void CS1001ERR_IdentifierExpected() { var test = @" public class clx { enum splitch { 'a' } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_IdentifierExpected, "")); } [Fact, WorkItem(542408, "DevDiv")] public void CS1001ERR_IdentifierExpected_2() { var test = @" enum "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_IdentifierExpected, ""), Diagnostic(ErrorCode.ERR_LbraceExpected, ""), Diagnostic(ErrorCode.ERR_RbraceExpected, "")); } [Fact, WorkItem(542408, "DevDiv")] public void CS1001ERR_IdentifierExpected_5() { var test = @" using System; struct "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_IdentifierExpected, ""), Diagnostic(ErrorCode.ERR_LbraceExpected, ""), Diagnostic(ErrorCode.ERR_RbraceExpected, "")); } [Fact, WorkItem(542416, "DevDiv")] public void CS1001ERR_IdentifierExpected_3() { var test = @" using System; class NamedExample { static void Main(string[] args) { ExampleMethod(3, optionalint:4); } static void ExampleMethod(int required, string 1 = ""default string"",int optionalint = 10) { } } "; ParseAndValidate(test, // (9,52): error CS1001: Identifier expected // static void ExampleMethod(int required, string 1 = "default string",int optionalint = 10) Diagnostic(ErrorCode.ERR_IdentifierExpected, "1"), // (9,52): error CS1003: Syntax error, ',' expected // static void ExampleMethod(int required, string 1 = "default string",int optionalint = 10) Diagnostic(ErrorCode.ERR_SyntaxError, "1").WithArguments(",", "")); } [Fact, WorkItem(542416, "DevDiv")] public void CS1001ERR_IdentifierExpected_4() { var test = @" using System; class NamedExample { static void Main(string[] args) { ExampleMethod(3, optionalint:4); } static void ExampleMethod(int required, ,int optionalint = 10) { } } "; // Extra errors ParseAndValidate(test, // (9,45): error CS1031: Type expected // static void ExampleMethod(int required, ,int optionalint = 10) Diagnostic(ErrorCode.ERR_TypeExpected, ","), // (9,45): error CS1001: Identifier expected // static void ExampleMethod(int required, ,int optionalint = 10) Diagnostic(ErrorCode.ERR_IdentifierExpected, ",")); } [Fact, WorkItem(542416, "DevDiv")] public void CS1001ERR_IdentifierExpected_6() { var test = @" class Program { const int max = 10; static void M(int p2 = max is int?1,) { } static void Main() { M(1); } } "; // Extra errors ParseAndValidate(test, // (5,40): error CS1003: Syntax error, ':' expected // static void M(int p2 = max is int?1,) Diagnostic(ErrorCode.ERR_SyntaxError, ",").WithArguments(":", ","), // (5,40): error CS1525: Invalid expression term ',' // static void M(int p2 = max is int?1,) Diagnostic(ErrorCode.ERR_InvalidExprTerm, ",").WithArguments(","), // (5,41): error CS1031: Type expected // static void M(int p2 = max is int?1,) Diagnostic(ErrorCode.ERR_TypeExpected, ")"), // (5,41): error CS1001: Identifier expected // static void M(int p2 = max is int?1,) Diagnostic(ErrorCode.ERR_IdentifierExpected, ")")); } [Fact] public void CS1002ERR_SemicolonExpected() { var test = @" namespace x { abstract public class clx { int i // CS1002, missing semicolon public static int Main() { return 0; } } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_SemicolonExpected, "")); } [WorkItem(528008, "DevDiv")] [Fact] public void CS1002ERR_SemicolonExpected_2() { var test = @" class Program { static void Main(string[] args) { goto Lab2,Lab1; Lab1: System.Console.WriteLine(""1""); Lab2: System.Console.WriteLine(""2""); } } "; ParseAndValidate(test, // (6,18): error CS1002: ; expected // goto Lab2,Lab1; Diagnostic(ErrorCode.ERR_SemicolonExpected, ","), // (6,18): error CS1513: } expected // goto Lab2,Lab1; Diagnostic(ErrorCode.ERR_RbraceExpected, ",")); } [WorkItem(527944, "DevDiv")] [Fact] public void CS1002ERR_SemicolonExpected_3() { var test = @" class Program { static void Main(string[] args) { goto L1; return; L1: //invalid } } "; ParseAndValidate(test, // (8,8): error CS1525: Invalid expression term '}' // L1: //invalid Diagnostic(ErrorCode.ERR_InvalidExprTerm, "").WithArguments("}"), // (8,8): error CS1002: ; expected // L1: //invalid Diagnostic(ErrorCode.ERR_SemicolonExpected, "")); } [Fact()] public void CS1002ERR_SemicolonExpected_4() { var test = @" class Program { static void Main(string[] args) { string target = ""t1""; switch (target) { label1: case ""t1"": goto label1; } } } "; // Extra errors ParseAndValidate(test, // (8,10): error CS1513: } expected // { Diagnostic(ErrorCode.ERR_RbraceExpected, ""), // (9,16): error CS1525: Invalid expression term 'case' // label1: Diagnostic(ErrorCode.ERR_InvalidExprTerm, "").WithArguments("case"), // (9,16): error CS1002: ; expected // label1: Diagnostic(ErrorCode.ERR_SemicolonExpected, ""), // (9,16): error CS1513: } expected // label1: Diagnostic(ErrorCode.ERR_RbraceExpected, ""), // (10,18): error CS1002: ; expected // case "t1": Diagnostic(ErrorCode.ERR_SemicolonExpected, ":"), // (10,18): error CS1513: } expected // case "t1": Diagnostic(ErrorCode.ERR_RbraceExpected, ":"), // (14,1): error CS1022: Type or namespace definition, or end-of-file expected // } Diagnostic(ErrorCode.ERR_EOFExpected, "}")); } // TODO: diff error CS1525 vs. CS1513 [Fact] public void CS1003ERR_SyntaxError() { var test = @" namespace x { public class b { public static void Main() { int[] a; a[); } } } "; ParseAndValidate(test, // (8,15): error CS1003: Syntax error, ']' expected // a[); Diagnostic(ErrorCode.ERR_SyntaxError, ")").WithArguments("]", ")"), // (8,15): error CS1002: ; expected // a[); Diagnostic(ErrorCode.ERR_SemicolonExpected, ")"), // (8,15): error CS1513: } expected // a[); Diagnostic(ErrorCode.ERR_RbraceExpected, ")")); } [Fact] public void CS1003ERR_SyntaxError_ForeachExpected1() { var test = @" public class b { public void Main() { for (var v in } } "; //the first error should be // (6,9): error CS1003: Syntax error, 'foreach' expected // don't care about any others. var parsedTree = ParseWithRoundTripCheck(test); var firstDiag = parsedTree.GetDiagnostics().Take(1); firstDiag.Verify(Diagnostic(ErrorCode.ERR_SyntaxError, "for").WithArguments("foreach", "for")); } [Fact] public void CS1004ERR_DuplicateModifier() { var test = @" namespace x { abstract public class clx { int i; public public static int Main() // CS1004, two public keywords { return 0; } } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_DuplicateModifier, "public").WithArguments("public")); } [Fact] public void CS1007ERR_DuplicateAccessor() { var test = @"using System; public class Container { public int Prop1{ protected get{return 1;} set {} protected get { return 1;} } public static int Prop2{ get{return 1;} internal set {} internal set{} } public int this[int i]{ protected get{return 1;} internal set {} protected get { return 1;} internal set {} } } "; ParseAndValidate(test, // (5,65): error CS1007: Property accessor already defined // public int Prop1{ protected get{return 1;} set {} protected get { return 1;} } Diagnostic(ErrorCode.ERR_DuplicateAccessor, "get"), // (6,70): error CS1007: Property accessor already defined // public static int Prop2{ get{return 1;} internal set {} internal set{} } Diagnostic(ErrorCode.ERR_DuplicateAccessor, "set"), // (7,80): error CS1007: Property accessor already defined // public int this[int i]{ protected get{return 1;} internal set {} protected get { return 1;} internal set {} } Diagnostic(ErrorCode.ERR_DuplicateAccessor, "get"), // (7,106): error CS1007: Property accessor already defined // public int this[int i]{ protected get{return 1;} internal set {} protected get { return 1;} internal set {} } Diagnostic(ErrorCode.ERR_DuplicateAccessor, "set")); } [Fact] public void CS1008ERR_IntegralTypeExpected01() { CreateCompilationWithMscorlib( @"namespace x { abstract public class clx { enum E : sbyte { x, y, z } // no error enum F : char { x, y, z } // CS1008, char not valid type for enums enum G : short { A, B, C } // no error enum H : System.Int16 { A, B, C } // CS1008, short not System.Int16 } } ") .VerifyDiagnostics( // (6,18): error CS1008: Type byte, sbyte, short, ushort, int, uint, long, or ulong expected // enum F : char { x, y, z } // CS1008, char not valid type for enums Diagnostic(ErrorCode.ERR_IntegralTypeExpected, "char").WithLocation(6, 18) ); } [Fact] public void CS1008ERR_IntegralTypeExpected02() { CreateCompilationWithMscorlib( @"interface I { } class C { } enum E { } enum F : I { A } enum G : C { A } enum H : E { A } enum K : System.Enum { A } enum L : string { A } enum M : float { A } enum N : decimal { A } ") .VerifyDiagnostics( Diagnostic(ErrorCode.ERR_IntegralTypeExpected, "I").WithLocation(4, 10), Diagnostic(ErrorCode.ERR_IntegralTypeExpected, "C").WithLocation(5, 10), Diagnostic(ErrorCode.ERR_IntegralTypeExpected, "E").WithLocation(6, 10), Diagnostic(ErrorCode.ERR_IntegralTypeExpected, "System.Enum").WithLocation(7, 10), Diagnostic(ErrorCode.ERR_IntegralTypeExpected, "string").WithLocation(8, 10), Diagnostic(ErrorCode.ERR_IntegralTypeExpected, "float").WithLocation(9, 10), Diagnostic(ErrorCode.ERR_IntegralTypeExpected, "decimal").WithLocation(10, 10)); } [Fact, WorkItem(667303)] public void CS1008ERR_IntegralTypeExpected03() { ParseAndValidate(@"enum E : byt { A, B }"); // no *parser* errors. This is a semantic error now. } [Fact, WorkItem(540117, "DevDiv")] public void CS1009ERR_IllegalEscape_Strings() { var text = @" class Program { static void Main() { string s; s = ""\u""; s = ""\u0""; s = ""\u00""; s = ""\u000""; s = ""a\uz""; s = ""a\u0z""; s = ""a\u00z""; s = ""a\u000z""; } } "; ParseAndValidate(text, // (7,14): error CS1009: Unrecognized escape sequence Diagnostic(ErrorCode.ERR_IllegalEscape, @"\u"), // (8,14): error CS1009: Unrecognized escape sequence Diagnostic(ErrorCode.ERR_IllegalEscape, @"\u0"), // (9,14): error CS1009: Unrecognized escape sequence Diagnostic(ErrorCode.ERR_IllegalEscape, @"\u00"), // (10,14): error CS1009: Unrecognized escape sequence Diagnostic(ErrorCode.ERR_IllegalEscape, @"\u000"), // (12,15): error CS1009: Unrecognized escape sequence Diagnostic(ErrorCode.ERR_IllegalEscape, @"\u"), // (13,15): error CS1009: Unrecognized escape sequence Diagnostic(ErrorCode.ERR_IllegalEscape, @"\u0"), // (14,15): error CS1009: Unrecognized escape sequence Diagnostic(ErrorCode.ERR_IllegalEscape, @"\u00"), // (15,15): error CS1009: Unrecognized escape sequence Diagnostic(ErrorCode.ERR_IllegalEscape, @"\u000") ); } [Fact, WorkItem(528100, "DevDiv")] public void CS1009ERR_IllegalEscape_Identifiers() { var text = @"using System; class Program { static void Main() { int \u; int \u0; int \u00; int \u000; int a\uz; int a\u0z; int a\u00z; int a\u000z; } } "; ParseAndValidate(text, // (6,13): error CS1009: Unrecognized escape sequence // int \u; Diagnostic(ErrorCode.ERR_IllegalEscape, @"\u"), // (7,13): error CS1009: Unrecognized escape sequence // int \u0; Diagnostic(ErrorCode.ERR_IllegalEscape, @"\u0"), // (7,13): error CS1056: Unexpected character '\u0' // int \u0; Diagnostic(ErrorCode.ERR_UnexpectedCharacter, "").WithArguments(@"\u0"), // (8,13): error CS1009: Unrecognized escape sequence // int \u00; Diagnostic(ErrorCode.ERR_IllegalEscape, @"\u00"), // (8,13): error CS1056: Unexpected character '\u00' // int \u00; Diagnostic(ErrorCode.ERR_UnexpectedCharacter, "").WithArguments(@"\u00"), // (9,13): error CS1009: Unrecognized escape sequence // int \u000; Diagnostic(ErrorCode.ERR_IllegalEscape, @"\u000"), // (9,13): error CS1056: Unexpected character '\u000' // int \u000; Diagnostic(ErrorCode.ERR_UnexpectedCharacter, "").WithArguments(@"\u000"), // (11,14): error CS1009: Unrecognized escape sequence // int a\uz; Diagnostic(ErrorCode.ERR_IllegalEscape, @"\u"), // (12,14): error CS1009: Unrecognized escape sequence // int a\u0z; Diagnostic(ErrorCode.ERR_IllegalEscape, @"\u0"), // (12,14): error CS1056: Unexpected character '\u0' // int a\u0z; Diagnostic(ErrorCode.ERR_UnexpectedCharacter, "").WithArguments(@"\u0"), // (13,14): error CS1009: Unrecognized escape sequence // int a\u00z; Diagnostic(ErrorCode.ERR_IllegalEscape, @"\u00"), // (13,14): error CS1056: Unexpected character '\u00' // int a\u00z; Diagnostic(ErrorCode.ERR_UnexpectedCharacter, "").WithArguments(@"\u00"), // (14,14): error CS1009: Unrecognized escape sequence // int a\u000z; Diagnostic(ErrorCode.ERR_IllegalEscape, @"\u000"), // (14,14): error CS1056: Unexpected character '\u000' // int a\u000z; Diagnostic(ErrorCode.ERR_UnexpectedCharacter, "").WithArguments(@"\u000"), // NOTE: Dev11 doesn't report these cascading diagnostics. // (7,13): error CS1001: Identifier expected // int \u0; Diagnostic(ErrorCode.ERR_IdentifierExpected, @"\u0"), // (8,13): error CS1001: Identifier expected // int \u00; Diagnostic(ErrorCode.ERR_IdentifierExpected, @"\u00"), // (9,13): error CS1001: Identifier expected // int \u000; Diagnostic(ErrorCode.ERR_IdentifierExpected, @"\u000"), // (12,17): error CS1002: ; expected // int a\u0z; Diagnostic(ErrorCode.ERR_SemicolonExpected, "z"), // (13,18): error CS1002: ; expected // int a\u00z; Diagnostic(ErrorCode.ERR_SemicolonExpected, "z"), // (14,19): error CS1002: ; expected // int a\u000z; Diagnostic(ErrorCode.ERR_SemicolonExpected, "z") ); } [WorkItem(535921, "DevDiv")] [Fact] public void CS1013ERR_InvalidNumber() { // Diff error var test = @" namespace x { public class a { public static int Main() { return 1; } } public class b { public int d = 0x; } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_InvalidNumber, "")); } [WorkItem(862116, "DevDiv/Personal")] [Fact] public void CS1014ERR_GetOrSetExpected() { var test = @"using System; public sealed class Container { public string Prop1 { protected } public string Prop2 { get { return null; } protected } public string Prop3 { get { return null; } protected set { } protected } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_GetOrSetExpected, "}"), Diagnostic(ErrorCode.ERR_GetOrSetExpected, "}"), Diagnostic(ErrorCode.ERR_GetOrSetExpected, "}")); } [Fact] public void CS1015ERR_ClassTypeExpected() { var test = @" using System; public class Test { public static void Main() { try { } catch(int) { } catch(byte) { } } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_ClassTypeExpected, "int"), Diagnostic(ErrorCode.ERR_ClassTypeExpected, "byte")); } [WorkItem(863382, "DevDiv/Personal")] [Fact] public void CS1016ERR_NamedArgumentExpected() { var test = @" namespace x { [foo(a=5, b)] class foo { } public class a { public static int Main() { return 1; } } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_NamedArgumentExpected, "b")); } [Fact] public void CS1017ERR_TooManyCatches() { var test = @" using System; namespace nms { public class S : Exception { }; public class S1 : Exception { }; public class mine { private static int retval = 2; public static int Main() { try { throw new S(); } catch {} catch (S1) {} catch (S) {} catch if (false) {} if (retval == 0) Console.WriteLine(""PASS""); else Console.WriteLine(""FAIL""); return retval; } }; } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_TooManyCatches, "catch"), Diagnostic(ErrorCode.ERR_TooManyCatches, "catch"), Diagnostic(ErrorCode.ERR_TooManyCatches, "catch")); } [Fact] public void CS1017ERR_TooManyCatches_NoError() { var test = @" using System; namespace nms { public class S : Exception { }; public class S1 : Exception { }; public class mine { private static int retval = 2; public static int Main() { try { throw new S(); } catch if (true) {} catch (S1) {} catch (S) {} if (retval == 0) Console.WriteLine(""PASS""); else Console.WriteLine(""FAIL""); return retval; } }; } "; ParseAndValidate(test); } [Fact] public void CS1018ERR_ThisOrBaseExpected() { var test = @" namespace x { public class C { } public class a : C { public a () : {} public static int Main() { return 1; } } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_ThisOrBaseExpected, "{")); } [WorkItem(535924, "DevDiv")] [Fact] public void CS1019ERR_OvlUnaryOperatorExpected() { // Diff errors var test = @" namespace x { public class ii { int i { get { return 0; } } } public class a { public static ii operator ii(a aa) // replace ii with explicit or implicit { return new ii(); } public static void Main() { } } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_OvlUnaryOperatorExpected, "ii")); } [WorkItem(906502, "DevDiv/Personal")] [Fact] public void CS1020ERR_OvlBinaryOperatorExpected() { // Diff error var test = @" namespace x { public class iii { public static implicit operator int(iii x) { return 0; } public static implicit operator iii(int x) { return null; } public static int operator ++(iii aa, int bb) // change ++ to + { return 0; } public static void Main() { } } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_OvlBinaryOperatorExpected, "++") ); } [Fact] public void CS1022ERR_EOFExpected() { var test = @" }}}}} "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_EOFExpected, "}"), Diagnostic(ErrorCode.ERR_EOFExpected, "}"), Diagnostic(ErrorCode.ERR_EOFExpected, "}"), Diagnostic(ErrorCode.ERR_EOFExpected, "}"), Diagnostic(ErrorCode.ERR_EOFExpected, "}")); } [Fact] public void CS1022ERR_EOFExpected02() { var test = @" > Roslyn.Utilities.dll! Basic"; CreateCompilationWithMscorlib(test).VerifyDiagnostics( // (1,2): error CS1022: Type or namespace definition, or end-of-file expected Diagnostic(ErrorCode.ERR_EOFExpected, ">").WithLocation(1, 2), // (1,21): error CS0116: A namespace does not directly contain members such as fields or methods Diagnostic(ErrorCode.ERR_NamespaceUnexpected, "dll").WithLocation(1, 21), // (1,24): error CS1022: Type or namespace definition, or end-of-file expected Diagnostic(ErrorCode.ERR_EOFExpected, "!").WithLocation(1, 24), // (1,27): error CS0116: A namespace does not directly contain members such as fields or methods Diagnostic(ErrorCode.ERR_NamespaceUnexpected, "Basic").WithLocation(1, 27)); } [Fact] public void CS1023ERR_BadEmbeddedStmt() { var test = @" struct S { } public class a { public static int Main() { for (int i=0; i < 3; i++) MyLabel: {} return 1; } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_BadEmbeddedStmt, "MyLabel: {}")); } // Preprocessor: [Fact] public void CS1024ERR_PPDirectiveExpectedpp() { var test = @"#import System;"; ParseAndValidate(test, // (1,2): error CS1024: Preprocessor directive expected // #import System; Diagnostic(ErrorCode.ERR_PPDirectiveExpected, "import")); } // Preprocessor: [Fact] public void CS1025ERR_EndOfPPLineExpectedpp() { var test = @" public class Test { # line hidden 123 public static void MyHiddenMethod() { } #undef x y public static void Main() { } } "; // Extra Errors ParseAndValidate(test, // (4,15): error CS1025: Single-line comment or end-of-line expected // # line hidden 123 Diagnostic(ErrorCode.ERR_EndOfPPLineExpected, "123"), // (9,6): error CS1032: Cannot define/undefine preprocessor symbols after first token in file // #undef x y Diagnostic(ErrorCode.ERR_PPDefFollowsToken, "undef"), // (9,14): error CS1025: Single-line comment or end-of-line expected // #undef x y Diagnostic(ErrorCode.ERR_EndOfPPLineExpected, "y")); } [WorkItem(863388, "DevDiv/Personal")] [Fact] public void CS1026ERR_CloseParenExpected() { var test = @" #if (fred == barney #endif namespace x { public class a { public static int Main() { return 1; } } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_CloseParenExpected, "")); } // Preprocessor: [Fact] public void CS1027ERR_EndifDirectiveExpectedpp() { var test = @" public class Test { # if true } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_EndifDirectiveExpected, "")); } // Preprocessor: [Fact] public void CS1028ERR_UnexpectedDirectivepp() { var test = @" class Test { #endregion public static int Main() { return 0; } # endif } "; ParseAndValidate(test, // (4,3): error CS1028: Unexpected preprocessor directive // #endregion Diagnostic(ErrorCode.ERR_UnexpectedDirective, "#endregion"), // (9,1): error CS1028: Unexpected preprocessor directive // # endif Diagnostic(ErrorCode.ERR_UnexpectedDirective, "# endif")); } // Preprocessor: [Fact] public void CS1029ERR_ErrorDirectivepp() { var test = @" public class Test { # error (12345) } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_ErrorDirective, "(12345)").WithArguments("(12345)")); } [WorkItem(541954, "DevDiv")] [Fact] public void CS1029ERR_ErrorDirectiveppNonLatin() { var test = "public class Test\r\n{\r\n# error \u0444\u0430\u0439\u043B\r\n}"; var parsedTree = ParseWithRoundTripCheck(test); var error = parsedTree.GetDiagnostics().Single(); Assert.Equal((int)ErrorCode.ERR_ErrorDirective, error.Code); Assert.Equal("error CS1029: #error: '\u0444\u0430\u0439\u043B'", CSharpDiagnosticFormatter.Instance.Format(error.WithLocation(Location.None))); } [Fact(), WorkItem(526991, "DevDiv")] public void CS1031ERR_TypeExpected01() { // Diff error - CS1003 var test = @" namespace x { interface ii { int i { get; } } public class a { public operator ii(a aa) { return new ii(); } } } "; ParseAndValidate(test, // (13,16): error CS1003: Syntax error, 'explicit' expected // public operator ii(a aa) Diagnostic(ErrorCode.ERR_SyntaxError, "operator").WithArguments("explicit", "operator") ); } [Fact] public void CS1031ERR_TypeExpected02() { var text = @"namespace x { public class a { public static void Main() { e = new base; // CS1031, not a type e = new this; // CS1031, not a type e = new (); // CS1031, not a type } } } "; // TODO: this appears to be a severe regression from Dev10, which neatly reported 3 errors. ParseAndValidate(text, // (7,21): error CS1031: Type expected // e = new base; // CS1031, not a type Diagnostic(ErrorCode.ERR_TypeExpected, "base"), // (7,21): error CS1526: A new expression requires (), [], or {} after type // e = new base; // CS1031, not a type Diagnostic(ErrorCode.ERR_BadNewExpr, "base"), // (7,21): error CS1002: ; expected // e = new base; // CS1031, not a type Diagnostic(ErrorCode.ERR_SemicolonExpected, "base"), // (8,21): error CS1031: Type expected // e = new this; // CS1031, not a type Diagnostic(ErrorCode.ERR_TypeExpected, "this"), // (8,21): error CS1526: A new expression requires (), [], or {} after type // e = new this; // CS1031, not a type Diagnostic(ErrorCode.ERR_BadNewExpr, "this"), // (8,21): error CS1002: ; expected // e = new this; // CS1031, not a type Diagnostic(ErrorCode.ERR_SemicolonExpected, "this"), // (9,21): error CS1031: Type expected // e = new (); // CS1031, not a type Diagnostic(ErrorCode.ERR_TypeExpected, "(") ); } [WorkItem(541347, "DevDiv")] [Fact] public void CS1031ERR_TypeExpected03() { var test = @" using System; public class Extensions { //Extension method must be static public Extensions(this int i) {} public static void Main(){} } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_IdentifierExpectedKW, "this").WithArguments("", "this")); } [Fact] public void CS1031ERR_TypeExpected04_RoslynCS1001() { var test = @"public struct S<> { public void M<>() {} } "; ParseAndValidate(test, // (1,17): error CS1001: Identifier expected // public struct S<> Diagnostic(ErrorCode.ERR_IdentifierExpected, ">"), // (3,19): error CS1001: Identifier expected // public void M<>() {} Diagnostic(ErrorCode.ERR_IdentifierExpected, ">")); } [Fact] public void CS1037ERR_OvlOperatorExpected() { var test = @" class A { public static int explicit operator () { return 0; } public static A operator () { return null; } }"; ParseAndValidate(test, // (4,19): error CS1553: Declaration is not valid; use '+ operator <dest-type> (...' instead // public static int explicit operator () Diagnostic(ErrorCode.ERR_BadOperatorSyntax, "int").WithArguments("+"), // (4,23): error CS1003: Syntax error, 'operator' expected // public static int explicit operator () Diagnostic(ErrorCode.ERR_SyntaxError, "explicit").WithArguments("operator", "explicit"), // (4,23): error CS1037: Overloadable operator expected // public static int explicit operator () Diagnostic(ErrorCode.ERR_OvlOperatorExpected, "explicit"), // (4,32): error CS1003: Syntax error, '(' expected // public static int explicit operator () Diagnostic(ErrorCode.ERR_SyntaxError, "operator").WithArguments("(", "operator"), // (4,32): error CS1041: Identifier expected; 'operator' is a keyword // public static int explicit operator () Diagnostic(ErrorCode.ERR_IdentifierExpectedKW, "operator").WithArguments("", "operator"), // (8,30): error CS1037: Overloadable operator expected // public static A operator () Diagnostic(ErrorCode.ERR_OvlOperatorExpected, "("), // (8,31): error CS1003: Syntax error, '(' expected // public static A operator () Diagnostic(ErrorCode.ERR_SyntaxError, ")").WithArguments("(", ")")); } // Preprocessor: [Fact] public void CS1038ERR_EndRegionDirectiveExpectedpp() { var test = @" class Test { # region } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_EndRegionDirectiveExpected, "")); } [Fact, WorkItem(535926, "DevDiv")] public void CS1041ERR_IdentifierExpectedKW() { // Diff errors var test = @" class MyClass { public void f(int long) { // CS1041 } public static int Main() { return 1; } } "; ParseAndValidate(test, // (3,23): error CS1001: Identifier expected // public void f(int long) { // CS1041 Diagnostic(ErrorCode.ERR_IdentifierExpected, "long"), // (3,23): error CS1003: Syntax error, ',' expected // public void f(int long) { // CS1041 Diagnostic(ErrorCode.ERR_SyntaxError, "long").WithArguments(",", "long"), // (3,27): error CS1001: Identifier expected // public void f(int long) { // CS1041 Diagnostic(ErrorCode.ERR_IdentifierExpected, ")")); } [WorkItem(919476, "DevDiv/Personal")] [Fact] public void CS1041RegressKeywordInEnumField() { var test = @"enum ColorA { const Red, Green = 10, readonly Blue, }"; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_IdentifierExpectedKW, "").WithArguments("", "const"), Diagnostic(ErrorCode.ERR_IdentifierExpectedKW, "").WithArguments("", "readonly")); } [Fact, WorkItem(541347, "DevDiv")] public void CS1041ERR_IdentifierExpectedKW02() { var test = @"class C { C(this object o) { } }"; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_IdentifierExpectedKW, "this").WithArguments("", "this")); } [Fact, WorkItem(541347, "DevDiv")] public void CS1041ERR_IdentifierExpectedKW03() { var test = @"class C { object this[this object o] { get { return null; } } }"; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_IdentifierExpectedKW, "this").WithArguments("", "this") ); } [Fact, WorkItem(541347, "DevDiv")] public void CS1041ERR_IdentifierExpectedKW04() { var test = @"delegate void D(this object o);"; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_IdentifierExpectedKW, "this").WithArguments("", "this")); } [Fact, WorkItem(541347, "DevDiv")] public void CS1041ERR_IdentifierExpectedKW05() { var test = @"delegate void D(object o); class C { static void M() { D d = delegate (this object o) { }; } }"; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_CloseParenExpected, "this"), Diagnostic(ErrorCode.ERR_LbraceExpected, "this"), Diagnostic(ErrorCode.ERR_SemicolonExpected, "object"), Diagnostic(ErrorCode.ERR_SemicolonExpected, ")"), Diagnostic(ErrorCode.ERR_RbraceExpected, ")"), Diagnostic(ErrorCode.ERR_SemicolonExpected, ")"), Diagnostic(ErrorCode.ERR_RbraceExpected, ")")); } [Fact, WorkItem(541347, "DevDiv")] public void CS1041ERR_IdentifierExpectedKW06() { var test = @"delegate object D(object o); class C { static void M() { D d = (this object o) => null; } }"; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_CloseParenExpected, "object"), Diagnostic(ErrorCode.ERR_SemicolonExpected, "object"), Diagnostic(ErrorCode.ERR_SemicolonExpected, ")"), Diagnostic(ErrorCode.ERR_RbraceExpected, ")")); } // TODO: extra error CS1014 [Fact] public void CS1043ERR_SemiOrLBraceExpected() { var test = @" using System; public class Test { public int Prop { get return 1; } public static int Main() { return 1; } } "; ParseAndValidate(test, // (7,13): error CS1043: { or ; expected // get return 1; Diagnostic(ErrorCode.ERR_SemiOrLBraceExpected, "return"), // (9,15): error CS1014: A get or set accessor expected // public static int Main() Diagnostic(ErrorCode.ERR_GetOrSetExpected, "int"), // (9,15): error CS1513: } expected // public static int Main() Diagnostic(ErrorCode.ERR_RbraceExpected, "int")); } [Fact] public void CS1044ERR_MultiTypeInDeclaration() { var test = @" using System; // two normal classes... public class Res1 : IDisposable { public void Dispose() { } public void Func() { } public void Throw() { } } public class Res2 : IDisposable { public void Dispose() { } public void Func() { } public void Throw() { } } public class Test { public static int Main() { using ( Res1 res1 = new Res1(), Res2 res2 = new Res2()) { res1.Func(); res2.Func(); } return 1; } } "; // Extra Errors ParseAndValidate(test, // (36,9): error CS1044: Cannot use more than one type in a for, using, fixed, or declaration statement // Res2 res2 = new Res2()) Diagnostic(ErrorCode.ERR_MultiTypeInDeclaration, "Res2"), // (36,14): error CS1026: ) expected // Res2 res2 = new Res2()) Diagnostic(ErrorCode.ERR_CloseParenExpected, "res2"), // (36,31): error CS1002: ; expected // Res2 res2 = new Res2()) Diagnostic(ErrorCode.ERR_SemicolonExpected, ")"), // (36,31): error CS1513: } expected // Res2 res2 = new Res2()) Diagnostic(ErrorCode.ERR_RbraceExpected, ")")); } [WorkItem(863395, "DevDiv/Personal")] [Fact] public void CS1055ERR_AddOrRemoveExpected() { // TODO: extra errors var test = @" delegate void del(); class Test { public event del MyEvent { return value; } public static int Main() { return 1; } } "; ParseAndValidate(test, // (7,9): error CS1055: An add or remove accessor expected // return value; Diagnostic(ErrorCode.ERR_AddOrRemoveExpected, "return"), // (7,16): error CS1055: An add or remove accessor expected // return value; Diagnostic(ErrorCode.ERR_AddOrRemoveExpected, "value"), // (7,21): error CS0073: An add or remove accessor must have a body // return value; Diagnostic(ErrorCode.ERR_AddRemoveMustHaveBody, ";")); } [WorkItem(536956, "DevDiv")] [Fact] public void CS1065ERR_DefaultValueNotAllowed() { var test = @" class A { delegate void D(int x); D d1 = delegate(int x = 42) { }; } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_DefaultValueNotAllowed, "=")); } [Fact] public void CS1065ERR_DefaultValueNotAllowed_2() { var test = @" class A { delegate void D(int x, int y); D d1 = delegate(int x, int y = 42) { }; } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_DefaultValueNotAllowed, "=")); } [WorkItem(540251, "DevDiv")] [Fact] public void CS7014ERR_AttributesNotAllowed() { var test = @" using System; class Program { static void Main() { const string message = ""the parameter is obsolete""; Action<int> a = delegate ( [ObsoleteAttribute(message)] [ObsoleteAttribute(message)] int x, [ObsoleteAttribute(message)] int y ) { }; } } "; ParseAndValidate(test, // (10,13): error CS7014: Attributes are not valid in this context. // [ObsoleteAttribute(message)] [ObsoleteAttribute(message)] int x, Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[ObsoleteAttribute(message)]"), // (10,42): error CS7014: Attributes are not valid in this context. // [ObsoleteAttribute(message)] [ObsoleteAttribute(message)] int x, Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[ObsoleteAttribute(message)]"), // (11,13): error CS7014: Attributes are not valid in this context. // [ObsoleteAttribute(message)] int y Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[ObsoleteAttribute(message)]")); } [WorkItem(863401, "DevDiv/Personal")] [Fact] public void CS1101ERR_BadRefWithThis() { // No error var test = @" using System; public static class Extensions { //No type parameters public static void Foo(ref this int i) {} //Single type parameter public static void Foo<T>(ref this T t) {} //Multiple type parameters public static void Foo<T,U,V>(ref this U u) {} } public static class GenExtensions<X> { //No type parameters public static void Foo(ref this int i) {} public static void Foo(ref this X x) {} //Single type parameter public static void Foo<T>(ref this T t) {} public static void Foo<T>(ref this X x) {} //Multiple type parameters public static void Foo<T,U,V>(ref this U u) {} public static void Foo<T,U,V>(ref this X x) {} } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_BadRefWithThis, "this"), Diagnostic(ErrorCode.ERR_BadRefWithThis, "this"), Diagnostic(ErrorCode.ERR_BadRefWithThis, "this"), Diagnostic(ErrorCode.ERR_BadRefWithThis, "this"), Diagnostic(ErrorCode.ERR_BadRefWithThis, "this"), Diagnostic(ErrorCode.ERR_BadRefWithThis, "this"), Diagnostic(ErrorCode.ERR_BadRefWithThis, "this"), Diagnostic(ErrorCode.ERR_BadRefWithThis, "this"), Diagnostic(ErrorCode.ERR_BadRefWithThis, "this")); } [WorkItem(906072, "DevDiv/Personal")] [Fact] public void CS1102ERR_BadOutWithThis() { // No error var test = @" using System; public static class Extensions { //No type parameters public static void Foo(this out int i) {} //Single type parameter public static void Foo<T>(this out T t) {} //Multiple type parameters public static void Foo<T,U,V>(this out U u) {} } public static class GenExtensions<X> { //No type parameters public static void Foo(this out int i) {} public static void Foo(this out X x) {} //Single type parameter public static void Foo<T>(this out T t) {} public static void Foo<T>(this out X x) {} //Multiple type parameters public static void Foo<T,U,V>(this out U u) {} public static void Foo<T,U,V>(this out X x) {} } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_BadOutWithThis, "out"), Diagnostic(ErrorCode.ERR_BadOutWithThis, "out"), Diagnostic(ErrorCode.ERR_BadOutWithThis, "out"), Diagnostic(ErrorCode.ERR_BadOutWithThis, "out"), Diagnostic(ErrorCode.ERR_BadOutWithThis, "out"), Diagnostic(ErrorCode.ERR_BadOutWithThis, "out"), Diagnostic(ErrorCode.ERR_BadOutWithThis, "out"), Diagnostic(ErrorCode.ERR_BadOutWithThis, "out"), Diagnostic(ErrorCode.ERR_BadOutWithThis, "out")); } [WorkItem(863402, "DevDiv/Personal")] [Fact] public void CS1104ERR_BadParamModThis() { // NO error var test = @" using System; public static class Extensions { //No type parameters public static void Foo(this params int[] iArr) {} //Single type parameter public static void Foo<T>(this params T[] tArr) {} //Multiple type parameters public static void Foo<T,U,V>(this params U[] uArr) {} } public static class GenExtensions<X> { //No type parameters public static void Foo(this params int[] iArr) {} public static void Foo(this params X[] xArr) {} //Single type parameter public static void Foo<T>(this params T[] tArr) {} public static void Foo<T>(this params X[] xArr) {} //Multiple type parameters public static void Foo<T,U,V>(this params U[] uArr) {} public static void Foo<T,U,V>(this params X[] xArr) {} } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_BadParamModThis, "params"), Diagnostic(ErrorCode.ERR_BadParamModThis, "params"), Diagnostic(ErrorCode.ERR_BadParamModThis, "params"), Diagnostic(ErrorCode.ERR_BadParamModThis, "params"), Diagnostic(ErrorCode.ERR_BadParamModThis, "params"), Diagnostic(ErrorCode.ERR_BadParamModThis, "params"), Diagnostic(ErrorCode.ERR_BadParamModThis, "params"), Diagnostic(ErrorCode.ERR_BadParamModThis, "params"), Diagnostic(ErrorCode.ERR_BadParamModThis, "params")); } [Fact, WorkItem(535930, "DevDiv")] public void CS1107ERR_DupParamMod() { // Diff errors var test = @" using System; public static class Extensions { //Extension methods public static void Foo(this this t) {} public static void Foo(this int this) {} //Non-extension methods public static void Foo(this t) {} public static void Foo(int this) {} } "; // Extra errors ParseAndValidate(test, // (6,33): error CS1107: A parameter can only have one 'this' modifier // public static void Foo(this this t) {} Diagnostic(ErrorCode.ERR_DupParamMod, "this").WithArguments("this"), // (6,39): error CS1001: Identifier expected // public static void Foo(this this t) {} Diagnostic(ErrorCode.ERR_IdentifierExpected, ")"), // (7,37): error CS1001: Identifier expected // public static void Foo(this int this) {} Diagnostic(ErrorCode.ERR_IdentifierExpected, "this"), // (7,37): error CS1003: Syntax error, ',' expected // public static void Foo(this int this) {} Diagnostic(ErrorCode.ERR_SyntaxError, "this").WithArguments(",", "this"), // (7,41): error CS1031: Type expected // public static void Foo(this int this) {} Diagnostic(ErrorCode.ERR_TypeExpected, ")"), // (7,41): error CS1001: Identifier expected // public static void Foo(this int this) {} Diagnostic(ErrorCode.ERR_IdentifierExpected, ")"), // (9,34): error CS1001: Identifier expected // public static void Foo(this t) {} Diagnostic(ErrorCode.ERR_IdentifierExpected, ")"), // (10,32): error CS1001: Identifier expected // public static void Foo(int this) {} Diagnostic(ErrorCode.ERR_IdentifierExpected, "this"), // (10,32): error CS1003: Syntax error, ',' expected // public static void Foo(int this) {} Diagnostic(ErrorCode.ERR_SyntaxError, "this").WithArguments(",", "this"), // (10,36): error CS1031: Type expected // public static void Foo(int this) {} Diagnostic(ErrorCode.ERR_TypeExpected, ")"), // (10,36): error CS1001: Identifier expected // public static void Foo(int this) {} Diagnostic(ErrorCode.ERR_IdentifierExpected, ")")); } [WorkItem(863405, "DevDiv/Personal")] [Fact] public void CS1108ERR_MultiParamMod() { // No error var test = @" using System; public static class Extensions { //No type parameters public static void Foo(ref out int i) {} //Single type parameter public static void Foo<T>(ref out T t) {} //Multiple type parameters public static void Foo<T,U,V>(ref out U u) {} } public static class GenExtensions<X> { //No type parameters public static void Foo(ref out int i) {} public static void Foo(ref out X x) {} //Single type parameter public static void Foo<T>(ref out T t) {} public static void Foo<T>(ref out X x) {} //Multiple type parameters public static void Foo<T,U,V>(ref out U u) {} public static void Foo<T,U,V>(ref out X x) {} } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_MultiParamMod, "out"), Diagnostic(ErrorCode.ERR_MultiParamMod, "out"), Diagnostic(ErrorCode.ERR_MultiParamMod, "out"), Diagnostic(ErrorCode.ERR_MultiParamMod, "out"), Diagnostic(ErrorCode.ERR_MultiParamMod, "out"), Diagnostic(ErrorCode.ERR_MultiParamMod, "out"), Diagnostic(ErrorCode.ERR_MultiParamMod, "out"), Diagnostic(ErrorCode.ERR_MultiParamMod, "out"), Diagnostic(ErrorCode.ERR_MultiParamMod, "out")); } [Fact] public void CS1513ERR_RbraceExpected() { var test = @" struct S { } public class a { public static int Main() { return 1; } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_RbraceExpected, "") ); } // Infinite loop [Fact] public void CS1514ERR_LbraceExpected() { var test = @" namespace x "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_LbraceExpected, ""), Diagnostic(ErrorCode.ERR_RbraceExpected, "")); } [Fact] public void CS1514ERR_LbraceExpected02() { var test = @"public class S.D { public string P.P { get; set; } } "; ParseAndValidate(test, // (1,15): error CS1514: { expected // public class S.D Diagnostic(ErrorCode.ERR_LbraceExpected, "."), // (1,15): error CS1513: } expected // public class S.D Diagnostic(ErrorCode.ERR_RbraceExpected, "."), // (1,15): error CS1022: Type or namespace definition, or end-of-file expected // public class S.D Diagnostic(ErrorCode.ERR_EOFExpected, "."), // (1,16): error CS0116: A namespace does not directly contain members such as fields or methods // public class S.D Diagnostic(ErrorCode.ERR_NamespaceUnexpected, "D"), // (2,1): error CS1022: Type or namespace definition, or end-of-file expected // { Diagnostic(ErrorCode.ERR_EOFExpected, "{"), // (4,1): error CS1022: Type or namespace definition, or end-of-file expected // } Diagnostic(ErrorCode.ERR_EOFExpected, "}")); } [WorkItem(535932, "DevDiv")] [Fact] public void CS1515ERR_InExpected() { // Diff error - CS1003 var test = @" using System; class Test { public static int Main() { int[] arr = new int[] {1, 2, 3}; foreach (int x arr) // CS1515 { Console.WriteLine(x); } return 1; } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_InExpected, "arr")); } [Fact] public void CS1515ERR_InExpected02() { var test = @" class C { static void Main() { foreach (1) System.Console.WriteLine(1); } } "; ParseAndValidate(test, // (6,18): error CS1031: Type expected // foreach (1) Diagnostic(ErrorCode.ERR_TypeExpected, "1"), // (6,18): error CS1001: Identifier expected // foreach (1) Diagnostic(ErrorCode.ERR_IdentifierExpected, "1"), // (6,18): error CS1515: 'in' expected // foreach (1) Diagnostic(ErrorCode.ERR_InExpected, "1")); } [WorkItem(906503, "DevDiv/Personal")] [Fact] public void CS1517ERR_InvalidPreprocExprpp() { var test = @" class Test { #if 1=2 #endif public static int Main() { #if 0 return 0; #endif } } "; // TODO: Extra errors ParseAndValidate(test, // (4,5): error CS1517: Invalid preprocessor expression // #if 1=2 Diagnostic(ErrorCode.ERR_InvalidPreprocExpr, "1"), // (4,5): error CS1025: Single-line comment or end-of-line expected // #if 1=2 Diagnostic(ErrorCode.ERR_EndOfPPLineExpected, "1"), // (8,5): error CS1517: Invalid preprocessor expression // #if 0 Diagnostic(ErrorCode.ERR_InvalidPreprocExpr, "0"), // (8,5): error CS1025: Single-line comment or end-of-line expected // #if 0 Diagnostic(ErrorCode.ERR_EndOfPPLineExpected, "0")); } // TODO: Extra errors [Fact] public void CS1519ERR_InvalidMemberDecl_1() { var test = @" namespace x { public void f() {} public class C { return 1; } } "; // member declarations in namespace trigger semantic error, not parse error: ParseAndValidate(test, Diagnostic(ErrorCode.ERR_InvalidMemberDecl, "return").WithArguments("return")); } [Fact] public void CS1519ERR_InvalidMemberDecl_2() { var test = @" public class C { int[] i = new int[5];; } public class D { public static int Main () { return 1; } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_InvalidMemberDecl, ";").WithArguments(";")); } [Fact] public void CS1519ERR_InvalidMemberDecl_3() { var test = @" struct s1 { goto Labl; // Invalid const int x = 1; Lab1: const int y = 2; } "; // Extra errors ParseAndValidate(test, // (4,5): error CS1519: Invalid token 'goto' in class, struct, or interface member declaration // goto Labl; // Invalid Diagnostic(ErrorCode.ERR_InvalidMemberDecl, "goto").WithArguments("goto"), // (4,14): error CS1519: Invalid token ';' in class, struct, or interface member declaration // goto Labl; // Invalid Diagnostic(ErrorCode.ERR_InvalidMemberDecl, ";").WithArguments(";"), // (4,14): error CS1519: Invalid token ';' in class, struct, or interface member declaration // goto Labl; // Invalid Diagnostic(ErrorCode.ERR_InvalidMemberDecl, ";").WithArguments(";"), // (6,9): error CS1519: Invalid token ':' in class, struct, or interface member declaration // Lab1: Diagnostic(ErrorCode.ERR_InvalidMemberDecl, ":").WithArguments(":"), // (6,9): error CS1519: Invalid token ':' in class, struct, or interface member declaration // Lab1: Diagnostic(ErrorCode.ERR_InvalidMemberDecl, ":").WithArguments(":")); } [Fact] public void CS1520ERR_MemberNeedsType() { var test = @" namespace x { public class clx { public int i; public static int Main(){return 0;} } public class clz { public x(){} } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_MemberNeedsType, "x")); } [Fact] public void CS1521ERR_BadBaseType() { var test = @" class Test1{} class Test2 : Test1[] // CS1521 { } class Test3 : Test1* // CS1521 { } class Program { static int Main() { return -1; } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_BadBaseType, "Test1[]"), Diagnostic(ErrorCode.ERR_BadBaseType, "Test1*")); } [WorkItem(906299, "DevDiv/Personal")] [Fact] public void CS1524ERR_ExpectedEndTry() { var test = @"using System; namespace nms { public class mine { private static int retval = 5; public static int Main() { try { Console.WriteLine(""In try block, ready to throw.""); sizeof (throw new RecoverableException(""An exception has occurred"")); } return retval; } }; } "; // Extra Errors ParseAndValidate(test, // (12,13): error CS1524: Expected catch or finally // } Diagnostic(ErrorCode.ERR_ExpectedEndTry, "}"), // (11,21): error CS1031: Type expected // sizeof (throw new RecoverableException("An exception has occurred")); Diagnostic(ErrorCode.ERR_TypeExpected, "throw"), // (11,21): error CS1026: ) expected // sizeof (throw new RecoverableException("An exception has occurred")); Diagnostic(ErrorCode.ERR_CloseParenExpected, "throw"), // (11,21): error CS1002: ; expected // sizeof (throw new RecoverableException("An exception has occurred")); Diagnostic(ErrorCode.ERR_SemicolonExpected, "throw"), // (11,80): error CS1002: ; expected // sizeof (throw new RecoverableException("An exception has occurred")); Diagnostic(ErrorCode.ERR_SemicolonExpected, ")"), // (11,80): error CS1513: } expected // sizeof (throw new RecoverableException("An exception has occurred")); Diagnostic(ErrorCode.ERR_RbraceExpected, ")")); } [WorkItem(906299, "DevDiv/Personal")] [Fact] public void CS1525ERR_InvalidExprTerm() { var test = @"public class mine { public static int Main() { throw } }; "; ParseAndValidate(test, // (5,18): error CS1525: Invalid expression term '}' // throw Diagnostic(ErrorCode.ERR_InvalidExprTerm, "").WithArguments("}"), // (5,18): error CS1002: ; expected // throw Diagnostic(ErrorCode.ERR_SemicolonExpected, "")); } [WorkItem(919539, "DevDiv/Personal")] [Fact] public void CS1525RegressBadStatement() { // Dev10 CS1525 vs. new parser CS1513 var test = @"class C { static void X() { => // error } }"; ParseAndValidate(test, // (4,6): error CS1513: } expected // { Diagnostic(ErrorCode.ERR_RbraceExpected, "")); } [WorkItem(540245, "DevDiv")] [Fact] public void CS1525RegressVoidInfiniteLoop() { var test = @"class C { void M() { void.Foo(); } }"; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_InvalidExprTerm, "void").WithArguments("void")); } [Fact] public void CS1525ERR_InvalidExprTerm_TernaryOperator() { var test = @"class Program { static void Main(string[] args) { int x = 1; int y = 1; int s = true ? : y++; // Invalid s = true ? x++ : ; // Invalid s = ? x++ : y++; // Invalid } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_InvalidExprTerm, ":").WithArguments(":"), Diagnostic(ErrorCode.ERR_InvalidExprTerm, ";").WithArguments(";"), Diagnostic(ErrorCode.ERR_InvalidExprTerm, "?").WithArguments("?")); } [Fact] public void CS1525ERR_InvalidExprTerm_MultiExpression() { var test = @"class Program { static void Main(string[] args) { int x = 1; int y = 1; int s = true ? x++, y++ : y++; // Invalid s = true ? x++ : x++, y++; // Invalid } } "; ParseAndValidate(test, // (7,27): error CS1003: Syntax error, ':' expected // int s = true ? x++, y++ : y++; // Invalid Diagnostic(ErrorCode.ERR_SyntaxError, ",").WithArguments(":", ","), // (7,27): error CS1525: Invalid expression term ',' // int s = true ? x++, y++ : y++; // Invalid Diagnostic(ErrorCode.ERR_InvalidExprTerm, ",").WithArguments(","), // (7,30): error CS1002: ; expected // int s = true ? x++, y++ : y++; // Invalid Diagnostic(ErrorCode.ERR_SemicolonExpected, "++"), // (7,33): error CS1525: Invalid expression term ':' // int s = true ? x++, y++ : y++; // Invalid Diagnostic(ErrorCode.ERR_InvalidExprTerm, ":").WithArguments(":"), // (7,33): error CS1002: ; expected // int s = true ? x++, y++ : y++; // Invalid Diagnostic(ErrorCode.ERR_SemicolonExpected, ":"), // (7,33): error CS1513: } expected // int s = true ? x++, y++ : y++; // Invalid Diagnostic(ErrorCode.ERR_RbraceExpected, ":"), // (8,29): error CS1002: ; expected // s = true ? x++ : x++, y++; // Invalid Diagnostic(ErrorCode.ERR_SemicolonExpected, ","), // (8,29): error CS1513: } expected // s = true ? x++ : x++, y++; // Invalid Diagnostic(ErrorCode.ERR_RbraceExpected, ",")); } [WorkItem(542229, "DevDiv")] [Fact] public void CS1525ERR_InvalidExprTerm_FromInExprInQuery() { var test = @" class Program { static void Main(string[] args) { var f1 = from num1 in new int[from] select num1; } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_InvalidExprTerm, "from").WithArguments("]")); } [Fact] public void CS1525ERR_InvalidExprTerm_ReturnInCondition() { var test = @"class Program { static void Main(string[] args) { int s = 1>2 ? return 0: return 1; // Invalid } } "; ParseAndValidate(test, // (5,23): error CS1525: Invalid expression term 'return' // int s = 1>2 ? return 0: return 1; // Invalid Diagnostic(ErrorCode.ERR_InvalidExprTerm, "return").WithArguments("return"), // (5,23): error CS1003: Syntax error, ':' expected // int s = 1>2 ? return 0: return 1; // Invalid Diagnostic(ErrorCode.ERR_SyntaxError, "return").WithArguments(":", "return"), // (5,23): error CS1525: Invalid expression term 'return' // int s = 1>2 ? return 0: return 1; // Invalid Diagnostic(ErrorCode.ERR_InvalidExprTerm, "return").WithArguments("return"), // (5,23): error CS1002: ; expected // int s = 1>2 ? return 0: return 1; // Invalid Diagnostic(ErrorCode.ERR_SemicolonExpected, "return"), // (5,31): error CS1002: ; expected // int s = 1>2 ? return 0: return 1; // Invalid Diagnostic(ErrorCode.ERR_SemicolonExpected, ":"), // (5,31): error CS1513: } expected // int s = 1>2 ? return 0: return 1; // Invalid Diagnostic(ErrorCode.ERR_RbraceExpected, ":")); } [Fact] public void CS1525ERR_InvalidExprTerm_GotoInCondition() { var test = @"class Program { static int Main(string[] args) { int s = true ? goto lab1: goto lab2; // Invalid lab1: return 0; lab2: return 1; } } "; ParseAndValidate(test, // (5,24): error CS1525: Invalid expression term 'goto' // int s = true ? goto lab1: goto lab2; // Invalid Diagnostic(ErrorCode.ERR_InvalidExprTerm, "goto").WithArguments("goto"), // (5,24): error CS1003: Syntax error, ':' expected // int s = true ? goto lab1: goto lab2; // Invalid Diagnostic(ErrorCode.ERR_SyntaxError, "goto").WithArguments(":", "goto"), // (5,24): error CS1525: Invalid expression term 'goto' // int s = true ? goto lab1: goto lab2; // Invalid Diagnostic(ErrorCode.ERR_InvalidExprTerm, "goto").WithArguments("goto"), // (5,24): error CS1002: ; expected // int s = true ? goto lab1: goto lab2; // Invalid Diagnostic(ErrorCode.ERR_SemicolonExpected, "goto"), // (5,33): error CS1002: ; expected // int s = true ? goto lab1: goto lab2; // Invalid Diagnostic(ErrorCode.ERR_SemicolonExpected, ":"), // (5,33): error CS1513: } expected // int s = true ? goto lab1: goto lab2; // Invalid Diagnostic(ErrorCode.ERR_RbraceExpected, ":")); } [Fact] public void CS1526ERR_BadNewExpr() { var test = @" public class MainClass { public static int Main () { int []pi = new int; return 1; } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_BadNewExpr, ";")); } [Fact] public void CS1528ERR_BadVarDecl() { var test = @" using System; namespace nms { public class B { public B(int i) {} public void toss () { throw new Exception(""Exception thrown in function toss()."");} }; public class mine { private static int retval = 5; public static int Main() { try {B b(3); b.toss(); } catch ( Exception e ) {retval -= 5; Console.WriteLine (e.GetMessage()); } return retval; } }; } "; // Extra errors ParseAndValidate(test, // (12,17): error CS1528: Expected ; or = (cannot specify constructor arguments in declaration) // try {B b(3); Diagnostic(ErrorCode.ERR_BadVarDecl, "(3)"), // (12,17): error CS1003: Syntax error, '[' expected // try {B b(3); Diagnostic(ErrorCode.ERR_SyntaxError, "(").WithArguments("[", "("), // (12,20): error CS1003: Syntax error, ']' expected // try {B b(3); Diagnostic(ErrorCode.ERR_SyntaxError, ";").WithArguments("]", ";")); } [Fact] public void CS1528RegressEventVersion() { var test = @" class C { event System.Action E(); } "; // Extra errors ParseAndValidate(test, // (4,26): error CS1528: Expected ; or = (cannot specify constructor arguments in declaration) // event System.Action E(); Diagnostic(ErrorCode.ERR_BadVarDecl, "()"), // (4,26): error CS1003: Syntax error, '[' expected // event System.Action E(); Diagnostic(ErrorCode.ERR_SyntaxError, "(").WithArguments("[", "("), // (4,27): error CS1525: Invalid expression term ')' // event System.Action E(); Diagnostic(ErrorCode.ERR_InvalidExprTerm, ")").WithArguments(")"), // (4,28): error CS1003: Syntax error, ']' expected // event System.Action E(); Diagnostic(ErrorCode.ERR_SyntaxError, ";").WithArguments("]", ";")); } [Fact] public void CS1529ERR_UsingAfterElements() { var test = @" namespace NS { class SomeClass {} using System; } using Microsoft; "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_UsingAfterElements, "using System;"), Diagnostic(ErrorCode.ERR_UsingAfterElements, "using Microsoft;")); } [Fact] public void CS1534ERR_BadBinOpArgs() { var test = @" class MyClass { public int intI = 2; public static MyClass operator + (MyClass MC1, MyClass MC2, MyClass MC3) { return new MyClass(); } public static int Main() { return 1; } } "; ParseAndValidate(test, // (4,36): error CS1534: Overloaded binary operator '+' takes two parameters // public static MyClass operator + (MyClass MC1, MyClass MC2, MyClass MC3) { Diagnostic(ErrorCode.ERR_BadBinOpArgs, "+").WithArguments("+")); } [WorkItem(863409, "DevDiv/Personal")] [WorkItem(906305, "DevDiv/Personal")] [Fact] public void CS1535ERR_BadUnOpArgs() { var test = @" class MyClass { public int intI = 2; public static MyClass operator ++ () { return new MyClass(); } public static int Main() { return 1; } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_BadUnOpArgs, "++").WithArguments("++")); } // TODO: extra error CS1001 [Fact] public void CS1536ERR_NoVoidParameter() { var test = @" class Test { public void foo(void){} } "; ParseAndValidate(test, // (4,21): error CS1536: Invalid parameter type 'void' // public void foo(void){} Diagnostic(ErrorCode.ERR_NoVoidParameter, "void"), // (4,25): error CS1001: Identifier expected // public void foo(void){} Diagnostic(ErrorCode.ERR_IdentifierExpected, ")")); } [Fact] public void CS1547ERR_NoVoidHere() { var test = @" using System; public class MainClass { public static int Main () { void v; Console.WriteLine (5); return 1; } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_NoVoidHere, "void")); } [WorkItem(919490, "DevDiv/Personal")] [Fact] public void CS1547ERR_NoVoidHereInDefaultAndSizeof() { var test = @"class C { void M() { var x = sizeof(void); return default(void); } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_NoVoidHere, "void"), Diagnostic(ErrorCode.ERR_NoVoidHere, "void")); } [Fact] public void CS1551ERR_IndexerNeedsParam() { var test = @" public class MyClass { int intI; int this[] { get { return intI; } set { intI = value; } } public static int Main() { return 1; } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_IndexerNeedsParam, "]")); } [Fact] public void CS1552ERR_BadArraySyntax() { var test = @" public class C { public static void Main(string args[]) { } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_BadArraySyntax, "[")); } [Fact, WorkItem(535933, "DevDiv")] // ? public void CS1553ERR_BadOperatorSyntax() { // Extra errors var test = @" class foo { public static int implicit operator (foo f) { return 6; } // Error } public class MainClass { public static int Main () { return 1; } } "; ParseAndValidate(test, // (3,19): error CS1553: Declaration is not valid; use '+ operator <dest-type> (...' instead // public static int implicit operator (foo f) { return 6; } // Error Diagnostic(ErrorCode.ERR_BadOperatorSyntax, "int").WithArguments("+"), // (3,23): error CS1003: Syntax error, 'operator' expected // public static int implicit operator (foo f) { return 6; } // Error Diagnostic(ErrorCode.ERR_SyntaxError, "implicit").WithArguments("operator", "implicit"), // (3,23): error CS1019: Overloadable unary operator expected // public static int implicit operator (foo f) { return 6; } // Error Diagnostic(ErrorCode.ERR_OvlUnaryOperatorExpected, "implicit"), // (3,32): error CS1003: Syntax error, '(' expected // public static int implicit operator (foo f) { return 6; } // Error Diagnostic(ErrorCode.ERR_SyntaxError, "operator").WithArguments("(", "operator"), // (3,32): error CS1041: Identifier expected; 'operator' is a keyword // public static int implicit operator (foo f) { return 6; } // Error Diagnostic(ErrorCode.ERR_IdentifierExpectedKW, "operator").WithArguments("", "operator")); } [Fact(), WorkItem(526995, "DevDiv")] public void CS1554ERR_BadOperatorSyntax2() { // Diff errors: CS1003, 1031 etc. (8 errors) var test = @" class foo { public static operator ++ foo (foo f) { return new foo(); } // Error } public class MainClass { public static int Main () { return 1; } } "; ParseAndValidateFirst(test, Diagnostic(ErrorCode.ERR_TypeExpected, "operator")); } [Fact, WorkItem(536673, "DevDiv")] public void CS1575ERR_BadStackAllocExpr() { // Diff errors var test = @" public class Test { unsafe public static int Main() { int *p = stackalloc int (30); int *pp = stackalloc int 30; return 1; } } "; // Extra errors ParseAndValidate(test, // (6,29): error CS1575: A stackalloc expression requires [] after type // int *p = stackalloc int (30); Diagnostic(ErrorCode.ERR_BadStackAllocExpr, "int"), // (6,33): error CS1002: ; expected // int *p = stackalloc int (30); Diagnostic(ErrorCode.ERR_SemicolonExpected, "("), // (7,30): error CS1575: A stackalloc expression requires [] after type // int *pp = stackalloc int 30; Diagnostic(ErrorCode.ERR_BadStackAllocExpr, "int"), // (7,34): error CS1002: ; expected // int *pp = stackalloc int 30; Diagnostic(ErrorCode.ERR_SemicolonExpected, "30")); } [WorkItem(906993, "DevDiv/Personal")] [Fact] public void CS1576ERR_InvalidLineNumberpp() { var test = @" public class Test { # line abc hidden public static void MyHiddenMethod() { #line 0 } } "; ParseAndValidate(test, // (4,12): error CS1576: The line number specified for #line directive is missing or invalid // # line abc hidden Diagnostic(ErrorCode.ERR_InvalidLineNumber, "abc"), // (7,7): error CS1576: The line number specified for #line directive is missing or invalid // #line 0 Diagnostic(ErrorCode.ERR_InvalidLineNumber, "0")); } [WorkItem(541952, "DevDiv")] [Fact] public void CS1576ERR_InvalidLineNumber02() { var test = @" #line 0 #error "; ParseAndValidate(test, // (2,7): error CS1576: The line number specified for #line directive is missing or invalid // #line 0 Diagnostic(ErrorCode.ERR_InvalidLineNumber, "0"), // (3,7): error CS1029: #error: '' // #error Diagnostic(ErrorCode.ERR_ErrorDirective, "").WithArguments("")); } [WorkItem(536689, "DevDiv")] [Fact] public void CS1578ERR_MissingPPFile() { var test = @" public class Test { #line 5 hidden public static void MyHiddenMethod() { } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_MissingPPFile, "hidden")); } [WorkItem(863414, "DevDiv/Personal")] [Fact] public void CS1585ERR_BadModifierLocation() { // Diff error: CS1519 v.s. CS1585 var test = @" namespace oo { public class clx { public void f(){} } // class clx public class clxx : clx { public static void virtual f() {} } public class cly { public static int Main(){return 0;} } // class cly } // namespace "; ParseAndValidate(test, // (7,24): error CS1585: Member modifier 'virtual' must precede the member type and name // public static void virtual f() {} Diagnostic(ErrorCode.ERR_BadModifierLocation, "virtual").WithArguments("virtual"), // (7,32): error CS1520: Method must have a return type // public static void virtual f() {} Diagnostic(ErrorCode.ERR_MemberNeedsType, "f")); } [Fact] public void CS1586ERR_MissingArraySize() { var test = @" class Test { public static int Main() { int[] a = new int[]; byte[] b = new byte[]; string[] s = new string[]; return 1; } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_MissingArraySize, "[]"), Diagnostic(ErrorCode.ERR_MissingArraySize, "[]"), Diagnostic(ErrorCode.ERR_MissingArraySize, "[]")); } [Fact, WorkItem(535935, "DevDiv")] public void CS1597ERR_UnexpectedSemicolon() { // Diff error: CS1519 var test = @" public class Test { public static int Main() { return 1; }; } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_UnexpectedSemicolon, ";") ); } [Fact] public void CS1609ERR_NoModifiersOnAccessor() { var test = @" public delegate void Del(); public class Test { public int Prop { get { return 0; } private set { } } public event Del E { private add{} public remove{} } public static int Main() { return 1; } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_NoModifiersOnAccessor, "private"), Diagnostic(ErrorCode.ERR_NoModifiersOnAccessor, "public")); } [Fact] public void CS1609ERR_NoModifiersOnAccessor_Event() { var test = @" public delegate void Del(); public class Test { event Del E { public add { } private remove { } } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_NoModifiersOnAccessor, "public"), Diagnostic(ErrorCode.ERR_NoModifiersOnAccessor, "private")); } [WorkItem(863423, "DevDiv/Personal")] [Fact] public void CS1611ERR_ParamsCantBeRefOut() { // No error var test = @" public class Test { public static void foo(params ref int[] a) { } public static void boo(params out int[] a) { } public static int Main() { int i = 10; foo(ref i); boo(out i); return 1; } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_ParamsCantBeRefOut, "ref"), Diagnostic(ErrorCode.ERR_ParamsCantBeRefOut, "out")); } [Fact] public void CS1627ERR_EmptyYield() { var test = @" using System.Collections; class C : IEnumerable { public IEnumerator GetEnumerator() { yield return; // CS1627 } } class Test { public static int Main() { return 1; } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_EmptyYield, "return")); } [Fact] public void CS1641ERR_FixedDimsRequired() { var test = @" unsafe struct S { fixed int [] ia; // CS1641 fixed int [] ib[]; // CS0443 }; class Test { public static int Main() { return 1; } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_FixedDimsRequired, "ia"), Diagnostic(ErrorCode.ERR_ValueExpected, "]")); } [WorkItem(863435, "DevDiv/Personal")] [Fact] public void CS1671ERR_BadModifiersOnNamespace01() { var test = @" public namespace NS // CS1671 { class Test { public static int Main() { return 1; } } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_BadModifiersOnNamespace, "public")); } [Fact] public void CS1671ERR_BadModifiersOnNamespace02() { var test = @"[System.Obsolete] namespace N { } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_BadModifiersOnNamespace, "[System.Obsolete]")); } [WorkItem(863437, "DevDiv/Personal")] [Fact] public void CS1675ERR_InvalidGenericEnumNowCS7002() { var test = @" enum E<T> // CS1675 { } class Test { public static int Main() { return 1; } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_UnexpectedGenericName, "E")); } [WorkItem(863438, "DevDiv/Personal")] [Fact] public void CS1730ERR_GlobalAttributesNotFirst() { var test = @" class Test { } [assembly:System.Attribute] "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_GlobalAttributesNotFirst, "assembly")); } [Fact(), WorkItem(527039, "DevDiv")] public void CS1732ERR_ParameterExpected() { var test = @" using System; static class Test { static int Main() { Func<int,int> f1 = (x,) => 1; Func<int,int, int> f2 = (y,) => 2; return 1; } } "; ParseAndValidate(test, // (7,31): error CS1001: Identifier expected // Func<int,int> f1 = (x,) => 1; Diagnostic(ErrorCode.ERR_IdentifierExpected, ")"), // (8,36): error CS1001: Identifier expected // Func<int,int, int> f2 = (y,) => 2; Diagnostic(ErrorCode.ERR_IdentifierExpected, ")")); } [WorkItem(536674, "DevDiv")] [Fact] public void CS1733ERR_ExpressionExpected() { // diff error msg - CS1525 var test = @" using System.Collections.Generic; using System.Collections; static class Test { static void Main() { A a = new A { 5, {9, 5, }, 3 }; } } "; ParseAndValidate(test, Diagnostic(ErrorCode.ERR_ExpressionExpected, "}")); } [WorkItem(536674, "DevDiv")] [Fact] public void CS1733ERR_ExpressionExpected_02() { var test = @"using System; using System.Collections.Generic; using System.Linq; class Program { static void Main(string[] args) { Console.WriteLine(""Hello"")?"; ParseAndValidate(test, // (9,36): error CS1733: Expected expression // Console.WriteLine("Hello")? Diagnostic(ErrorCode.ERR_ExpressionExpected, "").WithLocation(9, 36), // (9,36): error CS1003: Syntax error, ':' expected // Console.WriteLine("Hello")? Diagnostic(ErrorCode.ERR_SyntaxError, "").WithArguments(":", "").WithLocation(9, 36), // (9,36): error CS1733: Expected expression // Console.WriteLine("Hello")? Diagnostic(ErrorCode.ERR_ExpressionExpected, "").WithLocation(9, 36), // (9,36): error CS1002: ; expected // Console.WriteLine("Hello")? Diagnostic(ErrorCode.ERR_SemicolonExpected, "").WithLocation(9, 36), // (9,36): error CS1513: } expected // Console.WriteLine("Hello")? Diagnostic(ErrorCode.ERR_RbraceExpected, "").WithLocation(9, 36), // (9,36): error CS1513: } expected // Console.WriteLine("Hello")? Diagnostic(ErrorCode.ERR_RbraceExpected, "").WithLocation(9, 36)); } [Fact] public void CS1960ERR_IllegalVarianceSyntax() { var test = @"interface I<in T> { void M<in U>(); object this<out U>[int i] { get; set; } } struct S<out T> { void M<out U>(); } delegate void D<in T>(); class A<out T> { void M<out U>(); interface I<in U> { } struct S<out U> { } delegate void D<in U>(); class B<out U> { } }"; ParseAndValidate(test, // (3,12): error CS1960: Invalid variance modifier. Only interface and delegate type parameters can be specified as variant. Diagnostic(ErrorCode.ERR_IllegalVarianceSyntax, "in").WithLocation(3, 12), // (4,12): error CS7002: Unexpected use of a generic name Diagnostic(ErrorCode.ERR_UnexpectedGenericName, "this").WithLocation(4, 12), // (4,17): error CS1960: Invalid variance modifier. Only interface and delegate type parameters can be specified as variant. Diagnostic(ErrorCode.ERR_IllegalVarianceSyntax, "out").WithLocation(4, 17), // (6,10): error CS1960: Invalid variance modifier. Only interface and delegate type parameters can be specified as variant. Diagnostic(ErrorCode.ERR_IllegalVarianceSyntax, "out").WithLocation(6, 10), // (8,12): error CS1960: Invalid variance modifier. Only interface and delegate type parameters can be specified as variant. Diagnostic(ErrorCode.ERR_IllegalVarianceSyntax, "out").WithLocation(8, 12), // (11,9): error CS1960: Invalid variance modifier. Only interface and delegate type parameters can be specified as variant. Diagnostic(ErrorCode.ERR_IllegalVarianceSyntax, "out").WithLocation(11, 9), // (13, 12): error CS1960: Invalid variance modifier. Only interface and delegate type parameters can be specified as variant. Diagnostic(ErrorCode.ERR_IllegalVarianceSyntax, "out").WithLocation(13, 12), // (15, 14): error CS1960: Invalid variance modifier. Only interface and delegate type parameters can be specified as variant. Diagnostic(ErrorCode.ERR_IllegalVarianceSyntax, "out").WithLocation(15, 14), // (17,13): error CS1960: Invalid variance modifier. Only interface and delegate type parameters can be specified as variant. Diagnostic(ErrorCode.ERR_IllegalVarianceSyntax, "out").WithLocation(17, 13)); } [Fact] public void CS7000ERR_UnexpectedAliasedName() { var test = @"using System; using N1Alias = N1; namespace N1 { namespace N1Alias::N2 {} class Test { static int Main() { N1.global::Test.M1(); return 1; } } } "; // Native compiler : CS1003 ParseAndValidate(test, // (6,15): error CS7000: Unexpected use of an aliased name // namespace N1Alias::N2 {} Diagnostic(ErrorCode.ERR_UnexpectedAliasedName, "N1Alias::N2"), // (12,22): error CS7000: Unexpected use of an aliased name // N1.global::Test.M1(); Diagnostic(ErrorCode.ERR_UnexpectedAliasedName, "::")); } [Fact] public void CS7002ERR_UnexpectedGenericName() { var test = @"enum E<T> { One, Two, Three } public class Test { public int this<V>[V v] { get { return 0; } } } "; // Native Compiler : CS1675 etc. ParseAndValidate(test, // (1,6): error CS7002: Unexpected use of a generic name // enum E<T> { One, Two, Three } Diagnostic(ErrorCode.ERR_UnexpectedGenericName, "E"), // (5,16): error CS7002: Unexpected use of a generic name // public int this<V>[V v] { get { return 0; } } Diagnostic(ErrorCode.ERR_UnexpectedGenericName, "this") ); } [Fact, WorkItem(546212, "DevDiv")] public void InvalidQueryExpression() { var text = @" using System; using System.Linq; public class QueryExpressionTest { public static void Main() { var expr1 = new[] { 1, 2, 3 }; var expr2 = new[] { 1, 2, 3 }; var query13 = from const in expr1 join i in expr2 on const equals i select new { const, i }; } } "; // error CS1002: ; expected // error CS1031: Type expected // error CS1525: Invalid expression term 'in' ... ... ParseAndValidate(text, // (12,29): error CS1002: ; expected // var query13 = from const in expr1 join i in expr2 on const equals i select new { const, i }; Diagnostic(ErrorCode.ERR_SemicolonExpected, "const"), // (12,35): error CS1031: Type expected // var query13 = from const in expr1 join i in expr2 on const equals i select new { const, i }; Diagnostic(ErrorCode.ERR_TypeExpected, "in"), // (12,35): error CS1001: Identifier expected // var query13 = from const in expr1 join i in expr2 on const equals i select new { const, i }; Diagnostic(ErrorCode.ERR_IdentifierExpected, "in"), // (12,35): error CS0145: A const field requires a value to be provided // var query13 = from const in expr1 join i in expr2 on const equals i select new { const, i }; Diagnostic(ErrorCode.ERR_ConstValueRequired, "in"), // (12,35): error CS1003: Syntax error, ',' expected // var query13 = from const in expr1 join i in expr2 on const equals i select new { const, i }; Diagnostic(ErrorCode.ERR_SyntaxError, "in").WithArguments(",", "in"), // (12,38): error CS1002: ; expected // var query13 = from const in expr1 join i in expr2 on const equals i select new { const, i }; Diagnostic(ErrorCode.ERR_SemicolonExpected, "expr1"), // (12,50): error CS1002: ; expected // var query13 = from const in expr1 join i in expr2 on const equals i select new { const, i }; Diagnostic(ErrorCode.ERR_SemicolonExpected, "i"), // (12,52): error CS1002: ; expected // var query13 = from const in expr1 join i in expr2 on const equals i select new { const, i }; Diagnostic(ErrorCode.ERR_SemicolonExpected, "in"), // (12,52): error CS1513: } expected // var query13 = from const in expr1 join i in expr2 on const equals i select new { const, i }; Diagnostic(ErrorCode.ERR_RbraceExpected, "in"), // (12,64): error CS1002: ; expected // var query13 = from const in expr1 join i in expr2 on const equals i select new { const, i }; Diagnostic(ErrorCode.ERR_SemicolonExpected, "const"), // (12,77): error CS0145: A const field requires a value to be provided // var query13 = from const in expr1 join i in expr2 on const equals i select new { const, i }; Diagnostic(ErrorCode.ERR_ConstValueRequired, "i"), // (12,79): error CS1002: ; expected // var query13 = from const in expr1 join i in expr2 on const equals i select new { const, i }; Diagnostic(ErrorCode.ERR_SemicolonExpected, "select"), // (12,86): error CS1002: ; expected // var query13 = from const in expr1 join i in expr2 on const equals i select new { const, i }; Diagnostic(ErrorCode.ERR_SemicolonExpected, "new"), // (12,92): error CS1513: } expected // var query13 = from const in expr1 join i in expr2 on const equals i select new { const, i }; Diagnostic(ErrorCode.ERR_RbraceExpected, "const"), // (12,92): error CS1002: ; expected // var query13 = from const in expr1 join i in expr2 on const equals i select new { const, i }; Diagnostic(ErrorCode.ERR_SemicolonExpected, "const"), // (12,97): error CS1031: Type expected // var query13 = from const in expr1 join i in expr2 on const equals i select new { const, i }; Diagnostic(ErrorCode.ERR_TypeExpected, ","), // (12,97): error CS1001: Identifier expected // var query13 = from const in expr1 join i in expr2 on const equals i select new { const, i }; Diagnostic(ErrorCode.ERR_IdentifierExpected, ","), // (12,97): error CS0145: A const field requires a value to be provided // var query13 = from const in expr1 join i in expr2 on const equals i select new { const, i }; Diagnostic(ErrorCode.ERR_ConstValueRequired, ","), // (12,99): error CS0145: A const field requires a value to be provided // var query13 = from const in expr1 join i in expr2 on const equals i select new { const, i }; Diagnostic(ErrorCode.ERR_ConstValueRequired, "i"), // (12,101): error CS1002: ; expected // var query13 = from const in expr1 join i in expr2 on const equals i select new { const, i }; Diagnostic(ErrorCode.ERR_SemicolonExpected, "}"), // (12,102): error CS1597: Semicolon after method or accessor block is not valid // var query13 = from const in expr1 join i in expr2 on const equals i select new { const, i }; Diagnostic(ErrorCode.ERR_UnexpectedSemicolon, ";"), // (14,1): error CS1022: Type or namespace definition, or end-of-file expected // } Diagnostic(ErrorCode.ERR_EOFExpected, "}") ); } [Fact] public void PartialTypesBeforeVersionTwo() { var text = @" partial class C { } "; var tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5)); tree.GetCompilationUnitRoot().GetDiagnostics().Verify(); tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp1)); tree.GetCompilationUnitRoot().GetDiagnostics().Verify( // (2,1): error CS8022: Feature 'partial types' is not available in C# 1. Please use language version 2 or greater. // partial class C Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion1, "partial").WithArguments("partial types", "2")); } [Fact] public void PartialMethodsVersionThree() { var text = @" class C { partial int Foo() { } } "; var tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5)); tree.GetCompilationUnitRoot().GetDiagnostics().Verify(); tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp2)); tree.GetCompilationUnitRoot().GetDiagnostics().Verify( // (4,5): error CS8023: Feature 'partial method' is not available in C# 2. Please use language version 3 or greater. // partial int Foo() { } Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion2, "partial").WithArguments("partial method", "3")); } [Fact] public void QueryBeforeVersionThree() { var text = @" class C { void Foo() { var q = from a in b select c; } } "; var tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5)); tree.GetCompilationUnitRoot().GetDiagnostics().Verify(); tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp2)); tree.GetCompilationUnitRoot().GetDiagnostics().Verify( // (6,17): error CS8023: Feature 'query expression' is not available in C# 2. Please use language version 3 or greater. // var q = from a in b Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion2, "from a in b").WithArguments("query expression", "3"), // (6,17): error CS8023: Feature 'query expression' is not available in C# 2. Please use language version 3 or greater. // var q = from a in b Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion2, "from").WithArguments("query expression", "3")); } [Fact] public void AnonymousTypeBeforeVersionThree() { var text = @" class C { void Foo() { var q = new { }; } } "; var tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5)); tree.GetCompilationUnitRoot().GetDiagnostics().Verify(); tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp2)); tree.GetCompilationUnitRoot().GetDiagnostics().Verify( // (6,17): error CS8023: Feature 'anonymous types' is not available in C# 2. Please use language version 3 or greater. // var q = new { }; Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion2, "new").WithArguments("anonymous types", "3")); } [Fact] public void ImplicitArrayBeforeVersionThree() { var text = @" class C { void Foo() { var q = new [] { }; } } "; var tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5)); tree.GetCompilationUnitRoot().GetDiagnostics().Verify(); tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp2)); tree.GetCompilationUnitRoot().GetDiagnostics().Verify( // (6,17): error CS8023: Feature 'implicitly typed array' is not available in C# 2. Please use language version 3 or greater. // var q = new [] { }; Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion2, "new").WithArguments("implicitly typed array", "3")); } [Fact] public void ObjectInitializerBeforeVersionThree() { var text = @" class C { void Foo() { var q = new Foo { }; } } "; var tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5)); tree.GetCompilationUnitRoot().GetDiagnostics().Verify(); tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp2)); tree.GetCompilationUnitRoot().GetDiagnostics().Verify( // (6,25): error CS8023: Feature 'object initializer' is not available in C# 2. Please use language version 3 or greater. // var q = new Foo { }; Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion2, "{").WithArguments("object initializer", "3")); } [Fact] public void LambdaBeforeVersionThree() { var text = @" class C { void Foo() { var q = a => b; } } "; var tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5)); tree.GetCompilationUnitRoot().GetDiagnostics().Verify(); tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp2)); tree.GetCompilationUnitRoot().GetDiagnostics().Verify( // (6,19): error CS8023: Feature 'lambda expression' is not available in C# 2. Please use language version 3 or greater. // var q = a => b; Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion2, "=>").WithArguments("lambda expression", "3")); } [Fact] public void ExceptionFilterBeforeVersionSix() { var text = @" public class C { public static int Main() { try { } catch if (true) {} } } "; var tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp6)); tree.GetDiagnostics().Verify(); tree = Parse(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5)); tree.GetDiagnostics().Verify( // (6,23): error CS8026: Feature 'exception filter' is not available in C# 5. Please use language version 6 or greater. // try { } catch if (true) {} Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion5, "if").WithArguments("exception filter", "6")); } #endregion #region "Targeted Warning Tests - please arrange tests in the order of error code" [Fact] public void CS0440WRN_GlobalAliasDefn() { var test = @" using global = MyClass; // CS0440 class MyClass { static void Main() { // Note how global refers to the global namespace // even though it is redefined above. global::System.Console.WriteLine(); } } "; ParseAndValidate(test, Diagnostic(ErrorCode.WRN_GlobalAliasDefn, "global")); } [Fact] public void CS0642WRN_PossibleMistakenNullStatement() { var test = @" class MyClass { public static int Main() { for (int i = 0; i < 10; i += 1); // CS0642, semicolon intentional? if(true); while(false); return 0; } } "; ParseAndValidate(test, Diagnostic(ErrorCode.WRN_PossibleMistakenNullStatement, ";")); } [Fact, WorkItem(529895, "DevDiv")] public void AttributeInMethodBody() { var test = @" public class Class1 { int Meth2 (int parm) {[Foo(5)]return 0;} } "; ParseAndValidate(test, // (4,27): error CS1513: } expected Diagnostic(ErrorCode.ERR_RbraceExpected, "[").WithLocation(4, 27), // (4,35): error CS1519: Invalid token 'return' in class, struct, or interface member declaration Diagnostic(ErrorCode.ERR_InvalidMemberDecl, "return").WithArguments("return").WithLocation(4, 35), // (4,35): error CS1519: Invalid token 'return' in class, struct, or interface member declaration Diagnostic(ErrorCode.ERR_InvalidMemberDecl, "return").WithArguments("return").WithLocation(4, 35), // (5,1): error CS1022: Type or namespace definition, or end-of-file expected Diagnostic(ErrorCode.ERR_EOFExpected, "}").WithLocation(5, 1)); } // Preprocessor: [Fact] public void CS1030WRN_WarningDirectivepp() { //the single-line comment is handled differently from other trivia in the directive var test = @" class Test { static void Main() { #warning //This is a WARNING! } } "; ParseAndValidate(test, Diagnostic(ErrorCode.WRN_WarningDirective, "//This is a WARNING!").WithArguments("//This is a WARNING!")); } [Fact] public void CS1522WRN_EmptySwitch() { var test = @" class Test { public static int Main() { int i = 6; switch(i) // CS1522 {} return 0; } } "; ParseAndValidate(test, Diagnostic(ErrorCode.WRN_EmptySwitch, "{")); } [Fact] public void PartialMethodInCSharp2() { var test = @" partial class X { partial void M(); } "; CreateCompilationWithMscorlib(test, parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp2)).VerifyDiagnostics( // (4,5): error CS8023: Feature 'partial method' is not available in C# 2. Please use language version 3 or greater. // partial void M(); Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion2, "partial").WithArguments("partial method", "3")); } [WorkItem(529870, "DevDiv")] [Fact] public void AsyncBeforeCSharp5() { var text = @" class C { async void M() { } } "; var tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5)); tree.GetCompilationUnitRoot().GetDiagnostics().Verify(); tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp3)); tree.GetCompilationUnitRoot().GetDiagnostics().Verify( // (4,5): error CS8024: Feature 'async function' is not available in C# 3. Please use language version 5 or greater. // async void M() { } Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion3, "async").WithArguments("async function", "5")); } [WorkItem(529870, "DevDiv")] [Fact] public void AsyncWithOtherModifiersBeforeCSharp5() { var text = @" class C { async static void M() { } } "; var tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5)); tree.GetCompilationUnitRoot().GetDiagnostics().Verify(); tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp3)); tree.GetCompilationUnitRoot().GetDiagnostics().Verify( // (4,5): error CS8024: Feature 'async function' is not available in C# 3. Please use language version 5 or greater. // async static void M() { } Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion3, "async").WithArguments("async function", "5")); } [Fact] public void AsyncLambdaBeforeCSharp5() { var text = @" class C { static void Main() { Func<int, Task<int>> f = async x => x; } } "; var tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5)); tree.GetCompilationUnitRoot().GetDiagnostics().Verify(); tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp4)); tree.GetCompilationUnitRoot().GetDiagnostics().Verify( // (6,34): error CS8025: Feature 'async function' is not available in C# 4. Please use language version 5 or greater. // Func<int, Task<int>> f = async x => x; Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion4, "async").WithArguments("async function", "5")); } [Fact] public void AsyncDelegateBeforeCSharp5() { var text = @" class C { static void Main() { Func<int, Task<int>> f = async delegate (int x) { return x; }; } } "; var tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5)); tree.GetCompilationUnitRoot().GetDiagnostics().Verify(); tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp4)); tree.GetCompilationUnitRoot().GetDiagnostics().Verify( // (6,34): error CS8025: Feature 'async function' is not available in C# 4. Please use language version 5 or greater. // Func<int, Task<int>> f = async delegate (int x) { return x; }; Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion4, "async").WithArguments("async function", "5")); } [Fact] public void NamedArgumentBeforeCSharp4() { var text = @" [Attr(x:1)] class C { C() { M(y:2); } } "; SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp4)).GetDiagnostics().Verify(); SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp3)).GetDiagnostics().Verify( // (2,7): error CS8024: Feature 'named argument' is not available in C# 3. Please use language version 4 or greater. // [Attr(x:1)] Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion3, "x:").WithArguments("named argument", "4"), // (7,11): error CS8024: Feature 'named argument' is not available in C# 3. Please use language version 4 or greater. // M(y:2); Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion3, "y:").WithArguments("named argument", "4")); } [Fact] public void GlobalKeywordBeforeCSharp2() { var text = @" class C : global::B { } "; SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp2)).GetDiagnostics().Verify(); SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp1)).GetDiagnostics().Verify( // (2,11): error CS8022: Feature 'namespace alias qualifier' is not available in C# 1. Please use language version 2 or greater. // class C : global::B Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion1, "global").WithArguments("namespace alias qualifier", "2")); } [Fact] public void AliasQualifiedNameBeforeCSharp2() { var text = @" class C : A::B { } "; SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp2)).GetDiagnostics().Verify(); SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp1)).GetDiagnostics().Verify( // (2,11): error CS8022: Feature 'namespace alias qualifier' is not available in C# 1. Please use language version 2 or greater. // class C : A::B Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion1, "A").WithArguments("namespace alias qualifier", "2")); } [Fact] public void OptionalParameterBeforeCSharp4() { var text = @" class C { void M(int x = 1) { } } "; SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp4)).GetDiagnostics().Verify(); SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp3)).GetDiagnostics().Verify( // (4,18): error CS8024: Feature 'optional parameter' is not available in C# 3. Please use language version 4 or greater. // void M(int x = 1) { } Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion3, "= 1").WithArguments("optional parameter", "4")); } [Fact] public void ObjectInitializerBeforeCSharp3() { var text = @" class C { void M() { return new C { Foo = 1 }; } } "; SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp3)).GetDiagnostics().Verify(); SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp2)).GetDiagnostics().Verify( // (6,22): error CS8023: Feature 'object initializer' is not available in C# 2. Please use language version 3 or greater. // return new C { Foo = 1 }; Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion2, "{").WithArguments("object initializer", "3")); } [Fact] public void CollectionInitializerBeforeCSharp3() { var text = @" class C { void M() { return new C { 1, 2, 3 }; } } "; SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp3)).GetDiagnostics().Verify(); SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp2)).GetDiagnostics().Verify( // (6,22): error CS8023: Feature 'collection initializer' is not available in C# 2. Please use language version 3 or greater. // return new C { 1, 2, 3 }; Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion2, "{").WithArguments("collection initializer", "3")); } [Fact] public void CrefGenericBeforeCSharp2() { var text = @" /// <see cref='C{T}'/> class C { } "; // NOTE: This actually causes an internal compiler error in dev12 (probably wasn't expecting an error from cref parsing). SyntaxFactory.ParseSyntaxTree(text, options: TestOptions.RegularWithDocumentationComments.WithLanguageVersion(LanguageVersion.CSharp2)).GetDiagnostics().Verify(); SyntaxFactory.ParseSyntaxTree(text, options: TestOptions.RegularWithDocumentationComments.WithLanguageVersion(LanguageVersion.CSharp1)).GetDiagnostics().Verify( // (2,16): warning CS1584: XML comment has syntactically incorrect cref attribute 'C{T}' // /// <see cref='C{T}'/> Diagnostic(ErrorCode.WRN_BadXMLRefSyntax, "C{T}").WithArguments("C{T}"), // (2,17): warning CS1658: Feature 'generics' is not available in C# 1. Please use language version 2 or greater.. See also error CS8022. // /// <see cref='C{T}'/> Diagnostic(ErrorCode.WRN_ErrorOverride, "{").WithArguments("error CS8022: Feature 'generics' is not available in C# 1. Please use language version 2 or greater.", "8022")); } [Fact] public void CrefAliasQualifiedNameBeforeCSharp2() { var text = @" /// <see cref='Alias::Foo'/> /// <see cref='global::Foo'/> class C { } "; // NOTE: This actually causes an internal compiler error in dev12 (probably wasn't expecting an error from cref parsing). SyntaxFactory.ParseSyntaxTree(text, options: TestOptions.RegularWithDocumentationComments.WithLanguageVersion(LanguageVersion.CSharp2)).GetDiagnostics().Verify(); SyntaxFactory.ParseSyntaxTree(text, options: TestOptions.RegularWithDocumentationComments.WithLanguageVersion(LanguageVersion.CSharp1)).GetDiagnostics().Verify( // (2,16): warning CS1584: XML comment has syntactically incorrect cref attribute 'Alias::Foo' // /// <see cref='Alias::Foo'/> Diagnostic(ErrorCode.WRN_BadXMLRefSyntax, "Alias::Foo").WithArguments("Alias::Foo"), // (2,16): warning CS1658: Feature 'namespace alias qualifier' is not available in C# 1. Please use language version 2 or greater.. See also error CS8022. // /// <see cref='Alias::Foo'/> Diagnostic(ErrorCode.WRN_ErrorOverride, "Alias").WithArguments("error CS8022: Feature 'namespace alias qualifier' is not available in C# 1. Please use language version 2 or greater.", "8022"), // (3,16): warning CS1584: XML comment has syntactically incorrect cref attribute 'global::Foo' // /// <see cref='global::Foo'/> Diagnostic(ErrorCode.WRN_BadXMLRefSyntax, "global::Foo").WithArguments("global::Foo"), // (3,16): warning CS1658: Feature 'namespace alias qualifier' is not available in C# 1. Please use language version 2 or greater.. See also error CS8022. // /// <see cref='global::Foo'/> Diagnostic(ErrorCode.WRN_ErrorOverride, "global").WithArguments("error CS8022: Feature 'namespace alias qualifier' is not available in C# 1. Please use language version 2 or greater.", "8022")); } [Fact] public void PragmaBeforeCSharp2() { var text = @" #pragma warning disable 1584 #pragma checksum ""file.txt"" ""{00000000-0000-0000-0000-000000000000}"" ""2453"" class C { } "; SyntaxFactory.ParseSyntaxTree(text, options: TestOptions.RegularWithDocumentationComments.WithLanguageVersion(LanguageVersion.CSharp2)).GetDiagnostics().Verify(); SyntaxFactory.ParseSyntaxTree(text, options: TestOptions.RegularWithDocumentationComments.WithLanguageVersion(LanguageVersion.CSharp1)).GetDiagnostics().Verify( // (2,2): error CS8022: Feature '#pragma' is not available in C# 1. Please use language version 2 or greater. // #pragma warning disable 1584 Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion1, "pragma").WithArguments("#pragma", "2"), // (3,2): error CS8022: Feature '#pragma' is not available in C# 1. Please use language version 2 or greater. // #pragma checksum "file.txt" "{00000000-0000-0000-0000-000000000000}" "2453" Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion1, "pragma").WithArguments("#pragma", "2")); } [Fact] public void AwaitAsIdentifierInAsyncContext() { var text = @" class C { async void f() { int await; } } "; var tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5)); tree.GetCompilationUnitRoot().GetDiagnostics().Verify( // (6,13): error CS4003: 'await' cannot be used as an identifier within an async method or lambda expression // int await; Diagnostic(ErrorCode.ERR_BadAwaitAsIdentifier, "await")); } // Note: Warnings covered in other test suite: // 1) PreprocessorTests: CS1633WRN_IllegalPragma, CS1634WRN_IllegalPPWarning, CS1691WRN_BadWarningNumber, CS1692WRN_InvalidNumber, // CS1695WRN_IllegalPPChecksum, CS1696WRN_EndOfPPLineExpected [Fact] public void WRN_NonECMAFeature() { var source = @"[module:Obsolete()]"; SyntaxFactory.ParseSyntaxTree(source, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp2)).GetDiagnostics().Verify(); SyntaxFactory.ParseSyntaxTree(source, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp1)).GetDiagnostics().Verify( // (1,2): warning CS1645: Feature 'module as an attribute target specifier' is not part of the standardized ISO C# language specification, and may not be accepted by other compilers // [module:Obsolete()] Diagnostic(ErrorCode.WRN_NonECMAFeature, "module:").WithArguments("module as an attribute target specifier")); } #endregion #region "Helpers" public static void ParseAndValidate(string text, params DiagnosticDescription[] expectedErrors) { var parsedTree = ParseWithRoundTripCheck(text); var actualErrors = parsedTree.GetDiagnostics(); actualErrors.Verify(expectedErrors); } public static void ParseAndValidateFirst(string text, DiagnosticDescription expectedFirstError) { var parsedTree = ParseWithRoundTripCheck(text); var actualErrors = parsedTree.GetDiagnostics(); actualErrors.Take(1).Verify(expectedFirstError); } #endregion } }
33.955945
228
0.571332
[ "Apache-2.0" ]
jdm7dv/Rosyln
Src/Compilers/CSharp/Test/Syntax/Parsing/ParserErrorMessageTests.cs
158,780
C#
/* The MIT License (MIT) Copyright (c) 2018 Helix Toolkit contributors */ using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using global::SharpDX; #if NETFX_CORE namespace HelixToolkit.UWP #else namespace HelixToolkit.Wpf.SharpDX #endif { using Utilities; using Core; #if !NETFX_CORE [Serializable] #endif public class BoneSkinnedMeshGeometry3D : MeshGeometry3D { public BoneSkinnedMeshGeometry3D() { } public BoneSkinnedMeshGeometry3D(MeshGeometry3D mesh) { mesh.AssignTo(this); } private IList<BoneIds> vertexBoneIds; /// <summary> /// Gets or sets the vertex bone ids and bone weights. /// </summary> /// <value> /// The vertex bone ids. /// </value> public IList<BoneIds> VertexBoneIds { set { Set(ref vertexBoneIds, value); } get { return vertexBoneIds; } } /// <summary> /// Merge meshes into one /// </summary> /// <param name="meshes"></param> /// <returns></returns> public static BoneSkinnedMeshGeometry3D Merge(params BoneSkinnedMeshGeometry3D[] meshes) { var positions = new Vector3Collection(); var indices = new IntCollection(); var normals = meshes.All(x => x.Normals != null) ? new Vector3Collection() : null; var colors = meshes.All(x => x.Colors != null) ? new Color4Collection() : null; var textureCoods = meshes.All(x => x.TextureCoordinates != null) ? new Vector2Collection() : null; var tangents = meshes.All(x => x.Tangents != null) ? new Vector3Collection() : null; var bitangents = meshes.All(x => x.BiTangents != null) ? new Vector3Collection() : null; var vertexIds = meshes.All(x => x.VertexBoneIds != null) ? new List<BoneIds>() : null; int index = 0; foreach (var part in meshes) { positions.AddRange(part.Positions); indices.AddRange(part.Indices.Select(x => x + index)); index += part.Positions.Count; } if (normals != null) { normals = new Vector3Collection(meshes.SelectMany(x => x.Normals)); } if (colors != null) { colors = new Color4Collection(meshes.SelectMany(x => x.Colors)); } if (textureCoods != null) { textureCoods = new Vector2Collection(meshes.SelectMany(x => x.TextureCoordinates)); } if (tangents != null) { tangents = new Vector3Collection(meshes.SelectMany(x => x.Tangents)); } if (bitangents != null) { bitangents = new Vector3Collection(meshes.SelectMany(x => x.BiTangents)); } if(vertexIds != null) { vertexIds = new List<BoneIds>(meshes.SelectMany(x => x.VertexBoneIds)); } var mesh = new BoneSkinnedMeshGeometry3D() { Positions = positions, Indices = indices, Normals = normals, Colors = colors, TextureCoordinates = textureCoods, Tangents = tangents, BiTangents = bitangents, VertexBoneIds = vertexIds }; return mesh; } } }
29.991803
110
0.525553
[ "MIT" ]
SiNeumann/helix-toolkit
Source/HelixToolkit.SharpDX.Shared/Model/Geometry/BoneSkinnedMeshGeometry3D.cs
3,661
C#
using Grasshopper.Kernel; using Grasshopper.Kernel.Parameters; using Grasshopper.Kernel.Types; using Rhino.Geometry; using System; using System.Collections.Generic; using Parametric_FEM_Toolbox.UIWidgets; using Parametric_FEM_Toolbox.Utilities; using Parametric_FEM_Toolbox.HelperLibraries; using Dlubal.RFEM5; using Parametric_FEM_Toolbox.RFEM; namespace Parametric_FEM_Toolbox.GUI { public class SubComponent_RFLine_Disassemble_GUI : SubComponent { public override string name() { return "Disassemble"; } public override string display_name() { return "Disassemble"; } public override void registerEvaluationUnits(EvaluationUnitManager mngr) { EvaluationUnit evaluationUnit = new EvaluationUnit(name(), display_name(), "Disassemble Lines."); evaluationUnit.Icon = Properties.Resources.Disassemble_Line; mngr.RegisterUnit(evaluationUnit); Setup(evaluationUnit); } public override void OnComponentLoaded() { } protected void Setup(EvaluationUnit unit) { unit.RegisterInputParam(new Param_RFEM(), "RF Line", "RF Line", "Input RFLine.", GH_ParamAccess.item); // unit.Inputs[0].Parameter.Optional = true; unit.RegisterOutputParam(new Param_Curve(), "Line", "Line", "Line or Curve to assemble the RFLine from."); unit.RegisterOutputParam(new Param_Integer(), "Line Number", "No", "Index number of the RFEM object."); unit.RegisterOutputParam(new Param_String(), "Comment", "Comment", "Comment."); unit.RegisterOutputParam(new Param_String(), "NodeList", "NodeList", "Node List"); unit.RegisterOutputParam(new Param_String(), "Line Type", "Type", "Line Type"); unit.RegisterOutputParam(new Param_Number(), "Rotation Angle [°]", "β", "Rotation Angle [°]"); unit.RegisterOutputParam(new Param_String(), "Rotation Type", "Rot Type", "Rotation Type"); } public override void SolveInstance(IGH_DataAccess DA, out string msg, out GH_RuntimeMessageLevel level) { msg = ""; level = GH_RuntimeMessageLevel.Blank; // Input var inGH = new GH_RFEM(); if (!DA.GetData(0, ref inGH)) { return; } var rFLine = (RFLine)inGH.Value; // Output DA.SetData(0, rFLine.ToCurve()); DA.SetData(1, rFLine.No); DA.SetData(2, rFLine.Comment); DA.SetData(3, rFLine.NodeList); DA.SetData(4, rFLine.Type); DA.SetData(5, rFLine.RotationAngle); DA.SetData(6, rFLine.RotationType); } } }
36.38961
118
0.621342
[ "Apache-2.0" ]
diego-apellaniz/Parametric-FEM-Toolbox
Parametric_FEM_Toolbox/Parametric_FEM_Toolbox/GUI/SubComponent_RFLine_Disassemble_GUI.cs
2,807
C#
// https://github.com/meziantou/Meziantou.Framework #if NETCOREAPP namespace HandyControl.Tools; internal static class PendingEvent { public static PendingEvent<T> Add<T>(T item) => new PendingEvent<T>(PendingEventType.Add, item); public static PendingEvent<T> Insert<T>(int index, T item) => new PendingEvent<T>(PendingEventType.Insert, item, index); public static PendingEvent<T> Remove<T>(T item) => new PendingEvent<T>(PendingEventType.Remove, item); public static PendingEvent<T> RemoveAt<T>(int index) => new PendingEvent<T>(PendingEventType.RemoveAt, index); public static PendingEvent<T> Replace<T>(int index, T item) => new PendingEvent<T>(PendingEventType.Replace, item, index); public static PendingEvent<T> Clear<T>() => new PendingEvent<T>(PendingEventType.Clear); } #endif
39
126
0.742369
[ "MIT" ]
Muzsor/HandyControls
src/Shared/HandyControl_Shared/HandyControls/Tools/Collection/ThreadSafe/PendingEvent.cs
821
C#
using System; using System.Diagnostics; using b2xtranslator.StructuredStorage.Reader; using b2xtranslator.Tools; namespace b2xtranslator.Spreadsheet.XlsFileFormat.Records { /// <summary> /// TABLESTYLE: Table Style (88Fh) /// /// This record is used for each custom Table style in use in the document. /// </summary> [BiffRecord(RecordType.TableStyle)] public class TableStyle : BiffRecord { public const RecordType ID = RecordType.TableStyle; /// <summary> /// Record type; this matches the BIFF rt in the first two bytes of the record; =088Fh /// </summary> public ushort rt; /// <summary> /// FRT cell reference flag; =0 currently /// </summary> public ushort grbitFrt; /// <summary> /// Currently not used, and set to 0 /// </summary> public ulong reserved0; /// <summary> /// A packed bit field /// </summary> private ushort grbitTS; /// <summary> /// Count of TABLESTYLEELEMENT records to follow. /// </summary> public uint ctse; /// <summary> /// Length of Table style name in 2 byte characters. /// </summary> public ushort cchName; /// <summary> /// Table style name in 2 byte characters /// </summary> public byte[] rgchName; /// <summary> /// Should always be 0. /// </summary> public bool fIsBuiltIn; /// <summary> /// =1 if Table style can be applied to PivotTables /// </summary> public bool fIsPivot; /// <summary> /// =1 if Table style can be applied to Tables /// </summary> public bool fIsTable; /// <summary> /// Reserved; must be 0 (zero) /// </summary> public ushort fReserved0; public TableStyle(IStreamReader reader, RecordType id, ushort length) : base(reader, id, length) { // assert that the correct record type is instantiated Debug.Assert(this.Id == ID); // initialize class members from stream this.rt = reader.ReadUInt16(); this.grbitFrt = reader.ReadUInt16(); this.reserved0 = reader.ReadUInt64(); this.grbitTS = reader.ReadUInt16(); this.fIsBuiltIn = Utils.BitmaskToBool(this.grbitTS, 0x0001); this.fIsPivot = Utils.BitmaskToBool(this.grbitTS, 0x0002); this.fIsTable = Utils.BitmaskToBool(this.grbitTS, 0x0004); this.fReserved0 = (ushort)Utils.BitmaskToInt(this.grbitTS, 0xFFF8); this.ctse = reader.ReadUInt32(); this.cchName = reader.ReadUInt16(); this.rgchName = reader.ReadBytes(this.cchName * 2); // assert that the correct number of bytes has been read from the stream Debug.Assert(this.Offset + this.Length == this.Reader.BaseStream.Position); } } }
30.039604
94
0.571852
[ "BSD-3-Clause" ]
EvolutionJobs/b2xtranslator
Xls/XlsFileFormat/Records/TableStyle.cs
3,034
C#
namespace HTTPServer.GameStoreApplication.Models { using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; public class Game { [Key] public int Id { get; set; } public string Title { get; set; } public string Trailer { get; set; } public string Image { get; set; } public string SizeGB { get; set; } public decimal Price { get; set; } public string Description { get; set; } public DateTime ReleaseDate { get; set; } public ICollection<UserGame> UserGames { get; set; } } }
21.551724
60
0.6064
[ "MIT" ]
Steffkn/SoftUni
05.CSharpWeb/01.Basics/05.WebServer-CSS/WebServer/GameStoreApplication/Models/Game.cs
627
C#
using System; using System.Collections.Generic; using System.IO.Ports; using System.Linq; using Sharpduino.EventArguments; namespace Sharpduino.SerialProviders { public class ComPortProvider : ISerialProvider { private EnhancedSerialPort port; public ComPortProvider(string portName, int baudRate = 57600, Parity parity = Parity.None, int dataBits = 8, StopBits stopBits = StopBits.One, bool autoReset = false) { port = new EnhancedSerialPort(portName,baudRate,parity,dataBits,stopBits); if (autoReset) port.DtrEnable = true; } #region Proper Dispose Code // Proper Dispose code should contain the following. See // http://stackoverflow.com/questions/538060/proper-use-of-the-idisposable-interface ~ComPortProvider() { Dispose(false); } public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } protected void Dispose(bool shouldDispose) { if ( shouldDispose ) { // Dispose of the com port as safely as possible if ( port != null ) { if( port.IsOpen ) port.Close(); port.Dispose(); port = null; } } } #endregion public void Open() { port.Open(); if (port.IsOpen) port.DataReceived += ComPort_DataReceived; } public void Close() { if (port.IsOpen) { port.Close(); port.DataReceived -= ComPort_DataReceived; } } private void ComPort_DataReceived(object sender, SerialDataReceivedEventArgs e) { byte[] bytes = new byte[port.BytesToRead]; port.Read(bytes, 0, bytes.Length); OnDataReceived(bytes); } public event EventHandler<DataReceivedEventArgs> DataReceived; private void OnDataReceived(byte[] bytes) { var handler = DataReceived; if ( handler != null ) handler(this,new DataReceivedEventArgs(bytes)); } public void Send(IEnumerable<byte> bytes) { byte[] buffer = bytes.ToArray(); port.Write(buffer,0,buffer.Length); } } }
28.271739
139
0.509804
[ "MIT" ]
piccaso/sharpduino
Sharpduino/SerialProviders/ComPortProvider.cs
2,601
C#
using System.ComponentModel.DataAnnotations; namespace EntityG.Client.Models { public class LoginParamsType { [Required] public string UserName { get; set; } [Required] public string Password { get; set; } public string Mobile { get; set; } public string Captcha { get; set; } public string LoginType { get; set; } public bool AutoLogin { get; set; } } }
22.157895
55
0.624703
[ "MIT" ]
jackiesphan1996/EntityG-HRM
EntityG/Client/EntityG.Client/Models/LoginParamsType.cs
423
C#
namespace KaloPati.Entities.Model { public class Banner:BaseEntity { public string Bannername { get; set; } } }
16.625
46
0.639098
[ "MIT" ]
rbnprj/AspNetBoilerPlate
NetBoilerPlate.Entities/Model/Banner.cs
135
C#
using log4net.Util; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; namespace PathOfModifiers.Projectiles { public class FrostPulse : ModProjectile, INonTriggerringProjectile { const int baseTimeLeft = 600; const int timeLeftAfterTileCollide = 5; public override void SetStaticDefaults() { DisplayName.SetDefault("FrostPulse"); } public override void SetDefaults() { projectile.width = 38; projectile.height = 38; projectile.alpha = 100; projectile.timeLeft = baseTimeLeft; projectile.penetrate = 20; projectile.friendly = true; projectile.tileCollide = true; projectile.ignoreWater = true; projectile.usesLocalNPCImmunity = true; } public override void AI() { projectile.direction = projectile.spriteDirection = projectile.velocity.X > 0f ? 1 : -1; projectile.rotation = projectile.velocity.ToRotation(); Vector2 position = projectile.position + new Vector2( Main.rand.NextFloat(projectile.width), Main.rand.NextFloat(projectile.height)); Dust.NewDustPerfect( position, ModContent.DustType<Dusts.FrostDebris>(), Velocity: projectile.velocity * 0.2f, Alpha: 100, Scale: Main.rand.NextFloat(2.2f, 3.3f)); } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { Texture2D texture = Main.projectileTexture[projectile.type]; Rectangle sourceRectangle = texture.Bounds; Vector2 origin = sourceRectangle.Size() / 2f; Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), sourceRectangle, Color.White, projectile.rotation, origin, projectile.scale, SpriteEffects.None, 0f); return false; } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { Hit(target); } public override void OnHitPlayer(Player target, int damage, bool crit) { Hit(target); } public override void OnHitPvp(Player target, int damage, bool crit) { OnHitPlayer(target, damage, crit); } void Hit(NPC target) { target.GetGlobalNPC<BuffNPC>().AddChilledBuff(target, projectile.ai[0], PathOfModifiers.ailmentDuration); } void Hit(Player target) { target.GetModPlayer<BuffPlayer>().AddChilledBuff(target, projectile.ai[0], PathOfModifiers.ailmentDuration); } public override bool OnTileCollide(Vector2 oldVelocity) { if (projectile.timeLeft > timeLeftAfterTileCollide) { projectile.timeLeft = timeLeftAfterTileCollide; } projectile.velocity = oldVelocity; projectile.tileCollide = false; return false; } public override void Kill(int timeLeft) { PlayKillSound(); } void PlayKillSound() { Main.PlaySound(SoundID.Item21.WithVolume(1f).WithPitchVariance(0.3f), projectile.Center); } } }
32.731481
120
0.598868
[ "MIT" ]
Liburia/PathOfModifiers
Projectiles/FrostPulse.cs
3,535
C#
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class PlayerText : MonoBehaviour { public GameObject textObject; public Text playerText; public float showTextSpeed; private bool displayText; private float hideAfter; void Start() { hideAfter = GetComponent<PlayerMovement>().levelController.startPuzzleTime; Debug.Log(hideAfter); displayText = false; } public bool IsTextPlaying() { return displayText; } public IEnumerator PlayText(string text) { displayText = true; playerText.text = null; textObject.SetActive(true); foreach (char letter in text) { playerText.text += letter; yield return new WaitForSeconds(showTextSpeed); } yield return new WaitForSeconds(hideAfter); textObject.SetActive(false); displayText = false; } }
18.234043
77
0.736289
[ "MIT" ]
CaptainBulba/advanced-game-dev
Assets/Scripts/Player/PlayerText.cs
857
C#
using Plang.Compiler.Backend.ASTExt; using Plang.Compiler.TypeChecker; using Plang.Compiler.TypeChecker.AST; using Plang.Compiler.TypeChecker.AST.Declarations; using Plang.Compiler.TypeChecker.AST.Expressions; using Plang.Compiler.TypeChecker.AST.Statements; using Plang.Compiler.TypeChecker.AST.States; using Plang.Compiler.TypeChecker.Types; using System; using System.Collections.Generic; using System.IO; using System.Linq; namespace Plang.Compiler.Backend.CSharp { public class CSharpCodeGenerator : ICodeGenerator { public IEnumerable<CompiledFile> GenerateCode(ICompilationJob job, Scope globalScope) { CompilationContext context = new CompilationContext(job); CompiledFile csharpSource = GenerateSource(context, globalScope); return new List<CompiledFile> { csharpSource }; } private CompiledFile GenerateSource(CompilationContext context, Scope globalScope) { CompiledFile source = new CompiledFile(context.FileName); WriteSourcePrologue(context, source.Stream); // write the top level declarations foreach (IPDecl decl in globalScope.AllDecls) { WriteDecl(context, source.Stream, decl); } // write the interface declarations WriteInitializeInterfaces(context, source.Stream, globalScope.Interfaces); // write the enum declarations WriteInitializeEnums(context, source.Stream, globalScope.Enums); WriteSourceEpilogue(context, source.Stream); return source; } private void WriteInitializeInterfaces(CompilationContext context, StringWriter output, IEnumerable<Interface> interfaces) { WriteNameSpacePrologue(context, output); //create the interface declarations List<Interface> ifaces = interfaces.ToList(); foreach (Interface iface in ifaces) { context.WriteLine(output, $"public class {context.Names.GetNameForDecl(iface)} : PMachineValue {{"); context.WriteLine(output, $"public {context.Names.GetNameForDecl(iface)} (ActorId machine, List<string> permissions) : base(machine, permissions) {{ }}"); context.WriteLine(output, "}"); context.WriteLine(output); } //initialize the interfaces context.WriteLine(output, "public partial class PHelper {"); context.WriteLine(output, "public static void InitializeInterfaces() {"); context.WriteLine(output, "PInterfaces.Clear();"); foreach (Interface iface in ifaces) { context.Write(output, $"PInterfaces.AddInterface(nameof({context.Names.GetNameForDecl(iface)})"); foreach (PEvent ev in iface.ReceivableEvents.Events) { context.Write(output, ", "); context.Write(output, $"nameof({context.Names.GetNameForDecl(ev)})"); } context.WriteLine(output, ");"); } context.WriteLine(output, "}"); context.WriteLine(output, "}"); context.WriteLine(output); WriteNameSpaceEpilogue(context, output); } private void WriteSourcePrologue(CompilationContext context, StringWriter output) { context.WriteLine(output, "using Microsoft.Coyote;"); context.WriteLine(output, "using Microsoft.Coyote.Actors;"); context.WriteLine(output, "using Microsoft.Coyote.Runtime;"); context.WriteLine(output, "using Microsoft.Coyote.Specifications;"); context.WriteLine(output, "using System;"); context.WriteLine(output, "using System.Runtime;"); context.WriteLine(output, "using System.Collections.Generic;"); context.WriteLine(output, "using System.Linq;"); context.WriteLine(output, "using System.IO;"); context.WriteLine(output, "using Plang.CSharpRuntime;"); context.WriteLine(output, "using Plang.CSharpRuntime.Values;"); context.WriteLine(output, "using Plang.CSharpRuntime.Exceptions;"); context.WriteLine(output, "using System.Threading;"); context.WriteLine(output, "using System.Threading.Tasks;"); context.WriteLine(output); context.WriteLine(output, "#pragma warning disable 162, 219, 414, 1998"); context.WriteLine(output, $"namespace PImplementation"); context.WriteLine(output, "{"); context.WriteLine(output, "}"); } private void WriteSourceEpilogue(CompilationContext context, StringWriter output) { context.WriteLine(output, "#pragma warning restore 162, 219, 414"); } private void WriteNameSpacePrologue(CompilationContext context, StringWriter output) { context.WriteLine(output, $"namespace PImplementation"); context.WriteLine(output, "{"); } private void WriteNameSpaceEpilogue(CompilationContext context, StringWriter output) { context.WriteLine(output, "}"); } private void WriteDecl(CompilationContext context, StringWriter output, IPDecl decl) { string declName; switch (decl) { case Function function: if (!function.IsForeign) { context.WriteLine(output, $"namespace PImplementation"); context.WriteLine(output, "{"); context.WriteLine(output, $"public static partial class {context.GlobalFunctionClassName}"); context.WriteLine(output, "{"); WriteFunction(context, output, function); context.WriteLine(output, "}"); context.WriteLine(output, "}"); } break; case PEvent pEvent: if (!pEvent.IsBuiltIn) { WriteEvent(context, output, pEvent); } break; case Machine machine: if (machine.IsSpec) { WriteMonitor(context, output, machine); } else { WriteMachine(context, output, machine); } break; case PEnum _: break; case TypeDef typeDef: ForeignType foreignType = typeDef.Type as ForeignType; if (foreignType != null) { WriteForeignType(context, output, foreignType); } break; case Implementation impl: WriteImplementationDecl(context, output, impl); break; case SafetyTest safety: WriteSafetyTestDecl(context, output, safety); break; case Interface _: break; case EnumElem _: break; default: declName = context.Names.GetNameForDecl(decl); context.WriteLine(output, $"// TODO: {decl.GetType().Name} {declName}"); break; } } private void WriteMonitor(CompilationContext context, StringWriter output, Machine machine) { WriteNameSpacePrologue(context, output); string declName = context.Names.GetNameForDecl(machine); context.WriteLine(output, $"internal partial class {declName} : PMonitor"); context.WriteLine(output, "{"); foreach (Variable field in machine.Fields) { context.WriteLine(output, $"private {GetCSharpType(field.Type)} {context.Names.GetNameForDecl(field)} = {GetDefaultValue(field.Type)};"); } WriteMonitorConstructor(context, output, machine); foreach (Function method in machine.Methods) { WriteFunction(context, output, method); } foreach (State state in machine.States) { WriteState(context, output, state); } context.WriteLine(output, "}"); WriteNameSpaceEpilogue(context, output); } private void WriteMonitorConstructor(CompilationContext context, StringWriter output, Machine machine) { string declName = context.Names.GetNameForDecl(machine); context.WriteLine(output, $"static {declName}() {{"); foreach (PEvent sEvent in machine.Observes.Events) { context.WriteLine(output, $"observes.Add(nameof({context.Names.GetNameForDecl(sEvent)}));"); } context.WriteLine(output, "}"); context.WriteLine(output); } private static void WriteForeignType(CompilationContext context, StringWriter output, ForeignType foreignType) { // we do not generate code for foreign types string declName = foreignType.CanonicalRepresentation; context.WriteLine(output, $"// TODO: Implement the Foreign Type {declName}"); } private void WriteSafetyTestDecl(CompilationContext context, StringWriter output, SafetyTest safety) { WriteNameSpacePrologue(context, output); context.WriteLine(output, $"public class {context.Names.GetNameForDecl(safety)} {{"); WriteInitializeLinkMap(context, output, safety.ModExpr.ModuleInfo.LinkMap); WriteInitializeInterfaceDefMap(context, output, safety.ModExpr.ModuleInfo.InterfaceDef); WriteInitializeMonitorObserves(context, output, safety.ModExpr.ModuleInfo.MonitorMap.Keys); WriteInitializeMonitorMap(context, output, safety.ModExpr.ModuleInfo.MonitorMap); WriteTestFunction(context, output, safety.Main); context.WriteLine(output, "}"); WriteNameSpaceEpilogue(context, output); } private void WriteImplementationDecl(CompilationContext context, StringWriter output, Implementation impl) { WriteNameSpacePrologue(context, output); context.WriteLine(output, $"public class {context.Names.GetNameForDecl(impl)} {{"); WriteInitializeLinkMap(context, output, impl.ModExpr.ModuleInfo.LinkMap); WriteInitializeInterfaceDefMap(context, output, impl.ModExpr.ModuleInfo.InterfaceDef); WriteInitializeMonitorObserves(context, output, impl.ModExpr.ModuleInfo.MonitorMap.Keys); WriteInitializeMonitorMap(context, output, impl.ModExpr.ModuleInfo.MonitorMap); WriteTestFunction(context, output, impl.Main); context.WriteLine(output, "}"); WriteNameSpaceEpilogue(context, output); } private void WriteInitializeMonitorObserves(CompilationContext context, StringWriter output, ICollection<Machine> monitors) { context.WriteLine(output, "public static void InitializeMonitorObserves() {"); context.WriteLine(output, "PModule.monitorObserves.Clear();"); foreach (Machine monitor in monitors) { context.WriteLine(output, $"PModule.monitorObserves[nameof({context.Names.GetNameForDecl(monitor)})] = new List<string>();"); foreach (PEvent ev in monitor.Observes.Events) { context.WriteLine(output, $"PModule.monitorObserves[nameof({context.Names.GetNameForDecl(monitor)})].Add(nameof({context.Names.GetNameForDecl(ev)}));"); } } context.WriteLine(output, "}"); context.WriteLine(output); } private void WriteInitializeEnums(CompilationContext context, StringWriter output, IEnumerable<PEnum> enums) { WriteNameSpacePrologue(context, output); //initialize the interfaces context.WriteLine(output, "public partial class PHelper {"); context.WriteLine(output, "public static void InitializeEnums() {"); context.WriteLine(output, "PrtEnum.Clear();"); foreach (PEnum enumDecl in enums) { string enumElemNames = $"new [] {{{string.Join(",", enumDecl.Values.Select(e => $"\"{context.Names.GetNameForDecl(e)}\""))}}}"; string enumElemValues = $"new [] {{{string.Join(",", enumDecl.Values.Select(e => e.Value))}}}"; context.WriteLine(output, $"PrtEnum.AddEnumElements({enumElemNames}, {enumElemValues});"); } context.WriteLine(output, "}"); context.WriteLine(output, "}"); context.WriteLine(output); WriteNameSpaceEpilogue(context, output); } private void WriteTestFunction(CompilationContext context, StringWriter output, string main) { context.WriteLine(output); context.WriteLine(output, "[Microsoft.Coyote.SystematicTesting.Test]"); context.WriteLine(output, "public static void Execute(IActorRuntime runtime) {"); context.WriteLine(output, "runtime.RegisterLog(new PLogFormatter());"); context.WriteLine(output, "PModule.runtime = runtime;"); context.WriteLine(output, "PHelper.InitializeInterfaces();"); context.WriteLine(output, "PHelper.InitializeEnums();"); context.WriteLine(output, "InitializeLinkMap();"); context.WriteLine(output, "InitializeInterfaceDefMap();"); context.WriteLine(output, "InitializeMonitorMap(runtime);"); context.WriteLine(output, "InitializeMonitorObserves();"); context.WriteLine(output, $"runtime.CreateActor(typeof(_GodMachine), new _GodMachine.Config(typeof({main})));"); context.WriteLine(output, "}"); } private void WriteInitializeMonitorMap(CompilationContext context, StringWriter output, IDictionary<Machine, IEnumerable<Interface>> monitorMap) { // compute the reverse map Dictionary<Interface, List<Machine>> machineMap = new Dictionary<Interface, List<Machine>>(); foreach (KeyValuePair<Machine, IEnumerable<Interface>> monitorToInterface in monitorMap) { foreach (Interface iface in monitorToInterface.Value) { if (!machineMap.ContainsKey(iface)) { machineMap[iface] = new List<Machine>(); } machineMap[iface].Add(monitorToInterface.Key); } } context.WriteLine(output, "public static void InitializeMonitorMap(IActorRuntime runtime) {"); context.WriteLine(output, "PModule.monitorMap.Clear();"); foreach (KeyValuePair<Interface, List<Machine>> machine in machineMap) { context.WriteLine(output, $"PModule.monitorMap[nameof({context.Names.GetNameForDecl(machine.Key)})] = new List<Type>();"); foreach (Machine monitor in machine.Value) { context.WriteLine(output, $"PModule.monitorMap[nameof({context.Names.GetNameForDecl(machine.Key)})].Add(typeof({context.Names.GetNameForDecl(monitor)}));"); } } foreach (Machine monitor in monitorMap.Keys) { context.WriteLine(output, $"runtime.RegisterMonitor<{context.Names.GetNameForDecl(monitor)}>();"); } context.WriteLine(output, "}"); context.WriteLine(output); } private void WriteInitializeInterfaceDefMap(CompilationContext context, StringWriter output, IDictionary<Interface, Machine> interfaceDef) { context.WriteLine(output, "public static void InitializeInterfaceDefMap() {"); context.WriteLine(output, "PModule.interfaceDefinitionMap.Clear();"); foreach (KeyValuePair<Interface, Machine> map in interfaceDef) { context.WriteLine(output, $"PModule.interfaceDefinitionMap.Add(nameof({context.Names.GetNameForDecl(map.Key)}), typeof({context.Names.GetNameForDecl(map.Value)}));"); } context.WriteLine(output, "}"); context.WriteLine(output); } private void WriteInitializeLinkMap(CompilationContext context, StringWriter output, IDictionary<Interface, IDictionary<Interface, Interface>> linkMap) { context.WriteLine(output, "public static void InitializeLinkMap() {"); context.WriteLine(output, "PModule.linkMap.Clear();"); foreach (KeyValuePair<Interface, IDictionary<Interface, Interface>> creatorInterface in linkMap) { context.WriteLine(output, $"PModule.linkMap[nameof({context.Names.GetNameForDecl(creatorInterface.Key)})] = new Dictionary<string, string>();"); foreach (KeyValuePair<Interface, Interface> clinkMap in creatorInterface.Value) { context.WriteLine(output, $"PModule.linkMap[nameof({context.Names.GetNameForDecl(creatorInterface.Key)})].Add(nameof({context.Names.GetNameForDecl(clinkMap.Key)}), nameof({context.Names.GetNameForDecl(clinkMap.Value)}));"); } } context.WriteLine(output, "}"); context.WriteLine(output); } private void WriteEvent(CompilationContext context, StringWriter output, PEvent pEvent) { WriteNameSpacePrologue(context, output); string declName = context.Names.GetNameForDecl(pEvent); // initialize the payload type string payloadType = GetCSharpType(pEvent.PayloadType, true); context.WriteLine(output, $"internal partial class {declName} : PEvent"); context.WriteLine(output, "{"); context.WriteLine(output, $"public {declName}() : base() {{}}"); context.WriteLine(output, $"public {declName} ({payloadType} payload): base(payload)" + "{ }"); context.WriteLine(output, $"public override IPrtValue Clone() {{ return new {declName}();}}"); context.WriteLine(output, "}"); WriteNameSpaceEpilogue(context, output); } private void WriteMachine(CompilationContext context, StringWriter output, Machine machine) { WriteNameSpacePrologue(context, output); string declName = context.Names.GetNameForDecl(machine); context.WriteLine(output, $"internal partial class {declName} : PMachine"); context.WriteLine(output, "{"); foreach (Variable field in machine.Fields) { context.WriteLine(output, $"private {GetCSharpType(field.Type)} {context.Names.GetNameForDecl(field)} = {GetDefaultValue(field.Type)};"); } //create the constructor event string cTorType = GetCSharpType(machine.PayloadType, true); context.Write(output, "public class ConstructorEvent : PEvent"); context.Write(output, "{"); context.Write(output, $"public ConstructorEvent({cTorType} val) : base(val) {{ }}"); context.WriteLine(output, "}"); context.WriteLine(output); context.WriteLine(output, $"protected override Event GetConstructorEvent(IPrtValue value) {{ return new ConstructorEvent(({cTorType})value); }}"); // create the constructor to initialize the sends, creates and receives list WriteMachineConstructor(context, output, machine); foreach (Function method in machine.Methods) { WriteFunction(context, output, method); } foreach (State state in machine.States) { WriteState(context, output, state); } context.WriteLine(output, "}"); WriteNameSpaceEpilogue(context, output); } private static void WriteMachineConstructor(CompilationContext context, StringWriter output, Machine machine) { string declName = context.Names.GetNameForDecl(machine); context.WriteLine(output, $"public {declName}() {{"); foreach (PEvent sEvent in machine.Sends.Events) { context.WriteLine(output, $"this.sends.Add(nameof({context.Names.GetNameForDecl(sEvent)}));"); } foreach (PEvent rEvent in machine.Receives.Events) { context.WriteLine(output, $"this.receives.Add(nameof({context.Names.GetNameForDecl(rEvent)}));"); } foreach (Interface iCreate in machine.Creates.Interfaces) { context.WriteLine(output, $"this.creates.Add(nameof({context.Names.GetNameForDecl(iCreate)}));"); } context.WriteLine(output, "}"); context.WriteLine(output); } private void WriteState(CompilationContext context, StringWriter output, State state) { if (state.IsStart && !state.OwningMachine.IsSpec) { context.WriteLine(output, "[Start]"); context.WriteLine(output, "[OnEntry(nameof(InitializeParametersFunction))]"); context.WriteLine(output, $"[OnEventGotoState(typeof(ConstructorEvent), typeof({context.Names.GetNameForDecl(state)}))]"); context.WriteLine(output, "class __InitState__ : State { }"); context.WriteLine(output); } if (state.IsStart && state.OwningMachine.IsSpec) { context.WriteLine(output, "[Start]"); } if (state.OwningMachine.IsSpec) { if (state.Temperature == StateTemperature.Cold) { context.WriteLine(output, "[Cold]"); } else if (state.Temperature == StateTemperature.Hot) { context.WriteLine(output, "[Hot]"); } } if (state.Entry != null) { context.WriteLine(output, $"[OnEntry(nameof({context.Names.GetNameForDecl(state.Entry)}))]"); } List<string> deferredEvents = new List<string>(); List<string> ignoredEvents = new List<string>(); foreach (KeyValuePair<PEvent, IStateAction> eventHandler in state.AllEventHandlers) { PEvent pEvent = eventHandler.Key; IStateAction stateAction = eventHandler.Value; switch (stateAction) { case EventDefer _: deferredEvents.Add($"typeof({context.Names.GetNameForDecl(pEvent)})"); break; case EventDoAction eventDoAction: var targetDoFunctionName = context.Names.GetNameForDecl(eventDoAction.Target); targetDoFunctionName = eventDoAction.Target.IsAnon ? targetDoFunctionName : $"_{targetDoFunctionName}"; context.WriteLine( output, $"[OnEventDoAction(typeof({context.Names.GetNameForDecl(pEvent)}), nameof({targetDoFunctionName}))]"); break; case EventGotoState eventGotoState when eventGotoState.TransitionFunction == null: context.WriteLine( output, $"[OnEventGotoState(typeof({context.Names.GetNameForDecl(pEvent)}), typeof({context.Names.GetNameForDecl(eventGotoState.Target)}))]"); break; case EventGotoState eventGotoState when eventGotoState.TransitionFunction != null: var targetGotoFunctionName = context.Names.GetNameForDecl(eventGotoState.TransitionFunction); targetGotoFunctionName = eventGotoState.TransitionFunction.IsAnon ? targetGotoFunctionName : $"_{targetGotoFunctionName}"; context.WriteLine( output, $"[OnEventGotoState(typeof({context.Names.GetNameForDecl(pEvent)}), typeof({context.Names.GetNameForDecl(eventGotoState.Target)}), nameof({targetGotoFunctionName}))]"); break; case EventIgnore _: ignoredEvents.Add($"typeof({context.Names.GetNameForDecl(pEvent)})"); break; case EventPushState eventPushState: context.WriteLine( output, $"[OnEventPushState(typeof({context.Names.GetNameForDecl(pEvent)}), typeof({context.Names.GetNameForDecl(eventPushState.Target)}))]"); break; } } if (deferredEvents.Count > 0) { context.WriteLine(output, $"[DeferEvents({string.Join(", ", deferredEvents.AsEnumerable())})]"); } if (ignoredEvents.Count > 0) { context.WriteLine(output, $"[IgnoreEvents({string.Join(", ", ignoredEvents.AsEnumerable())})]"); } if (state.Exit != null) { context.WriteLine(output, $"[OnExit(nameof({context.Names.GetNameForDecl(state.Exit)}))]"); } context.WriteLine(output, $"class {context.Names.GetNameForDecl(state)} : State"); context.WriteLine(output, "{"); context.WriteLine(output, "}"); } private void WriteNamedFunctionWrapper(CompilationContext context, StringWriter output, Function function) { if (function.Role == FunctionRole.Method || function.Role == FunctionRole.Foreign) return; bool isAsync = function.CanReceive == true; FunctionSignature signature = function.Signature; string functionName = context.Names.GetNameForDecl(function); string functionParameters = "Event currentMachine_dequeuedEvent"; string awaitMethod = isAsync ? "await " : ""; string asyncMethod = isAsync ? "async" : ""; string returnType = "void"; if (isAsync) { returnType = "Task"; } context.WriteLine(output, $"public {asyncMethod} {returnType} {$"_{functionName}"}({functionParameters})"); context.WriteLine(output, "{"); //add the declaration of currentMachine if (function.Owner != null) { context.WriteLine(output, $"{context.Names.GetNameForDecl(function.Owner)} currentMachine = this;"); } var parameter = function.Signature.Parameters.Any() ? $"({GetCSharpType(function.Signature.ParameterTypes.First())})((PEvent)currentMachine_dequeuedEvent).Payload" : ""; context.WriteLine(output, $"{awaitMethod}{functionName}({parameter});"); context.WriteLine(output, "}"); } private void WriteFunction(CompilationContext context, StringWriter output, Function function) { if (function.IsForeign) { return; } bool isStatic = function.Owner == null; if (!function.IsAnon && !isStatic) { WriteNamedFunctionWrapper(context, output, function); } bool isAsync = function.CanReceive == true; FunctionSignature signature = function.Signature; string staticKeyword = isStatic ? "static " : ""; string asyncKeyword = isAsync ? "async " : ""; string returnType = GetCSharpType(signature.ReturnType); if (isAsync) { returnType = returnType == "void" ? "Task" : $"Task<{returnType}>"; } string functionName = context.Names.GetNameForDecl(function); string functionParameters = ""; if (function.IsAnon) { functionParameters = "Event currentMachine_dequeuedEvent"; } else { functionParameters = string.Join( ", ", signature.Parameters.Select(param => $"{GetCSharpType(param.Type)} {context.Names.GetNameForDecl(param)}")); } if (isStatic) { string seperator = functionParameters == "" ? "" : ", "; functionParameters += string.Concat(seperator, "PMachine currentMachine"); } context.WriteLine(output, $"public {staticKeyword}{asyncKeyword}{returnType} {functionName}({functionParameters})"); WriteFunctionBody(context, output, function); } private void WriteFunctionBody(CompilationContext context, StringWriter output, Function function) { context.WriteLine(output, "{"); //add the declaration of currentMachine if (function.Owner != null) { context.WriteLine(output, $"{context.Names.GetNameForDecl(function.Owner)} currentMachine = this;"); } if (function.IsAnon) { if (function.Signature.Parameters.Any()) { Variable param = function.Signature.Parameters.First(); context.WriteLine(output, $"{GetCSharpType(param.Type)} {context.Names.GetNameForDecl(param)} = ({GetCSharpType(param.Type)})(gotoPayload ?? ((PEvent)currentMachine_dequeuedEvent).Payload);"); context.WriteLine(output, "this.gotoPayload = null;"); } } foreach (Variable local in function.LocalVariables) { PLanguageType type = local.Type; context.WriteLine(output, $"{GetCSharpType(type, true)} {context.Names.GetNameForDecl(local)} = {GetDefaultValue(type)};"); } foreach (IPStmt bodyStatement in function.Body.Statements) { WriteStmt(context: context, output: output, function: function, stmt: bodyStatement); } context.WriteLine(output, "}"); } private void WriteStmt(CompilationContext context, StringWriter output, Function function, IPStmt stmt) { switch (stmt) { case AnnounceStmt announceStmt: context.Write(output, "currentMachine.Announce((Event)"); WriteExpr(context, output, announceStmt.PEvent); if (announceStmt.Payload != null) { context.Write(output, ", "); WriteExpr(context, output, announceStmt.Payload); } context.WriteLine(output, ");"); break; case AssertStmt assertStmt: context.Write(output, "currentMachine.TryAssert("); WriteExpr(context, output, assertStmt.Assertion); context.Write(output, ","); context.Write(output, $"\"Assertion Failed: \" + "); WriteExpr(context, output, assertStmt.Message); context.WriteLine(output, ");"); //last statement if (FunctionValidator.SurelyReturns(assertStmt)) { context.WriteLine(output, "throw new PUnreachableCodeException();"); } break; case AssignStmt assignStmt: bool needCtorAdapter = !assignStmt.Value.Type.IsSameTypeAs(assignStmt.Location.Type) && !PrimitiveType.Null.IsSameTypeAs(assignStmt.Value.Type) && !PrimitiveType.Any.IsSameTypeAs(assignStmt.Location.Type); WriteLValue(context, output, assignStmt.Location); context.Write(output, $" = ({GetCSharpType(assignStmt.Location.Type)})("); if (needCtorAdapter) { context.Write(output, $"new {GetCSharpType(assignStmt.Location.Type)}("); } WriteExpr(context, output, assignStmt.Value); if (needCtorAdapter) { if (assignStmt.Location.Type.Canonicalize() is SequenceType seqType) { context.Write(output, $".Cast<{GetCSharpType(seqType.ElementType)}>()"); } context.Write(output, ")"); } context.WriteLine(output, ");"); break; case CompoundStmt compoundStmt: context.WriteLine(output, "{"); foreach (IPStmt subStmt in compoundStmt.Statements) { WriteStmt(context, output, function, subStmt); } context.WriteLine(output, "}"); break; case CtorStmt ctorStmt: context.Write(output, $"currentMachine.CreateInterface<{context.Names.GetNameForDecl(ctorStmt.Interface)}>("); context.Write(output, "currentMachine"); if (ctorStmt.Arguments.Any()) { context.Write(output, ", "); if (ctorStmt.Arguments.Count > 1) { //create tuple from rvaluelist context.Write(output, "new PrtTuple("); string septor = ""; foreach (IPExpr ctorExprArgument in ctorStmt.Arguments) { context.Write(output, septor); WriteExpr(context, output, ctorExprArgument); septor = ","; } context.Write(output, ")"); } else { WriteExpr(context, output, ctorStmt.Arguments.First()); } } context.WriteLine(output, ");"); break; case FunCallStmt funCallStmt: bool isStatic = funCallStmt.Function.Owner == null; string awaitMethod = funCallStmt.Function.CanReceive == true ? "await " : ""; string globalFunctionClass = isStatic ? $"{context.GlobalFunctionClassName}." : ""; context.Write(output, $"{awaitMethod}{globalFunctionClass}{context.Names.GetNameForDecl(funCallStmt.Function)}("); string separator = ""; foreach (IPExpr param in funCallStmt.ArgsList) { context.Write(output, separator); WriteExpr(context, output, param); separator = ", "; } if (isStatic) { context.Write(output, separator + "currentMachine"); } context.WriteLine(output, ");"); break; case GotoStmt gotoStmt: //last statement context.Write(output, $"currentMachine.TryGotoState<{context.Names.GetNameForDecl(gotoStmt.State)}>("); if (gotoStmt.Payload != null) { WriteExpr(context, output, gotoStmt.Payload); } context.WriteLine(output, ");"); context.WriteLine(output, "return;"); break; case IfStmt ifStmt: context.Write(output, "if ("); WriteExpr(context, output, ifStmt.Condition); context.WriteLine(output, ")"); WriteStmt(context, output, function, ifStmt.ThenBranch); if (ifStmt.ElseBranch != null && ifStmt.ElseBranch.Statements.Any()) { context.WriteLine(output, "else"); WriteStmt(context, output, function, ifStmt.ElseBranch); } break; case AddStmt addStmt: context.Write(output, "((PrtSet)"); WriteExpr(context, output, addStmt.Variable); context.Write(output, ").Add("); WriteExpr(context, output, addStmt.Value); context.WriteLine(output, ");"); break; case InsertStmt insertStmt: bool isMap = PLanguageType.TypeIsOfKind(insertStmt.Variable.Type, TypeKind.Map); string castOp = isMap ? "(PrtMap)" : "(PrtSeq)"; context.Write(output, $"({castOp}"); WriteExpr(context, output, insertStmt.Variable); if (isMap) { context.Write(output, ").Add("); } else { context.Write(output, ").Insert("); } WriteExpr(context, output, insertStmt.Index); context.Write(output, ", "); WriteExpr(context, output, insertStmt.Value); context.WriteLine(output, ");"); break; case MoveAssignStmt moveAssignStmt: string upCast = ""; if (!moveAssignStmt.FromVariable.Type.IsSameTypeAs(moveAssignStmt.ToLocation.Type)) { upCast = $"({GetCSharpType(moveAssignStmt.ToLocation.Type)})"; if (PLanguageType.TypeIsOfKind(moveAssignStmt.FromVariable.Type, TypeKind.Enum)) { upCast = $"{upCast}(long)"; } } WriteLValue(context, output, moveAssignStmt.ToLocation); context.WriteLine(output, $" = {upCast}{context.Names.GetNameForDecl(moveAssignStmt.FromVariable)};"); break; case NoStmt _: break; case PopStmt _: //last statement context.WriteLine(output, "currentMachine.TryPopState();"); context.WriteLine(output, "return;"); break; case PrintStmt printStmt: context.Write(output, $"PModule.runtime.Logger.WriteLine(\"<PrintLog> \" + "); WriteExpr(context, output, printStmt.Message); context.WriteLine(output, ");"); break; case RaiseStmt raiseStmt: //last statement context.Write(output, "currentMachine.TryRaiseEvent((Event)"); WriteExpr(context, output, raiseStmt.PEvent); if (raiseStmt.Payload.Any()) { context.Write(output, ", "); WriteExpr(context, output, raiseStmt.Payload.First()); } context.WriteLine(output, ");"); context.WriteLine(output, "return;"); break; case ReceiveStmt receiveStmt: string eventName = context.Names.GetTemporaryName("recvEvent"); string[] eventTypeNames = receiveStmt.Cases.Keys.Select(evt => context.Names.GetNameForDecl(evt)) .ToArray(); string recvArgs = string.Join(", ", eventTypeNames.Select(name => $"typeof({name})")); context.WriteLine(output, $"var {eventName} = await currentMachine.TryReceiveEvent({recvArgs});"); context.WriteLine(output, $"switch ({eventName}) {{"); foreach (KeyValuePair<PEvent, Function> recvCase in receiveStmt.Cases) { string caseName = context.Names.GetTemporaryName("evt"); context.WriteLine(output, $"case {context.Names.GetNameForDecl(recvCase.Key)} {caseName}: {{"); if (recvCase.Value.Signature.Parameters.FirstOrDefault() is Variable caseArg) { context.WriteLine(output, $"{GetCSharpType(caseArg.Type)} {context.Names.GetNameForDecl(caseArg)} = ({GetCSharpType(caseArg.Type)})({caseName}.Payload);"); } foreach (Variable local in recvCase.Value.LocalVariables) { PLanguageType type = local.Type; context.WriteLine(output, $"{GetCSharpType(type, true)} {context.Names.GetNameForDecl(local)} = {GetDefaultValue(type)};"); } foreach (IPStmt caseStmt in recvCase.Value.Body.Statements) { WriteStmt(context, output, function, caseStmt); } context.WriteLine(output, "} break;"); } context.WriteLine(output, "}"); break; case RemoveStmt removeStmt: { string castOperation = PLanguageType.TypeIsOfKind(removeStmt.Variable.Type, TypeKind.Map) ? "(PrtMap)" : PLanguageType.TypeIsOfKind(removeStmt.Variable.Type, TypeKind.Sequence) ? "(PrtSeq)" : "(PrtSet)"; context.Write(output, $"({castOperation}"); switch (removeStmt.Variable.Type.Canonicalize()) { case MapType _: WriteExpr(context, output, removeStmt.Variable); context.Write(output, ").Remove("); WriteExpr(context, output, removeStmt.Value); context.WriteLine(output, ");"); break; case SequenceType _: WriteExpr(context, output, removeStmt.Variable); context.Write(output, ").RemoveAt("); WriteExpr(context, output, removeStmt.Value); context.WriteLine(output, ");"); break; case SetType _: WriteExpr(context, output, removeStmt.Variable); context.Write(output, ").Remove("); WriteExpr(context, output, removeStmt.Value); context.WriteLine(output, ");"); break; default: throw new ArgumentOutOfRangeException( $"Remove cannot be applied to type {removeStmt.Variable.Type.OriginalRepresentation}"); } break; } case ReturnStmt returnStmt: context.Write(output, "return "); if (returnStmt.ReturnValue != null) { WriteExpr(context, output, returnStmt.ReturnValue); } context.WriteLine(output, ";"); break; case BreakStmt breakStmt: context.WriteLine(output, "break;"); break; case ContinueStmt continueStmt: context.WriteLine(output, "continue;"); break; case SendStmt sendStmt: context.Write(output, "currentMachine.TrySendEvent("); WriteExpr(context, output, sendStmt.MachineExpr); context.Write(output, ", (Event)"); WriteExpr(context, output, sendStmt.Evt); if (sendStmt.Arguments.Any()) { context.Write(output, ", "); if (sendStmt.Arguments.Count > 1) { //create tuple from rvaluelist string argTypes = string.Join(",", sendStmt.Arguments.Select(a => GetCSharpType(a.Type))); string tupleType = $"PrtTuple"; context.Write(output, $"new {tupleType}("); string septor = ""; foreach (IPExpr ctorExprArgument in sendStmt.Arguments) { context.Write(output, septor); WriteExpr(context, output, ctorExprArgument); septor = ","; } context.Write(output, ")"); } else { WriteExpr(context, output, sendStmt.Arguments.First()); } } context.WriteLine(output, ");"); break; case SwapAssignStmt swapStmt: throw new NotImplementedException("Swap Assignment Not Implemented"); case WhileStmt whileStmt: context.Write(output, "while ("); WriteExpr(context, output, whileStmt.Condition); context.WriteLine(output, ")"); WriteStmt(context, output, function, whileStmt.Body); break; default: throw new ArgumentOutOfRangeException(nameof(stmt)); } } private void WriteLValue(CompilationContext context, StringWriter output, IPExpr lvalue) { #pragma warning disable CCN0002 // Non exhaustive patterns in switch block switch (lvalue) { case MapAccessExpr mapAccessExpr: context.Write(output, "((PrtMap)"); WriteLValue(context, output, mapAccessExpr.MapExpr); context.Write(output, ")["); WriteExpr(context, output, mapAccessExpr.IndexExpr); context.Write(output, "]"); break; case SetAccessExpr setAccessExpr: context.Write(output, "((PrtSet)"); WriteLValue(context, output, setAccessExpr.SetExpr); context.Write(output, ")["); WriteExpr(context, output, setAccessExpr.IndexExpr); context.Write(output, "]"); break; case NamedTupleAccessExpr namedTupleAccessExpr: context.Write(output, "((PrtNamedTuple)"); WriteExpr(context, output, namedTupleAccessExpr.SubExpr); context.Write(output, $")[\"{namedTupleAccessExpr.FieldName}\"]"); break; case SeqAccessExpr seqAccessExpr: context.Write(output, "((PrtSeq)"); WriteLValue(context, output, seqAccessExpr.SeqExpr); context.Write(output, ")["); WriteExpr(context, output, seqAccessExpr.IndexExpr); context.Write(output, "]"); break; case TupleAccessExpr tupleAccessExpr: context.Write(output, "((PrtTuple)"); WriteExpr(context, output, tupleAccessExpr.SubExpr); context.Write(output, $")[{tupleAccessExpr.FieldNo}]"); break; case VariableAccessExpr variableAccessExpr: context.Write(output, context.Names.GetNameForDecl(variableAccessExpr.Variable)); break; default: throw new ArgumentOutOfRangeException(nameof(lvalue)); } #pragma warning restore CCN0002 // Non exhaustive patterns in switch block } private void WriteExpr(CompilationContext context, StringWriter output, IPExpr pExpr) { #pragma warning disable CCN0002 // Non exhaustive patterns in switch block switch (pExpr) { case CloneExpr cloneExpr: WriteClone(context, output, cloneExpr.Term); break; case BinOpExpr binOpExpr: //handle eq and noteq differently if (binOpExpr.Operation == BinOpType.Eq || binOpExpr.Operation == BinOpType.Neq) { string negate = binOpExpr.Operation == BinOpType.Neq ? "!" : ""; context.Write(output, $"({negate}PrtValues.SafeEquals("); if (PLanguageType.TypeIsOfKind(binOpExpr.Lhs.Type, TypeKind.Enum)) { context.Write(output, "PrtValues.Box((long) "); WriteExpr(context, output, binOpExpr.Lhs); context.Write(output, "),"); } else { WriteExpr(context, output, binOpExpr.Lhs); context.Write(output, ","); } if (PLanguageType.TypeIsOfKind(binOpExpr.Rhs.Type, TypeKind.Enum)) { context.Write(output, "PrtValues.Box((long) "); WriteExpr(context, output, binOpExpr.Rhs); context.Write(output, ")"); } else { WriteExpr(context, output, binOpExpr.Rhs); } context.Write(output, "))"); } else { context.Write(output, "("); if (PLanguageType.TypeIsOfKind(binOpExpr.Lhs.Type, TypeKind.Enum)) { context.Write(output, "(long)"); } WriteExpr(context, output, binOpExpr.Lhs); context.Write(output, $") {BinOpToStr(binOpExpr.Operation)} ("); if (PLanguageType.TypeIsOfKind(binOpExpr.Rhs.Type, TypeKind.Enum)) { context.Write(output, "(long)"); } WriteExpr(context, output, binOpExpr.Rhs); context.Write(output, ")"); } break; case BoolLiteralExpr boolLiteralExpr: context.Write(output, $"((PrtBool){(boolLiteralExpr.Value ? "true" : "false")})"); break; case CastExpr castExpr: context.Write(output, $"(({GetCSharpType(castExpr.Type)})"); WriteExpr(context, output, castExpr.SubExpr); context.Write(output, ")"); break; case CoerceExpr coerceExpr: switch (coerceExpr.Type.Canonicalize()) { case PrimitiveType oldType when oldType.IsSameTypeAs(PrimitiveType.Float): case PrimitiveType oldType1 when oldType1.IsSameTypeAs(PrimitiveType.Int): context.Write(output, "("); WriteExpr(context, output, coerceExpr.SubExpr); context.Write(output, ")"); break; case PermissionType _: context.Write(output, "(PInterfaces.IsCoercionAllowed("); WriteExpr(context, output, coerceExpr.SubExpr); context.Write(output, ", "); context.Write(output, $"\"I_{coerceExpr.NewType.CanonicalRepresentation}\") ?"); context.Write(output, "new PMachineValue("); context.Write(output, "("); WriteExpr(context, output, coerceExpr.SubExpr); context.Write(output, ").Id, "); context.Write(output, $"PInterfaces.GetPermissions(\"I_{coerceExpr.NewType.CanonicalRepresentation}\")) : null)"); break; default: throw new ArgumentOutOfRangeException( @"unexpected coercion operation to:" + coerceExpr.Type.CanonicalRepresentation); } break; case ChooseExpr chooseExpr: if (chooseExpr.SubExpr == null) { context.Write(output, "((PrtBool)currentMachine.TryRandomBool())"); } else { context.Write(output, $"(({GetCSharpType(chooseExpr.Type)})currentMachine.TryRandom("); WriteExpr(context, output, chooseExpr.SubExpr); context.Write(output, $"))"); } break; case ContainsExpr containsExpr: var isMap = PLanguageType.TypeIsOfKind(containsExpr.Collection.Type, TypeKind.Map); var isSeq = PLanguageType.TypeIsOfKind(containsExpr.Collection.Type, TypeKind.Sequence); var castOp = isMap ? "(PrtMap)" : isSeq ? "(PrtSeq)" : "(PrtSet)"; context.Write(output, "((PrtBool)("); context.Write(output, $"({castOp}"); WriteExpr(context, output, containsExpr.Collection); if (isMap) { context.Write(output, ").ContainsKey("); } else { context.Write(output, ").Contains("); } WriteExpr(context, output, containsExpr.Item); context.Write(output, ")))"); break; case CtorExpr ctorExpr: context.Write(output, $"currentMachine.CreateInterface<{context.Names.GetNameForDecl(ctorExpr.Interface)}>( "); context.Write(output, "currentMachine"); if (ctorExpr.Arguments.Any()) { context.Write(output, ", "); if (ctorExpr.Arguments.Count > 1) { //create tuple from rvaluelist context.Write(output, "new PrtTuple("); string septor = ""; foreach (IPExpr ctorExprArgument in ctorExpr.Arguments) { context.Write(output, septor); WriteExpr(context, output, ctorExprArgument); septor = ","; } context.Write(output, ")"); } else { WriteExpr(context, output, ctorExpr.Arguments.First()); } } context.Write(output, ")"); break; case DefaultExpr defaultExpr: context.Write(output, GetDefaultValue(defaultExpr.Type)); break; case EnumElemRefExpr enumElemRefExpr: EnumElem enumElem = enumElemRefExpr.Value; context.Write(output, $"(PrtEnum.Get(\"{context.Names.GetNameForDecl(enumElem)}\"))"); break; case EventRefExpr eventRefExpr: string eventName = context.Names.GetNameForDecl(eventRefExpr.Value); switch (eventName) { case "Halt": context.Write(output, "new PHalt()"); break; case "DefaultEvent": context.Write(output, "DefaultEvent.Instance"); break; default: string payloadExpr = GetDefaultValue(eventRefExpr.Value.PayloadType); context.Write(output, $"new {eventName}({payloadExpr})"); break; } break; case FairNondetExpr _: context.Write(output, "((PrtBool)currentMachine.TryRandomBool())"); break; case FloatLiteralExpr floatLiteralExpr: context.Write(output, $"((PrtFloat){floatLiteralExpr.Value})"); break; case FunCallExpr funCallExpr: bool isStatic = funCallExpr.Function.Owner == null; string awaitMethod = funCallExpr.Function.CanReceive == true ? "await " : ""; string globalFunctionClass = isStatic ? $"{context.GlobalFunctionClassName}." : ""; context.Write(output, $"{awaitMethod}{globalFunctionClass}{context.Names.GetNameForDecl(funCallExpr.Function)}("); string separator = ""; foreach (IPExpr param in funCallExpr.Arguments) { context.Write(output, separator); WriteExpr(context, output, param); separator = ", "; } if (isStatic) { context.Write(output, separator + "currentMachine"); } context.Write(output, ")"); break; case IntLiteralExpr intLiteralExpr: context.Write(output, $"((PrtInt){intLiteralExpr.Value})"); break; case KeysExpr keysExpr: context.Write(output, "("); WriteExpr(context, output, keysExpr.Expr); context.Write(output, ").CloneKeys()"); break; case LinearAccessRefExpr linearAccessRefExpr: string swapKeyword = linearAccessRefExpr.LinearType.Equals(LinearType.Swap) ? "ref " : ""; context.Write(output, $"{swapKeyword}{context.Names.GetNameForDecl(linearAccessRefExpr.Variable)}"); break; case NamedTupleExpr namedTupleExpr: string fieldNamesArray = string.Join(",", ((NamedTupleType)namedTupleExpr.Type).Names.Select(n => $"\"{n}\"")); fieldNamesArray = $"new string[]{{{fieldNamesArray}}}"; context.Write(output, $"(new {GetCSharpType(namedTupleExpr.Type)}({fieldNamesArray}, "); for (int i = 0; i < namedTupleExpr.TupleFields.Count; i++) { if (i > 0) { context.Write(output, ", "); } WriteExpr(context, output, namedTupleExpr.TupleFields[i]); } context.Write(output, "))"); break; case NondetExpr _: context.Write(output, "((PrtBool)currentMachine.TryRandomBool())"); break; case NullLiteralExpr _: context.Write(output, "null"); break; case SizeofExpr sizeofExpr: context.Write(output, "((PrtInt)("); WriteExpr(context, output, sizeofExpr.Expr); context.Write(output, ").Count)"); break; case StringExpr stringExpr: context.Write(output, $"((PrtString) String.Format("); context.Write(output, $"\"{stringExpr.BaseString}\""); foreach (var arg in stringExpr.Args) { context.Write(output, ","); WriteExpr(context, output, arg); } context.Write(output, "))"); break; case ThisRefExpr _: context.Write(output, "currentMachine.self"); break; case UnaryOpExpr unaryOpExpr: context.Write(output, $"{UnOpToStr(unaryOpExpr.Operation)}("); WriteExpr(context, output, unaryOpExpr.SubExpr); context.Write(output, ")"); break; case UnnamedTupleExpr unnamedTupleExpr: context.Write(output, $"new {GetCSharpType(unnamedTupleExpr.Type)}("); string sep = ""; foreach (IPExpr field in unnamedTupleExpr.TupleFields) { context.Write(output, sep); WriteExpr(context, output, field); sep = ", "; } context.Write(output, ")"); break; case ValuesExpr valuesExpr: context.Write(output, "("); WriteExpr(context, output, valuesExpr.Expr); context.Write(output, ").CloneValues()"); break; case MapAccessExpr _: case SetAccessExpr _: case NamedTupleAccessExpr _: case SeqAccessExpr _: case TupleAccessExpr _: case VariableAccessExpr _: WriteLValue(context, output, pExpr); break; default: throw new ArgumentOutOfRangeException(nameof(pExpr), $"type was {pExpr?.GetType().FullName}"); } #pragma warning restore CCN0002 // Non exhaustive patterns in switch block } private void WriteClone(CompilationContext context, StringWriter output, IExprTerm cloneExprTerm) { if (!(cloneExprTerm is IVariableRef variableRef)) { WriteExpr(context, output, cloneExprTerm); return; } string varName = context.Names.GetNameForDecl(variableRef.Variable); context.Write(output, $"(({GetCSharpType(variableRef.Type)})((IPrtValue){varName})?.Clone())"); } private string GetCSharpType(PLanguageType type, bool isVar = false) { switch (type.Canonicalize()) { case DataType _: return "IPrtValue"; case EnumType _: return "PrtInt"; case ForeignType _: return type.CanonicalRepresentation; case MapType _: return "PrtMap"; case NamedTupleType _: return "PrtNamedTuple"; case PermissionType _: return "PMachineValue"; case PrimitiveType primitiveType when primitiveType.IsSameTypeAs(PrimitiveType.Any): return "IPrtValue"; case PrimitiveType primitiveType when primitiveType.IsSameTypeAs(PrimitiveType.Bool): return "PrtBool"; case PrimitiveType primitiveType when primitiveType.IsSameTypeAs(PrimitiveType.Int): return "PrtInt"; case PrimitiveType primitiveType when primitiveType.IsSameTypeAs(PrimitiveType.Float): return "PrtFloat"; case PrimitiveType primitiveType when primitiveType.IsSameTypeAs(PrimitiveType.String): return "PrtString"; case PrimitiveType primitiveType when primitiveType.IsSameTypeAs(PrimitiveType.Event): return "PEvent"; case PrimitiveType primitiveType when primitiveType.IsSameTypeAs(PrimitiveType.Machine): return "PMachineValue"; case PrimitiveType primitiveType when primitiveType.IsSameTypeAs(PrimitiveType.Null): return isVar ? "IPrtValue" : "void"; case SequenceType _: return "PrtSeq"; case SetType _: return "PrtSet"; case TupleType _: return "PrtTuple"; default: throw new ArgumentOutOfRangeException(nameof(type)); } } private string GetDefaultValue(PLanguageType returnType) { switch (returnType.Canonicalize()) { case EnumType enumType: return $"((PrtInt){enumType.EnumDecl.Values.Min(elem => elem.Value)})"; case MapType mapType: return $"new {GetCSharpType(mapType)}()"; case SequenceType sequenceType: return $"new {GetCSharpType(sequenceType)}()"; case SetType setType: return $"new {GetCSharpType(setType)}()"; case NamedTupleType namedTupleType: string fieldNamesArray = string.Join(",", namedTupleType.Names.Select(n => $"\"{n}\"")); fieldNamesArray = $"new string[]{{{fieldNamesArray}}}"; string fieldDefaults = string.Join(", ", namedTupleType.Types.Select(t => GetDefaultValue(t))); return $"(new {GetCSharpType(namedTupleType)}({fieldNamesArray},{fieldDefaults}))"; case TupleType tupleType: string defaultTupleValues = string.Join(", ", tupleType.Types.Select(t => GetDefaultValue(t))); return $"(new {GetCSharpType(tupleType)}({defaultTupleValues}))"; case PrimitiveType primitiveType when primitiveType.IsSameTypeAs(PrimitiveType.Bool): return "((PrtBool)false)"; case PrimitiveType primitiveType when primitiveType.IsSameTypeAs(PrimitiveType.Int): return "((PrtInt)0)"; case PrimitiveType primitiveType when primitiveType.IsSameTypeAs(PrimitiveType.Float): return "((PrtFloat)0.0)"; case PrimitiveType primitiveType when primitiveType.IsSameTypeAs(PrimitiveType.String): return "((PrtString)\"\")"; case PrimitiveType eventType when eventType.IsSameTypeAs(PrimitiveType.Event): case PermissionType _: case PrimitiveType anyType when anyType.IsSameTypeAs(PrimitiveType.Any): case PrimitiveType machineType when machineType.IsSameTypeAs(PrimitiveType.Machine): case ForeignType _: case PrimitiveType nullType when nullType.IsSameTypeAs(PrimitiveType.Null): case DataType _: return "null"; case null: return ""; default: throw new ArgumentOutOfRangeException(nameof(returnType)); } } private static string UnOpToStr(UnaryOpType operation) { switch (operation) { case UnaryOpType.Negate: return "-"; case UnaryOpType.Not: return "!"; default: throw new ArgumentOutOfRangeException(nameof(operation), operation, null); } } private static string BinOpToStr(BinOpType binOpType) { switch (binOpType) { case BinOpType.Add: return "+"; case BinOpType.Sub: return "-"; case BinOpType.Mul: return "*"; case BinOpType.Div: return "/"; case BinOpType.Lt: return "<"; case BinOpType.Le: return "<="; case BinOpType.Gt: return ">"; case BinOpType.Ge: return ">="; case BinOpType.And: return "&&"; case BinOpType.Or: return "||"; default: throw new ArgumentOutOfRangeException(nameof(binOpType), binOpType, null); } } } }
43.504884
221
0.510181
[ "MIT" ]
HuaixiLu/P
Src/PCompiler/CompilerCore/Backend/CSharp/CSharpCodeGenerator.cs
71,263
C#
using System; public class StartUp { static void Main() { string firstDate = Console.ReadLine(); string secondDate = Console.ReadLine(); int days = DateModifier.DateDifference(firstDate, secondDate); Console.WriteLine(days); } }
17.375
70
0.633094
[ "MIT" ]
doba7a/SoftUni
CSharp Fundamentals/CSharp OOP Basics/2. Defining Classes - Exercise/5. DateModifier/StartUp.cs
280
C#
// *** WARNING: this file was generated by the Pulumi SDK Generator. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; namespace Pulumi.AzureNextGen.DataMigration.Outputs { [OutputType] public sealed class ConnectToSourceOracleSyncTaskPropertiesResponse { /// <summary> /// Key value pairs of client data to attach meta data information to task /// </summary> public readonly ImmutableDictionary<string, string>? ClientData; /// <summary> /// Array of command properties. /// </summary> public readonly ImmutableArray<Union<Outputs.MigrateMISyncCompleteCommandPropertiesResponse, Outputs.MigrateSyncCompleteCommandPropertiesResponse>> Commands; /// <summary> /// Array of errors. This is ignored if submitted. /// </summary> public readonly ImmutableArray<Outputs.ODataErrorResponse> Errors; /// <summary> /// Task input /// </summary> public readonly Outputs.ConnectToSourceOracleSyncTaskInputResponse? Input; /// <summary> /// Task output. This is ignored if submitted. /// </summary> public readonly ImmutableArray<Outputs.ConnectToSourceOracleSyncTaskOutputResponse> Output; /// <summary> /// The state of the task. This is ignored if submitted. /// </summary> public readonly string State; /// <summary> /// Task type. /// Expected value is 'ConnectToSource.Oracle.Sync'. /// </summary> public readonly string TaskType; [OutputConstructor] private ConnectToSourceOracleSyncTaskPropertiesResponse( ImmutableDictionary<string, string>? clientData, ImmutableArray<Union<Outputs.MigrateMISyncCompleteCommandPropertiesResponse, Outputs.MigrateSyncCompleteCommandPropertiesResponse>> commands, ImmutableArray<Outputs.ODataErrorResponse> errors, Outputs.ConnectToSourceOracleSyncTaskInputResponse? input, ImmutableArray<Outputs.ConnectToSourceOracleSyncTaskOutputResponse> output, string state, string taskType) { ClientData = clientData; Commands = commands; Errors = errors; Input = input; Output = output; State = state; TaskType = taskType; } } }
35.902778
165
0.654545
[ "Apache-2.0" ]
pulumi/pulumi-azure-nextgen
sdk/dotnet/DataMigration/Outputs/ConnectToSourceOracleSyncTaskPropertiesResponse.cs
2,585
C#
namespace Havit.Data.EntityFrameworkCore.CodeGenerator.Services.SourceControl { public interface ISourceControlClient { void Add(string path); void Delete(string path); void Delete(string[] paths); } }
17.833333
78
0.766355
[ "MIT" ]
havit/HavitFramework
Havit.Data.EntityFrameworkCore.CodeGenerator/Services/SourceControl/ISourceControlClient.cs
216
C#
// ----------------------------------------------------------------------------------------- // <copyright file="TestLogListener.cs" company="Microsoft"> // Copyright 2013 Microsoft Corporation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // </copyright> // ----------------------------------------------------------------------------------------- using Microsoft.WindowsAzure.Storage.Shared.Protocol; using System; using System.Diagnostics; using System.Diagnostics.Tracing; namespace Microsoft.WindowsAzure.Storage.Core { public partial class TestLogListener : EventListener { protected override void OnEventWritten(EventWrittenEventArgs eventData) { Debug.WriteLine(eventData.Payload[0]); TestLogListener.ProcessMessage(TestLogListener.MapLogLevel(eventData.Level), eventData.Payload[0].ToString()); } protected override void OnEventSourceCreated(EventSource eventSource) { base.OnEventSourceCreated(eventSource); #if !FACADE_NETCORE if (eventSource.Name.Equals(Constants.LogSourceName)) { this.EnableEvents(eventSource, EventLevel.Verbose); } #endif } private static LogLevel MapLogLevel(EventLevel level) { switch (level) { case EventLevel.Error: return LogLevel.Error; case EventLevel.Warning: return LogLevel.Warning; case EventLevel.Informational: return LogLevel.Informational; case EventLevel.Verbose: return LogLevel.Verbose; default: throw new InvalidOperationException(); } } } }
34.294118
122
0.588336
[ "Apache-2.0" ]
JoeLiang1983/Azure-Storage-Net
Test/WindowsRuntime/Core/TestLogListener.cs
2,334
C#
using Microsoft.Xna.Framework; using Pathoschild.Stardew.Automate.Framework; using SObject = StardewValley.Object; namespace Pathoschild.Stardew.Automate.Machines.Objects { /// <summary>A preserves jar that accepts input and provides output.</summary> internal class PreservesJarMachine : GenericMachine { /********* ** Public methods *********/ /// <summary>Construct an instance.</summary> /// <param name="machine">The underlying machine.</param> public PreservesJarMachine(SObject machine) : base(machine) { } /// <summary>Pull items from the connected pipes.</summary> /// <param name="pipes">The connected IO pipes.</param> /// <returns>Returns whether the machine started processing an item.</returns> public override bool Pull(IPipe[] pipes) { SObject jar = this.Machine; // fruit => jelly if (pipes.TryGetIngredient(item => item.Sample.category == SObject.FruitsCategory, 1, out Requirement fruit)) { fruit.Reduce(); SObject sample = (SObject)fruit.Sample; jar.heldObject = new SObject(Vector2.Zero, 344, sample.Name + " Jelly", false, true, false, false) { Price = 50 + sample.Price * 2, name = sample.Name + " Jelly", #if SDV_1_2 preserve = SObject.PreserveType.Jelly, preservedParentSheetIndex = sample.parentSheetIndex #endif }; jar.minutesUntilReady = 4000; return true; } // vegetable => pickled vegetable if (pipes.TryGetIngredient(item => item.Sample.category == SObject.VegetableCategory, 1, out Requirement vegetable)) { vegetable.Reduce(); SObject sample = (SObject)vegetable.Sample; jar.heldObject = new SObject(Vector2.Zero, 342, "Pickled " + sample.Name, false, true, false, false) { Price = 50 + sample.Price * 2, name = "Pickled " + sample.Name, #if SDV_1_2 preserve = SObject.PreserveType.Pickle, preservedParentSheetIndex = sample.parentSheetIndex #endif }; jar.minutesUntilReady = 4000; return true; } return false; } } }
37.104478
128
0.555109
[ "MIT" ]
Denifia/Pathoschild-StardewMods
Automate/Machines/Objects/PreservesJarMachine.cs
2,488
C#
using NUnit.Framework; using static Appio.ObjectModel.Tests.ParameterResolverTest; namespace Appio.ObjectModel.Tests { public class ParameterResolverWithBooleanParametersShould { private enum Identifiers { Server, Client, Help } private ParameterResolver<Identifiers> _resolver; private static object[] _goodParams = { new object[] { new string[0], new [] {"NoServer", "NoClient"}, false }, new object[] { new[] {"-C", "exampleClient"}, new [] {"NoServer", "exampleClient"}, false }, new object[] { new[] {"-C", "exampleClient", "--server", "testServer"}, new [] {"testServer", "exampleClient"}, false }, new object[] { new[] {"--help"}, new [] {"NoServer", "NoClient"}, true }, new object[] { new[] {"-C", "exampleClient", "--help"}, new [] {"NoServer", "exampleClient"}, true }, new object[] { new[] {"--help", "--server", "testServer"}, new [] {"testServer", "NoClient"}, true }, new object[] { new[] {"-C", "exampleClient", "--help", "--server", "testServer"}, new [] {"testServer", "exampleClient"}, true } }; private static object[] _badParamsExpectedFlag = { new[] {"badArg", "--help"}, new[] {"--help", "badArg"}, new[] {"--help", "--server", "someServer", "badArg"}, new[] {"--server", "someServer", "badArg", "--help"} }; [SetUp] public void Setup() { _resolver = new ParameterResolver<Identifiers>(string.Empty, new[] { new StringParameterSpecification<Identifiers>{ Identifier = Identifiers.Server, Short = "-S", Verbose = "--server", Default = "NoServer"}, new StringParameterSpecification<Identifiers>{ Identifier = Identifiers.Client, Short = "-C", Verbose = "--client", Default = "NoClient"} }, new[] { new BoolParameterSpecification<Identifiers>{ Identifier = Identifiers.Help, Short = "-h", Verbose = "--help" } }); } [TestCaseSource(nameof(_goodParams))] public void GiveCorrectParametersOnGoodInputs(string[] parameters, string[] expectedStrings, bool expectedBool) { var (_, stringParams, boolParams) = _resolver.ResolveParams(parameters); Assert.AreEqual(expectedStrings[(int) Identifiers.Client], stringParams[Identifiers.Client]); Assert.AreEqual(expectedStrings[(int) Identifiers.Server], stringParams[Identifiers.Server]); Assert.AreEqual(expectedBool, boolParams[Identifiers.Help]); } [TestCaseSource(nameof(_badParamsExpectedFlag))] public void ThrowExceptionWhenFlagExpected(string[] parameters) { AssertFailWith(_resolver, parameters,"Unrecognized parameter 'badArg'. Expected parameter '-S', '--server', '-C', '--client', '-h' or '--help' instead"); } } }
37.136842
165
0.497449
[ "MPL-2.0" ]
dkaras88/APPIOframework
src/appio-objectmodel.tests/ParameterResolverWithBooleanParameters.Tests.cs
3,528
C#
using System.Threading.Tasks; using Xunit; using Xunit.Abstractions; namespace PuppeteerSharp.Tests.JSHandleTests { [Collection("PuppeteerLoaderFixture collection")] public class AsElementTests : PuppeteerPageBaseTest { public AsElementTests(ITestOutputHelper output) : base(output) { } [Fact] public async Task ShouldWork() { var aHandle = await Page.EvaluateExpressionHandleAsync("document.body"); var element = aHandle as ElementHandle; Assert.NotNull(element); } [Fact] public async Task ShouldReturnNullForNonElements() { var aHandle = await Page.EvaluateExpressionHandleAsync("2"); var element = aHandle as ElementHandle; Assert.Null(element); } [Fact] public async Task ShouldReturnElementHandleForTextNodes() { await Page.SetContentAsync("<div>ee!</div>"); var aHandle = await Page.EvaluateExpressionHandleAsync("document.querySelector('div').firstChild"); var element = aHandle as ElementHandle; Assert.NotNull(element); Assert.NotNull(await Page.EvaluateFunctionAsync("e => e.nodeType === HTMLElement.TEXT_NODE", element)); } } }
32.8
115
0.63186
[ "MIT" ]
GarethWright/puppeteer-sharp
lib/PuppeteerSharp.Tests/JSHandleTests/AsElementTests.cs
1,314
C#
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Calculadora_POO { public partial class CalculadoraS : Form { public CalculadoraS() { InitializeComponent(); } } }
17.304348
44
0.680905
[ "Unlicense" ]
Dcendrette/projects-C--on-github
Calculadora POO/Calculadora POO/CalculadoraS.cs
400
C#
using System; using System.Collections.Generic; using System.Linq; namespace Nap.Html.Enum { /// <summary> /// Enumeration to describe the style of binding (InnerHtml, InnerText, etc). /// </summary> public enum BindingBehavior { /// <summary> /// Bind to the inner text (removing elements) of the selected/found node. /// </summary> InnerText, /// <summary> /// Bind to the inner html (not removing elements) of the selected/found node. /// </summary> InnerHtml, /// <summary> /// Bind to a specific attribute value of the selected/found node. /// Additional information is required for this type of binding. /// </summary> Attribute, /// <summary> /// Bind to the classes of the selected/found node. /// </summary> Class, /// <summary> /// Bind to the ID of the selected/found node. /// </summary> Id, /// <summary> /// Bind to the <c>value=""</c> (specific attribute) of the selected/found node. /// </summary> Value, /// <summary> /// The smart binding behavior, which will perform various types of binds in order. /// The bindings tried are: option[selected].InnerText -> Value -> InnerText /// This is the default behavior. /// </summary> Smart } }
27.372549
88
0.575215
[ "MIT" ]
forki/Nap
src/Nap.Html/Enum/BindingBehavior.cs
1,398
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 Xunit; namespace System.Data.Tests { public class TypedTableBaseExtensionsTests { [Fact] public void AsEnumerable_NullSource_ThrowsArgumentNullException() { AssertExtensions.Throws<ArgumentNullException>("source", () => TypedTableBaseExtensions.AsEnumerable<DataRow>(null)); } [Fact] public void OrderBy_NullSource_ThrowsArgumentNullException() { AssertExtensions.Throws<ArgumentNullException>("source", () => TypedTableBaseExtensions.OrderBy<DataRow, string>(null, row => "abc")); AssertExtensions.Throws<ArgumentNullException>("source", () => TypedTableBaseExtensions.OrderBy<DataRow, string>(null, row => "abc", StringComparer.CurrentCulture)); } [Fact] public void OrderByDescending_NullSource_ThrowsArgumentNullException() { AssertExtensions.Throws<ArgumentNullException>("source", () => TypedTableBaseExtensions.OrderByDescending<DataRow, string>(null, row => "abc")); AssertExtensions.Throws<ArgumentNullException>("source", () => TypedTableBaseExtensions.OrderByDescending<DataRow, string>(null, row => "abc", StringComparer.CurrentCulture)); } [Fact] public void Select_NullSource_ThrowsArgumentNullException() { AssertExtensions.Throws<ArgumentNullException>("source", () => TypedTableBaseExtensions.Select<DataRow, string>(null, row => "abc")); } [Fact] public void Where_NullSource_ThrowsArgumentNullException() { AssertExtensions.Throws<ArgumentNullException>("source", () => TypedTableBaseExtensions.Where<DataRow>(null, row => true)); } public class TestTypedTable<T> : TypedTableBase<T> where T : DataRow { public TestTypedTable() : base() { } } [Fact] public void ElementAtOrDefault_ValidIndex() { TypedTableBase<DataRow> table = new TestTypedTable<DataRow>(); table.Columns.Add(); DataRow zero = table.Rows.Add(0); Assert.Same(zero, table.ElementAtOrDefault(0)); } [Fact] public void ElementAtOrDefault_InvalidIndex() { TypedTableBase<DataRow> table = new TestTypedTable<DataRow>(); table.Columns.Add(); DataRow zero = table.Rows.Add(0); Assert.Same(default(DataRow), table.ElementAtOrDefault(1)); } [Fact] public void Select_ToListOfInts() { TypedTableBase<DataRow> table = new TestTypedTable<DataRow>(); table.Columns.Add(); table.Rows.Add(10); table.Rows.Add(5); var chosen = table.Select(row => int.Parse((string)row.ItemArray[0])); int total = 0; foreach (int num in chosen) { total += num; } Assert.Equal(15, total); } } }
37.081395
187
0.622452
[ "MIT" ]
06needhamt/runtime
src/libraries/System.Data.DataSetExtensions/tests/System/Data/TypedTableBaseExtensionsTests.cs
3,189
C#
using AutoMat.Core.Constants; using System; using System.Collections.Generic; using System.Net.Http; using System.Text; namespace AutoMat.Core.Services { public sealed class FirebaseDatabaseHttpClient { private static HttpClient instance = null; private static readonly object padlock = new object(); FirebaseDatabaseHttpClient() { } public static HttpClient Instance { get { lock (padlock) { if (instance == null) { instance = new HttpClient{ BaseAddress = new Uri(AppConstants.FirebaseDatabaseURL)}; } return instance; } } } } }
22.857143
108
0.5175
[ "MIT" ]
ASxCRO/AutoMat
AutoMat/AutoMat/AutoMat/Core/Services/FirebaseDatabaseHttpClient.cs
802
C#
/* Copyright (c) 2018-2021 Festo AG & Co. KG <https://www.festo.com/net/de_de/Forms/web/contact_international> Author: Michael Hoffmeister This source code is licensed under the Apache License 2.0 (see LICENSE.txt). This source code may use other Open Source software components (see LICENSE.txt). */ using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using AasxIntegrationBase; using AasxPackageExplorer; using AdminShellEvents; using AdminShellNS; using Newtonsoft.Json; namespace AasxWpfControlLibrary.PackageCentral { /// <summary> /// Exceptions thrown when handling PackageContainer or PackageCentral /// </summary> public class PackageContainerException : Exception { public PackageContainerException() { } public PackageContainerException(string message) : base(message) { } } public class PackageContainerCredentials { public string Username; public string Password; } /// <summary> /// Extendable run-time options /// </summary> public class PackCntRuntimeOptions { public enum Progress { Idle, Starting, Ongoing, Final } public delegate void ProgressChangedHandler(Progress state, long? totalFileSize, long totalBytesDownloaded); public delegate void AskForSelectFromListHandler( string caption, List<SelectFromListFlyoutItem> list, TaskCompletionSource<SelectFromListFlyoutItem> propagateResult); public delegate void AskForCredentialsHandler( string caption, TaskCompletionSource<PackageContainerCredentials> propagateResult); public LogInstance Log; public ProgressChangedHandler ProgressChanged; public AskForSelectFromListHandler AskForSelectFromList; public AskForCredentialsHandler AskForCredentials; } /// <summary> /// The container wraps an AdminShellPackageEnv with the availability to upload, download, re-new the package env /// and to transport further information (future use). /// </summary> public class PackageContainerBase : IPackageConnectorManageEvents { public enum Format { Unknown = 0, AASX, XML, JSON } public static string[] FormatExt = { ".bin", ".aasx", ".xml", ".json" }; public enum BackupType { XML = 0, FullCopy } [Flags] public enum CopyMode { None = 0, Serialized = 1, BusinessData = 2 } [JsonIgnore] public AdminShellPackageEnv Env = new AdminShellPackageEnv(); [JsonIgnore] public Format IsFormat = Format.Unknown; private PackageCentral _packageCentral; [JsonIgnore] public PackageCentral PackageCentral { get { return _packageCentral; } } /// <summary> /// Holds the container (user) options in a base oder derived class. /// </summary> [JsonProperty(PropertyName = "Options")] public PackageContainerOptionsBase ContainerOptions = new PackageContainerOptionsBase(); /// <summary> /// If the connection shall stay alive, a appropriate connector needs to be created. /// Note, that the connector is an indeppendent object, but will have a link to this /// container! /// </summary> [JsonIgnore] public PackageConnectorBase ConnectorPrimary; /// <summary> /// Holds secondary connectors, which might also want to register to the SAME AAS! /// Examples could be plugins for different interface standards. /// </summary> [JsonIgnore] public List<PackageConnectorBase> ConnectorSecondary = new List<PackageConnectorBase>(); protected string _location = ""; /// <summary> /// Location of the Container in a certain storage container, e.g. a local or network based /// repository. In this base implementation, it maps to a empty string. /// </summary> public virtual string Location { get { return _location; } set { _location = value; } } // // Constructors // public PackageContainerBase() { } public PackageContainerBase(PackageCentral packageCentral) { _packageCentral = packageCentral; } public PackageContainerBase(CopyMode mode, PackageContainerBase other, PackageCentral packageCentral = null) { if ((mode & CopyMode.Serialized) > 0 && other != null) { // nothing here } if (packageCentral != null) _packageCentral = packageCentral; } // // Base functions // public static Format EvalFormat(string fn) { Format res = Format.Unknown; var ext = Path.GetExtension(fn).ToLower(); foreach (var en in (Format[])Enum.GetValues(typeof(Format))) if (ext == FormatExt[(int)en]) res = en; return res; } [JsonIgnore] public bool IsOpen { get { return Env != null && Env.IsOpen; } } public virtual void Close() { if (!IsOpen) return; Env.Close(); Env = null; } public virtual async Task LoadResidentIfPossible(string fullItemLocation) { await Task.Yield(); } public virtual void BackupInDir(string backupDir, int maxFiles, BackupType backupType = BackupType.XML) { } public virtual async Task LoadFromSourceAsync( string fullItemLocation, PackCntRuntimeOptions runtimeOptions = null) { await Task.Yield(); } public virtual async Task<bool> SaveLocalCopyAsync( string targetFilename, PackCntRuntimeOptions runtimeOptions = null) { await Task.Yield(); return false; } public virtual async Task SaveToSourceAsync(string saveAsNewFileName = null, AdminShellPackageEnv.SerializationFormat prefFmt = AdminShellPackageEnv.SerializationFormat.None, PackCntRuntimeOptions runtimeOptions = null) { await Task.Yield(); } // // Connector management // public IEnumerable<PackageConnectorBase> GetAllConnectors() { if (ConnectorPrimary != null) yield return ConnectorPrimary; if (ConnectorSecondary != null) foreach (var conn in ConnectorSecondary) yield return conn; } // // Event management // private bool CheckPushedEventInternal(AasEventMsgEnvelope ev) { // access if (ev == null) return false; // to be applicable, the event message Observable has to relate into this's environment var foundObservable = Env?.AasEnv?.FindReferableByReference(ev?.ObservableReference); if (foundObservable == null) return false; // // Update value? // // Note: an update will only be executed, if NOT ALREADY marked as being updated in the // event message. MOST LIKELY, the AAS update will be done in the connector, already! // foreach (var pluv in ev.GetPayloads<AasPayloadUpdateValue>()) { if (pluv.Values != null && !pluv.IsAlreadyUpdatedToAAS && foundObservable is AdminShell.IEnumerateChildren && (foundObservable is AdminShell.Submodel || foundObservable is AdminShell.SubmodelElement)) { // will later access children .. var wrappers = ((foundObservable as AdminShell.IEnumerateChildren).EnumerateChildren())?.ToList(); var changedSomething = false; // go thru all value updates if (pluv.Values != null) foreach (var vl in pluv.Values) { if (vl == null) continue; // Note: currently only updating Properties // TODO (MIHO, 2021-01-03): check to handle more SMEs for AasEventMsgUpdateValue AdminShell.SubmodelElement smeToModify = null; if (vl.Path == null && foundObservable is AdminShell.Property fop) smeToModify = fop; else if (vl.Path != null && vl.Path.Count >= 1 && wrappers != null) { var x = AdminShell.SubmodelElementWrapper.FindReferableByReference( wrappers, AdminShell.Reference.CreateNew(vl.Path), keyIndex: 0); if (x is AdminShell.Property fpp) smeToModify = fpp; } // something to modify? if (smeToModify is AdminShell.Property prop) { if (vl.Value != null) prop.value = vl.Value; if (vl.ValueId != null) prop.valueId = vl.ValueId; changedSomething = true; } } // if something was changed, the event messages is to be consumed if (changedSomething) return true; } } // no return false; } public bool PushEvent(AasEventMsgEnvelope ev) { // access if (ev == null) return false; // internal? if (CheckPushedEventInternal(ev)) return true; // use enumerator var consume = false; foreach (var con in GetAllConnectors()) { var br = con.PushEvent(ev); if (br) { consume = true; break; } } // done return consume; } } /// <summary> /// This container was taken over from AasxPackageEnv and lacks therefore further /// load/ store information /// </summary> public class PackageContainerTakenOver : PackageContainerBase { } }
33.925
118
0.556466
[ "Apache-2.0" ]
bischof-keb/aasx-package-explorer
src/AasxWpfControlLibrary/PackageCentral/PackageContainerBase.cs
10,858
C#
/* [The "BSD licence"] Copyright (c) 2007-2008 Johannes Luber Copyright (c) 2005-2007 Kunle Odutola All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code MUST RETAIN the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form MUST REPRODUCE the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior WRITTEN permission. 4. Unless explicitly state otherwise, any contribution intentionally submitted for inclusion in this work to the copyright owner or licensor shall be under the terms and conditions of this license, without any additional terms or conditions. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime.Tree { using System; using IToken = Antlr.Runtime.IToken; /// <summary>A tree node that is wrapper for a Token object. </summary> /// <remarks> /// After 3.0 release while building tree rewrite stuff, it became clear /// that computing parent and child index is very difficult and cumbersome. /// Better to spend the space in every tree node. If you don't want these /// extra fields, it's easy to cut them out in your own BaseTree subclass. /// </remarks> public class CommonTree : BaseTree { public CommonTree() { } public CommonTree(CommonTree node) : base(node) { this.token = node.token; this.startIndex = node.startIndex; this.stopIndex = node.stopIndex; } public CommonTree(IToken t) { this.token = t; } virtual public IToken Token { get { return token; } } override public bool IsNil { get { return token == null; } } override public int Type { get { if (token == null) { return Runtime.Token.INVALID_TOKEN_TYPE; } return token.Type; } } override public string Text { get { if (token == null) { return null; } return token.Text; } } override public int Line { get { if (token == null || token.Line == 0) { if (ChildCount > 0) { return GetChild(0).Line; } return 0; } return token.Line; } } override public int CharPositionInLine { get { if (token == null || token.CharPositionInLine == - 1) { if (ChildCount > 0) { return GetChild(0).CharPositionInLine; } return 0; } return token.CharPositionInLine; } } override public int TokenStartIndex { get { if ( (startIndex == -1) && (token != null) ) { return token.TokenIndex; } return startIndex; } set { startIndex = value; } } override public int TokenStopIndex { get { if ( (stopIndex == -1) && (token != null) ) { return token.TokenIndex; } return stopIndex; } set { stopIndex = value; } } override public int ChildIndex { get { return childIndex; } set { childIndex = value; } } override public ITree Parent { get { return parent; } set { parent = (CommonTree)value; } } /// <summary> /// What token indexes bracket all tokens associated with this node /// and below? /// </summary> public int startIndex = -1, stopIndex = -1; /// <summary>A single token is the payload </summary> protected IToken token; /// <summary>Who is the parent node of this node; if null, implies node is root</summary> public CommonTree parent; /// <summary>What index is this node in the child list? Range: 0..n-1</summary> public int childIndex = -1; public override ITree DupNode() { return new CommonTree(this); } public override string ToString() { if (IsNil) { return "nil"; } if ( Type == Runtime.Token.INVALID_TOKEN_TYPE ) { return "<errornode>"; } if (token == null) { return null; } return token.Text; } } }
23.370192
91
0.669204
[ "BSD-3-Clause" ]
beltrachi/antlr-3
runtime/CSharp/Sources/Antlr3.Runtime/Antlr.Runtime.Tree/CommonTree.cs
4,861
C#
#region MIT License // The MIT License (MIT) // // Copyright © 2017-2019 Tobias Koch <t.koch@tk-software.de> // // 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 #region Namespaces using System; using System.Drawing; using System.Windows.Forms; #endregion namespace ScreenSaver.Test { /// <summary> /// A test control used by the screen saver. /// </summary> public partial class ColorControl : UserControl { #region Constants and Fields /// <summary> /// A random number generator. /// </summary> private Random rnd = new Random(); #endregion #region Methods /// <summary> /// Initializes a new instance of the <see cref="ColorControl"/> class. /// </summary> public ColorControl() { this.InitializeComponent(); } #endregion #region Methods /// <summary> /// Handles the <see cref="Timer.Tick"/> event. /// </summary> /// <param name="sender">The event sender.</param> /// <param name="e">An empty <see cref="EventArgs"/>.</param> protected virtual void TimerColor_Tick(object sender, EventArgs e) { this.BackColor = Color.FromArgb(this.rnd.Next(0, 256), this.rnd.Next(0, 256), this.rnd.Next(0, 256)); } #endregion } }
31.337662
113
0.658516
[ "MIT" ]
t081as/ScreenSaver
ScreenSaver/ScreenSaver.Test/ColorControl.cs
2,424
C#
using System; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Threading; using System.Threading.Tasks; namespace moo.common.Models { [DebuggerDisplay("{Name}={(directory != null ? \"directory\" : value)} ({Type})")] public struct Property { public enum PropertyType { Unknown = 0, String = 1, Integer = 2, DbRef = 3, Float = 4, Directory = 5, Lock = 6 } public string Name; public PropertyDirectory? directory; public object? value; public object? Value { get { if (Type == PropertyType.DbRef) { if (value != null && value.GetType() == typeof(string)) return new Dbref((string)value); } return directory ?? value; } set { if (value is PropertyDirectory directory1) this.directory = directory1; else this.value = value; } } public PropertyType Type; public Property(string name, string value) { if (string.IsNullOrWhiteSpace(name)) throw new System.ArgumentNullException(nameof(name)); this.Name = name; this.directory = null; this.value = value; this.Type = PropertyType.String; } public Property(string name, int value) { if (string.IsNullOrWhiteSpace(name)) throw new System.ArgumentNullException(nameof(name)); this.Name = name; this.directory = null; this.value = value; this.Type = PropertyType.Integer; } public Property(string name, Lock value) { if (string.IsNullOrWhiteSpace(name)) throw new System.ArgumentNullException(nameof(name)); if (default(Lock).Equals(value)) throw new System.ArgumentNullException(nameof(value)); this.Name = name; this.directory = null; this.value = value; this.Type = PropertyType.Lock; } public Property(string name, Dbref value) { if (string.IsNullOrWhiteSpace(name)) throw new System.ArgumentNullException(nameof(name)); if (default(Dbref).Equals(value)) throw new System.ArgumentNullException(nameof(value)); this.Name = name; this.directory = null; this.value = value; this.Type = PropertyType.DbRef; } public Property(string name, float value) { if (string.IsNullOrWhiteSpace(name)) throw new System.ArgumentNullException(nameof(name)); this.Name = name; this.directory = null; this.value = value; this.Type = PropertyType.Float; } public Property(string name, PropertyDirectory value) { if (string.IsNullOrWhiteSpace(name)) throw new System.ArgumentNullException(nameof(name)); this.Name = name; this.directory = value ?? throw new System.ArgumentNullException(nameof(value)); this.value = null; this.Type = PropertyType.Directory; } public string Serialize() { if (string.IsNullOrWhiteSpace(Name)) throw new System.InvalidOperationException("Property name is not set"); return Type switch { PropertyType.String => Serialize((string)Value), PropertyType.Integer => Serialize((int)Value), PropertyType.DbRef => Serialize((Dbref)Value, 0), PropertyType.Lock => Serialize((Lock)Value, 0), PropertyType.Float => Serialize((float)Value), PropertyType.Directory => PropertyDirectory.Serialize((PropertyDirectory)Value), _ => throw new System.InvalidOperationException($"Unknown property type for {Name}: {Type}"), }; } public static string Serialize(Property prop) { if (PropertyType.DbRef == prop.Type) return $"<prop><name>{prop.Name}</name>" + Serialize((Dbref)prop.Value, 0) + "</prop>"; if (typeof(string).IsAssignableFrom(prop.Value.GetType())) return $"<prop><name>{prop.Name}</name>" + Serialize((string)prop.Value) + "</prop>"; if (typeof(int).IsAssignableFrom(prop.Value.GetType())) return $"<prop><name>{prop.Name}</name>" + Serialize((int)prop.Value) + "</prop>"; if (typeof(long).IsAssignableFrom(prop.Value.GetType())) return $"<prop><name>{prop.Name}</name>" + Serialize(Convert.ToInt32((long)prop.Value)) + "</prop>"; if (typeof(float).IsAssignableFrom(prop.Value.GetType())) return $"<prop><name>{prop.Name}</name>" + Serialize((float)prop.Value) + "</prop>"; if (typeof(double).IsAssignableFrom(prop.Value.GetType())) return $"<prop><name>{prop.Name}</name>" + Serialize(Convert.ToSingle((double)prop.Value)) + "</prop>"; if (typeof(PropertyDirectory).IsAssignableFrom(prop.Value.GetType())) return $"<prop><name>{prop.Name}</name>" + PropertyDirectory.Serialize((PropertyDirectory)prop.Value) + "</prop>"; throw new System.InvalidOperationException($"Cannot handle object of type {prop.Type}"); } public static async Task<(Property, Dbref)> ScanEnvironmentForProperty(Dbref where, string propertyName, PropertyType propertyType, CancellationToken cancellationToken) { // See envprop in fuzzball property.c var envRef = where; do { if (!envRef.IsValid()) return (default(Property), Dbref.NOT_FOUND); var env = await ThingRepository.Instance.GetAsync(envRef, cancellationToken); if (!env.isSuccess || env.value == null) return (default(Property), Dbref.NOT_FOUND); var property = env.value.properties.GetPropertyPathValue(propertyName); if (!default(Property).Equals(property) && (propertyType == PropertyType.Unknown || propertyType == property.Type)) return (property, envRef); if (envRef == Dbref.AETHER) return (default(Property), Dbref.NOT_FOUND); // Once we get to AETHER, don't keep looping. envRef = env.value.Location; } while (true); } public static string Serialize(Dbref value, byte dud) => Thing.Serialize(value, 0); public static string Serialize(Lock value, byte dud) => Thing.Serialize(value, 0); public static string Serialize(string? value) => Thing.Serialize(value); public static string Serialize(float value) => Thing.Serialize(value); public static string Serialize(int value) => Thing.Serialize(value); public static bool TryInferType([NotNullWhen(true)] string? value, [NotNullWhen(true)] out Tuple<PropertyType, object>? result) { if (value == null) { result = default; return false; } if (int.TryParse(value.Trim(), out int i)) { result = new Tuple<PropertyType, object>(PropertyType.Integer, i); return true; } if (float.TryParse(value.Trim(), out float f)) { result = new Tuple<PropertyType, object>(PropertyType.Float, f); return true; } if (Dbref.TryParse(value.Trim(), out Dbref d)) { result = new Tuple<PropertyType, object>(PropertyType.DbRef, d); return true; } if (value.StartsWith('\"') && value.EndsWith('\"')) { result = new Tuple<PropertyType, object>(PropertyType.String, value); return true; } result = default; return false; } } }
38.236364
176
0.547313
[ "MIT" ]
seanmcelroy/moo
moo.common/Models/Property.cs
8,412
C#
using UnityEngine; using UnityEngine.UI; // Display FPS on a Unity UGUI Text Panel // To use: Drag onto a game object with Text component // Press 'F' key to toggle show/hide public class VRFPSCounter : MonoBehaviour { public Text text; public bool show = true; private const int targetFPS = 60; private const float updateInterval = 0.5f; private int framesCount; private float framesTime; void Start() { // no text object set? see if our gameobject has one to use if (text == null) { text = GetComponent<Text>(); } } void Update() { if (Input.GetKeyDown(KeyCode.F)) { show = !show; } // monitoring frame counter and the total time framesCount++; framesTime += Time.unscaledDeltaTime; // measuring interval ended, so calculate FPS and display on Text if (framesTime > updateInterval) { if (text != null) { if (show) { float fps = framesCount/framesTime; text.text = System.String.Format("{0:F2} FPS", fps); text.color = (fps > (targetFPS-5) ? Color.green : (fps > (targetFPS-30) ? Color.yellow : Color.red)); } else { text.text = ""; } } // reset for the next interval to measure framesCount = 0; framesTime = 0; } } }
26.693548
73
0.481571
[ "MIT" ]
alexnaraghi/clash-of-clones
Assets/Plugins/VRFPSCounter.cs
1,655
C#
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; public class MenuController : MonoBehaviour { public Slider PlayerSlider; public GameObject GameController; private GameController gameController; public Canvas VictoryMenu; public Canvas PauseMenu; public Canvas StartMenu; private EventSystem eventSystem; // Start is called before the first frame update void Start() { gameController = GameController.GetComponent<GameController>(); eventSystem = GetComponentInChildren<EventSystem>(); } // Update is called once per frame void Update() { // TODO: replace with callback gameController.NumberOfPlayers = (uint) PlayerSlider.value; } public void QuitGame() { #if UNITY_EDITOR UnityEditor.EditorApplication.isPlaying = false; #else Application.Quit(); #endif } public void TogglePauseMenu() { if (PauseMenu.gameObject.activeInHierarchy) { PauseMenu.gameObject.SetActive(false); } else { PauseMenu.gameObject.SetActive(true); eventSystem.SetSelectedGameObject(PauseMenu.transform.Find("ResumeButton").gameObject); } } public void ShowVictoryMenu(uint winner) { VictoryMenu.gameObject.SetActive(true); VictoryMenu.GetComponentInChildren<Text>().text = $"Player {winner} wins!"; eventSystem.SetSelectedGameObject(VictoryMenu.transform.Find("ReturnToMenuButton").gameObject); } public void ReturnToStartMenu() { PauseMenu.gameObject.SetActive(false); VictoryMenu.gameObject.SetActive(false); StartMenu.gameObject.SetActive(true); eventSystem.SetSelectedGameObject(StartMenu.transform.Find("PlayerSlider").gameObject); } }
26.5
103
0.68501
[ "MIT" ]
jsuvanto/mighty-wings
Assets/Scripts/MenuController.cs
1,910
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 appsync-2017-07-25.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppSync.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppSync.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetApiCache operation /// </summary> public class GetApiCacheResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { GetApiCacheResponse response = new GetApiCacheResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("apiCache", targetDepth)) { var unmarshaller = ApiCacheUnmarshaller.Instance; response.ApiCache = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalFailureException")) { return InternalFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException")) { return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppSyncException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static GetApiCacheResponseUnmarshaller _instance = new GetApiCacheResponseUnmarshaller(); internal static GetApiCacheResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetApiCacheResponseUnmarshaller Instance { get { return _instance; } } } }
39.579365
190
0.637858
[ "Apache-2.0" ]
ChristopherButtars/aws-sdk-net
sdk/src/Services/AppSync/Generated/Model/Internal/MarshallTransformations/GetApiCacheResponseUnmarshaller.cs
4,987
C#
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; using Roslyn.Test.Utilities; using Roslyn.Utilities; using Xunit; namespace Microsoft.CodeAnalysis.UnitTests { public class AssemblyUtilitiesTests : TestBase { [Fact] public void FindAssemblySet_SingleAssembly() { var directory = Temp.CreateDirectory(); var alphaDll = directory.CreateFile("Alpha.dll").WriteAllBytes(TestResources.AssemblyLoadTests.Alpha); var results = AssemblyUtilities.FindAssemblySet(alphaDll.Path); Assert.Equal(expected: 1, actual: results.Length); Assert.Equal(expected: alphaDll.Path, actual: results[0]); } [Fact] public void FindAssemblySet_TwoUnrelatedAssemblies() { var directory = Temp.CreateDirectory(); var alphaDll = directory.CreateFile("Alpha.dll").WriteAllBytes(TestResources.AssemblyLoadTests.Alpha); var betaDll = directory.CreateFile("Beta.dll").WriteAllBytes(TestResources.AssemblyLoadTests.Beta); var results = AssemblyUtilities.FindAssemblySet(alphaDll.Path); Assert.Equal(expected: 1, actual: results.Length); Assert.Equal(expected: alphaDll.Path, actual: results[0]); } [Fact] public void FindAssemblySet_SimpleDependency() { var directory = Temp.CreateDirectory(); var alphaDll = directory.CreateFile("Alpha.dll").WriteAllBytes(TestResources.AssemblyLoadTests.Alpha); var gammaDll = directory.CreateFile("Gamma.dll").WriteAllBytes(TestResources.AssemblyLoadTests.Gamma); var results = AssemblyUtilities.FindAssemblySet(alphaDll.Path); Assert.Equal(expected: 2, actual: results.Length); Assert.Contains(alphaDll.Path, results, StringComparer.OrdinalIgnoreCase); Assert.Contains(gammaDll.Path, results, StringComparer.OrdinalIgnoreCase); } [Fact] public void FindAssemblySet_TransitiveDependencies() { var directory = Temp.CreateDirectory(); var alphaDll = directory.CreateFile("Alpha.dll").WriteAllBytes(TestResources.AssemblyLoadTests.Alpha); var gammaDll = directory.CreateFile("Gamma.dll").WriteAllBytes(TestResources.AssemblyLoadTests.Gamma); var deltaDll = directory.CreateFile("Delta.dll").WriteAllBytes(TestResources.AssemblyLoadTests.Delta); var results = AssemblyUtilities.FindAssemblySet(alphaDll.Path); Assert.Equal(expected: 3, actual: results.Length); Assert.Contains(alphaDll.Path, results, StringComparer.OrdinalIgnoreCase); Assert.Contains(gammaDll.Path, results, StringComparer.OrdinalIgnoreCase); Assert.Contains(deltaDll.Path, results, StringComparer.OrdinalIgnoreCase); } [Fact] public void ReadMVid() { var directory = Temp.CreateDirectory(); var alphaDll = directory.CreateFile("Alpha.dll").WriteAllBytes(TestResources.AssemblyLoadTests.Alpha); var assembly = Assembly.Load(File.ReadAllBytes(alphaDll.Path)); var result = AssemblyUtilities.ReadMvid(alphaDll.Path); Assert.Equal(expected: assembly.ManifestModule.ModuleVersionId, actual: result); } [Fact] public void FindSatelliteAssemblies_None() { var directory = Temp.CreateDirectory(); var assemblyFile = directory.CreateFile("FakeAssembly.dll"); var results = AssemblyUtilities.FindSatelliteAssemblies(assemblyFile.Path); Assert.Equal(expected: 0, actual: results.Length); } [Fact] public void FindSatelliteAssemblies_DoesNotIncludeFileInSameDirectory() { var directory = Temp.CreateDirectory(); var assemblyFile = directory.CreateFile("FakeAssembly.dll"); var satelliteFile = directory.CreateFile("FakeAssembly.resources.dll"); var results = AssemblyUtilities.FindSatelliteAssemblies(assemblyFile.Path); Assert.Equal(expected: 0, actual: results.Length); } [Fact] public void FindSatelliteAssemblies_OneLevelDown() { var directory = Temp.CreateDirectory(); var assemblyFile = directory.CreateFile("FakeAssembly.dll"); var satelliteFile = directory.CreateDirectory("de").CreateFile("FakeAssembly.resources.dll"); var results = AssemblyUtilities.FindSatelliteAssemblies(assemblyFile.Path); Assert.Equal(expected: 1, actual: results.Length); Assert.Equal(expected: satelliteFile.Path, actual: results[0], comparer: StringComparer.OrdinalIgnoreCase); } [Fact] public void FindSatelliteAssemblies_TwoLevelsDown() { var directory = Temp.CreateDirectory(); var assemblyFile = directory.CreateFile("FakeAssembly.dll"); var satelliteFile = directory.CreateDirectory("de").CreateDirectory("FakeAssembly.resources").CreateFile("FakeAssembly.resources.dll"); var results = AssemblyUtilities.FindSatelliteAssemblies(assemblyFile.Path); Assert.Equal(expected: 1, actual: results.Length); Assert.Equal(expected: satelliteFile.Path, actual: results[0], comparer: StringComparer.OrdinalIgnoreCase); } [Fact] public void FindSatelliteAssemblies_MultipleAssemblies() { var directory = Temp.CreateDirectory(); var assemblyFile = directory.CreateFile("FakeAssembly.dll"); var satelliteFileDE = directory.CreateDirectory("de").CreateFile("FakeAssembly.resources.dll"); var satelliteFileFR = directory.CreateDirectory("fr").CreateFile("FakeAssembly.resources.dll"); var results = AssemblyUtilities.FindSatelliteAssemblies(assemblyFile.Path); Assert.Equal(expected: 2, actual: results.Length); Assert.Contains(satelliteFileDE.Path, results, StringComparer.OrdinalIgnoreCase); Assert.Contains(satelliteFileFR.Path, results, StringComparer.OrdinalIgnoreCase); } [Fact] public void FindSatelliteAssemblies_WrongIntermediateDirectoryName() { var directory = Temp.CreateDirectory(); var assemblyFile = directory.CreateFile("FakeAssembly.dll"); var satelliteFile = directory.CreateDirectory("de").CreateDirectory("OtherAssembly.resources").CreateFile("FakeAssembly.resources.dll"); var results = AssemblyUtilities.FindSatelliteAssemblies(assemblyFile.Path); Assert.Equal(expected: 0, actual: results.Length); } [Fact] public void IdentifyMissingDependencies_OnlyMscorlibMissing() { var directory = Temp.CreateDirectory(); var alphaDll = directory.CreateFile("Alpha.dll").WriteAllBytes(TestResources.AssemblyLoadTests.Alpha); var gammaDll = directory.CreateFile("Gamma.dll").WriteAllBytes(TestResources.AssemblyLoadTests.Gamma); var deltaDll = directory.CreateFile("Delta.dll").WriteAllBytes(TestResources.AssemblyLoadTests.Delta); var results = AssemblyUtilities.IdentifyMissingDependencies(alphaDll.Path, new[] { alphaDll.Path, gammaDll.Path, deltaDll.Path }); Assert.Equal(expected: 1, actual: results.Length); Assert.Equal(expected: "mscorlib", actual: results[0].Name); } [Fact] public void IdentifyMissingDependencies_MultipleMissing() { var directory = Temp.CreateDirectory(); var alphaDll = directory.CreateFile("Alpha.dll").WriteAllBytes(TestResources.AssemblyLoadTests.Alpha); var results = AssemblyUtilities.IdentifyMissingDependencies(alphaDll.Path, new[] { alphaDll.Path }).Select(identity => identity.Name); Assert.Equal(expected: 2, actual: results.Count()); Assert.Contains("mscorlib", results); Assert.Contains("Gamma", results); } [Fact] public void GetAssemblyIdentity() { var directory = Temp.CreateDirectory(); var alphaDll = directory.CreateFile("Alpha.dll").WriteAllBytes(TestResources.AssemblyLoadTests.Alpha); var result = AssemblyUtilities.GetAssemblyIdentity(alphaDll.Path); Assert.Equal(expected: "Alpha", actual: result.Name); } } }
40.869767
161
0.673723
[ "Apache-2.0" ]
0x53A/roslyn
src/Compilers/Core/CodeAnalysisTest/AssemblyUtilitiesTests.cs
8,789
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.Buffers; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text; using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; using Xunit; namespace System.IO.Pipelines.Tests { public partial class PipelineReaderWriterFacts : IDisposable { public PipelineReaderWriterFacts() { _pool = new TestMemoryPool(); _pipe = new Pipe(new PipeOptions(_pool, readerScheduler: PipeScheduler.Inline, writerScheduler: PipeScheduler.Inline, useSynchronizationContext: false)); } public void Dispose() { _pipe.Writer.Complete(); _pipe.Reader.Complete(); _pool?.Dispose(); } private readonly Pipe _pipe; private readonly TestMemoryPool _pool; [Fact] public async Task CanReadAndWrite() { byte[] bytes = Encoding.ASCII.GetBytes("Hello World"); await _pipe.Writer.WriteAsync(bytes); ReadResult result = await _pipe.Reader.ReadAsync(); ReadOnlySequence<byte> buffer = result.Buffer; Assert.Equal(11, buffer.Length); Assert.True(buffer.IsSingleSegment); var array = new byte[11]; buffer.First.Span.CopyTo(array); Assert.Equal("Hello World", Encoding.ASCII.GetString(array)); _pipe.Reader.AdvanceTo(buffer.End); } [Fact] public async Task AdvanceResetsCommitHeadIndex() { _pipe.Writer.GetMemory(1); _pipe.Writer.Advance(100); await _pipe.Writer.FlushAsync(); // Advance to the end ReadResult readResult = await _pipe.Reader.ReadAsync(); _pipe.Reader.AdvanceTo(readResult.Buffer.End); // Try reading, it should block ValueTask<ReadResult> awaitable = _pipe.Reader.ReadAsync(); Assert.False(awaitable.IsCompleted); _pipe.Writer.Write(new byte[1]); await _pipe.Writer.FlushAsync(); Assert.True(awaitable.IsCompleted); // Advance to the end should reset awaitable readResult = await awaitable; _pipe.Reader.AdvanceTo(readResult.Buffer.End); // Try reading, it should block awaitable = _pipe.Reader.ReadAsync(); Assert.False(awaitable.IsCompleted); } [Fact] public async Task AdvanceShouldResetStateIfReadCanceled() { _pipe.Reader.CancelPendingRead(); ReadResult result = await _pipe.Reader.ReadAsync(); ReadOnlySequence<byte> buffer = result.Buffer; _pipe.Reader.AdvanceTo(buffer.End); Assert.False(result.IsCompleted); Assert.True(result.IsCanceled); Assert.True(buffer.IsEmpty); ValueTask<ReadResult> awaitable = _pipe.Reader.ReadAsync(); Assert.False(awaitable.IsCompleted); } [Fact] public async Task AdvanceToInvalidCursorThrows() { await _pipe.Writer.WriteAsync(new byte[100]); ReadResult result = await _pipe.Reader.ReadAsync(); ReadOnlySequence<byte> buffer = result.Buffer; _pipe.Reader.AdvanceTo(buffer.End); _pipe.Reader.CancelPendingRead(); result = await _pipe.Reader.ReadAsync(); Assert.Throws<InvalidOperationException>(() => _pipe.Reader.AdvanceTo(buffer.End)); _pipe.Reader.AdvanceTo(result.Buffer.End); } [Fact] public async Task AdvanceWithGetPositionCrossingIntoWriteHeadWorks() { // Create two blocks Memory<byte> memory = _pipe.Writer.GetMemory(1); _pipe.Writer.Advance(memory.Length); memory = _pipe.Writer.GetMemory(1); _pipe.Writer.Advance(memory.Length); await _pipe.Writer.FlushAsync(); // Read single block ReadResult readResult = await _pipe.Reader.ReadAsync(); // Allocate more memory memory = _pipe.Writer.GetMemory(1); // Create position that would cross into write head ReadOnlySequence<byte> buffer = readResult.Buffer; SequencePosition position = buffer.GetPosition(buffer.Length); // Return everything _pipe.Reader.AdvanceTo(position); // Advance writer _pipe.Writer.Advance(memory.Length); } [Fact] public async Task CompleteReaderAfterFlushWithoutAdvancingDoesNotThrow() { await _pipe.Writer.WriteAsync(new byte[10]); ReadResult result = await _pipe.Reader.ReadAsync(); ReadOnlySequence<byte> buffer = result.Buffer; _pipe.Reader.Complete(); } [Fact] public async Task AdvanceAfterCompleteThrows() { await _pipe.Writer.WriteAsync(new byte[1]); ReadResult result = await _pipe.Reader.ReadAsync(); ReadOnlySequence<byte> buffer = result.Buffer; _pipe.Reader.Complete(); var exception = Assert.Throws<InvalidOperationException>(() => _pipe.Reader.AdvanceTo(buffer.End)); Assert.Equal("Reading is not allowed after reader was completed.", exception.Message); } [Fact] public void FlushAsync_ReturnsCompletedTaskWhenMaxSizeIfZero() { PipeWriter writableBuffer = _pipe.Writer.WriteEmpty(1); ValueTask<FlushResult> flushTask = writableBuffer.FlushAsync(); Assert.True(flushTask.IsCompleted); writableBuffer = _pipe.Writer.WriteEmpty(1); flushTask = writableBuffer.FlushAsync(); Assert.True(flushTask.IsCompleted); } [Fact] public async Task FlushAsync_ThrowsIfWriterReaderWithException() { void ThrowTestException() { try { throw new InvalidOperationException("Reader exception"); } catch (Exception e) { _pipe.Reader.Complete(e); } } ThrowTestException(); InvalidOperationException invalidOperationException = await Assert.ThrowsAsync<InvalidOperationException>(async () => await _pipe.Writer.FlushAsync()); Assert.Equal("Reader exception", invalidOperationException.Message); Assert.Contains("ThrowTestException", invalidOperationException.StackTrace); invalidOperationException = await Assert.ThrowsAsync<InvalidOperationException>(async () => await _pipe.Writer.FlushAsync()); Assert.Equal("Reader exception", invalidOperationException.Message); Assert.Contains("ThrowTestException", invalidOperationException.StackTrace); Assert.Single(Regex.Matches(invalidOperationException.StackTrace, "Pipe.GetFlushResult")); } [Fact] public async Task HelloWorldAcrossTwoBlocks() { // block 1 -> block2 // [padding..hello] -> [ world ] PipeWriter writeBuffer = _pipe.Writer; var blockSize = _pipe.Writer.GetMemory().Length; byte[] paddingBytes = Enumerable.Repeat((byte)'a', blockSize - 5).ToArray(); byte[] bytes = Encoding.ASCII.GetBytes("Hello World"); writeBuffer.Write(paddingBytes); writeBuffer.Write(bytes); await writeBuffer.FlushAsync(); ReadResult result = await _pipe.Reader.ReadAsync(); ReadOnlySequence<byte> buffer = result.Buffer; Assert.False(buffer.IsSingleSegment); ReadOnlySequence<byte> helloBuffer = buffer.Slice(blockSize - 5); Assert.False(helloBuffer.IsSingleSegment); var memory = new List<ReadOnlyMemory<byte>>(); foreach (ReadOnlyMemory<byte> m in helloBuffer) { memory.Add(m); } List<ReadOnlyMemory<byte>> spans = memory; _pipe.Reader.AdvanceTo(buffer.Start, buffer.Start); Assert.Equal(2, memory.Count); var helloBytes = new byte[spans[0].Length]; spans[0].Span.CopyTo(helloBytes); var worldBytes = new byte[spans[1].Length]; spans[1].Span.CopyTo(worldBytes); Assert.Equal("Hello", Encoding.ASCII.GetString(helloBytes)); Assert.Equal(" World", Encoding.ASCII.GetString(worldBytes)); } [Fact] public async Task ReadAsync_ThrowsIfWriterCompletedWithException() { void ThrowTestException() { try { throw new InvalidOperationException("Writer exception"); } catch (Exception e) { _pipe.Writer.Complete(e); } } ThrowTestException(); InvalidOperationException invalidOperationException = await Assert.ThrowsAsync<InvalidOperationException>(async () => await _pipe.Reader.ReadAsync()); Assert.Equal("Writer exception", invalidOperationException.Message); Assert.Contains("ThrowTestException", invalidOperationException.StackTrace); invalidOperationException = await Assert.ThrowsAsync<InvalidOperationException>(async () => await _pipe.Reader.ReadAsync()); Assert.Equal("Writer exception", invalidOperationException.Message); Assert.Contains("ThrowTestException", invalidOperationException.StackTrace); Assert.Single(Regex.Matches(invalidOperationException.StackTrace, "Pipe.GetReadResult")); } [Fact] public async Task ReaderShouldNotGetUnflushedBytes() { // Write 10 and flush PipeWriter buffer = _pipe.Writer; buffer.Write(new byte[] { 0, 0, 0, 10 }); await buffer.FlushAsync(); // Write 9 buffer = _pipe.Writer; buffer.Write(new byte[] { 0, 0, 0, 9 }); // Write 8 buffer.Write(new byte[] { 0, 0, 0, 8 }); // Make sure we don't see it yet ReadResult result = await _pipe.Reader.ReadAsync(); ReadOnlySequence<byte> reader = result.Buffer; Assert.Equal(4, reader.Length); Assert.Equal(new byte[] { 0, 0, 0, 10 }, reader.ToArray()); // Don't move _pipe.Reader.AdvanceTo(reader.Start); // Now flush await buffer.FlushAsync(); reader = (await _pipe.Reader.ReadAsync()).Buffer; Assert.Equal(12, reader.Length); Assert.Equal(new byte[] { 0, 0, 0, 10 }, reader.Slice(0, 4).ToArray()); Assert.Equal(new byte[] { 0, 0, 0, 9 }, reader.Slice(4, 4).ToArray()); Assert.Equal(new byte[] { 0, 0, 0, 8 }, reader.Slice(8, 4).ToArray()); _pipe.Reader.AdvanceTo(reader.Start, reader.Start); } [Fact] public async Task ReaderShouldNotGetUnflushedBytesWhenOverflowingSegments() { // Fill the block with stuff leaving 5 bytes at the end Memory<byte> buffer = _pipe.Writer.GetMemory(); int len = buffer.Length; // Fill the buffer with garbage // block 1 -> block2 // [padding..hello] -> [ world ] byte[] paddingBytes = Enumerable.Repeat((byte)'a', len - 5).ToArray(); _pipe.Writer.Write(paddingBytes); await _pipe.Writer.FlushAsync(); // Write 10 and flush _pipe.Writer.Write(new byte[] { 0, 0, 0, 10 }); // Write 9 _pipe.Writer.Write(new byte[] { 0, 0, 0, 9 }); // Write 8 _pipe.Writer.Write(new byte[] { 0, 0, 0, 8 }); // Make sure we don't see it yet ReadResult result = await _pipe.Reader.ReadAsync(); ReadOnlySequence<byte> reader = result.Buffer; Assert.Equal(len - 5, reader.Length); // Don't move _pipe.Reader.AdvanceTo(reader.End); // Now flush await _pipe.Writer.FlushAsync(); reader = (await _pipe.Reader.ReadAsync()).Buffer; Assert.Equal(12, reader.Length); Assert.Equal(new byte[] { 0, 0, 0, 10 }, reader.Slice(0, 4).ToArray()); Assert.Equal(new byte[] { 0, 0, 0, 9 }, reader.Slice(4, 4).ToArray()); Assert.Equal(new byte[] { 0, 0, 0, 8 }, reader.Slice(8, 4).ToArray()); _pipe.Reader.AdvanceTo(reader.Start, reader.Start); } [Fact] public async Task ReaderShouldNotGetUnflushedBytesWithAppend() { // Write 10 and flush PipeWriter buffer = _pipe.Writer; buffer.Write(new byte[] { 0, 0, 0, 10 }); await buffer.FlushAsync(); // Write Hello to another pipeline and get the buffer byte[] bytes = Encoding.ASCII.GetBytes("Hello"); var c2 = new Pipe(new PipeOptions(_pool, readerScheduler: PipeScheduler.Inline, writerScheduler: PipeScheduler.Inline)); await c2.Writer.WriteAsync(bytes); ReadResult result = await c2.Reader.ReadAsync(); ReadOnlySequence<byte> c2Buffer = result.Buffer; Assert.Equal(bytes.Length, c2Buffer.Length); // Write 9 to the buffer buffer = _pipe.Writer; buffer.Write(new byte[] { 0, 0, 0, 9 }); // Append the data from the other pipeline foreach (ReadOnlyMemory<byte> memory in c2Buffer) { buffer.Write(memory.Span); } // Mark it as consumed c2.Reader.AdvanceTo(c2Buffer.End); // Now read and make sure we only see the comitted data result = await _pipe.Reader.ReadAsync(); ReadOnlySequence<byte> reader = result.Buffer; Assert.Equal(4, reader.Length); Assert.Equal(new byte[] { 0, 0, 0, 10 }, reader.Slice(0, 4).ToArray()); // Consume nothing _pipe.Reader.AdvanceTo(reader.Start); // Flush the second set of writes await buffer.FlushAsync(); reader = (await _pipe.Reader.ReadAsync()).Buffer; // int, int, "Hello" Assert.Equal(13, reader.Length); Assert.Equal(new byte[] { 0, 0, 0, 10 }, reader.Slice(0, 4).ToArray()); Assert.Equal(new byte[] { 0, 0, 0, 9 }, reader.Slice(4, 4).ToArray()); Assert.Equal("Hello", Encoding.ASCII.GetString(reader.Slice(8).ToArray())); _pipe.Reader.AdvanceTo(reader.Start, reader.Start); } [Theory] [InlineData(true)] [InlineData(false)] public async Task ReadAsyncOnCompletedCapturesTheExecutionContext(bool useSynchronizationContext) { var pipe = new Pipe(new PipeOptions(useSynchronizationContext: useSynchronizationContext)); SynchronizationContext previous = SynchronizationContext.Current; var sc = new CustomSynchronizationContext(); if (useSynchronizationContext) { SynchronizationContext.SetSynchronizationContext(sc); } try { AsyncLocal<int> val = new AsyncLocal<int>(); var tcs = new TaskCompletionSource<int>(); val.Value = 10; pipe.Reader.ReadAsync().GetAwaiter().OnCompleted(() => { tcs.TrySetResult(val.Value); }); val.Value = 20; pipe.Writer.WriteEmpty(100); // Don't run any code on our fake sync context await pipe.Writer.FlushAsync().ConfigureAwait(false); if (useSynchronizationContext) { Assert.Equal(1, sc.Callbacks.Count); sc.Callbacks[0].Item1(sc.Callbacks[0].Item2); } int value = await tcs.Task.ConfigureAwait(false); Assert.Equal(10, value); } finally { if (useSynchronizationContext) { SynchronizationContext.SetSynchronizationContext(previous); } pipe.Reader.Complete(); pipe.Writer.Complete(); } } [Theory] [InlineData(true)] [InlineData(false)] public async Task FlushAsyncOnCompletedCapturesTheExecutionContextAndSyncContext(bool useSynchronizationContext) { var pipe = new Pipe(new PipeOptions(useSynchronizationContext: useSynchronizationContext, pauseWriterThreshold: 20, resumeWriterThreshold: 10)); SynchronizationContext previous = SynchronizationContext.Current; var sc = new CustomSynchronizationContext(); if (useSynchronizationContext) { SynchronizationContext.SetSynchronizationContext(sc); } try { AsyncLocal<int> val = new AsyncLocal<int>(); var tcs = new TaskCompletionSource<int>(); val.Value = 10; pipe.Writer.WriteEmpty(20); pipe.Writer.FlushAsync().GetAwaiter().OnCompleted(() => { tcs.TrySetResult(val.Value); }); val.Value = 20; // Don't run any code on our fake sync context ReadResult result = await pipe.Reader.ReadAsync().ConfigureAwait(false); pipe.Reader.AdvanceTo(result.Buffer.End); if (useSynchronizationContext) { Assert.Equal(1, sc.Callbacks.Count); sc.Callbacks[0].Item1(sc.Callbacks[0].Item2); } int value = await tcs.Task.ConfigureAwait(false); Assert.Equal(10, value); } finally { if (useSynchronizationContext) { SynchronizationContext.SetSynchronizationContext(previous); } pipe.Reader.Complete(); pipe.Writer.Complete(); } } [Fact] public async Task ReadingCanBeCanceled() { var cts = new CancellationTokenSource(); cts.Token.Register(() => { _pipe.Writer.Complete(new OperationCanceledException(cts.Token)); }); Task ignore = Task.Run( async () => { await Task.Delay(1000); cts.Cancel(); }); await Assert.ThrowsAsync<OperationCanceledException>( async () => { ReadResult result = await _pipe.Reader.ReadAsync(); ReadOnlySequence<byte> buffer = result.Buffer; }); } [Fact] public async Task SyncReadThenAsyncRead() { PipeWriter buffer = _pipe.Writer; buffer.Write(Encoding.ASCII.GetBytes("Hello World")); await buffer.FlushAsync(); bool gotData = _pipe.Reader.TryRead(out ReadResult result); Assert.True(gotData); Assert.Equal("Hello World", Encoding.ASCII.GetString(result.Buffer.ToArray())); _pipe.Reader.AdvanceTo(result.Buffer.GetPosition(6)); result = await _pipe.Reader.ReadAsync(); Assert.Equal("World", Encoding.ASCII.GetString(result.Buffer.ToArray())); _pipe.Reader.AdvanceTo(result.Buffer.End); } [Fact] public void ThrowsOnAllocAfterCompleteWriter() { _pipe.Writer.Complete(); Assert.Throws<InvalidOperationException>(() => _pipe.Writer.GetMemory()); } [Fact] public void ThrowsOnReadAfterCompleteReader() { _pipe.Reader.Complete(); Assert.Throws<InvalidOperationException>(() => _pipe.Reader.ReadAsync()); } [Fact] public void TryReadAfterCancelPendingReadReturnsTrue() { _pipe.Reader.CancelPendingRead(); bool gotData = _pipe.Reader.TryRead(out ReadResult result); Assert.True(result.IsCanceled); _pipe.Reader.AdvanceTo(result.Buffer.End); } [Fact] public void TryReadAfterCloseWriterWithExceptionThrows() { _pipe.Writer.Complete(new Exception("wow")); var ex = Assert.Throws<Exception>(() => _pipe.Reader.TryRead(out ReadResult result)); Assert.Equal("wow", ex.Message); } [Fact] public void TryReadAfterReaderCompleteThrows() { _pipe.Reader.Complete(); Assert.Throws<InvalidOperationException>(() => _pipe.Reader.TryRead(out ReadResult result)); } [Fact] public void TryReadAfterWriterCompleteReturnsTrue() { _pipe.Writer.Complete(); bool gotData = _pipe.Reader.TryRead(out ReadResult result); Assert.True(result.IsCompleted); _pipe.Reader.AdvanceTo(result.Buffer.End); } [Fact] public void WhenTryReadReturnsFalseDontNeedToCallAdvance() { bool gotData = _pipe.Reader.TryRead(out ReadResult result); Assert.False(gotData); _pipe.Reader.AdvanceTo(default); } [Fact] public async Task WritingDataMakesDataReadableViaPipeline() { byte[] bytes = Encoding.ASCII.GetBytes("Hello World"); await _pipe.Writer.WriteAsync(bytes); ReadResult result = await _pipe.Reader.ReadAsync(); ReadOnlySequence<byte> buffer = result.Buffer; Assert.Equal(11, buffer.Length); Assert.True(buffer.IsSingleSegment); var array = new byte[11]; buffer.First.Span.CopyTo(array); Assert.Equal("Hello World", Encoding.ASCII.GetString(array)); _pipe.Reader.AdvanceTo(buffer.Start, buffer.Start); } [Fact] public async Task DoubleAsyncReadThrows() { ValueTask<ReadResult> readTask1 = _pipe.Reader.ReadAsync(); ValueTask<ReadResult> readTask2 = _pipe.Reader.ReadAsync(); var task1 = Assert.ThrowsAsync<InvalidOperationException>(async () => await readTask1); var task2 = Assert.ThrowsAsync<InvalidOperationException>(async () => await readTask2); var exception1 = await task1; var exception2 = await task2; Assert.Equal("Concurrent reads or writes are not supported.", exception1.Message); Assert.Equal("Concurrent reads or writes are not supported.", exception2.Message); } [Fact] public void GetResultBeforeCompletedThrows() { ValueTask<ReadResult> awaiter = _pipe.Reader.ReadAsync(); Assert.Throws<InvalidOperationException>(() => awaiter.GetAwaiter().GetResult()); } [Fact] public async Task CompleteAfterAdvanceCommits() { _pipe.Writer.WriteEmpty(4); _pipe.Writer.Complete(); var result = await _pipe.Reader.ReadAsync(); Assert.Equal(4, result.Buffer.Length); _pipe.Reader.AdvanceTo(result.Buffer.End); } [Fact] public async Task AdvanceWithoutReadThrows() { await _pipe.Writer.WriteAsync(new byte[3]); ReadResult readResult = await _pipe.Reader.ReadAsync(); _pipe.Reader.AdvanceTo(readResult.Buffer.Start); InvalidOperationException exception = Assert.Throws<InvalidOperationException>(() => _pipe.Reader.AdvanceTo(readResult.Buffer.End)); Assert.Equal("No reading operation to complete.", exception.Message); } [Fact] public async Task TryReadAfterReadAsyncThrows() { await _pipe.Writer.WriteAsync(new byte[3]); ReadResult readResult = await _pipe.Reader.ReadAsync(); Assert.Throws<InvalidOperationException>(() => _pipe.Reader.TryRead(out _)); _pipe.Reader.AdvanceTo(readResult.Buffer.Start); } [Fact] public void GetMemoryZeroReturnsNonEmpty() { Assert.True(_pipe.Writer.GetMemory(0).Length > 0); } [Fact] public async Task ReadAsyncWithDataReadyReturnsTaskWithValue() { _pipe.Writer.WriteEmpty(10); await _pipe.Writer.FlushAsync(); var task = _pipe.Reader.ReadAsync(); Assert.True(IsTaskWithResult(task)); } [Fact] public void CancelledReadAsyncReturnsTaskWithValue() { _pipe.Reader.CancelPendingRead(); var task = _pipe.Reader.ReadAsync(); Assert.True(IsTaskWithResult(task)); } [Fact] public void FlushAsyncWithoutBackpressureReturnsTaskWithValue() { _pipe.Writer.WriteEmpty(10); var task = _pipe.Writer.FlushAsync(); Assert.True(IsTaskWithResult(task)); } [Fact] public void CancelledFlushAsyncReturnsTaskWithValue() { _pipe.Writer.CancelPendingFlush(); var task = _pipe.Writer.FlushAsync(); Assert.True(IsTaskWithResult(task)); } [Fact] public void EmptyFlushAsyncDoesntWakeUpReader() { ValueTask<ReadResult> task = _pipe.Reader.ReadAsync(); _pipe.Writer.FlushAsync(); Assert.False(task.IsCompleted); } [Fact] public async Task EmptyFlushAsyncDoesntWakeUpReaderAfterAdvance() { await _pipe.Writer.WriteAsync(new byte[10]); ReadResult result = await _pipe.Reader.ReadAsync(); _pipe.Reader.AdvanceTo(result.Buffer.Start, result.Buffer.End); ValueTask<ReadResult> task = _pipe.Reader.ReadAsync(); await _pipe.Writer.FlushAsync(); Assert.False(task.IsCompleted); } private bool IsTaskWithResult<T>(ValueTask<T> task) { return task == new ValueTask<T>(task.Result); } private sealed class CustomSynchronizationContext : SynchronizationContext { public List<Tuple<SendOrPostCallback, object>> Callbacks = new List<Tuple<SendOrPostCallback, object>>(); public override void Post(SendOrPostCallback d, object state) { Callbacks.Add(Tuple.Create(d, state)); } } } }
34.9375
165
0.577014
[ "MIT" ]
Adam25T/corefx
src/System.IO.Pipelines/tests/PipeReaderWriterFacts.cs
27,391
C#
// SharpDevelop samples // Copyright (c) 2006, AlphaSierraPapa // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, are // permitted provided that the following conditions are met: // // - Redistributions of source code must retain the above copyright notice, this list // of conditions and the following disclaimer. // // - Redistributions in binary form must reproduce the above copyright notice, this list // of conditions and the following disclaimer in the documentation and/or other materials // provided with the distribution. // // - Neither the name of the SharpDevelop team nor the names of its contributors may be used to // endorse or promote products derived from this software without specific prior written // permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &AS IS& AND ANY EXPRESS // OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY // AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT // OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. using Mono.Build.Tasks; using System; namespace Mono.Build.Tasks.Tests { /// <summary> /// Helper class that allows us to test protected methods of the /// MonoCSharpCompilerTask class. /// </summary> public class MockMonoCSharpCompilerTask : MonoCSharpCompilerTask { /// <summary> /// Generates the MonoCSharpCompilerTask command line arguments via the /// protected GenerateCommandLineArguments method. /// </summary> public string GetCommandLine() { return base.GenerateResponseFileCommands(); } protected override string ToolName { get { return "MonoCSharp.exe"; } } protected override string GenerateFullPathToTool() { return MonoToolLocationHelper.GetPathToTool(ToolName); } } }
40.017241
101
0.761741
[ "MIT" ]
Plankankul/SharpDevelop-w-Framework
samples/Mono/Mono.Build.Tasks.Tests/MockMonoCSharpCompilerTask.cs
2,321
C#
// ----------------------------------------------------------------------- // Licensed to The .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // ----------------------------------------------------------------------- // This is a generated file. // The generation template has been modified from .NET Runtime implementation using System; using System.Collections.Generic; using System.Security.Cryptography; using System.Security.Cryptography.Asn1; using Kerberos.NET.Crypto; using Kerberos.NET.Asn1; namespace Kerberos.NET.Entities { public partial class KrbPrincipalName { /* PrincipalName ::= SEQUENCE { name-type [0] Int32, name-string [1] SEQUENCE OF KerberosString } */ public PrincipalNameType Type { get; set; } public string[] Name { get; set; } // Encoding methods public ReadOnlyMemory<byte> Encode() { var writer = new AsnWriter(AsnEncodingRules.DER); Encode(writer); return writer.EncodeAsMemory(); } internal void Encode(AsnWriter writer) { Encode(writer, Asn1Tag.Sequence); } internal void Encode(AsnWriter writer, Asn1Tag tag) { writer.PushSequence(tag); writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 0)); writer.WriteInteger((long)Type); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 0)); writer.PushSequence(new Asn1Tag(TagClass.ContextSpecific, 1)); writer.PushSequence(); for (int i = 0; i < Name.Length; i++) { writer.WriteCharacterString(UniversalTagNumber.GeneralString, Name[i]); } writer.PopSequence(); writer.PopSequence(new Asn1Tag(TagClass.ContextSpecific, 1)); writer.PopSequence(tag); } internal void EncodeApplication(AsnWriter writer, Asn1Tag tag) { writer.PushSequence(tag); this.Encode(writer, Asn1Tag.Sequence); writer.PopSequence(tag); } public virtual ReadOnlyMemory<byte> EncodeApplication() => new ReadOnlyMemory<byte>(); internal ReadOnlyMemory<byte> EncodeApplication(Asn1Tag tag) { using (var writer = new AsnWriter(AsnEncodingRules.DER)) { EncodeApplication(writer, tag); return writer.EncodeAsMemory(); } } public static KrbPrincipalName Decode(ReadOnlyMemory<byte> data) { return Decode(data, AsnEncodingRules.DER); } internal static KrbPrincipalName Decode(ReadOnlyMemory<byte> encoded, AsnEncodingRules ruleSet) { return Decode(Asn1Tag.Sequence, encoded, ruleSet); } internal static KrbPrincipalName Decode(Asn1Tag expectedTag, ReadOnlyMemory<byte> encoded) { AsnReader reader = new AsnReader(encoded, AsnEncodingRules.DER); Decode(reader, expectedTag, out KrbPrincipalName decoded); reader.ThrowIfNotEmpty(); return decoded; } internal static KrbPrincipalName Decode(Asn1Tag expectedTag, ReadOnlyMemory<byte> encoded, AsnEncodingRules ruleSet) { AsnReader reader = new AsnReader(encoded, ruleSet); Decode(reader, expectedTag, out KrbPrincipalName decoded); reader.ThrowIfNotEmpty(); return decoded; } internal static void Decode<T>(AsnReader reader, out T decoded) where T: KrbPrincipalName, new() { if (reader == null) { throw new ArgumentNullException(nameof(reader)); } Decode(reader, Asn1Tag.Sequence, out decoded); } internal static void Decode<T>(AsnReader reader, Asn1Tag expectedTag, out T decoded) where T: KrbPrincipalName, new() { if (reader == null) { throw new ArgumentNullException(nameof(reader)); } decoded = new T(); AsnReader sequenceReader = reader.ReadSequence(expectedTag); AsnReader explicitReader; AsnReader collectionReader; explicitReader = sequenceReader.ReadSequence(new Asn1Tag(TagClass.ContextSpecific, 0)); if (!explicitReader.TryReadInt32(out PrincipalNameType tmpType)) { explicitReader.ThrowIfNotEmpty(); } decoded.Type = tmpType; explicitReader.ThrowIfNotEmpty(); explicitReader = sequenceReader.ReadSequence(new Asn1Tag(TagClass.ContextSpecific, 1)); // Decode SEQUENCE OF for Name { collectionReader = explicitReader.ReadSequence(); var tmpList = new List<string>(); string tmpItem; while (collectionReader.HasData) { tmpItem = collectionReader.ReadCharacterString(UniversalTagNumber.GeneralString); tmpList.Add(tmpItem); } decoded.Name = tmpList.ToArray(); } explicitReader.ThrowIfNotEmpty(); sequenceReader.ThrowIfNotEmpty(); } } }
32.517241
124
0.556204
[ "MIT" ]
AlexanderSemenyak/Kerberos.NET
Kerberos.NET/Entities/Krb/KrbPrincipalName.generated.cs
5,660
C#
namespace HappyThoughts.Services.Data.Votes { using System.Threading.Tasks; public interface IVotesService { Task<int> VoteTopicAsync(string topicId, string userId, bool isLike); } }
20.9
77
0.708134
[ "MIT" ]
ilkerBuguner/HappyThoughts
HappyThoghts/Services/HappyThoughts.Services.Data/Votes/IVotesService.cs
211
C#
using System; using BizHawk.Common; using BizHawk.Emulation.Common; using BizHawk.Emulation.Cores.Components.H6280; namespace BizHawk.Emulation.Cores.PCEngine { // ------------------------------------------------------ // HuC6202 Video Priority Controller // ------------------------------------------------------ // Responsible for merging VDC1 and VDC2 data on the SuperGrafx. // Pretty much all documentation on the SuperGrafx courtesy of Charles MacDonald. public sealed class VPC : IVideoProvider { PCEngine PCE; public VDC VDC1; public VDC VDC2; public VCE VCE; public HuC6280 CPU; public byte[] Registers = { 0x11, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00 }; public int Window1Width => ((Registers[3] & 3) << 8) | Registers[2]; public int Window2Width => ((Registers[5] & 3) << 8) | Registers[4]; public int PriorityModeSlot0 => Registers[0] & 0x0F; public int PriorityModeSlot1 => (Registers[0] >> 4) & 0x0F; public int PriorityModeSlot2 => Registers[1] & 0x0F; public int PriorityModeSlot3 => (Registers[1] >> 4) & 0x0F; public VPC(PCEngine pce, VDC vdc1, VDC vdc2, VCE vce, HuC6280 cpu) { PCE = pce; VDC1 = vdc1; VDC2 = vdc2; VCE = vce; CPU = cpu; // latch initial video buffer FrameBuffer = vdc1.GetVideoBuffer(); FrameWidth = vdc1.BufferWidth; FrameHeight = vdc1.BufferHeight; } public byte ReadVPC(int port) { port &= 0x0F; switch (port) { case 0x08: return Registers[0]; case 0x09: return Registers[1]; case 0x0A: return Registers[2]; case 0x0B: return Registers[3]; case 0x0C: return Registers[4]; case 0x0D: return Registers[5]; case 0x0E: return Registers[6]; case 0x0F: return 0; default: return 0xFF; } } public void WriteVPC(int port, byte value) { port &= 0x0F; switch (port) { case 0x08: Registers[0] = value; break; case 0x09: Registers[1] = value; break; case 0x0A: Registers[2] = value; break; case 0x0B: Registers[3] = value; break; case 0x0C: Registers[4] = value; break; case 0x0D: Registers[5] = value; break; case 0x0E: // CPU Store Immediate VDC Select CPU.WriteVDC = (value & 1) == 0 ? (Action<int, byte>)VDC1.WriteVDC : VDC2.WriteVDC; Registers[6] = value; break; } } public void SyncState(Serializer ser) { ser.BeginSection("VPC"); ser.Sync("Registers", ref Registers, false); ser.EndSection(); if (ser.IsReader) WriteVPC(0x0E, Registers[6]); } // We use a single priority mode for the whole frame. // No commercial SGX games really use the 'window' features AFAIK. // And there are no homebrew SGX games I know of. // Maybe we'll emulate it in the native-code version. const int RCR = 6; const int BXR = 7; const int BYR = 8; const int VDW = 13; const int DCR = 15; int EffectivePriorityMode = 0; int FrameHeight; int FrameWidth; int[] FrameBuffer; private readonly byte[] PriorityBuffer = new byte[512]; private readonly byte[] InterSpritePriorityBuffer = new byte[512]; public void ExecFrame(bool render) { // Determine the effective priority mode. if (Window1Width < 0x40 && Window2Width < 0x40) EffectivePriorityMode = PriorityModeSlot3 >> 2; else if (Window2Width > 512) EffectivePriorityMode = PriorityModeSlot1 >> 2; else { Console.WriteLine("Unsupported VPC window settings"); EffectivePriorityMode = 0; } // Latch frame dimensions and framebuffer, for purely dumb reasons FrameWidth = VDC1.BufferWidth; FrameHeight = VDC1.BufferHeight; FrameBuffer = VDC1.GetVideoBuffer(); int ScanLine = 0; while (true) { VDC1.ScanLine = ScanLine; VDC2.ScanLine = ScanLine; int ActiveDisplayStartLine = VDC1.DisplayStartLine; int VBlankLine = ActiveDisplayStartLine + VDC1.Registers[VDW] + 1; if (VBlankLine > 261) VBlankLine = 261; VDC1.ActiveLine = ScanLine - ActiveDisplayStartLine; VDC2.ActiveLine = VDC1.ActiveLine; bool InActiveDisplay = (ScanLine >= ActiveDisplayStartLine) && (ScanLine < VBlankLine); if (ScanLine == ActiveDisplayStartLine) { VDC1.RCRCounter = 0x40; VDC2.RCRCounter = 0x40; } if (ScanLine == VBlankLine) { VDC1.UpdateSpriteAttributeTable(); VDC2.UpdateSpriteAttributeTable(); } if (VDC1.RCRCounter == (VDC1.Registers[RCR] & 0x3FF)) { if (VDC1.RasterCompareInterruptEnabled) { VDC1.StatusByte |= VDC.StatusRasterCompare; CPU.IRQ1Assert = true; } } if (VDC2.RCRCounter == (VDC2.Registers[RCR] & 0x3FF)) { if (VDC2.RasterCompareInterruptEnabled) { VDC2.StatusByte |= VDC.StatusRasterCompare; CPU.IRQ1Assert = true; } } CPU.Execute(VDC1.HBlankCycles); if (InActiveDisplay) { if (ScanLine == ActiveDisplayStartLine) { VDC1.BackgroundY = VDC1.Registers[BYR]; VDC2.BackgroundY = VDC2.Registers[BYR]; } else { VDC1.BackgroundY++; VDC1.BackgroundY &= 0x01FF; VDC2.BackgroundY++; VDC2.BackgroundY &= 0x01FF; } if (render) RenderScanLine(); } if (ScanLine == VBlankLine && VDC1.VBlankInterruptEnabled) VDC1.StatusByte |= VDC.StatusVerticalBlanking; if (ScanLine == VBlankLine && VDC2.VBlankInterruptEnabled) VDC2.StatusByte |= VDC.StatusVerticalBlanking; if (ScanLine == VBlankLine + 4 && VDC1.SatDmaPerformed) { VDC1.SatDmaPerformed = false; if ((VDC1.Registers[DCR] & 1) > 0) VDC1.StatusByte |= VDC.StatusVramSatDmaComplete; } if (ScanLine == VBlankLine + 4 && VDC2.SatDmaPerformed) { VDC2.SatDmaPerformed = false; if ((VDC2.Registers[DCR] & 1) > 0) VDC2.StatusByte |= VDC.StatusVramSatDmaComplete; } CPU.Execute(2); if ((VDC1.StatusByte & (VDC.StatusVerticalBlanking | VDC.StatusVramSatDmaComplete)) != 0) CPU.IRQ1Assert = true; if ((VDC2.StatusByte & (VDC.StatusVerticalBlanking | VDC.StatusVramSatDmaComplete)) != 0) CPU.IRQ1Assert = true; CPU.Execute(455 - VDC1.HBlankCycles - 2); if (InActiveDisplay == false && VDC1.DmaRequested) VDC1.RunDmaForScanline(); if (InActiveDisplay == false && VDC2.DmaRequested) VDC2.RunDmaForScanline(); VDC1.RCRCounter++; VDC2.RCRCounter++; ScanLine++; if (ScanLine == VCE.NumberOfScanlines) break; } } private void RenderScanLine() { if (VDC1.ActiveLine >= FrameHeight) return; InitializeScanLine(VDC1.ActiveLine); switch (EffectivePriorityMode) { case 0: RenderBackgroundScanline(VDC1, 12, PCE.Settings.ShowBG1); RenderBackgroundScanline(VDC2, 2, PCE.Settings.ShowBG2); RenderSpritesScanline(VDC1, 11, 14, PCE.Settings.ShowOBJ1); RenderSpritesScanline(VDC2, 1, 3, PCE.Settings.ShowOBJ2); break; case 1: RenderBackgroundScanline(VDC1, 12, PCE.Settings.ShowBG1); RenderBackgroundScanline(VDC2, 2, PCE.Settings.ShowBG2); RenderSpritesScanline(VDC1, 11, 14, PCE.Settings.ShowOBJ1); RenderSpritesScanline(VDC2, 1, 13, PCE.Settings.ShowOBJ2); break; } } private void InitializeScanLine(int scanline) { // Clear priority buffer Array.Clear(PriorityBuffer, 0, FrameWidth); // Initialize scanline to background color for (int i = 0; i < FrameWidth; i++) FrameBuffer[(scanline * FrameWidth) + i] = VCE.Palette[256]; } private unsafe void RenderBackgroundScanline(VDC vdc, byte priority, bool show) { if (vdc.BackgroundEnabled == false) return; // per-line parameters int vertLine = vdc.BackgroundY; vertLine %= vdc.BatHeight * 8; int yTile = (vertLine / 8); int yOfs = vertLine % 8; int xScroll = vdc.Registers[BXR] & 0x3FF; int BatRowMask = vdc.BatWidth - 1; fixed (ushort* VRAMptr = vdc.VRAM) fixed (int* PALptr = VCE.Palette) fixed (byte* Patternptr = vdc.PatternBuffer) fixed (int* FBptr = FrameBuffer) fixed (byte* Priortyptr = PriorityBuffer) { // pointer to the BAT and the framebuffer for this line ushort* BatRow = VRAMptr + yTile * vdc.BatWidth; int* dst = FBptr + vdc.ActiveLine * FrameWidth; // parameters that change per tile ushort BatEnt; int tileNo, paletteNo, paletteBase; byte* src; // calculate tile number and offset for first tile int xTile = (xScroll >> 3) & BatRowMask; int xOfs = xScroll & 7; // update per-tile parameters for first tile BatEnt = BatRow[xTile]; tileNo = BatEnt & 2047; paletteNo = BatEnt >> 12; paletteBase = paletteNo * 16; src = Patternptr + (tileNo << 6 | yOfs << 3 | xOfs); for (int x = 0; x < FrameWidth; x++) { if (Priortyptr[x] < priority) { byte c = *src; if (c != 0) { dst[x] = show ? PALptr[paletteBase + c] : PALptr[0]; Priortyptr[x] = priority; } } xOfs++; src++; if (xOfs == 8) { // update tile number xOfs = 0; xTile++; xTile &= BatRowMask; // update per-tile parameters BatEnt = BatRow[xTile]; tileNo = BatEnt & 2047; paletteNo = BatEnt >> 12; paletteBase = paletteNo * 16; src = Patternptr + (tileNo << 6 | yOfs << 3 | xOfs); } } } } private static readonly byte[] heightTable = { 16, 32, 64, 64 }; private void RenderSpritesScanline(VDC vdc, byte lowPriority, byte highPriority, bool show) { if (vdc.SpritesEnabled == false) return; // clear inter-sprite priority buffer Array.Clear(InterSpritePriorityBuffer, 0, FrameWidth); for (int i = 0; i < 64; i++) { int y = (vdc.SpriteAttributeTable[(i * 4) + 0] & 1023) - 64; int x = (vdc.SpriteAttributeTable[(i * 4) + 1] & 1023) - 32; ushort flags = vdc.SpriteAttributeTable[(i * 4) + 3]; int height = heightTable[(flags >> 12) & 3]; if (y + height <= vdc.ActiveLine || y > vdc.ActiveLine) continue; int patternNo = (((vdc.SpriteAttributeTable[(i * 4) + 2]) >> 1) & 0x1FF); int paletteBase = 256 + ((flags & 15) * 16); int width = (flags & 0x100) == 0 ? 16 : 32; bool priority = (flags & 0x80) != 0; bool hflip = (flags & 0x0800) != 0; bool vflip = (flags & 0x8000) != 0; if (width == 32) patternNo &= 0x1FE; int yofs; if (vflip == false) { yofs = (vdc.ActiveLine - y) & 15; if (height == 32) { patternNo &= 0x1FD; if (vdc.ActiveLine - y >= 16) { y += 16; patternNo += 2; } } else if (height == 64) { patternNo &= 0x1F9; if (vdc.ActiveLine - y >= 48) { y += 48; patternNo += 6; } else if (vdc.ActiveLine - y >= 32) { y += 32; patternNo += 4; } else if (vdc.ActiveLine - y >= 16) { y += 16; patternNo += 2; } } } else // vflip == true { yofs = 15 - ((vdc.ActiveLine - y) & 15); if (height == 32) { patternNo &= 0x1FD; if (vdc.ActiveLine - y < 16) { y += 16; patternNo += 2; } } else if (height == 64) { patternNo &= 0x1F9; if (vdc.ActiveLine - y < 16) { y += 48; patternNo += 6; } else if (vdc.ActiveLine - y < 32) { y += 32; patternNo += 4; } else if (vdc.ActiveLine - y < 48) { y += 16; patternNo += 2; } } } if (hflip == false) { if (x + width > 0 && y + height > 0) { for (int xs = x >= 0 ? x : 0; xs < x + 16 && xs >= 0 && xs < FrameWidth; xs++) { byte pixel = vdc.SpriteBuffer[(patternNo * 256) + (yofs * 16) + (xs - x)]; if (pixel != 0 && InterSpritePriorityBuffer[xs] == 0) { InterSpritePriorityBuffer[xs] = 1; byte myPriority = priority ? highPriority : lowPriority; if (PriorityBuffer[xs] < myPriority) { if (show) FrameBuffer[(vdc.ActiveLine * FrameWidth) + xs] = VCE.Palette[paletteBase + pixel]; PriorityBuffer[xs] = myPriority; } } } } if (width == 32) { patternNo++; x += 16; for (int xs = x >= 0 ? x : 0; xs < x + 16 && xs >= 0 && xs < FrameWidth; xs++) { byte pixel = vdc.SpriteBuffer[(patternNo * 256) + (yofs * 16) + (xs - x)]; if (pixel != 0 && InterSpritePriorityBuffer[xs] == 0) { InterSpritePriorityBuffer[xs] = 1; byte myPriority = priority ? highPriority : lowPriority; if (PriorityBuffer[xs] < myPriority) { if (show) FrameBuffer[(vdc.ActiveLine * FrameWidth) + xs] = VCE.Palette[paletteBase + pixel]; PriorityBuffer[xs] = myPriority; } } } } } else { // hflip = true if (x + width > 0 && y + height > 0) { if (width == 32) patternNo++; for (int xs = x >= 0 ? x : 0; xs < x + 16 && xs >= 0 && xs < FrameWidth; xs++) { byte pixel = vdc.SpriteBuffer[(patternNo * 256) + (yofs * 16) + 15 - (xs - x)]; if (pixel != 0 && InterSpritePriorityBuffer[xs] == 0) { InterSpritePriorityBuffer[xs] = 1; byte myPriority = priority ? highPriority : lowPriority; if (PriorityBuffer[xs] < myPriority) { if (show) FrameBuffer[(vdc.ActiveLine * FrameWidth) + xs] = VCE.Palette[paletteBase + pixel]; PriorityBuffer[xs] = myPriority; } } } if (width == 32) { patternNo--; x += 16; for (int xs = x >= 0 ? x : 0; xs < x + 16 && xs >= 0 && xs < FrameWidth; xs++) { byte pixel = vdc.SpriteBuffer[(patternNo * 256) + (yofs * 16) + 15 - (xs - x)]; if (pixel != 0 && InterSpritePriorityBuffer[xs] == 0) { InterSpritePriorityBuffer[xs] = 1; byte myPriority = priority ? highPriority : lowPriority; if (PriorityBuffer[xs] < myPriority) { if (show) FrameBuffer[(vdc.ActiveLine * FrameWidth) + xs] = VCE.Palette[paletteBase + pixel]; PriorityBuffer[xs] = myPriority; } } } } } } } } // IVideoProvider implementation public int[] GetVideoBuffer() { return FrameBuffer; } public int VirtualWidth => FrameWidth; public int VirtualHeight => FrameHeight; public int BufferWidth => FrameWidth; public int BufferHeight => FrameHeight; public int BackgroundColor => VCE.Palette[0]; public int VsyncNumerator { [FeatureNotImplemented] get { return NullVideo.DefaultVsyncNum; } } public int VsyncDenominator { [FeatureNotImplemented] get { return NullVideo.DefaultVsyncDen; } } } }
26.756806
103
0.591264
[ "MIT" ]
CognitiaAI/StreetFighterRL
emulator/Bizhawk/BizHawk-master/BizHawk.Emulation.Cores/Consoles/PC Engine/VPC.cs
14,745
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 iot-2015-05-28.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.IoT.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.IoT.Model.Internal.MarshallTransformations { /// <summary> /// ListThingGroups Request Marshaller /// </summary> public class ListThingGroupsRequestMarshaller : IMarshaller<IRequest, ListThingGroupsRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((ListThingGroupsRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(ListThingGroupsRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.IoT"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-05-28"; request.HttpMethod = "GET"; if (publicRequest.IsSetMaxResults()) request.Parameters.Add("maxResults", StringUtils.FromInt(publicRequest.MaxResults)); if (publicRequest.IsSetNamePrefixFilter()) request.Parameters.Add("namePrefixFilter", StringUtils.FromString(publicRequest.NamePrefixFilter)); if (publicRequest.IsSetNextToken()) request.Parameters.Add("nextToken", StringUtils.FromString(publicRequest.NextToken)); if (publicRequest.IsSetParentGroup()) request.Parameters.Add("parentGroup", StringUtils.FromString(publicRequest.ParentGroup)); if (publicRequest.IsSetRecursive()) request.Parameters.Add("recursive", StringUtils.FromBool(publicRequest.Recursive)); request.ResourcePath = "/thing-groups"; request.UseQueryString = true; return request; } private static ListThingGroupsRequestMarshaller _instance = new ListThingGroupsRequestMarshaller(); internal static ListThingGroupsRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListThingGroupsRequestMarshaller Instance { get { return _instance; } } } }
36.03
145
0.645296
[ "Apache-2.0" ]
ChristopherButtars/aws-sdk-net
sdk/src/Services/IoT/Generated/Model/Internal/MarshallTransformations/ListThingGroupsRequestMarshaller.cs
3,603
C#
using System.Collections; using UnityEngine; [AddComponentMenu("_Ground Objects/Active/Timer")] public class Timer : GroundObject { public WorkingObject workingObject; public float setTime = 5f; protected float timer = 0f; protected float step = Time.fixedDeltaTime; public override void Hit() { if (!hitByLightning) { timer = setTime; workingObject.ChangeValue(1); Lock(); StartCoroutine("TimeRoutine"); } } IEnumerable TimeRoutine() { while (timer > 0) { timer -= step; yield return new WaitForSeconds(step); } workingObject.ChangeValue(-1); Unlock(); } }
22.242424
50
0.577657
[ "MIT" ]
CookieNoir/Cloudy-Around
Assets/Scripts/Ground Objects/Active/Timer.cs
736
C#
using System; using System.Collections.Generic; using System.Linq; using Vip.DFe.Attributes; using Vip.DFe.Graphics; namespace Vip.DFe.Danfe.Elementos { /// <summary> /// Define uma pilha vertical de elementos, de forma que todos eles fiquem com a mesma largura. /// </summary> [AlturaFixa] internal class VerticalStack : DrawableBase { #region Constructors public VerticalStack() { Drawables = new List<DrawableBase>(); } public VerticalStack(float width) : this() { Width = width; } #endregion #region Properties public List<DrawableBase> Drawables { get; private set; } /// <summary> /// Soma das alturas de todos os elementos. /// </summary> public override float Height { get => Drawables.Sum(x => x.Height); set => throw new NotSupportedException(); } #endregion #region Methods public void Add(params DrawableBase[] db) { foreach (var item in db) { if (item == this) throw new InvalidOperationException(); Drawables.Add(item); } } public override void Draw(Gfx gfx) { base.Draw(gfx); float x = X, y = Y; for (int i = 0; i < Drawables.Count; i++) { var db = Drawables[i]; db.Width = Width; db.SetPosition(x, y); db.Draw(gfx); y += db.Height; } } /// <summary> /// Somente é possível mudar a largura. /// </summary> public override void SetSize(float w, float h) => throw new NotSupportedException(); #endregion } }
23.607595
103
0.506702
[ "MIT" ]
leandrovip/Vip.DFe
src/Vip.DFe/0-Domain/Danfe/Elementos/VerticalStack.cs
1,869
C#
using DSS.Architecture.Patterns.DotNet.Clean.Gateways; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace IAR.Infrastructure { public class UnitOfWorkAsync : IUnitOfWorkAsync { private readonly Dictionary<Type, object> _repositories; public UnitOfWorkAsync(IARContext context) { _repositories = new Dictionary<Type, object>(); Context = context; } public IARContext Context { get; } public IRepositoryAsync<TEntity> GetRepository<TEntity>() where TEntity : class { if (_repositories.Keys.Contains(typeof(TEntity))) { return _repositories[typeof(TEntity)] as IRepositoryAsync<TEntity>; } var repository = new Repositories.EFRepositoryAsync<TEntity, IARContext>(Context); _repositories.Add(typeof(TEntity), repository); return repository; } public async Task Save() { await Context.SaveChangesAsync(); } } }
27.142857
94
0.619298
[ "MIT" ]
AlanBailie/nics-iar-api
IAR.Infrastructure/UnitOfWorkAsync.cs
1,142
C#
using CogniteSdk; using Microsoft.Extensions.Logging; using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; namespace Cognite.Extractor.Utils { /// <summary> /// Base interface for upload queue /// </summary> public interface IUploadQueue : IDisposable, IAsyncDisposable { /// <summary> /// Start automatically uploading queue entries /// </summary> Task Start(CancellationToken token); } /// <summary> /// Interface for generic upload queue /// </summary> /// <typeparam name="T">Type of resource to upload</typeparam> public interface IUploadQueue<T> : IUploadQueue { /// <summary> /// Enqueue a single item in the internal queue. /// </summary> /// <param name="item">Item to enqueue</param> void Enqueue(T item); /// <summary> /// Enqueue a list of items in the internal queue. /// </summary> /// <param name="items">Items to enqueue</param> void Enqueue(IEnumerable<T> items); /// <summary> /// Empty the queue and return the contents /// </summary> /// <returns>Contents of the queue</returns> IEnumerable<T> Dequeue(); /// <summary> /// Trigger queue upload and return the result instead of calling the callback. /// Can be used as alternative for callback entirely. /// </summary> /// <param name="token"></param> /// <returns>A <see cref="QueueUploadResult{T}"/> containing an error or the uploaded entries</returns> Task<QueueUploadResult<T>> Trigger(CancellationToken token); } /// <summary> /// Result of an attempt to upload from an upload queue. /// </summary> /// <typeparam name="T">Queue item type</typeparam> public class QueueUploadResult<T> { /// <summary> /// List of items to be uploaded, may be null if upload failed, or empty if no objects were uploaded. /// </summary> public IEnumerable<T>? Uploaded { get; } /// <summary> /// True if upload failed completely. /// </summary> public bool IsFailed => Exception != null; /// <summary> /// Exception if upload failed completely. /// </summary> public Exception? Exception { get; } /// <summary> /// Constructor for successfull or empty upload. /// </summary> /// <param name="uploaded"></param> public QueueUploadResult(IEnumerable<T> uploaded) { Uploaded = uploaded; } /// <summary> /// Constructor for failed upload. /// </summary> /// <param name="ex">Fatal exception</param> public QueueUploadResult(Exception? ex) { Exception = ex; } } /// <summary> /// Generic base class for upload queues /// </summary> /// <typeparam name="T"></typeparam> public abstract class BaseUploadQueue<T> : IUploadQueue<T> { /// <summary> /// CogniteDestination to use /// </summary> protected CogniteDestination Destination { get; private set; } /// <summary> /// Callback on upload /// </summary> protected Func<QueueUploadResult<T>, Task>? Callback { get; private set; } /// <summary> /// Logger to use /// </summary> protected ILogger<CogniteDestination> DestLogger { get; private set; } private readonly ConcurrentQueue<T> _items; private readonly int _maxSize; private readonly ManualResetEventSlim _pushEvent; private readonly System.Timers.Timer? _timer; private CancellationTokenSource? _tokenSource; private CancellationTokenSource? _internalSource; private Task? _uploadLoopTask; private Task? _uploadTask; internal BaseUploadQueue( CogniteDestination destination, TimeSpan interval, int maxSize, ILogger<CogniteDestination> logger, Func<QueueUploadResult<T>, Task>? callback) { _maxSize = maxSize; Destination = destination; _items = new ConcurrentQueue<T>(); DestLogger = logger; _pushEvent = new ManualResetEventSlim(false); Callback = callback; if (interval == TimeSpan.Zero || interval == Timeout.InfiniteTimeSpan) return; _timer = new System.Timers.Timer { Interval = interval.TotalMilliseconds, AutoReset = false }; _timer.Elapsed += (sender, e) => _pushEvent.Set(); } /// <inheritdoc /> public virtual void Enqueue(T item) { _items.Enqueue(item); if (_maxSize > 0 && _items.Count >= _maxSize) { _pushEvent.Set(); } } /// <inheritdoc /> public virtual void Enqueue(IEnumerable<T> items) { if (items == null) return; foreach (var item in items) { _items.Enqueue(item); } if (_maxSize > 0 && _items.Count >= _maxSize) { _pushEvent.Set(); } } /// <inheritdoc /> public virtual IEnumerable<T> Dequeue() { var items = new List<T>(); while (_items.TryDequeue(out T item)) { items.Add(item); } return items; } /// <inheritdoc /> public async Task<QueueUploadResult<T>> Trigger(CancellationToken token) { var items = Dequeue(); return await UploadEntries(items, token).ConfigureAwait(false); } /// <inheritdoc /> public async Task Start(CancellationToken token) { _tokenSource = CancellationTokenSource.CreateLinkedTokenSource(token); _timer?.Start(); DestLogger.LogDebug("Queue of type {Type} started", GetType().Name); // Use a separate token to avoid propagating the loop cancellation to Chunking.RunThrottled _internalSource = new CancellationTokenSource(); _uploadLoopTask = Task.Run(() => { try { while (!_tokenSource.IsCancellationRequested) { _pushEvent?.Wait(_tokenSource.Token); _uploadTask = TriggerUploadAndCallback(_internalSource.Token); // stop waiting if the source token gets cancelled, but do not // cancel the upload task _uploadTask.Wait(_tokenSource.Token); _pushEvent?.Reset(); _timer?.Start(); } } catch (OperationCanceledException) { // ignore cancel exceptions, but throw any other exception DestLogger.LogDebug("Upload queue of type {Type} cancelled with {QueueSize} items left", GetType().Name, _items.Count); } }, CancellationToken.None); await _uploadLoopTask.ConfigureAwait(false); } [System.Diagnostics.CodeAnalysis.SuppressMessage("Reliability", "CA2007: Do not directly await a Task", Justification = "Awaiter configured by the caller")] private Task TriggerUploadAndCallback(CancellationToken token) { return Task.Run(async () => { var result = await Trigger(token); if (Callback != null) await Callback(result); }, CancellationToken.None); } /// <summary> /// Method called to upload entries /// </summary> /// <param name="items">Items to upload</param> /// <param name="token"></param> /// <returns>A <see cref="QueueUploadResult{T}"/> containing an error or the uploaded entries</returns> protected abstract Task<QueueUploadResult<T>> UploadEntries(IEnumerable<T> items, CancellationToken token); #region IDisposable Support [System.Diagnostics.CodeAnalysis.SuppressMessage("Reliability", "CA2007: Do not directly await a Task", Justification = "Fine to wait in the same context")] private async Task FinalizeQueue() { try { _timer?.Stop(); if (_tokenSource != null && !_tokenSource.IsCancellationRequested) { _tokenSource.Cancel(); } if (_uploadLoopTask != null) { await _uploadLoopTask; } if (_uploadTask != null) { // Wait for the current upload task to end or timeout, if any await WaitOrTimeout(_uploadTask); } // If there is anything left in the queue, push it, await WaitOrTimeout(TriggerUploadAndCallback(CancellationToken.None)); } catch (Exception ex) { DestLogger.LogError(ex, "Exception when disposing of upload queue: {msg}", ex.Message); } } [System.Diagnostics.CodeAnalysis.SuppressMessage("Reliability", "CA2007: Do not directly await a Task", Justification = "Awaiter configured by the caller")] private async Task WaitOrTimeout(Task task) { var t = await Task.WhenAny(task, Task.Delay(60_000)); if (t != task || t.Status != TaskStatus.RanToCompletion) { DestLogger.LogError("Upload queue of type {Type} aborted before finishing uploading: Timeout", GetType().Name); } } /// <summary> /// Dispose of the queue, uploading all remaining entries. /// </summary> /// <param name="disposing"></param> [System.Diagnostics.CodeAnalysis.SuppressMessage("Reliability", "CA2007: Do not directly await a Task", Justification = "Fine to wait in the same context")] protected virtual void Dispose(bool disposing) { if (disposing) { Task.Run(async () => await FinalizeQueue()).Wait(); _pushEvent.Dispose(); _timer?.Close(); _tokenSource?.Dispose(); _internalSource?.Dispose(); } } /// <summary> /// Internal method to dispose asynchronously. /// </summary> protected async ValueTask DisposeAsyncCore() { await FinalizeQueue().ConfigureAwait(false); _pushEvent.Dispose(); _timer?.Close(); _tokenSource?.Dispose(); _internalSource?.Dispose(); } /// <summary> /// Dispose of the queue, uploading all remaining entries. Use DisposeAsync instead if possible. /// </summary> public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } /// <summary> /// Dispose of the queue, uploading all remaining entries. Preferred over synchronous dispose. /// </summary> public async ValueTask DisposeAsync() { await DisposeAsyncCore().ConfigureAwait(false); Dispose(false); #pragma warning disable CA1816 // Dispose methods should call SuppressFinalize GC.SuppressFinalize(this); #pragma warning restore CA1816 // Dispose methods should call SuppressFinalize } #endregion } }
35.981818
164
0.553815
[ "Apache-2.0" ]
cognitedata/dotnet-extractor-utils
ExtractorUtils/queues/BaseUploadQueue.cs
11,876
C#
namespace Spherus.Notifications.Mail { public enum DestinationType { To = 0, CC = 1, BCC = 2 } }
14.777778
37
0.511278
[ "MIT" ]
spherus/notifications
SourceCodes/Spherus.Notifications/Mail/DestinationType.cs
135
C#
using System; using System.Collections.Generic; using System.Text; using Lib.CharMappers; using Lib.CharsetGenerators; using Lib.Suppressors; namespace Lib.VariationGenerators { public sealed class ArbitraryVariationGenerator : VariationGeneratorBase { public ArbitraryVariationGenerator( string chars, int minLength, int maxLength, CharCase charCase = CharCase.AsDefined, IList<ISuppressor> suppressors = null, ICharMapper mapper = null) : base(suppressors, mapper) { if (string.IsNullOrEmpty(chars)) { throw new ArgumentNullException(nameof(chars), $"Empty parameter: {nameof(chars)}."); } OriginalChars = chars; MaxLength = NormalizeMaxLength(maxLength); MinLength = NormalizeMinLength(minLength, MaxLength); CharCase = charCase; BuildChars(); LoopCount = GetLoopCount(); Reset(); } public int MaxLength { get; } public int MinLength { get; } public int Size => Chars.Length; public string Chars { get; private set; } public string OriginalChars { get; } public CharCase CharCase { get; set; } protected override string BuildVariation() { var result = new StringBuilder(_currentLength); for (uint i = 0; i < _currentLength; i++) { result.Append(Chars[_permutationState[i]]); } return result.ToString(); } protected override bool GoToNextState(out ulong passedLoops) { for (var i = 0; i < _currentLength; i++) { if (_permutationState[i] < Chars.Length - 1) { _permutationState[i] += 1; passedLoops = 1; return true; } _permutationState[i] = 0; } if (_currentLength < MaxLength) { _currentLength++; _permutationState = new int[_currentLength]; passedLoops = 1; return true; } passedLoops = 0; return false; } public override void Reset() { _currentLength = MinLength; _permutationState = new int[_currentLength]; base.Reset(); } private void BuildChars() { Chars = BuildCharsetGenerator().GenerateCharset(OriginalChars); } private ICharsetGenerator BuildCharsetGenerator() { var builder = new CharsetGeneratorBuilder(); switch (CharCase) { case CharCase.Lower: builder.AddLowerCaseGenerator(); break; case CharCase.Upper: builder.AddUpperCaseGenerator(); break; case CharCase.UpperAndLower: builder.AddUpperAndLowerCaseGenerator(); break; } builder.AddUniquenessCharGenerator(); return builder.Build(); } private static int NormalizeMaxLength(int maxLength) { return Math.Max(1, maxLength); } private static int NormalizeMinLength(int minLength, int maxLength) { return Math.Min(Math.Max(0, minLength), maxLength); } private ulong GetLoopCount() { var result = 0ul; for (var i = MinLength; i <= MaxLength; i++) { result += (ulong)Math.Pow(Size, i); } return result; } private int[] _permutationState; private int _currentLength; } }
27.256944
101
0.515414
[ "MIT" ]
nabokov-ef/ForgottenPasswordGenerator
Lib/VariationGenerators/ArbitraryVariationGenerator.cs
3,927
C#
using CommonServiceLocator; using GalaSoft.MvvmLight.Ioc; namespace Chromatics.Controllers { /// <summary> /// This is a Service Locator to allow for loose coupling of components /// See https://martinfowler.com/articles/injection.html#UsingAServiceLocator for a description. /// </summary> internal class Locator { static Locator() { // Set up IoC container ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default); // Register our main applications entry point (Chromatics) SimpleIoc.Default.Register<Chromatics>(); // Register an interface used for writing to the Console/Log/Application SimpleIoc.Default.Register<ILogWrite>(() => SimpleIoc.Default.GetInstance<Chromatics>()); } /// <summary> /// Static reference to our main entry point into Chromatics /// </summary> public static Chromatics ChromaticsInstance => SimpleIoc.Default.GetInstance<Chromatics>(); } }
34.8
104
0.64751
[ "MIT" ]
Reylak/Chromatics
Chromatics/Controllers/Locator.cs
1,046
C#
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ using System.Collections.Generic; using Aliyun.Acs.Core; namespace Aliyun.Acs.Iot.Model.V20180120 { public class UpdateJobResponse : AcsResponse { private string requestId; private bool? success; private string code; private string errorMessage; public string RequestId { get { return requestId; } set { requestId = value; } } public bool? Success { get { return success; } set { success = value; } } public string Code { get { return code; } set { code = value; } } public string ErrorMessage { get { return errorMessage; } set { errorMessage = value; } } } }
18.611765
63
0.644753
[ "Apache-2.0" ]
AxiosCros/aliyun-openapi-net-sdk
aliyun-net-sdk-iot/Iot/Model/V20180120/UpdateJobResponse.cs
1,582
C#
// Copyright (c) Christof Senn. All rights reserved. See license.txt in the project root for license information. namespace Remote.Linq { using Aqua.TypeSystem; using Remote.Linq.Expressions; using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.Text; [Serializable] [DataContract] public class Query : IQuery, IOrderedQuery { /// <summary> /// Initializes a new instance of the <see cref="Query"/> class. /// </summary> public Query() { } /// <summary> /// Initializes a new instance of the <see cref="Query"/> class. /// </summary> public Query(Type type, IEnumerable<LambdaExpression> filterExpressions = null, IEnumerable<SortExpression> sortExpressions = null, int? skip = null, int? take = null) : this(new TypeInfo(type, false, false), filterExpressions, sortExpressions, skip, take) { } /// <summary> /// Initializes a new instance of the <see cref="Query"/> class. /// </summary> public Query(TypeInfo typeInfo, IEnumerable<LambdaExpression> filterExpressions = null, IEnumerable<SortExpression> sortExpressions = null, int? skip = null, int? take = null) { Type = typeInfo; FilterExpressions = (filterExpressions ?? Enumerable.Empty<LambdaExpression>()).ToList(); SortExpressions = (sortExpressions ?? Enumerable.Empty<SortExpression>()).ToList(); SkipValue = skip; TakeValue = take; } [DataMember(Order = 1, IsRequired = true, EmitDefaultValue = false)] public TypeInfo Type { get; set; } public bool HasFilters => FilterExpressions.Count > 0; public bool HasSorting => SortExpressions.Count > 0; public bool HasPaging => TakeValue.HasValue; [DataMember(Order = 2, IsRequired = false, EmitDefaultValue = false)] public List<LambdaExpression> FilterExpressions { get; set; } [DataMember(Order = 3, IsRequired = false, EmitDefaultValue = false)] public List<SortExpression> SortExpressions { get; set; } [DataMember(Name = "Skip", Order = 4, IsRequired = false, EmitDefaultValue = false)] public int? SkipValue { get; set; } [DataMember(Name = "Take", Order = 5, IsRequired = false, EmitDefaultValue = false)] public int? TakeValue { get; set; } /// <summary> /// Filters a sequence of values based on a predicate. /// </summary> /// <param name="predicate">A lambda expression to test each element for a condition.</param> /// <returns>A new query instance containing all specified query parameters.</returns> public IQuery Where(LambdaExpression predicate) { var filterExpressions = FilterExpressions.ToList(); filterExpressions.Add(predicate); var query = new Query(Type, filterExpressions, SortExpressions, SkipValue, TakeValue); return query; } /// <summary> /// Sorts the elements of a sequence in ascending order according to a key. /// </summary> public IOrderedQuery OrderBy(SortExpression sortExpression) { if (sortExpression.SortDirection != SortDirection.Ascending) { throw new ArgumentException("Expected sort expresson to be ascending."); } var query = new Query(Type, FilterExpressions, new[] { sortExpression }, SkipValue, TakeValue); return query; } /// <summary> /// Sorts the elements of a sequence in descending order according to a key. /// </summary> public IOrderedQuery OrderByDescending(SortExpression sortExpression) { if (sortExpression.SortDirection != SortDirection.Descending) { throw new ArgumentException("Expected sort expresson to be descending."); } var query = new Query(Type, FilterExpressions, new[] { sortExpression }, SkipValue, TakeValue); return query; } /// <summary> /// Performs a subsequent ordering of the elements in a sequence in ascending order according to a key. /// </summary> /// <param name="sortExpression">A sort expression to extract a key from each element and define a sort direction.</param> /// <returns>A new query instance containing all specified query parameters.</returns> IOrderedQuery IOrderedQuery.ThenBy(SortExpression sortExpression) { if (!SortExpressions.Any()) { throw new InvalidOperationException("No sorting defined yet, use OrderBy or OrderByDescending first."); } if (sortExpression.SortDirection != SortDirection.Ascending) { throw new ArgumentException("Expected sort expresson to be ascending."); } var sortExpressions = SortExpressions.ToList(); sortExpressions.Add(sortExpression); var query = new Query(Type, FilterExpressions, sortExpressions, SkipValue, TakeValue); return query; } /// <summary> /// Performs a subsequent ordering of the elements in a sequence in descending order, according to a key. /// </summary> /// <param name="sortExpression">A sort expression to extract a key from each element and define a sort direction.</param> /// <returns>A new query instance containing all specified query parameters.</returns> IOrderedQuery IOrderedQuery.ThenByDescending(SortExpression sortExpression) { if (!SortExpressions.Any()) { throw new InvalidOperationException("No sorting defined yet, use OrderBy or OrderByDescending first."); } if (sortExpression.SortDirection != SortDirection.Descending) { throw new ArgumentException("Expected sort expresson to be descending."); } var sortExpressions = SortExpressions.ToList(); sortExpressions.Add(sortExpression); var query = new Query(Type, FilterExpressions, sortExpressions, SkipValue, TakeValue); return query; } /// <summary> /// Bypasses a specified number of elements in a sequence and then returns the remaining elements. /// </summary> /// <param name="count">The number of elements to skip before returning the remaining elements.</param> /// <returns>A new query instance containing all specified query parameters.</returns> public IQuery Skip(int count) { var query = new Query(Type, FilterExpressions, SortExpressions, count, TakeValue); return query; } /// <summary> /// Returns a specified number of contiguous elements from the start of a sequence. /// </summary> /// <param name="count">The number of elements to return.</param> /// <returns>A new query instance containing all specified query parameters.</returns> public IQuery Take(int count) { var query = new Query(Type, FilterExpressions, SortExpressions, SkipValue, count); return query; } /// <summary> /// Creates a non-generic version of the specified query instance. /// </summary> /// <param name="query">The query instance to be converted into a non-generc query object.</param> /// <returns>A non-generic version of the specified query instance.</returns> public static Query CreateFromGeneric<T>(IQuery<T> query) { if (query is null) { throw new ArgumentNullException(nameof(query)); } var instance = new Query(typeof(T), query.FilterExpressions, query.SortExpressions, query.SkipValue, query.TakeValue); return instance; } public override string ToString() { var queryParameters = QueryParametersToString(); return string.Format("Query {0}{1}{2}", Type, string.IsNullOrEmpty(queryParameters) ? null : ": ", queryParameters); } protected string QueryParametersToString() { var sb = new StringBuilder(); var filterExpressions = FilterExpressions; if (!(filterExpressions is null)) { foreach (var expression in filterExpressions) { sb.AppendLine(); sb.AppendFormat("\tWhere {0}", expression); } } var sortExpressions = SortExpressions; if (!(sortExpressions is null)) { foreach (var expression in sortExpressions) { sb.AppendLine(); sb.AppendFormat("\t{0}", expression); } } var skipValue = SkipValue; if (skipValue.HasValue) { sb.AppendLine(); sb.AppendFormat("\tSkip {0}", skipValue.Value); } var takeValue = TakeValue; if (takeValue.HasValue) { sb.AppendLine(); sb.AppendFormat("\tTake {0}", takeValue.Value); } var queryParameters = sb.ToString(); return queryParameters; } } }
39.780992
183
0.597694
[ "MIT" ]
cosmintiru/Remote.Linq
src/Remote.Linq/Query.cs
9,629
C#
namespace Cosmetics { using Cosmetics.Engine; public class CosmeticsProgram { public static void Main() { CosmeticsEngine.Instance.Start(); } } }
15.384615
45
0.565
[ "MIT" ]
Valsinev/ComponentTestingWithC
WritedTestsForExams/OOP - 06 April 2015 - Evening/1/Solution/Cosmetics/CosmeticsProgram.cs
202
C#
using Harmony; using LmpClient.Events; // ReSharper disable All namespace LmpClient.ModuleStore.Harmony { [HarmonyPatch(typeof(ModuleScienceExperiment))] [HarmonyPatch("resetExperiment")] public class ModuleScienceExperiment_ResetExperiment { [HarmonyPostfix] private static void PostfixResetExperiment(ModuleScienceExperiment __instance) { ExperimentEvent.onExperimentReset.Fire(__instance.vessel); } } }
26.222222
86
0.726695
[ "MIT" ]
404inc/LunaMultiplayer
LmpClient/ModuleStore/Harmony/ModuleScienceExperiment_ResetExperiment.cs
474
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("TeamPowered")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("TeamPowered")] [assembly: AssemblyCopyright("Copyright © 2018")] [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("1256a198-dd5e-4a4b-96c2-1a054e154e1d")] // 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.567568
84
0.747482
[ "MIT" ]
crhwebdev/TeamPowered
TeamPowered/TeamPowered/Properties/AssemblyInfo.cs
1,393
C#
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Strategy { public class CashReturn : CashSuper { private double _moneyConditon=0.0d; private double _moneyReturn = 0.0d; public CashReturn(double moneyCondition,double moneyReturn) { this._moneyConditon = moneyCondition; this._moneyReturn = moneyReturn; } public override double AcceptCash(double money) { if(money>_moneyConditon) { money = money - Math.Floor(money / _moneyConditon)*_moneyReturn; } return money; } } }
23.354839
80
0.600829
[ "MIT" ]
Damon-Salvatore/design-patterns
Stragety/example01/CashReturn.cs
726
C#
using Microsoft.Maui.Controls; namespace Prism.Maui.Tests.Navigation.Mocks.Views; public class TabbedPageEmptyMock : TabbedPage { }
16.875
50
0.807407
[ "MIT" ]
jBijsterboschNL/Prism.Maui
tests/Prism.Maui.Tests/Mocks/Views/TabbedPageEmptyMock.cs
137
C#
// Copyright 2017, Institute for Artificial Intelligence - University of Bremen using UnrealBuildTool; public class UROSActorControl : ModuleRules { public UROSActorControl(ReadOnlyTargetRules Target) : base(Target) { PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; PublicIncludePaths.AddRange( new string[] { "UROSActorControl/Public" // ... add public include paths required here ... } ); PrivateIncludePaths.AddRange( new string[] { "UROSActorControl/Private", // ... add other private include paths required here ... } ); PublicDependencyModuleNames.AddRange( new string[] { "Core", "UnrealEd", "Engine", "UROSBridge", "Json", "JsonUtilities" // ... add other public dependencies that you statically link with here ... } ); PrivateDependencyModuleNames.AddRange( new string[] { "CoreUObject", "UnrealEd", "Engine", "Slate", "SlateCore", "RenderCore", "Networking", "Sockets" // ... add private dependencies that you statically link with here ... } ); DynamicallyLoadedModuleNames.AddRange( new string[] { "Renderer" // ... add any modules that your module loads dynamically here ... } ); } }
20.552239
79
0.601307
[ "BSD-3-Clause" ]
bbferka/UROSActorControl
Source/UROSActorControl/UROSActorControl.Build.cs
1,377
C#
using Tida.Canvas.Shell.Contracts.ComponentModel; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using static Tida.Canvas.Shell.Contracts.ComponentModel.Constants; namespace Tida.Canvas.Shell.ComponentModel { [ExportEditorDescriptor(EditorType = typeof(Views.Ellipse2DEditor),TypeGUID = EditorType_Ellipse2D)] class Ellipse2DEditorDescriptor : IEditorDescriptor { } }
32.214286
104
0.813747
[ "MIT" ]
JanusTida/Tida.CAD
Tida.Canvas.Shell/ComponentModel/Ellipse2DEditorDescriptor.cs
453
C#
using System; using System.Collections.Generic; using System.Text; using Newtonsoft.Json; namespace Haukcode.TaxifyDotNet.Models { public class Address { [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public string FirstName { get; set; } [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public string LastName { get; set; } [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public string Company { get; set; } public string Street1 { get; set; } [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public string Street2 { get; set; } public string City { get; set; } public string Region { get; set; } public string PostalCode { get; set; } public string Country { get; set; } [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public string Email { get; set; } [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public string Phone { get; set; } } }
28.564103
74
0.671454
[ "MIT" ]
HakanL/TaxifyDotNet
TaxifyDotNet/Models/Address.cs
1,116
C#
using System.Net; using System.Web.Http; using DotJEM.Web.Host.Results; namespace DotJEM.Web.Host { public static class ApiControllerExtentions { public static NotFoundErrorMessageResult NotFound(this ApiController self, string message) { return new NotFoundErrorMessageResult(HttpStatusCode.NotFound, message, self); } } }
26.642857
98
0.715818
[ "MIT" ]
dotJEM/web-host
src/DotJEM.Web.Host/ApiControllerExtentions.cs
375
C#
// Licensed to Elasticsearch B.V under one or more agreements. // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information using System; using System.Linq; using Elastic.Elasticsearch.Xunit.XunitPlumbing; using FluentAssertions; using Nest; namespace Tests.QueryDsl.Geo.GeoShape { public class GeoWKTTests { [U] public void ReadAndWritePoint() { var wkt = "POINT (-77.03653 38.897676)"; var shape = GeoWKTReader.Read(wkt); shape.Should().BeOfType<PointGeoShape>(); var point = (PointGeoShape)shape; point.Coordinates.Latitude.Should().Be(38.897676); point.Coordinates.Longitude.Should().Be(-77.03653); GeoWKTWriter.Write(point).Should().Be(wkt); } [U] public void ReadAndWritePointWithExponent() { var wkt = "POINT (1.2E2 -2.5E-05)"; var shape = GeoWKTReader.Read(wkt); shape.Should().BeOfType<PointGeoShape>(); var point = (PointGeoShape)shape; point.Coordinates.Latitude.Should().Be(-0.000025); point.Coordinates.Longitude.Should().Be(120); // 1.2E2 will be expanded GeoWKTWriter.Write(point).Should().Be("POINT (120 -2.5E-05)"); } [U] public void ReadAndWriteMultiPoint() { var wkt = "MULTIPOINT (102.0 2.0, 103.0 2.0)"; var shape = GeoWKTReader.Read(wkt); var multiPoint = shape as MultiPointGeoShape; multiPoint.Should().NotBeNull(); var firstPoint = multiPoint.Coordinates.First(); firstPoint.Latitude.Should().Be(2); firstPoint.Longitude.Should().Be(102); var lastPoint = multiPoint.Coordinates.Last(); lastPoint.Latitude.Should().Be(2); lastPoint.Longitude.Should().Be(103); GeoWKTWriter.Write(multiPoint).Should().Be("MULTIPOINT (102 2, 103 2)"); } [U] public void ReadAndWriteLineString() { var wkt = "LINESTRING (-77.03653 38.897676, -77.009051 38.889939)"; var shape = GeoWKTReader.Read(wkt); var lineString = shape as LineStringGeoShape; lineString.Should().NotBeNull(); lineString.Coordinates.First().Latitude.Should().Be(38.897676); lineString.Coordinates.First().Longitude.Should().Be(-77.03653); lineString.Coordinates.Last().Latitude.Should().Be(38.889939); lineString.Coordinates.Last().Longitude.Should().Be(-77.009051); GeoWKTWriter.Write(lineString).Should().Be(wkt); } [U] public void ReadMultiLineString() { var wkt = @"MULTILINESTRING ((102.0 2.0, 103.0 2.0, 103.0 3.0, 102.0 3.0), (100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0), (100.2 0.2, 100.8 0.2, 100.8 0.8, 100.2 0.8))"; var shape = GeoWKTReader.Read(wkt); var multiLineString = shape as MultiLineStringGeoShape; multiLineString.Should().NotBeNull(); foreach (var lineString in multiLineString.Coordinates) foreach (var coordinate in lineString) { coordinate.Latitude.Should().BeGreaterOrEqualTo(0).And.BeLessOrEqualTo(3); coordinate.Longitude.Should().BeGreaterOrEqualTo(100).And.BeLessOrEqualTo(103); } } [U] public void WriteMultiLineString() { var multLineString = new MultiLineStringGeoShape(new[] { new[] { new GeoCoordinate(2, 102), new GeoCoordinate(2, 103), new GeoCoordinate(3, 103), new GeoCoordinate(3, 102), }, new[] { new GeoCoordinate(0, 100), new GeoCoordinate(0, 101), new GeoCoordinate(1, 101), new GeoCoordinate(1, 100), } }); var wkt = GeoWKTWriter.Write(multLineString); wkt.Should().Be("MULTILINESTRING ((102 2, 103 2, 103 3, 102 3), (100 0, 101 0, 101 1, 100 1))"); } [U] public void ReadPolygon() { var wkt = @"POLYGON ((100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0, 100.0 0.0), (100.2 0.2, 100.8 0.2, 100.8 0.8, 100.2 0.8, 100.2 0.2))"; var shape = GeoWKTReader.Read(wkt); var polygon = shape as PolygonGeoShape; polygon.Should().NotBeNull(); foreach (var ring in polygon.Coordinates) foreach (var coordinate in ring) { coordinate.Latitude.Should().BeLessOrEqualTo(1.0); coordinate.Longitude.Should().BeGreaterOrEqualTo(100.0); } } [U] public void WritePolygon() { var polygon = new PolygonGeoShape(new[] { new[] { new GeoCoordinate(2, 102), new GeoCoordinate(2, 103), new GeoCoordinate(3, 103), new GeoCoordinate(3, 102), }, new[] { new GeoCoordinate(0, 100), new GeoCoordinate(0, 101), new GeoCoordinate(1, 101), new GeoCoordinate(1, 100), } }); var wkt = GeoWKTWriter.Write(polygon); wkt.Should().Be("POLYGON ((102 2, 103 2, 103 3, 102 3), (100 0, 101 0, 101 1, 100 1))"); } [U] public void ReadMultiPolygon() { var wkt = @"MULTIPOLYGON ( ((102.0 2.0, 103.0 2.0, 103.0 3.0, 102.0 3.0, 102.0 2.0)), ((100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0, 100.0 0.0), (100.2 0.2, 100.8 0.2, 100.8 0.8, 100.2 0.8, 100.2 0.2)))"; var shape = GeoWKTReader.Read(wkt); var multiPolygon = shape as MultiPolygonGeoShape; multiPolygon.Should().NotBeNull(); multiPolygon.Coordinates.Should().HaveCount(2); foreach (var polygon in multiPolygon.Coordinates) foreach (var ring in polygon) { ring.Should().HaveCount(5); foreach (var coordinate in ring) { coordinate.Latitude.Should().BeLessOrEqualTo(3.0).And.BeGreaterOrEqualTo(0); coordinate.Longitude.Should().BeGreaterOrEqualTo(100.0).And.BeLessOrEqualTo(103.0); } } } [U] public void WriteMultiPolygon() { var multiPolygon = new MultiPolygonGeoShape(new[] { new[] { new[] { new GeoCoordinate(2, 102), new GeoCoordinate(2, 103), new GeoCoordinate(3, 103), new GeoCoordinate(3, 102), new GeoCoordinate(2, 102), } }, new[] { new[] { new GeoCoordinate(0, 100), new GeoCoordinate(0, 101), new GeoCoordinate(1, 101), new GeoCoordinate(1, 100), new GeoCoordinate(0, 100), }, new[] { new GeoCoordinate(0.2, 100.2), new GeoCoordinate(0.2, 100.8), new GeoCoordinate(0.8, 100.8), new GeoCoordinate(0.8, 100.2), new GeoCoordinate(0.2, 100.2), } } }); GeoWKTWriter.Write(multiPolygon) .Should() .Be( "MULTIPOLYGON (((102 2, 103 2, 103 3, 102 3, 102 2)), ((100 0, 101 0, 101 1, 100 1, 100 0), (100.2 0.2, 100.8 0.2, 100.8 0.8, 100.2 0.8, 100.2 0.2)))"); } [U] public void ReadAndWriteEnvelope() { var wkt = "BBOX (-74.1, -71.12, 40.73, 40.01)"; var shape = GeoWKTReader.Read(wkt); var envelope = shape as EnvelopeGeoShape; envelope.Should().NotBeNull(); envelope.Coordinates.First().Latitude.Should().Be(40.73); envelope.Coordinates.First().Longitude.Should().Be(-74.1); envelope.Coordinates.Last().Latitude.Should().Be(40.01); envelope.Coordinates.Last().Longitude.Should().Be(-71.12); GeoWKTWriter.Write(shape).Should().Be(wkt); } [U] public void WriteEnvelopeIgnoresZValues() { var envelope = new EnvelopeGeoShape(new[] { new GeoCoordinate(40.73, -74.1, 3), new GeoCoordinate(40.01, -71.12, 2) }); GeoWKTWriter.Write(envelope).Should().Be("BBOX (-74.1, -71.12, 40.73, 40.01)"); } [U] public void ReadAndWriteGeometryCollection() { var wkt = "GEOMETRYCOLLECTION (POINT (100 0), LINESTRING (101 0, 102 1))"; var shape = GeoWKTReader.Read(wkt); var geometryCollection = shape as IGeometryCollection; geometryCollection.Should().NotBeNull(); geometryCollection.Geometries.Should().HaveCount(2); geometryCollection.Geometries.First().Should().BeOfType<PointGeoShape>(); geometryCollection.Geometries.Last().Should().BeOfType<LineStringGeoShape>(); GeoWKTWriter.Write(geometryCollection).Should().Be(wkt); } [U] public void UnknownGeometryThrowsGeoWKTException() { var wkt = "UNKNOWN (100 0)"; Action action = () => GeoWKTReader.Read(wkt); action.Should().Throw<GeoWKTException>().Which.Message.Should().Be("Unknown geometry type: UNKNOWN"); } [U] public void MalformedPolygonThrowsGeoWKTException() { var wkt = "POLYGON ((100, 5) (100, 10) (90, 10), (90, 5), (100, 5)"; Action action = () => GeoWKTReader.Read(wkt); action.Should().Throw<GeoWKTException>().Which.Message.Should().Be("Expected number but found: , at line 1, position 14"); } [U] public void GeoWKTExceptionReturnsCorrectLineNumberAndPosition() { var wkt = "POLYGON (\n(100, 5) (100, 10) (90, 10), (90, 5), (100, 5)"; Action action = () => GeoWKTReader.Read(wkt); action.Should().Throw<GeoWKTException>().Which.Message.Should().Be("Expected number but found: , at line 2, position 5"); } } }
27.485714
157
0.646223
[ "Apache-2.0" ]
Brightspace/elasticsearch-net
tests/Tests/QueryDsl/Geo/GeoShape/GeoWKTTests.cs
8,660
C#
// -------------------------------------------------------------------------------------------------------------------- // <copyright file="RepositoryEF6InMemorySqlServerUnitTests.cs" company="DotnetScaffolder"> // MIT // </copyright> // -------------------------------------------------------------------------------------------------------------------- namespace RepositoryEFDotnet.UnitTest { using Banking.Models.Context.EF; using Effort; using Microsoft.VisualStudio.TestTools.UnitTesting; using RepositoryEFDotnet.UnitTest.Base; using DatabaseContext = Banking.Models.Context.EF.SqlServerFullContext; /// <summary> /// The repository e f 6 in memory sql server unit test. /// </summary> [TestClass] public class RepositoryEF6InMemorySqlServerUnitTest : BaseRepositoryUnitTest { #region Public Methods And Operators /// <summary> /// The run all. /// </summary> [TestMethod] public void RunAll() { string dbId = "EFRepoTest"; this.AddTests(dbId); this.SearchTests(dbId); this.UpdateTests(dbId); this.LoadTests(dbId); this.DeleteTests(dbId); } #endregion #region Other Methods /// <summary> /// The add tests. /// </summary> /// <param name="dbId"> /// The db id. /// </param> private void AddTests(string dbId) { using (var uow = new DatabaseContext(DbConnectionFactory.CreatePersistent(dbId))) { this.Country_Add(uow); } using (var uow = new DatabaseContext(DbConnectionFactory.CreatePersistent(dbId))) { this.Customer_Add(uow, 2, 1, 2); } using (var uow = new DatabaseContext(DbConnectionFactory.CreatePersistent(dbId))) { this.Product_Add(uow, 5, 1, 5); } using (var uow = new DatabaseContext(DbConnectionFactory.CreatePersistent(dbId))) { this.Book_Add(uow); } using (var uow = new DatabaseContext(DbConnectionFactory.CreatePersistent(dbId))) { this.Software_Add(uow); } using (var uow = new DatabaseContext(DbConnectionFactory.CreatePersistent(dbId))) { this.Order_Add(uow, 2, 1, 2); } using (var uow = new DatabaseContext(DbConnectionFactory.CreatePersistent(dbId))) { this.OrderDetails_Add(uow, 2, 1, 2); } using (var uow = new DatabaseContext(DbConnectionFactory.CreatePersistent(dbId))) { this.BankAccount_Add(uow, 2, 1, 2); } using (var uow = new DatabaseContext(DbConnectionFactory.CreatePersistent(dbId))) { this.BankTransfers_Add(uow); } } /// <summary> /// The delete tests. /// </summary> /// <param name="dbId"> /// The db id. /// </param> private void DeleteTests(string dbId) { using (var uow = new DatabaseContext(DbConnectionFactory.CreatePersistent(dbId))) { this.BankTransfers_Delete(uow); } using (var uow = new DatabaseContext(DbConnectionFactory.CreatePersistent(dbId))) { this.BankAccount_Delete(uow); } using (var uow = new DatabaseContext(DbConnectionFactory.CreatePersistent(dbId))) { this.OrderDetails_Delete(uow); } using (var uow = new DatabaseContext(DbConnectionFactory.CreatePersistent(dbId))) { this.Order_Delete(uow); } using (var uow = new DatabaseContext(DbConnectionFactory.CreatePersistent(dbId))) { this.Software_Delete(uow); } using (var uow = new DatabaseContext(DbConnectionFactory.CreatePersistent(dbId))) { this.Book_Delete(uow); } using (var uow = new DatabaseContext(DbConnectionFactory.CreatePersistent(dbId))) { this.Product_Delete(uow); } using (var uow = new DatabaseContext(DbConnectionFactory.CreatePersistent(dbId))) { this.Customer_Delete(uow); } using (var uow = new DatabaseContext(DbConnectionFactory.CreatePersistent(dbId))) { this.Country_Delete(uow); } } /// <summary> /// The load tests. /// </summary> /// <param name="dbId"> /// The db id. /// </param> private void LoadTests(string dbId) { using (var uow = new DatabaseContext(DbConnectionFactory.CreatePersistent(dbId))) { this.Country_LoadTests(uow); this.Customer_LoadTests(uow); this.Product_LoadTests(uow); this.Book_LoadTests(uow); this.Software_LoadTests(uow); this.Order_LoadTests(uow); this.OrderDetails_LoadTests(uow); this.BankAccount_LoadTests(uow); this.BankTransfers_LoadTests(uow); } } /// <summary> /// The search tests. /// </summary> /// <param name="dbId"> /// The db id. /// </param> private void SearchTests(string dbId) { using (var uow = new DatabaseContext(DbConnectionFactory.CreatePersistent(dbId))) { this.Country_SearchTests(uow); this.Customer_SearchTests(uow); this.Product_SearchTests(uow); this.Book_SearchTests(uow); this.Software_SearchTests(uow); this.Order_SearchTests(uow); this.BankAccount_SearchTests(uow); } } /// <summary> /// The update tests. /// </summary> /// <param name="dbId"> /// The db id. /// </param> private void UpdateTests(string dbId) { // Updates using (var uow = new DatabaseContext(DbConnectionFactory.CreatePersistent(dbId))) { this.Country_Update(uow); } using (var uow = new DatabaseContext(DbConnectionFactory.CreatePersistent(dbId))) { this.Customer_Update(uow); } using (var uow = new DatabaseContext(DbConnectionFactory.CreatePersistent(dbId))) { this.Product_Update(uow); } using (var uow = new DatabaseContext(DbConnectionFactory.CreatePersistent(dbId))) { this.Book_Update(uow); } using (var uow = new DatabaseContext(DbConnectionFactory.CreatePersistent(dbId))) { this.Software_Update(uow); } using (var uow = new DatabaseContext(DbConnectionFactory.CreatePersistent(dbId))) { this.Order_Update(uow); } using (var uow = new DatabaseContext(DbConnectionFactory.CreatePersistent(dbId))) { this.OrderDetails_Update(uow); } using (var uow = new DatabaseContext(DbConnectionFactory.CreatePersistent(dbId))) { this.BankAccount_Update(uow); } using (var uow = new DatabaseContext(DbConnectionFactory.CreatePersistent(dbId))) { this.BankTransfers_Update(uow); } } #endregion } }
31.288538
120
0.513138
[ "MIT" ]
laredoza/.NetScaffolder
Templates/Generated/Dotnet/Domain/Data/Tests/EF/Repository/In-Memory/RepositoryEF6InMemorySqlServerUnitTests.cs
7,918
C#
public class Rectangle { public double Length { get; set; } public double Width { get; set; } }
20.8
38
0.644231
[ "MIT" ]
donstany/Sand_Box
SandBox_Console_App/Rectangle.cs
106
C#
using Discord; using Discord.WebSocket; using System.Linq; using System.Threading.Tasks; namespace RavenBOT.Common { public static partial class Extensions { public static async Task<IMessage[]> GetFlattenedMessagesAsync(this ISocketMessageChannel channel, int count = 100) { var msgs = await channel.GetMessagesAsync(count).FlattenAsync(); return msgs.ToArray(); } } }
26.875
123
0.688372
[ "MIT" ]
PassiveModding/RavenBOT
RavenBOT.Common/Extensions/ChannelExtensions.cs
430
C#
// CS1508: The resource identifier `A' has already been used in this assembly // Line: 0 // Compiler options: -res:1,A -linkres:1,A
26.6
77
0.706767
[ "Apache-2.0" ]
121468615/mono
mcs/errors/cs1508-2.cs
133
C#
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ namespace VeraWAF.WebPages.Admin { public partial class EditRole { /// <summary> /// butSave control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.Button butSave; /// <summary> /// butDelete control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.Button butDelete; /// <summary> /// notifications control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::VeraWAF.WebPages.Controls.FormNotification notifications; /// <summary> /// lblId control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.Label lblId; /// <summary> /// litId control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.Literal litId; /// <summary> /// lblRolename control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.Label lblRolename; /// <summary> /// txtRolename control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.TextBox txtRolename; /// <summary> /// lblCreated control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.Label lblCreated; /// <summary> /// litCreated control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.Literal litCreated; /// <summary> /// lblModified control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.Label lblModified; /// <summary> /// litModified control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.Literal litModified; /// <summary> /// lblComment control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.Label lblComment; /// <summary> /// txtComment control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.TextBox txtComment; /// <summary> /// lblUsers control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.Label lblUsers; /// <summary> /// txtUsers control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.TextBox txtUsers; /// <summary> /// lblUserName control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.Label lblUserName; /// <summary> /// txtUserName control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.TextBox txtUserName; /// <summary> /// btnAddUser control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.Button btnAddUser; /// <summary> /// btnRemoveUser control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.Button btnRemoveUser; } }
35.005348
84
0.538955
[ "ECL-2.0", "Apache-2.0" ]
SysSurge/vera
WebPages/AccessControl/EditRole.aspx.designer.cs
6,548
C#
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Eqstra.DataProvider.AX.SSModels { public class SupplierSelection { public String CaseNumber { get; set; } public Int64 CaseServiceRecID { get; set; } public List<Country> Countries { get; set; } public List<Province> Provinces { get; set; } public List<City> Cities { get; set; } public List<Suburb> Suburbs { get; set; } public List<Region> Regions { get; set; } public List<Supplier> Suppliers { get; set; } public Supplier SelectedSupplier { get; set; } public string SelectedCountry { get; set; } public string Selectedprovince { get; set; } public string SelectedCity { get; set; } public string SelectedSuburb { get; set; } public string SelectedRegion { get; set; } } }
23
54
0.636267
[ "MIT" ]
pithline/FMS
Pithline.FMS.DataProvider.AX/SSModels/SupplierSelection.cs
945
C#
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // <auto-generated/> #nullable disable using System; using System.Text.Json; using System.Threading; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Core.Pipeline; using Azure.Management.Network.Models; namespace Azure.Management.Network { internal partial class AzureFirewallFqdnTagsRestOperations { private string subscriptionId; private Uri endpoint; private ClientDiagnostics _clientDiagnostics; private HttpPipeline _pipeline; /// <summary> Initializes a new instance of AzureFirewallFqdnTagsRestOperations. </summary> /// <param name="clientDiagnostics"> The handler for diagnostic messaging in the client. </param> /// <param name="pipeline"> The HTTP pipeline for sending and receiving REST requests and responses. </param> /// <param name="subscriptionId"> The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. </param> /// <param name="endpoint"> server parameter. </param> /// <exception cref="ArgumentNullException"> <paramref name="subscriptionId"/> is null. </exception> public AzureFirewallFqdnTagsRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null) { if (subscriptionId == null) { throw new ArgumentNullException(nameof(subscriptionId)); } endpoint ??= new Uri("https://management.azure.com"); this.subscriptionId = subscriptionId; this.endpoint = endpoint; _clientDiagnostics = clientDiagnostics; _pipeline = pipeline; } internal HttpMessage CreateListAllRequest() { var message = _pipeline.CreateMessage(); var request = message.Request; request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.Network/azureFirewallFqdnTags", false); uri.AppendQuery("api-version", "2020-04-01", true); request.Uri = uri; return message; } /// <summary> Gets all the Azure Firewall FQDN Tags in a subscription. </summary> /// <param name="cancellationToken"> The cancellation token to use. </param> public async Task<Response<AzureFirewallFqdnTagListResult>> ListAllAsync(CancellationToken cancellationToken = default) { using var message = CreateListAllRequest(); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { AzureFirewallFqdnTagListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); value = AzureFirewallFqdnTagListResult.DeserializeAzureFirewallFqdnTagListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } /// <summary> Gets all the Azure Firewall FQDN Tags in a subscription. </summary> /// <param name="cancellationToken"> The cancellation token to use. </param> public Response<AzureFirewallFqdnTagListResult> ListAll(CancellationToken cancellationToken = default) { using var message = CreateListAllRequest(); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { AzureFirewallFqdnTagListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); value = AzureFirewallFqdnTagListResult.DeserializeAzureFirewallFqdnTagListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } internal HttpMessage CreateListAllNextPageRequest(string nextLink) { var message = _pipeline.CreateMessage(); var request = message.Request; request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(endpoint); uri.AppendRawNextLink(nextLink, false); request.Uri = uri; return message; } /// <summary> Gets all the Azure Firewall FQDN Tags in a subscription. </summary> /// <param name="nextLink"> The URL to the next page of results. </param> /// <param name="cancellationToken"> The cancellation token to use. </param> /// <exception cref="ArgumentNullException"> <paramref name="nextLink"/> is null. </exception> public async Task<Response<AzureFirewallFqdnTagListResult>> ListAllNextPageAsync(string nextLink, CancellationToken cancellationToken = default) { if (nextLink == null) { throw new ArgumentNullException(nameof(nextLink)); } using var message = CreateListAllNextPageRequest(nextLink); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { AzureFirewallFqdnTagListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); value = AzureFirewallFqdnTagListResult.DeserializeAzureFirewallFqdnTagListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } /// <summary> Gets all the Azure Firewall FQDN Tags in a subscription. </summary> /// <param name="nextLink"> The URL to the next page of results. </param> /// <param name="cancellationToken"> The cancellation token to use. </param> /// <exception cref="ArgumentNullException"> <paramref name="nextLink"/> is null. </exception> public Response<AzureFirewallFqdnTagListResult> ListAllNextPage(string nextLink, CancellationToken cancellationToken = default) { if (nextLink == null) { throw new ArgumentNullException(nameof(nextLink)); } using var message = CreateListAllNextPageRequest(nextLink); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { AzureFirewallFqdnTagListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); value = AzureFirewallFqdnTagListResult.DeserializeAzureFirewallFqdnTagListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } } }
48.363095
203
0.626831
[ "MIT" ]
AbelHu/azure-sdk-for-net
sdk/testcommon/Azure.Management.Network.2020_04/src/Generated/AzureFirewallFqdnTagsRestOperations.cs
8,125
C#
using CadEditor; using System; using System.Drawing; public class Data { public OffsetRec getScreensOffset() { return new OffsetRec(0x323f, 1 , 48*7, 48, 7); } public bool isBuildScreenFromSmallBlocks() { return true; } public bool isBigBlockEditorEnabled() { return false; } public bool isBlockEditorEnabled() { return true; } public bool isEnemyEditorEnabled() { return false; } public OffsetRec getVideoOffset() { return new OffsetRec(0x25010, 1, 0x1000); } public OffsetRec getPalOffset() { return new OffsetRec(0x321f, 16, 16 ); } public GetVideoPageAddrFunc getVideoPageAddrFunc() { return Utils.getChrAddress; } public GetVideoChunkFunc getVideoChunkFunc() { return Utils.getVideoChunk; } public SetVideoChunkFunc setVideoChunkFunc() { return Utils.setVideoChunk; } public OffsetRec getBlocksOffset() { return new OffsetRec(0x36df , 1 , 0x1000); } public int getBlocksCount() { return 256; } public int getBigBlocksCount() { return 256; } public int getPalBytesAddr() { return 0x35df; } public GetBlocksFunc getBlocksFunc() { return Utils.getBlocksFromTiles16Pal1;} public SetBlocksFunc setBlocksFunc() { return Utils.setBlocksFromTiles16Pal1;} public GetPalFunc getPalFunc() { return Utils.getPalleteLinear;} public SetPalFunc setPalFunc() { return Utils.setPalleteLinear;} }
48.5
92
0.694845
[ "MIT" ]
spiiin/CadEditor
CadEditor/settings_nes/robocop_2/Settings_RoboCop2-bonus1.cs
1,455
C#
// *********************************************************************** // Assembly : ACBr.Net.DFe.Core // Author : RFTD // Created : 06-22-2018 // // Last Modified By : RFTD // Last Modified On : 06-22-2018 // *********************************************************************** // <copyright file="ACBrDFeValidationException.cs" company="ACBr.Net"> // The MIT License (MIT) // Copyright (c) 2016 Grupo ACBr.Net // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish, distribute, sublicense, // and/or sell copies of the Software, and to permit persons to whom the // Software is furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be // included in all copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. // </copyright> // <summary></summary> // *********************************************************************** using System; using System.Runtime.Serialization; using ACBr.Net.Core; namespace ACBr.Net.DFe.Core { public class ACBrDFeValidationException : ACBrException { /// <summary> /// Initializes a new instance of the <see cref="T:ACBr.Net.DFe.Core.ACBrDFeValidationException" /> class with a specified error message. /// </summary> /// <param name="message">The message that describes the error.</param> public ACBrDFeValidationException(string message) : base(message) { } /// <summary> /// Initializes a new instance of the <see cref="T:ACBr.Net.DFe.Core.ACBrDFeValidationException" /> class. /// </summary> public ACBrDFeValidationException() { } /// <summary> /// Initializes a new instance of the <see cref="T:ACBr.Net.DFe.Core.ACBrDFeValidationException" /> class with a specified error message and a reference to the inner exception that is the cause of this exception. /// </summary> /// <param name="message">The error message that explains the reason for the exception.</param> /// <param name="innerException">The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.</param> public ACBrDFeValidationException(string message, Exception innerException) : base(message, innerException) { } /// <summary> /// Initializes a new instance of the <see cref="T:ACBr.Net.DFe.Core.ACBrDFeValidationException" /> class. /// </summary> /// <param name="innerException">The inner exception.</param> /// <param name="message">The message.</param> /// <param name="args">The arguments.</param> public ACBrDFeValidationException(Exception innerException, string message, params object[] args) : base(string.Format(message, args), innerException) { } /// <summary> /// Initializes a new instance of the <see cref="T:ACBr.Net.DFe.Core.ACBrDFeValidationException" /> class with serialized data. /// </summary> /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param> /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param> protected ACBrDFeValidationException(SerializationInfo info, StreamingContext context) : base(info, context) { } } }
50.149425
220
0.643135
[ "MIT" ]
ACBrNet/ACBr.Net.DFe.Core
src/ACBr.Net.DFe.Core/ACBrDFeValidationException.cs
4,363
C#
using System.Reflection; namespace Docu.IO { public interface IAssemblyLoader { Assembly LoadFrom(string assemblyPath); } }
16
47
0.694444
[ "BSD-3-Clause" ]
ChrisMissal/docu
src/Docu.Console/IO/IAssemblyLoader.cs
144
C#
using System; using System.Collections; using System.Collections.Generic; using System.Globalization; using System.IO; using System.IO.IsolatedStorage; using System.Linq; using System.Reflection; using System.Runtime.InteropServices; using System.Text; using System.Threading; using accel; using dbg; using er; using er.web; using gs; using gs.backup; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Graphics.PackedVector; using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Media; using mpp; using setting; public partial class AppMain { public class AME_HEADER : AppMain.AMS_AME_HEADER { } }
22.088235
52
0.805593
[ "Unlicense" ]
WanKerr/Sonic4Episode1
Sonic4Episode1/AppMain/Types/AME_HEADER.cs
751
C#
namespace SIFLess { partial class TestWindow { /// <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.licenseLabel = new System.Windows.Forms.Label(); this.xConnectCertJsonLabel = new System.Windows.Forms.Label(); this.xConnectXPJsonLabel = new System.Windows.Forms.Label(); this.xConnectSolrJsonLabel = new System.Windows.Forms.Label(); this.sitecoreSolrJsonLabel = new System.Windows.Forms.Label(); this.sitecoreXPJsonLabel = new System.Windows.Forms.Label(); this.xConnectPackageLabel = new System.Windows.Forms.Label(); this.sitecorePackageLabel = new System.Windows.Forms.Label(); this.solrFolderLabel = new System.Windows.Forms.Label(); this.solrURLLabel = new System.Windows.Forms.Label(); this.sqlLabel = new System.Windows.Forms.Label(); this.button1 = new System.Windows.Forms.Button(); this.solrServiceLabel = new System.Windows.Forms.Label(); this.solrVersionLabel = new System.Windows.Forms.Label(); this.solrConfigSetsLabel = new System.Windows.Forms.Label(); this.webDeployLabel = new System.Windows.Forms.Label(); this.powershellVersionLabel = new System.Windows.Forms.Label(); this.sifInstalledLabel = new System.Windows.Forms.Label(); this.sifFundLabel = new System.Windows.Forms.Label(); this.SuspendLayout(); // // licenseLabel // this.licenseLabel.AutoSize = true; this.licenseLabel.Location = new System.Drawing.Point(12, 17); this.licenseLabel.Name = "licenseLabel"; this.licenseLabel.Size = new System.Drawing.Size(93, 13); this.licenseLabel.TabIndex = 0; this.licenseLabel.Text = "License File Exists"; // // xConnectCertJsonLabel // this.xConnectCertJsonLabel.AutoSize = true; this.xConnectCertJsonLabel.Location = new System.Drawing.Point(12, 37); this.xConnectCertJsonLabel.Name = "xConnectCertJsonLabel"; this.xConnectCertJsonLabel.Size = new System.Drawing.Size(154, 13); this.xConnectCertJsonLabel.TabIndex = 0; this.xConnectCertJsonLabel.Text = "xconnect-createcert.json Exists"; // // xConnectXPJsonLabel // this.xConnectXPJsonLabel.AutoSize = true; this.xConnectXPJsonLabel.Location = new System.Drawing.Point(12, 57); this.xConnectXPJsonLabel.Name = "xConnectXPJsonLabel"; this.xConnectXPJsonLabel.Size = new System.Drawing.Size(123, 13); this.xConnectXPJsonLabel.TabIndex = 0; this.xConnectXPJsonLabel.Text = "xconnect-xp0.json Exists"; // // xConnectSolrJsonLabel // this.xConnectSolrJsonLabel.AutoSize = true; this.xConnectSolrJsonLabel.Location = new System.Drawing.Point(12, 77); this.xConnectSolrJsonLabel.Name = "xConnectSolrJsonLabel"; this.xConnectSolrJsonLabel.Size = new System.Drawing.Size(122, 13); this.xConnectSolrJsonLabel.TabIndex = 0; this.xConnectSolrJsonLabel.Text = "xconnect-solr.json Exists"; // // sitecoreSolrJsonLabel // this.sitecoreSolrJsonLabel.AutoSize = true; this.sitecoreSolrJsonLabel.Location = new System.Drawing.Point(12, 97); this.sitecoreSolrJsonLabel.Name = "sitecoreSolrJsonLabel"; this.sitecoreSolrJsonLabel.Size = new System.Drawing.Size(115, 13); this.sitecoreSolrJsonLabel.TabIndex = 0; this.sitecoreSolrJsonLabel.Text = "sitecore-solr.json Exists"; // // sitecoreXPJsonLabel // this.sitecoreXPJsonLabel.AutoSize = true; this.sitecoreXPJsonLabel.Location = new System.Drawing.Point(12, 117); this.sitecoreXPJsonLabel.Name = "sitecoreXPJsonLabel"; this.sitecoreXPJsonLabel.Size = new System.Drawing.Size(119, 13); this.sitecoreXPJsonLabel.TabIndex = 0; this.sitecoreXPJsonLabel.Text = "sitecore-XP0.json Exists"; // // xConnectPackageLabel // this.xConnectPackageLabel.AutoSize = true; this.xConnectPackageLabel.Location = new System.Drawing.Point(12, 137); this.xConnectPackageLabel.Name = "xConnectPackageLabel"; this.xConnectPackageLabel.Size = new System.Drawing.Size(128, 13); this.xConnectPackageLabel.TabIndex = 0; this.xConnectPackageLabel.Text = "xConnect Package Exists"; // // sitecorePackageLabel // this.sitecorePackageLabel.AutoSize = true; this.sitecorePackageLabel.Location = new System.Drawing.Point(12, 157); this.sitecorePackageLabel.Name = "sitecorePackageLabel"; this.sitecorePackageLabel.Size = new System.Drawing.Size(122, 13); this.sitecorePackageLabel.TabIndex = 0; this.sitecorePackageLabel.Text = "Sitecore Package Exists"; // // solrFolderLabel // this.solrFolderLabel.AutoSize = true; this.solrFolderLabel.Location = new System.Drawing.Point(13, 197); this.solrFolderLabel.Name = "solrFolderLabel"; this.solrFolderLabel.Size = new System.Drawing.Size(87, 13); this.solrFolderLabel.TabIndex = 0; this.solrFolderLabel.Text = "Solr Folder Exists"; // // solrURLLabel // this.solrURLLabel.AutoSize = true; this.solrURLLabel.Location = new System.Drawing.Point(12, 177); this.solrURLLabel.Name = "solrURLLabel"; this.solrURLLabel.Size = new System.Drawing.Size(84, 13); this.solrURLLabel.TabIndex = 0; this.solrURLLabel.Text = "Solr URL Works"; // // sqlLabel // this.sqlLabel.AutoSize = true; this.sqlLabel.Location = new System.Drawing.Point(13, 277); this.sqlLabel.Name = "sqlLabel"; this.sqlLabel.Size = new System.Drawing.Size(116, 13); this.sqlLabel.TabIndex = 0; this.sqlLabel.Text = "SQL Connection works"; // // button1 // this.button1.Location = new System.Drawing.Point(13, 396); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(150, 23); this.button1.TabIndex = 1; this.button1.Text = "Ok"; this.button1.UseVisualStyleBackColor = true; this.button1.Click += new System.EventHandler(this.button1_Click); // // solrServiceLabel // this.solrServiceLabel.AutoSize = true; this.solrServiceLabel.Location = new System.Drawing.Point(13, 237); this.solrServiceLabel.Name = "solrServiceLabel"; this.solrServiceLabel.Size = new System.Drawing.Size(94, 13); this.solrServiceLabel.TabIndex = 0; this.solrServiceLabel.Text = "Solr Service Exists"; // // solrVersionLabel // this.solrVersionLabel.AutoSize = true; this.solrVersionLabel.Location = new System.Drawing.Point(13, 257); this.solrVersionLabel.Name = "solrVersionLabel"; this.solrVersionLabel.Size = new System.Drawing.Size(91, 13); this.solrVersionLabel.TabIndex = 2; this.solrVersionLabel.Text = "Solr Version is OK"; // // solrConfigSetsLabel // this.solrConfigSetsLabel.AutoSize = true; this.solrConfigSetsLabel.Location = new System.Drawing.Point(13, 217); this.solrConfigSetsLabel.Name = "solrConfigSetsLabel"; this.solrConfigSetsLabel.Size = new System.Drawing.Size(107, 13); this.solrConfigSetsLabel.TabIndex = 3; this.solrConfigSetsLabel.Text = "Solr Config Sets Exist"; // // webDeployLabel // this.webDeployLabel.AutoSize = true; this.webDeployLabel.Location = new System.Drawing.Point(13, 297); this.webDeployLabel.Name = "webDeployLabel"; this.webDeployLabel.Size = new System.Drawing.Size(123, 13); this.webDeployLabel.TabIndex = 4; this.webDeployLabel.Text = "Web Deploy 3+ Installed"; // // powershellVersionLabel // this.powershellVersionLabel.AutoSize = true; this.powershellVersionLabel.Location = new System.Drawing.Point(13, 317); this.powershellVersionLabel.Name = "powershellVersionLabel"; this.powershellVersionLabel.Size = new System.Drawing.Size(124, 13); this.powershellVersionLabel.TabIndex = 4; this.powershellVersionLabel.Text = "Powershell 5.1+ Installed"; // // sifInstalledLabel // this.sifInstalledLabel.AutoSize = true; this.sifInstalledLabel.Location = new System.Drawing.Point(13, 337); this.sifInstalledLabel.Name = "sifInstalledLabel"; this.sifInstalledLabel.Size = new System.Drawing.Size(65, 13); this.sifInstalledLabel.TabIndex = 5; this.sifInstalledLabel.Text = "SIF Installed"; // // sifFundLabel // this.sifFundLabel.AutoSize = true; this.sifFundLabel.Location = new System.Drawing.Point(13, 357); this.sifFundLabel.Name = "sifFundLabel"; this.sifFundLabel.Size = new System.Drawing.Size(134, 13); this.sifFundLabel.TabIndex = 6; this.sifFundLabel.Text = "SIF Fundamentals Installed"; // // TestWindow // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(205, 431); this.Controls.Add(this.sifFundLabel); this.Controls.Add(this.sifInstalledLabel); this.Controls.Add(this.powershellVersionLabel); this.Controls.Add(this.webDeployLabel); this.Controls.Add(this.solrConfigSetsLabel); this.Controls.Add(this.solrVersionLabel); this.Controls.Add(this.button1); this.Controls.Add(this.sqlLabel); this.Controls.Add(this.solrURLLabel); this.Controls.Add(this.solrServiceLabel); this.Controls.Add(this.solrFolderLabel); this.Controls.Add(this.sitecorePackageLabel); this.Controls.Add(this.xConnectPackageLabel); this.Controls.Add(this.sitecoreXPJsonLabel); this.Controls.Add(this.sitecoreSolrJsonLabel); this.Controls.Add(this.xConnectSolrJsonLabel); this.Controls.Add(this.xConnectXPJsonLabel); this.Controls.Add(this.xConnectCertJsonLabel); this.Controls.Add(this.licenseLabel); this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "TestWindow"; this.Text = "Shhh. We\'re testing!"; this.ResumeLayout(false); this.PerformLayout(); } #endregion private System.Windows.Forms.Label licenseLabel; private System.Windows.Forms.Label xConnectCertJsonLabel; private System.Windows.Forms.Label xConnectXPJsonLabel; private System.Windows.Forms.Label xConnectSolrJsonLabel; private System.Windows.Forms.Label sitecoreSolrJsonLabel; private System.Windows.Forms.Label sitecoreXPJsonLabel; private System.Windows.Forms.Label xConnectPackageLabel; private System.Windows.Forms.Label sitecorePackageLabel; private System.Windows.Forms.Label solrFolderLabel; private System.Windows.Forms.Label solrURLLabel; private System.Windows.Forms.Label sqlLabel; private System.Windows.Forms.Button button1; private System.Windows.Forms.Label solrServiceLabel; private System.Windows.Forms.Label solrVersionLabel; private System.Windows.Forms.Label solrConfigSetsLabel; private System.Windows.Forms.Label webDeployLabel; private System.Windows.Forms.Label powershellVersionLabel; private System.Windows.Forms.Label sifInstalledLabel; private System.Windows.Forms.Label sifFundLabel; } }
48.83871
107
0.612212
[ "MIT" ]
GuitarRich/sif-less
SIFLess/SIFLess/TestWindow.Designer.cs
13,628
C#
#pragma warning disable 1591 //------------------------------------------------------------------------------ // <auto-generated> // O código foi gerado por uma ferramenta. // Versão de Tempo de Execução:4.0.30319.42000 // // As alterações ao arquivo poderão causar comportamento incorreto e serão perdidas se // o código for gerado novamente. // </auto-generated> //------------------------------------------------------------------------------ [assembly: global::Android.Runtime.ResourceDesignerAttribute("MarcadorTruco.Droid.Resource", IsApplication=true)] namespace MarcadorTruco.Droid { [System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")] public partial class Resource { static Resource() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } public static void UpdateIdValues() { global::Xamarin.Forms.Platform.Android.Resource.Attribute.actionBarSize = global::MarcadorTruco.Droid.Resource.Attribute.actionBarSize; } public partial class Animation { // aapt resource value: 0x7f050000 public const int abc_fade_in = 2131034112; // aapt resource value: 0x7f050001 public const int abc_fade_out = 2131034113; // aapt resource value: 0x7f050002 public const int abc_grow_fade_in_from_bottom = 2131034114; // aapt resource value: 0x7f050003 public const int abc_popup_enter = 2131034115; // aapt resource value: 0x7f050004 public const int abc_popup_exit = 2131034116; // aapt resource value: 0x7f050005 public const int abc_shrink_fade_out_from_bottom = 2131034117; // aapt resource value: 0x7f050006 public const int abc_slide_in_bottom = 2131034118; // aapt resource value: 0x7f050007 public const int abc_slide_in_top = 2131034119; // aapt resource value: 0x7f050008 public const int abc_slide_out_bottom = 2131034120; // aapt resource value: 0x7f050009 public const int abc_slide_out_top = 2131034121; // aapt resource value: 0x7f05000a public const int design_bottom_sheet_slide_in = 2131034122; // aapt resource value: 0x7f05000b public const int design_bottom_sheet_slide_out = 2131034123; // aapt resource value: 0x7f05000c public const int design_snackbar_in = 2131034124; // aapt resource value: 0x7f05000d public const int design_snackbar_out = 2131034125; // aapt resource value: 0x7f05000e public const int tooltip_enter = 2131034126; // aapt resource value: 0x7f05000f public const int tooltip_exit = 2131034127; static Animation() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } private Animation() { } } public partial class Animator { // aapt resource value: 0x7f060000 public const int design_appbar_state_list_animator = 2131099648; static Animator() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } private Animator() { } } public partial class Attribute { // aapt resource value: 0x7f01006b public const int actionBarDivider = 2130772075; // aapt resource value: 0x7f01006c public const int actionBarItemBackground = 2130772076; // aapt resource value: 0x7f010065 public const int actionBarPopupTheme = 2130772069; // aapt resource value: 0x7f01006a public const int actionBarSize = 2130772074; // aapt resource value: 0x7f010067 public const int actionBarSplitStyle = 2130772071; // aapt resource value: 0x7f010066 public const int actionBarStyle = 2130772070; // aapt resource value: 0x7f010061 public const int actionBarTabBarStyle = 2130772065; // aapt resource value: 0x7f010060 public const int actionBarTabStyle = 2130772064; // aapt resource value: 0x7f010062 public const int actionBarTabTextStyle = 2130772066; // aapt resource value: 0x7f010068 public const int actionBarTheme = 2130772072; // aapt resource value: 0x7f010069 public const int actionBarWidgetTheme = 2130772073; // aapt resource value: 0x7f010086 public const int actionButtonStyle = 2130772102; // aapt resource value: 0x7f010082 public const int actionDropDownStyle = 2130772098; // aapt resource value: 0x7f0100dd public const int actionLayout = 2130772189; // aapt resource value: 0x7f01006d public const int actionMenuTextAppearance = 2130772077; // aapt resource value: 0x7f01006e public const int actionMenuTextColor = 2130772078; // aapt resource value: 0x7f010071 public const int actionModeBackground = 2130772081; // aapt resource value: 0x7f010070 public const int actionModeCloseButtonStyle = 2130772080; // aapt resource value: 0x7f010073 public const int actionModeCloseDrawable = 2130772083; // aapt resource value: 0x7f010075 public const int actionModeCopyDrawable = 2130772085; // aapt resource value: 0x7f010074 public const int actionModeCutDrawable = 2130772084; // aapt resource value: 0x7f010079 public const int actionModeFindDrawable = 2130772089; // aapt resource value: 0x7f010076 public const int actionModePasteDrawable = 2130772086; // aapt resource value: 0x7f01007b public const int actionModePopupWindowStyle = 2130772091; // aapt resource value: 0x7f010077 public const int actionModeSelectAllDrawable = 2130772087; // aapt resource value: 0x7f010078 public const int actionModeShareDrawable = 2130772088; // aapt resource value: 0x7f010072 public const int actionModeSplitBackground = 2130772082; // aapt resource value: 0x7f01006f public const int actionModeStyle = 2130772079; // aapt resource value: 0x7f01007a public const int actionModeWebSearchDrawable = 2130772090; // aapt resource value: 0x7f010063 public const int actionOverflowButtonStyle = 2130772067; // aapt resource value: 0x7f010064 public const int actionOverflowMenuStyle = 2130772068; // aapt resource value: 0x7f0100df public const int actionProviderClass = 2130772191; // aapt resource value: 0x7f0100de public const int actionViewClass = 2130772190; // aapt resource value: 0x7f01008e public const int activityChooserViewStyle = 2130772110; // aapt resource value: 0x7f0100b3 public const int alertDialogButtonGroupStyle = 2130772147; // aapt resource value: 0x7f0100b4 public const int alertDialogCenterButtons = 2130772148; // aapt resource value: 0x7f0100b2 public const int alertDialogStyle = 2130772146; // aapt resource value: 0x7f0100b5 public const int alertDialogTheme = 2130772149; // aapt resource value: 0x7f0100cb public const int allowStacking = 2130772171; // aapt resource value: 0x7f0100cc public const int alpha = 2130772172; // aapt resource value: 0x7f0100da public const int alphabeticModifiers = 2130772186; // aapt resource value: 0x7f0100d3 public const int arrowHeadLength = 2130772179; // aapt resource value: 0x7f0100d4 public const int arrowShaftLength = 2130772180; // aapt resource value: 0x7f0100ba public const int autoCompleteTextViewStyle = 2130772154; // aapt resource value: 0x7f010054 public const int autoSizeMaxTextSize = 2130772052; // aapt resource value: 0x7f010053 public const int autoSizeMinTextSize = 2130772051; // aapt resource value: 0x7f010052 public const int autoSizePresetSizes = 2130772050; // aapt resource value: 0x7f010051 public const int autoSizeStepGranularity = 2130772049; // aapt resource value: 0x7f010050 public const int autoSizeTextType = 2130772048; // aapt resource value: 0x7f01002e public const int background = 2130772014; // aapt resource value: 0x7f010030 public const int backgroundSplit = 2130772016; // aapt resource value: 0x7f01002f public const int backgroundStacked = 2130772015; // aapt resource value: 0x7f010116 public const int backgroundTint = 2130772246; // aapt resource value: 0x7f010117 public const int backgroundTintMode = 2130772247; // aapt resource value: 0x7f0100d5 public const int barLength = 2130772181; // aapt resource value: 0x7f010141 public const int behavior_autoHide = 2130772289; // aapt resource value: 0x7f01011e public const int behavior_hideable = 2130772254; // aapt resource value: 0x7f01014a public const int behavior_overlapTop = 2130772298; // aapt resource value: 0x7f01011d public const int behavior_peekHeight = 2130772253; // aapt resource value: 0x7f01011f public const int behavior_skipCollapsed = 2130772255; // aapt resource value: 0x7f01013f public const int borderWidth = 2130772287; // aapt resource value: 0x7f01008b public const int borderlessButtonStyle = 2130772107; // aapt resource value: 0x7f010139 public const int bottomSheetDialogTheme = 2130772281; // aapt resource value: 0x7f01013a public const int bottomSheetStyle = 2130772282; // aapt resource value: 0x7f010088 public const int buttonBarButtonStyle = 2130772104; // aapt resource value: 0x7f0100b8 public const int buttonBarNegativeButtonStyle = 2130772152; // aapt resource value: 0x7f0100b9 public const int buttonBarNeutralButtonStyle = 2130772153; // aapt resource value: 0x7f0100b7 public const int buttonBarPositiveButtonStyle = 2130772151; // aapt resource value: 0x7f010087 public const int buttonBarStyle = 2130772103; // aapt resource value: 0x7f01010b public const int buttonGravity = 2130772235; // aapt resource value: 0x7f010043 public const int buttonPanelSideLayout = 2130772035; // aapt resource value: 0x7f0100bb public const int buttonStyle = 2130772155; // aapt resource value: 0x7f0100bc public const int buttonStyleSmall = 2130772156; // aapt resource value: 0x7f0100cd public const int buttonTint = 2130772173; // aapt resource value: 0x7f0100ce public const int buttonTintMode = 2130772174; // aapt resource value: 0x7f010017 public const int cardBackgroundColor = 2130771991; // aapt resource value: 0x7f010018 public const int cardCornerRadius = 2130771992; // aapt resource value: 0x7f010019 public const int cardElevation = 2130771993; // aapt resource value: 0x7f01001a public const int cardMaxElevation = 2130771994; // aapt resource value: 0x7f01001c public const int cardPreventCornerOverlap = 2130771996; // aapt resource value: 0x7f01001b public const int cardUseCompatPadding = 2130771995; // aapt resource value: 0x7f0100bd public const int checkboxStyle = 2130772157; // aapt resource value: 0x7f0100be public const int checkedTextViewStyle = 2130772158; // aapt resource value: 0x7f0100ee public const int closeIcon = 2130772206; // aapt resource value: 0x7f010040 public const int closeItemLayout = 2130772032; // aapt resource value: 0x7f01010d public const int collapseContentDescription = 2130772237; // aapt resource value: 0x7f01010c public const int collapseIcon = 2130772236; // aapt resource value: 0x7f01012c public const int collapsedTitleGravity = 2130772268; // aapt resource value: 0x7f010126 public const int collapsedTitleTextAppearance = 2130772262; // aapt resource value: 0x7f0100cf public const int color = 2130772175; // aapt resource value: 0x7f0100aa public const int colorAccent = 2130772138; // aapt resource value: 0x7f0100b1 public const int colorBackgroundFloating = 2130772145; // aapt resource value: 0x7f0100ae public const int colorButtonNormal = 2130772142; // aapt resource value: 0x7f0100ac public const int colorControlActivated = 2130772140; // aapt resource value: 0x7f0100ad public const int colorControlHighlight = 2130772141; // aapt resource value: 0x7f0100ab public const int colorControlNormal = 2130772139; // aapt resource value: 0x7f0100ca public const int colorError = 2130772170; // aapt resource value: 0x7f0100a8 public const int colorPrimary = 2130772136; // aapt resource value: 0x7f0100a9 public const int colorPrimaryDark = 2130772137; // aapt resource value: 0x7f0100af public const int colorSwitchThumbNormal = 2130772143; // aapt resource value: 0x7f0100f3 public const int commitIcon = 2130772211; // aapt resource value: 0x7f0100e0 public const int contentDescription = 2130772192; // aapt resource value: 0x7f010039 public const int contentInsetEnd = 2130772025; // aapt resource value: 0x7f01003d public const int contentInsetEndWithActions = 2130772029; // aapt resource value: 0x7f01003a public const int contentInsetLeft = 2130772026; // aapt resource value: 0x7f01003b public const int contentInsetRight = 2130772027; // aapt resource value: 0x7f010038 public const int contentInsetStart = 2130772024; // aapt resource value: 0x7f01003c public const int contentInsetStartWithNavigation = 2130772028; // aapt resource value: 0x7f01001d public const int contentPadding = 2130771997; // aapt resource value: 0x7f010021 public const int contentPaddingBottom = 2130772001; // aapt resource value: 0x7f01001e public const int contentPaddingLeft = 2130771998; // aapt resource value: 0x7f01001f public const int contentPaddingRight = 2130771999; // aapt resource value: 0x7f010020 public const int contentPaddingTop = 2130772000; // aapt resource value: 0x7f010127 public const int contentScrim = 2130772263; // aapt resource value: 0x7f0100b0 public const int controlBackground = 2130772144; // aapt resource value: 0x7f010160 public const int counterEnabled = 2130772320; // aapt resource value: 0x7f010161 public const int counterMaxLength = 2130772321; // aapt resource value: 0x7f010163 public const int counterOverflowTextAppearance = 2130772323; // aapt resource value: 0x7f010162 public const int counterTextAppearance = 2130772322; // aapt resource value: 0x7f010031 public const int customNavigationLayout = 2130772017; // aapt resource value: 0x7f0100ed public const int defaultQueryHint = 2130772205; // aapt resource value: 0x7f010080 public const int dialogPreferredPadding = 2130772096; // aapt resource value: 0x7f01007f public const int dialogTheme = 2130772095; // aapt resource value: 0x7f010027 public const int displayOptions = 2130772007; // aapt resource value: 0x7f01002d public const int divider = 2130772013; // aapt resource value: 0x7f01008d public const int dividerHorizontal = 2130772109; // aapt resource value: 0x7f0100d9 public const int dividerPadding = 2130772185; // aapt resource value: 0x7f01008c public const int dividerVertical = 2130772108; // aapt resource value: 0x7f0100d1 public const int drawableSize = 2130772177; // aapt resource value: 0x7f010022 public const int drawerArrowStyle = 2130772002; // aapt resource value: 0x7f01009f public const int dropDownListViewStyle = 2130772127; // aapt resource value: 0x7f010083 public const int dropdownListPreferredItemHeight = 2130772099; // aapt resource value: 0x7f010094 public const int editTextBackground = 2130772116; // aapt resource value: 0x7f010093 public const int editTextColor = 2130772115; // aapt resource value: 0x7f0100bf public const int editTextStyle = 2130772159; // aapt resource value: 0x7f01003e public const int elevation = 2130772030; // aapt resource value: 0x7f01015e public const int errorEnabled = 2130772318; // aapt resource value: 0x7f01015f public const int errorTextAppearance = 2130772319; // aapt resource value: 0x7f010042 public const int expandActivityOverflowButtonDrawable = 2130772034; // aapt resource value: 0x7f010118 public const int expanded = 2130772248; // aapt resource value: 0x7f01012d public const int expandedTitleGravity = 2130772269; // aapt resource value: 0x7f010120 public const int expandedTitleMargin = 2130772256; // aapt resource value: 0x7f010124 public const int expandedTitleMarginBottom = 2130772260; // aapt resource value: 0x7f010123 public const int expandedTitleMarginEnd = 2130772259; // aapt resource value: 0x7f010121 public const int expandedTitleMarginStart = 2130772257; // aapt resource value: 0x7f010122 public const int expandedTitleMarginTop = 2130772258; // aapt resource value: 0x7f010125 public const int expandedTitleTextAppearance = 2130772261; // aapt resource value: 0x7f010015 public const int externalRouteEnabledDrawable = 2130771989; // aapt resource value: 0x7f01013d public const int fabSize = 2130772285; // aapt resource value: 0x7f010004 public const int fastScrollEnabled = 2130771972; // aapt resource value: 0x7f010007 public const int fastScrollHorizontalThumbDrawable = 2130771975; // aapt resource value: 0x7f010008 public const int fastScrollHorizontalTrackDrawable = 2130771976; // aapt resource value: 0x7f010005 public const int fastScrollVerticalThumbDrawable = 2130771973; // aapt resource value: 0x7f010006 public const int fastScrollVerticalTrackDrawable = 2130771974; // aapt resource value: 0x7f010171 public const int font = 2130772337; // aapt resource value: 0x7f010055 public const int fontFamily = 2130772053; // aapt resource value: 0x7f01016a public const int fontProviderAuthority = 2130772330; // aapt resource value: 0x7f01016d public const int fontProviderCerts = 2130772333; // aapt resource value: 0x7f01016e public const int fontProviderFetchStrategy = 2130772334; // aapt resource value: 0x7f01016f public const int fontProviderFetchTimeout = 2130772335; // aapt resource value: 0x7f01016b public const int fontProviderPackage = 2130772331; // aapt resource value: 0x7f01016c public const int fontProviderQuery = 2130772332; // aapt resource value: 0x7f010170 public const int fontStyle = 2130772336; // aapt resource value: 0x7f010172 public const int fontWeight = 2130772338; // aapt resource value: 0x7f010142 public const int foregroundInsidePadding = 2130772290; // aapt resource value: 0x7f0100d2 public const int gapBetweenBars = 2130772178; // aapt resource value: 0x7f0100ef public const int goIcon = 2130772207; // aapt resource value: 0x7f010148 public const int headerLayout = 2130772296; // aapt resource value: 0x7f010023 public const int height = 2130772003; // aapt resource value: 0x7f010037 public const int hideOnContentScroll = 2130772023; // aapt resource value: 0x7f010164 public const int hintAnimationEnabled = 2130772324; // aapt resource value: 0x7f01015d public const int hintEnabled = 2130772317; // aapt resource value: 0x7f01015c public const int hintTextAppearance = 2130772316; // aapt resource value: 0x7f010085 public const int homeAsUpIndicator = 2130772101; // aapt resource value: 0x7f010032 public const int homeLayout = 2130772018; // aapt resource value: 0x7f01002b public const int icon = 2130772011; // aapt resource value: 0x7f0100e2 public const int iconTint = 2130772194; // aapt resource value: 0x7f0100e3 public const int iconTintMode = 2130772195; // aapt resource value: 0x7f0100eb public const int iconifiedByDefault = 2130772203; // aapt resource value: 0x7f010095 public const int imageButtonStyle = 2130772117; // aapt resource value: 0x7f010034 public const int indeterminateProgressStyle = 2130772020; // aapt resource value: 0x7f010041 public const int initialActivityCount = 2130772033; // aapt resource value: 0x7f010149 public const int insetForeground = 2130772297; // aapt resource value: 0x7f010024 public const int isLightTheme = 2130772004; // aapt resource value: 0x7f010146 public const int itemBackground = 2130772294; // aapt resource value: 0x7f010144 public const int itemIconTint = 2130772292; // aapt resource value: 0x7f010036 public const int itemPadding = 2130772022; // aapt resource value: 0x7f010147 public const int itemTextAppearance = 2130772295; // aapt resource value: 0x7f010145 public const int itemTextColor = 2130772293; // aapt resource value: 0x7f010131 public const int keylines = 2130772273; // aapt resource value: 0x7f0100ea public const int layout = 2130772202; // aapt resource value: 0x7f010000 public const int layoutManager = 2130771968; // aapt resource value: 0x7f010134 public const int layout_anchor = 2130772276; // aapt resource value: 0x7f010136 public const int layout_anchorGravity = 2130772278; // aapt resource value: 0x7f010133 public const int layout_behavior = 2130772275; // aapt resource value: 0x7f01012f public const int layout_collapseMode = 2130772271; // aapt resource value: 0x7f010130 public const int layout_collapseParallaxMultiplier = 2130772272; // aapt resource value: 0x7f010138 public const int layout_dodgeInsetEdges = 2130772280; // aapt resource value: 0x7f010137 public const int layout_insetEdge = 2130772279; // aapt resource value: 0x7f010135 public const int layout_keyline = 2130772277; // aapt resource value: 0x7f01011b public const int layout_scrollFlags = 2130772251; // aapt resource value: 0x7f01011c public const int layout_scrollInterpolator = 2130772252; // aapt resource value: 0x7f0100a7 public const int listChoiceBackgroundIndicator = 2130772135; // aapt resource value: 0x7f010081 public const int listDividerAlertDialog = 2130772097; // aapt resource value: 0x7f010047 public const int listItemLayout = 2130772039; // aapt resource value: 0x7f010044 public const int listLayout = 2130772036; // aapt resource value: 0x7f0100c7 public const int listMenuViewStyle = 2130772167; // aapt resource value: 0x7f0100a0 public const int listPopupWindowStyle = 2130772128; // aapt resource value: 0x7f01009a public const int listPreferredItemHeight = 2130772122; // aapt resource value: 0x7f01009c public const int listPreferredItemHeightLarge = 2130772124; // aapt resource value: 0x7f01009b public const int listPreferredItemHeightSmall = 2130772123; // aapt resource value: 0x7f01009d public const int listPreferredItemPaddingLeft = 2130772125; // aapt resource value: 0x7f01009e public const int listPreferredItemPaddingRight = 2130772126; // aapt resource value: 0x7f01002c public const int logo = 2130772012; // aapt resource value: 0x7f010110 public const int logoDescription = 2130772240; // aapt resource value: 0x7f01014b public const int maxActionInlineWidth = 2130772299; // aapt resource value: 0x7f01010a public const int maxButtonHeight = 2130772234; // aapt resource value: 0x7f0100d7 public const int measureWithLargestChild = 2130772183; // aapt resource value: 0x7f010009 public const int mediaRouteAudioTrackDrawable = 2130771977; // aapt resource value: 0x7f01000a public const int mediaRouteButtonStyle = 2130771978; // aapt resource value: 0x7f010016 public const int mediaRouteButtonTint = 2130771990; // aapt resource value: 0x7f01000b public const int mediaRouteCloseDrawable = 2130771979; // aapt resource value: 0x7f01000c public const int mediaRouteControlPanelThemeOverlay = 2130771980; // aapt resource value: 0x7f01000d public const int mediaRouteDefaultIconDrawable = 2130771981; // aapt resource value: 0x7f01000e public const int mediaRoutePauseDrawable = 2130771982; // aapt resource value: 0x7f01000f public const int mediaRoutePlayDrawable = 2130771983; // aapt resource value: 0x7f010010 public const int mediaRouteSpeakerGroupIconDrawable = 2130771984; // aapt resource value: 0x7f010011 public const int mediaRouteSpeakerIconDrawable = 2130771985; // aapt resource value: 0x7f010012 public const int mediaRouteStopDrawable = 2130771986; // aapt resource value: 0x7f010013 public const int mediaRouteTheme = 2130771987; // aapt resource value: 0x7f010014 public const int mediaRouteTvIconDrawable = 2130771988; // aapt resource value: 0x7f010143 public const int menu = 2130772291; // aapt resource value: 0x7f010045 public const int multiChoiceItemLayout = 2130772037; // aapt resource value: 0x7f01010f public const int navigationContentDescription = 2130772239; // aapt resource value: 0x7f01010e public const int navigationIcon = 2130772238; // aapt resource value: 0x7f010026 public const int navigationMode = 2130772006; // aapt resource value: 0x7f0100db public const int numericModifiers = 2130772187; // aapt resource value: 0x7f0100e6 public const int overlapAnchor = 2130772198; // aapt resource value: 0x7f0100e8 public const int paddingBottomNoButtons = 2130772200; // aapt resource value: 0x7f010114 public const int paddingEnd = 2130772244; // aapt resource value: 0x7f010113 public const int paddingStart = 2130772243; // aapt resource value: 0x7f0100e9 public const int paddingTopNoTitle = 2130772201; // aapt resource value: 0x7f0100a4 public const int panelBackground = 2130772132; // aapt resource value: 0x7f0100a6 public const int panelMenuListTheme = 2130772134; // aapt resource value: 0x7f0100a5 public const int panelMenuListWidth = 2130772133; // aapt resource value: 0x7f010167 public const int passwordToggleContentDescription = 2130772327; // aapt resource value: 0x7f010166 public const int passwordToggleDrawable = 2130772326; // aapt resource value: 0x7f010165 public const int passwordToggleEnabled = 2130772325; // aapt resource value: 0x7f010168 public const int passwordToggleTint = 2130772328; // aapt resource value: 0x7f010169 public const int passwordToggleTintMode = 2130772329; // aapt resource value: 0x7f010091 public const int popupMenuStyle = 2130772113; // aapt resource value: 0x7f01003f public const int popupTheme = 2130772031; // aapt resource value: 0x7f010092 public const int popupWindowStyle = 2130772114; // aapt resource value: 0x7f0100e4 public const int preserveIconSpacing = 2130772196; // aapt resource value: 0x7f01013e public const int pressedTranslationZ = 2130772286; // aapt resource value: 0x7f010035 public const int progressBarPadding = 2130772021; // aapt resource value: 0x7f010033 public const int progressBarStyle = 2130772019; // aapt resource value: 0x7f0100f5 public const int queryBackground = 2130772213; // aapt resource value: 0x7f0100ec public const int queryHint = 2130772204; // aapt resource value: 0x7f0100c0 public const int radioButtonStyle = 2130772160; // aapt resource value: 0x7f0100c1 public const int ratingBarStyle = 2130772161; // aapt resource value: 0x7f0100c2 public const int ratingBarStyleIndicator = 2130772162; // aapt resource value: 0x7f0100c3 public const int ratingBarStyleSmall = 2130772163; // aapt resource value: 0x7f010002 public const int reverseLayout = 2130771970; // aapt resource value: 0x7f01013c public const int rippleColor = 2130772284; // aapt resource value: 0x7f01012b public const int scrimAnimationDuration = 2130772267; // aapt resource value: 0x7f01012a public const int scrimVisibleHeightTrigger = 2130772266; // aapt resource value: 0x7f0100f1 public const int searchHintIcon = 2130772209; // aapt resource value: 0x7f0100f0 public const int searchIcon = 2130772208; // aapt resource value: 0x7f010099 public const int searchViewStyle = 2130772121; // aapt resource value: 0x7f0100c4 public const int seekBarStyle = 2130772164; // aapt resource value: 0x7f010089 public const int selectableItemBackground = 2130772105; // aapt resource value: 0x7f01008a public const int selectableItemBackgroundBorderless = 2130772106; // aapt resource value: 0x7f0100dc public const int showAsAction = 2130772188; // aapt resource value: 0x7f0100d8 public const int showDividers = 2130772184; // aapt resource value: 0x7f010101 public const int showText = 2130772225; // aapt resource value: 0x7f010048 public const int showTitle = 2130772040; // aapt resource value: 0x7f010046 public const int singleChoiceItemLayout = 2130772038; // aapt resource value: 0x7f010001 public const int spanCount = 2130771969; // aapt resource value: 0x7f0100d0 public const int spinBars = 2130772176; // aapt resource value: 0x7f010084 public const int spinnerDropDownItemStyle = 2130772100; // aapt resource value: 0x7f0100c5 public const int spinnerStyle = 2130772165; // aapt resource value: 0x7f010100 public const int splitTrack = 2130772224; // aapt resource value: 0x7f010049 public const int srcCompat = 2130772041; // aapt resource value: 0x7f010003 public const int stackFromEnd = 2130771971; // aapt resource value: 0x7f0100e7 public const int state_above_anchor = 2130772199; // aapt resource value: 0x7f010119 public const int state_collapsed = 2130772249; // aapt resource value: 0x7f01011a public const int state_collapsible = 2130772250; // aapt resource value: 0x7f010132 public const int statusBarBackground = 2130772274; // aapt resource value: 0x7f010128 public const int statusBarScrim = 2130772264; // aapt resource value: 0x7f0100e5 public const int subMenuArrow = 2130772197; // aapt resource value: 0x7f0100f6 public const int submitBackground = 2130772214; // aapt resource value: 0x7f010028 public const int subtitle = 2130772008; // aapt resource value: 0x7f010103 public const int subtitleTextAppearance = 2130772227; // aapt resource value: 0x7f010112 public const int subtitleTextColor = 2130772242; // aapt resource value: 0x7f01002a public const int subtitleTextStyle = 2130772010; // aapt resource value: 0x7f0100f4 public const int suggestionRowLayout = 2130772212; // aapt resource value: 0x7f0100fe public const int switchMinWidth = 2130772222; // aapt resource value: 0x7f0100ff public const int switchPadding = 2130772223; // aapt resource value: 0x7f0100c6 public const int switchStyle = 2130772166; // aapt resource value: 0x7f0100fd public const int switchTextAppearance = 2130772221; // aapt resource value: 0x7f01014f public const int tabBackground = 2130772303; // aapt resource value: 0x7f01014e public const int tabContentStart = 2130772302; // aapt resource value: 0x7f010151 public const int tabGravity = 2130772305; // aapt resource value: 0x7f01014c public const int tabIndicatorColor = 2130772300; // aapt resource value: 0x7f01014d public const int tabIndicatorHeight = 2130772301; // aapt resource value: 0x7f010153 public const int tabMaxWidth = 2130772307; // aapt resource value: 0x7f010152 public const int tabMinWidth = 2130772306; // aapt resource value: 0x7f010150 public const int tabMode = 2130772304; // aapt resource value: 0x7f01015b public const int tabPadding = 2130772315; // aapt resource value: 0x7f01015a public const int tabPaddingBottom = 2130772314; // aapt resource value: 0x7f010159 public const int tabPaddingEnd = 2130772313; // aapt resource value: 0x7f010157 public const int tabPaddingStart = 2130772311; // aapt resource value: 0x7f010158 public const int tabPaddingTop = 2130772312; // aapt resource value: 0x7f010156 public const int tabSelectedTextColor = 2130772310; // aapt resource value: 0x7f010154 public const int tabTextAppearance = 2130772308; // aapt resource value: 0x7f010155 public const int tabTextColor = 2130772309; // aapt resource value: 0x7f01004f public const int textAllCaps = 2130772047; // aapt resource value: 0x7f01007c public const int textAppearanceLargePopupMenu = 2130772092; // aapt resource value: 0x7f0100a1 public const int textAppearanceListItem = 2130772129; // aapt resource value: 0x7f0100a2 public const int textAppearanceListItemSecondary = 2130772130; // aapt resource value: 0x7f0100a3 public const int textAppearanceListItemSmall = 2130772131; // aapt resource value: 0x7f01007e public const int textAppearancePopupMenuHeader = 2130772094; // aapt resource value: 0x7f010097 public const int textAppearanceSearchResultSubtitle = 2130772119; // aapt resource value: 0x7f010096 public const int textAppearanceSearchResultTitle = 2130772118; // aapt resource value: 0x7f01007d public const int textAppearanceSmallPopupMenu = 2130772093; // aapt resource value: 0x7f0100b6 public const int textColorAlertDialogListItem = 2130772150; // aapt resource value: 0x7f01013b public const int textColorError = 2130772283; // aapt resource value: 0x7f010098 public const int textColorSearchUrl = 2130772120; // aapt resource value: 0x7f010115 public const int theme = 2130772245; // aapt resource value: 0x7f0100d6 public const int thickness = 2130772182; // aapt resource value: 0x7f0100fc public const int thumbTextPadding = 2130772220; // aapt resource value: 0x7f0100f7 public const int thumbTint = 2130772215; // aapt resource value: 0x7f0100f8 public const int thumbTintMode = 2130772216; // aapt resource value: 0x7f01004c public const int tickMark = 2130772044; // aapt resource value: 0x7f01004d public const int tickMarkTint = 2130772045; // aapt resource value: 0x7f01004e public const int tickMarkTintMode = 2130772046; // aapt resource value: 0x7f01004a public const int tint = 2130772042; // aapt resource value: 0x7f01004b public const int tintMode = 2130772043; // aapt resource value: 0x7f010025 public const int title = 2130772005; // aapt resource value: 0x7f01012e public const int titleEnabled = 2130772270; // aapt resource value: 0x7f010104 public const int titleMargin = 2130772228; // aapt resource value: 0x7f010108 public const int titleMarginBottom = 2130772232; // aapt resource value: 0x7f010106 public const int titleMarginEnd = 2130772230; // aapt resource value: 0x7f010105 public const int titleMarginStart = 2130772229; // aapt resource value: 0x7f010107 public const int titleMarginTop = 2130772231; // aapt resource value: 0x7f010109 public const int titleMargins = 2130772233; // aapt resource value: 0x7f010102 public const int titleTextAppearance = 2130772226; // aapt resource value: 0x7f010111 public const int titleTextColor = 2130772241; // aapt resource value: 0x7f010029 public const int titleTextStyle = 2130772009; // aapt resource value: 0x7f010129 public const int toolbarId = 2130772265; // aapt resource value: 0x7f010090 public const int toolbarNavigationButtonStyle = 2130772112; // aapt resource value: 0x7f01008f public const int toolbarStyle = 2130772111; // aapt resource value: 0x7f0100c9 public const int tooltipForegroundColor = 2130772169; // aapt resource value: 0x7f0100c8 public const int tooltipFrameBackground = 2130772168; // aapt resource value: 0x7f0100e1 public const int tooltipText = 2130772193; // aapt resource value: 0x7f0100f9 public const int track = 2130772217; // aapt resource value: 0x7f0100fa public const int trackTint = 2130772218; // aapt resource value: 0x7f0100fb public const int trackTintMode = 2130772219; // aapt resource value: 0x7f010140 public const int useCompatPadding = 2130772288; // aapt resource value: 0x7f0100f2 public const int voiceIcon = 2130772210; // aapt resource value: 0x7f010056 public const int windowActionBar = 2130772054; // aapt resource value: 0x7f010058 public const int windowActionBarOverlay = 2130772056; // aapt resource value: 0x7f010059 public const int windowActionModeOverlay = 2130772057; // aapt resource value: 0x7f01005d public const int windowFixedHeightMajor = 2130772061; // aapt resource value: 0x7f01005b public const int windowFixedHeightMinor = 2130772059; // aapt resource value: 0x7f01005a public const int windowFixedWidthMajor = 2130772058; // aapt resource value: 0x7f01005c public const int windowFixedWidthMinor = 2130772060; // aapt resource value: 0x7f01005e public const int windowMinWidthMajor = 2130772062; // aapt resource value: 0x7f01005f public const int windowMinWidthMinor = 2130772063; // aapt resource value: 0x7f010057 public const int windowNoTitle = 2130772055; static Attribute() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } private Attribute() { } } public partial class Boolean { // aapt resource value: 0x7f0e0000 public const int abc_action_bar_embed_tabs = 2131623936; // aapt resource value: 0x7f0e0001 public const int abc_allow_stacked_button_bar = 2131623937; // aapt resource value: 0x7f0e0002 public const int abc_config_actionMenuItemAllCaps = 2131623938; // aapt resource value: 0x7f0e0003 public const int abc_config_closeDialogWhenTouchOutside = 2131623939; // aapt resource value: 0x7f0e0004 public const int abc_config_showMenuShortcutsWhenKeyboardPresent = 2131623940; static Boolean() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } private Boolean() { } } public partial class Color { // aapt resource value: 0x7f0d004f public const int abc_background_cache_hint_selector_material_dark = 2131558479; // aapt resource value: 0x7f0d0050 public const int abc_background_cache_hint_selector_material_light = 2131558480; // aapt resource value: 0x7f0d0051 public const int abc_btn_colored_borderless_text_material = 2131558481; // aapt resource value: 0x7f0d0052 public const int abc_btn_colored_text_material = 2131558482; // aapt resource value: 0x7f0d0053 public const int abc_color_highlight_material = 2131558483; // aapt resource value: 0x7f0d0054 public const int abc_hint_foreground_material_dark = 2131558484; // aapt resource value: 0x7f0d0055 public const int abc_hint_foreground_material_light = 2131558485; // aapt resource value: 0x7f0d0004 public const int abc_input_method_navigation_guard = 2131558404; // aapt resource value: 0x7f0d0056 public const int abc_primary_text_disable_only_material_dark = 2131558486; // aapt resource value: 0x7f0d0057 public const int abc_primary_text_disable_only_material_light = 2131558487; // aapt resource value: 0x7f0d0058 public const int abc_primary_text_material_dark = 2131558488; // aapt resource value: 0x7f0d0059 public const int abc_primary_text_material_light = 2131558489; // aapt resource value: 0x7f0d005a public const int abc_search_url_text = 2131558490; // aapt resource value: 0x7f0d0005 public const int abc_search_url_text_normal = 2131558405; // aapt resource value: 0x7f0d0006 public const int abc_search_url_text_pressed = 2131558406; // aapt resource value: 0x7f0d0007 public const int abc_search_url_text_selected = 2131558407; // aapt resource value: 0x7f0d005b public const int abc_secondary_text_material_dark = 2131558491; // aapt resource value: 0x7f0d005c public const int abc_secondary_text_material_light = 2131558492; // aapt resource value: 0x7f0d005d public const int abc_tint_btn_checkable = 2131558493; // aapt resource value: 0x7f0d005e public const int abc_tint_default = 2131558494; // aapt resource value: 0x7f0d005f public const int abc_tint_edittext = 2131558495; // aapt resource value: 0x7f0d0060 public const int abc_tint_seek_thumb = 2131558496; // aapt resource value: 0x7f0d0061 public const int abc_tint_spinner = 2131558497; // aapt resource value: 0x7f0d0062 public const int abc_tint_switch_track = 2131558498; // aapt resource value: 0x7f0d0008 public const int accent_material_dark = 2131558408; // aapt resource value: 0x7f0d0009 public const int accent_material_light = 2131558409; // aapt resource value: 0x7f0d000a public const int background_floating_material_dark = 2131558410; // aapt resource value: 0x7f0d000b public const int background_floating_material_light = 2131558411; // aapt resource value: 0x7f0d000c public const int background_material_dark = 2131558412; // aapt resource value: 0x7f0d000d public const int background_material_light = 2131558413; // aapt resource value: 0x7f0d000e public const int bright_foreground_disabled_material_dark = 2131558414; // aapt resource value: 0x7f0d000f public const int bright_foreground_disabled_material_light = 2131558415; // aapt resource value: 0x7f0d0010 public const int bright_foreground_inverse_material_dark = 2131558416; // aapt resource value: 0x7f0d0011 public const int bright_foreground_inverse_material_light = 2131558417; // aapt resource value: 0x7f0d0012 public const int bright_foreground_material_dark = 2131558418; // aapt resource value: 0x7f0d0013 public const int bright_foreground_material_light = 2131558419; // aapt resource value: 0x7f0d0014 public const int button_material_dark = 2131558420; // aapt resource value: 0x7f0d0015 public const int button_material_light = 2131558421; // aapt resource value: 0x7f0d0000 public const int cardview_dark_background = 2131558400; // aapt resource value: 0x7f0d0001 public const int cardview_light_background = 2131558401; // aapt resource value: 0x7f0d0002 public const int cardview_shadow_end_color = 2131558402; // aapt resource value: 0x7f0d0003 public const int cardview_shadow_start_color = 2131558403; // aapt resource value: 0x7f0d004e public const int colorAccent = 2131558478; // aapt resource value: 0x7f0d004c public const int colorPrimary = 2131558476; // aapt resource value: 0x7f0d004d public const int colorPrimaryDark = 2131558477; // aapt resource value: 0x7f0d0040 public const int design_bottom_navigation_shadow_color = 2131558464; // aapt resource value: 0x7f0d0063 public const int design_error = 2131558499; // aapt resource value: 0x7f0d0041 public const int design_fab_shadow_end_color = 2131558465; // aapt resource value: 0x7f0d0042 public const int design_fab_shadow_mid_color = 2131558466; // aapt resource value: 0x7f0d0043 public const int design_fab_shadow_start_color = 2131558467; // aapt resource value: 0x7f0d0044 public const int design_fab_stroke_end_inner_color = 2131558468; // aapt resource value: 0x7f0d0045 public const int design_fab_stroke_end_outer_color = 2131558469; // aapt resource value: 0x7f0d0046 public const int design_fab_stroke_top_inner_color = 2131558470; // aapt resource value: 0x7f0d0047 public const int design_fab_stroke_top_outer_color = 2131558471; // aapt resource value: 0x7f0d0048 public const int design_snackbar_background_color = 2131558472; // aapt resource value: 0x7f0d0064 public const int design_tint_password_toggle = 2131558500; // aapt resource value: 0x7f0d0016 public const int dim_foreground_disabled_material_dark = 2131558422; // aapt resource value: 0x7f0d0017 public const int dim_foreground_disabled_material_light = 2131558423; // aapt resource value: 0x7f0d0018 public const int dim_foreground_material_dark = 2131558424; // aapt resource value: 0x7f0d0019 public const int dim_foreground_material_light = 2131558425; // aapt resource value: 0x7f0d001a public const int error_color_material = 2131558426; // aapt resource value: 0x7f0d001b public const int foreground_material_dark = 2131558427; // aapt resource value: 0x7f0d001c public const int foreground_material_light = 2131558428; // aapt resource value: 0x7f0d001d public const int highlighted_text_material_dark = 2131558429; // aapt resource value: 0x7f0d001e public const int highlighted_text_material_light = 2131558430; // aapt resource value: 0x7f0d004b public const int launcher_background = 2131558475; // aapt resource value: 0x7f0d001f public const int material_blue_grey_800 = 2131558431; // aapt resource value: 0x7f0d0020 public const int material_blue_grey_900 = 2131558432; // aapt resource value: 0x7f0d0021 public const int material_blue_grey_950 = 2131558433; // aapt resource value: 0x7f0d0022 public const int material_deep_teal_200 = 2131558434; // aapt resource value: 0x7f0d0023 public const int material_deep_teal_500 = 2131558435; // aapt resource value: 0x7f0d0024 public const int material_grey_100 = 2131558436; // aapt resource value: 0x7f0d0025 public const int material_grey_300 = 2131558437; // aapt resource value: 0x7f0d0026 public const int material_grey_50 = 2131558438; // aapt resource value: 0x7f0d0027 public const int material_grey_600 = 2131558439; // aapt resource value: 0x7f0d0028 public const int material_grey_800 = 2131558440; // aapt resource value: 0x7f0d0029 public const int material_grey_850 = 2131558441; // aapt resource value: 0x7f0d002a public const int material_grey_900 = 2131558442; // aapt resource value: 0x7f0d0049 public const int notification_action_color_filter = 2131558473; // aapt resource value: 0x7f0d004a public const int notification_icon_bg_color = 2131558474; // aapt resource value: 0x7f0d003f public const int notification_material_background_media_default_color = 2131558463; // aapt resource value: 0x7f0d002b public const int primary_dark_material_dark = 2131558443; // aapt resource value: 0x7f0d002c public const int primary_dark_material_light = 2131558444; // aapt resource value: 0x7f0d002d public const int primary_material_dark = 2131558445; // aapt resource value: 0x7f0d002e public const int primary_material_light = 2131558446; // aapt resource value: 0x7f0d002f public const int primary_text_default_material_dark = 2131558447; // aapt resource value: 0x7f0d0030 public const int primary_text_default_material_light = 2131558448; // aapt resource value: 0x7f0d0031 public const int primary_text_disabled_material_dark = 2131558449; // aapt resource value: 0x7f0d0032 public const int primary_text_disabled_material_light = 2131558450; // aapt resource value: 0x7f0d0033 public const int ripple_material_dark = 2131558451; // aapt resource value: 0x7f0d0034 public const int ripple_material_light = 2131558452; // aapt resource value: 0x7f0d0035 public const int secondary_text_default_material_dark = 2131558453; // aapt resource value: 0x7f0d0036 public const int secondary_text_default_material_light = 2131558454; // aapt resource value: 0x7f0d0037 public const int secondary_text_disabled_material_dark = 2131558455; // aapt resource value: 0x7f0d0038 public const int secondary_text_disabled_material_light = 2131558456; // aapt resource value: 0x7f0d0039 public const int switch_thumb_disabled_material_dark = 2131558457; // aapt resource value: 0x7f0d003a public const int switch_thumb_disabled_material_light = 2131558458; // aapt resource value: 0x7f0d0065 public const int switch_thumb_material_dark = 2131558501; // aapt resource value: 0x7f0d0066 public const int switch_thumb_material_light = 2131558502; // aapt resource value: 0x7f0d003b public const int switch_thumb_normal_material_dark = 2131558459; // aapt resource value: 0x7f0d003c public const int switch_thumb_normal_material_light = 2131558460; // aapt resource value: 0x7f0d003d public const int tooltip_background_dark = 2131558461; // aapt resource value: 0x7f0d003e public const int tooltip_background_light = 2131558462; static Color() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } private Color() { } } public partial class Dimension { // aapt resource value: 0x7f08001b public const int abc_action_bar_content_inset_material = 2131230747; // aapt resource value: 0x7f08001c public const int abc_action_bar_content_inset_with_nav = 2131230748; // aapt resource value: 0x7f080010 public const int abc_action_bar_default_height_material = 2131230736; // aapt resource value: 0x7f08001d public const int abc_action_bar_default_padding_end_material = 2131230749; // aapt resource value: 0x7f08001e public const int abc_action_bar_default_padding_start_material = 2131230750; // aapt resource value: 0x7f080020 public const int abc_action_bar_elevation_material = 2131230752; // aapt resource value: 0x7f080021 public const int abc_action_bar_icon_vertical_padding_material = 2131230753; // aapt resource value: 0x7f080022 public const int abc_action_bar_overflow_padding_end_material = 2131230754; // aapt resource value: 0x7f080023 public const int abc_action_bar_overflow_padding_start_material = 2131230755; // aapt resource value: 0x7f080011 public const int abc_action_bar_progress_bar_size = 2131230737; // aapt resource value: 0x7f080024 public const int abc_action_bar_stacked_max_height = 2131230756; // aapt resource value: 0x7f080025 public const int abc_action_bar_stacked_tab_max_width = 2131230757; // aapt resource value: 0x7f080026 public const int abc_action_bar_subtitle_bottom_margin_material = 2131230758; // aapt resource value: 0x7f080027 public const int abc_action_bar_subtitle_top_margin_material = 2131230759; // aapt resource value: 0x7f080028 public const int abc_action_button_min_height_material = 2131230760; // aapt resource value: 0x7f080029 public const int abc_action_button_min_width_material = 2131230761; // aapt resource value: 0x7f08002a public const int abc_action_button_min_width_overflow_material = 2131230762; // aapt resource value: 0x7f08000f public const int abc_alert_dialog_button_bar_height = 2131230735; // aapt resource value: 0x7f08002b public const int abc_button_inset_horizontal_material = 2131230763; // aapt resource value: 0x7f08002c public const int abc_button_inset_vertical_material = 2131230764; // aapt resource value: 0x7f08002d public const int abc_button_padding_horizontal_material = 2131230765; // aapt resource value: 0x7f08002e public const int abc_button_padding_vertical_material = 2131230766; // aapt resource value: 0x7f08002f public const int abc_cascading_menus_min_smallest_width = 2131230767; // aapt resource value: 0x7f080014 public const int abc_config_prefDialogWidth = 2131230740; // aapt resource value: 0x7f080030 public const int abc_control_corner_material = 2131230768; // aapt resource value: 0x7f080031 public const int abc_control_inset_material = 2131230769; // aapt resource value: 0x7f080032 public const int abc_control_padding_material = 2131230770; // aapt resource value: 0x7f080015 public const int abc_dialog_fixed_height_major = 2131230741; // aapt resource value: 0x7f080016 public const int abc_dialog_fixed_height_minor = 2131230742; // aapt resource value: 0x7f080017 public const int abc_dialog_fixed_width_major = 2131230743; // aapt resource value: 0x7f080018 public const int abc_dialog_fixed_width_minor = 2131230744; // aapt resource value: 0x7f080033 public const int abc_dialog_list_padding_bottom_no_buttons = 2131230771; // aapt resource value: 0x7f080034 public const int abc_dialog_list_padding_top_no_title = 2131230772; // aapt resource value: 0x7f080019 public const int abc_dialog_min_width_major = 2131230745; // aapt resource value: 0x7f08001a public const int abc_dialog_min_width_minor = 2131230746; // aapt resource value: 0x7f080035 public const int abc_dialog_padding_material = 2131230773; // aapt resource value: 0x7f080036 public const int abc_dialog_padding_top_material = 2131230774; // aapt resource value: 0x7f080037 public const int abc_dialog_title_divider_material = 2131230775; // aapt resource value: 0x7f080038 public const int abc_disabled_alpha_material_dark = 2131230776; // aapt resource value: 0x7f080039 public const int abc_disabled_alpha_material_light = 2131230777; // aapt resource value: 0x7f08003a public const int abc_dropdownitem_icon_width = 2131230778; // aapt resource value: 0x7f08003b public const int abc_dropdownitem_text_padding_left = 2131230779; // aapt resource value: 0x7f08003c public const int abc_dropdownitem_text_padding_right = 2131230780; // aapt resource value: 0x7f08003d public const int abc_edit_text_inset_bottom_material = 2131230781; // aapt resource value: 0x7f08003e public const int abc_edit_text_inset_horizontal_material = 2131230782; // aapt resource value: 0x7f08003f public const int abc_edit_text_inset_top_material = 2131230783; // aapt resource value: 0x7f080040 public const int abc_floating_window_z = 2131230784; // aapt resource value: 0x7f080041 public const int abc_list_item_padding_horizontal_material = 2131230785; // aapt resource value: 0x7f080042 public const int abc_panel_menu_list_width = 2131230786; // aapt resource value: 0x7f080043 public const int abc_progress_bar_height_material = 2131230787; // aapt resource value: 0x7f080044 public const int abc_search_view_preferred_height = 2131230788; // aapt resource value: 0x7f080045 public const int abc_search_view_preferred_width = 2131230789; // aapt resource value: 0x7f080046 public const int abc_seekbar_track_background_height_material = 2131230790; // aapt resource value: 0x7f080047 public const int abc_seekbar_track_progress_height_material = 2131230791; // aapt resource value: 0x7f080048 public const int abc_select_dialog_padding_start_material = 2131230792; // aapt resource value: 0x7f08001f public const int abc_switch_padding = 2131230751; // aapt resource value: 0x7f080049 public const int abc_text_size_body_1_material = 2131230793; // aapt resource value: 0x7f08004a public const int abc_text_size_body_2_material = 2131230794; // aapt resource value: 0x7f08004b public const int abc_text_size_button_material = 2131230795; // aapt resource value: 0x7f08004c public const int abc_text_size_caption_material = 2131230796; // aapt resource value: 0x7f08004d public const int abc_text_size_display_1_material = 2131230797; // aapt resource value: 0x7f08004e public const int abc_text_size_display_2_material = 2131230798; // aapt resource value: 0x7f08004f public const int abc_text_size_display_3_material = 2131230799; // aapt resource value: 0x7f080050 public const int abc_text_size_display_4_material = 2131230800; // aapt resource value: 0x7f080051 public const int abc_text_size_headline_material = 2131230801; // aapt resource value: 0x7f080052 public const int abc_text_size_large_material = 2131230802; // aapt resource value: 0x7f080053 public const int abc_text_size_medium_material = 2131230803; // aapt resource value: 0x7f080054 public const int abc_text_size_menu_header_material = 2131230804; // aapt resource value: 0x7f080055 public const int abc_text_size_menu_material = 2131230805; // aapt resource value: 0x7f080056 public const int abc_text_size_small_material = 2131230806; // aapt resource value: 0x7f080057 public const int abc_text_size_subhead_material = 2131230807; // aapt resource value: 0x7f080012 public const int abc_text_size_subtitle_material_toolbar = 2131230738; // aapt resource value: 0x7f080058 public const int abc_text_size_title_material = 2131230808; // aapt resource value: 0x7f080013 public const int abc_text_size_title_material_toolbar = 2131230739; // aapt resource value: 0x7f08000c public const int cardview_compat_inset_shadow = 2131230732; // aapt resource value: 0x7f08000d public const int cardview_default_elevation = 2131230733; // aapt resource value: 0x7f08000e public const int cardview_default_radius = 2131230734; // aapt resource value: 0x7f080094 public const int compat_button_inset_horizontal_material = 2131230868; // aapt resource value: 0x7f080095 public const int compat_button_inset_vertical_material = 2131230869; // aapt resource value: 0x7f080096 public const int compat_button_padding_horizontal_material = 2131230870; // aapt resource value: 0x7f080097 public const int compat_button_padding_vertical_material = 2131230871; // aapt resource value: 0x7f080098 public const int compat_control_corner_material = 2131230872; // aapt resource value: 0x7f080072 public const int design_appbar_elevation = 2131230834; // aapt resource value: 0x7f080073 public const int design_bottom_navigation_active_item_max_width = 2131230835; // aapt resource value: 0x7f080074 public const int design_bottom_navigation_active_text_size = 2131230836; // aapt resource value: 0x7f080075 public const int design_bottom_navigation_elevation = 2131230837; // aapt resource value: 0x7f080076 public const int design_bottom_navigation_height = 2131230838; // aapt resource value: 0x7f080077 public const int design_bottom_navigation_item_max_width = 2131230839; // aapt resource value: 0x7f080078 public const int design_bottom_navigation_item_min_width = 2131230840; // aapt resource value: 0x7f080079 public const int design_bottom_navigation_margin = 2131230841; // aapt resource value: 0x7f08007a public const int design_bottom_navigation_shadow_height = 2131230842; // aapt resource value: 0x7f08007b public const int design_bottom_navigation_text_size = 2131230843; // aapt resource value: 0x7f08007c public const int design_bottom_sheet_modal_elevation = 2131230844; // aapt resource value: 0x7f08007d public const int design_bottom_sheet_peek_height_min = 2131230845; // aapt resource value: 0x7f08007e public const int design_fab_border_width = 2131230846; // aapt resource value: 0x7f08007f public const int design_fab_elevation = 2131230847; // aapt resource value: 0x7f080080 public const int design_fab_image_size = 2131230848; // aapt resource value: 0x7f080081 public const int design_fab_size_mini = 2131230849; // aapt resource value: 0x7f080082 public const int design_fab_size_normal = 2131230850; // aapt resource value: 0x7f080083 public const int design_fab_translation_z_pressed = 2131230851; // aapt resource value: 0x7f080084 public const int design_navigation_elevation = 2131230852; // aapt resource value: 0x7f080085 public const int design_navigation_icon_padding = 2131230853; // aapt resource value: 0x7f080086 public const int design_navigation_icon_size = 2131230854; // aapt resource value: 0x7f08006a public const int design_navigation_max_width = 2131230826; // aapt resource value: 0x7f080087 public const int design_navigation_padding_bottom = 2131230855; // aapt resource value: 0x7f080088 public const int design_navigation_separator_vertical_padding = 2131230856; // aapt resource value: 0x7f08006b public const int design_snackbar_action_inline_max_width = 2131230827; // aapt resource value: 0x7f08006c public const int design_snackbar_background_corner_radius = 2131230828; // aapt resource value: 0x7f080089 public const int design_snackbar_elevation = 2131230857; // aapt resource value: 0x7f08006d public const int design_snackbar_extra_spacing_horizontal = 2131230829; // aapt resource value: 0x7f08006e public const int design_snackbar_max_width = 2131230830; // aapt resource value: 0x7f08006f public const int design_snackbar_min_width = 2131230831; // aapt resource value: 0x7f08008a public const int design_snackbar_padding_horizontal = 2131230858; // aapt resource value: 0x7f08008b public const int design_snackbar_padding_vertical = 2131230859; // aapt resource value: 0x7f080070 public const int design_snackbar_padding_vertical_2lines = 2131230832; // aapt resource value: 0x7f08008c public const int design_snackbar_text_size = 2131230860; // aapt resource value: 0x7f08008d public const int design_tab_max_width = 2131230861; // aapt resource value: 0x7f080071 public const int design_tab_scrollable_min_width = 2131230833; // aapt resource value: 0x7f08008e public const int design_tab_text_size = 2131230862; // aapt resource value: 0x7f08008f public const int design_tab_text_size_2line = 2131230863; // aapt resource value: 0x7f080059 public const int disabled_alpha_material_dark = 2131230809; // aapt resource value: 0x7f08005a public const int disabled_alpha_material_light = 2131230810; // aapt resource value: 0x7f080000 public const int fastscroll_default_thickness = 2131230720; // aapt resource value: 0x7f080001 public const int fastscroll_margin = 2131230721; // aapt resource value: 0x7f080002 public const int fastscroll_minimum_range = 2131230722; // aapt resource value: 0x7f08005b public const int highlight_alpha_material_colored = 2131230811; // aapt resource value: 0x7f08005c public const int highlight_alpha_material_dark = 2131230812; // aapt resource value: 0x7f08005d public const int highlight_alpha_material_light = 2131230813; // aapt resource value: 0x7f08005e public const int hint_alpha_material_dark = 2131230814; // aapt resource value: 0x7f08005f public const int hint_alpha_material_light = 2131230815; // aapt resource value: 0x7f080060 public const int hint_pressed_alpha_material_dark = 2131230816; // aapt resource value: 0x7f080061 public const int hint_pressed_alpha_material_light = 2131230817; // aapt resource value: 0x7f080003 public const int item_touch_helper_max_drag_scroll_per_frame = 2131230723; // aapt resource value: 0x7f080004 public const int item_touch_helper_swipe_escape_max_velocity = 2131230724; // aapt resource value: 0x7f080005 public const int item_touch_helper_swipe_escape_velocity = 2131230725; // aapt resource value: 0x7f080006 public const int mr_controller_volume_group_list_item_height = 2131230726; // aapt resource value: 0x7f080007 public const int mr_controller_volume_group_list_item_icon_size = 2131230727; // aapt resource value: 0x7f080008 public const int mr_controller_volume_group_list_max_height = 2131230728; // aapt resource value: 0x7f08000b public const int mr_controller_volume_group_list_padding_top = 2131230731; // aapt resource value: 0x7f080009 public const int mr_dialog_fixed_width_major = 2131230729; // aapt resource value: 0x7f08000a public const int mr_dialog_fixed_width_minor = 2131230730; // aapt resource value: 0x7f080099 public const int notification_action_icon_size = 2131230873; // aapt resource value: 0x7f08009a public const int notification_action_text_size = 2131230874; // aapt resource value: 0x7f08009b public const int notification_big_circle_margin = 2131230875; // aapt resource value: 0x7f080091 public const int notification_content_margin_start = 2131230865; // aapt resource value: 0x7f08009c public const int notification_large_icon_height = 2131230876; // aapt resource value: 0x7f08009d public const int notification_large_icon_width = 2131230877; // aapt resource value: 0x7f080092 public const int notification_main_column_padding_top = 2131230866; // aapt resource value: 0x7f080093 public const int notification_media_narrow_margin = 2131230867; // aapt resource value: 0x7f08009e public const int notification_right_icon_size = 2131230878; // aapt resource value: 0x7f080090 public const int notification_right_side_padding_top = 2131230864; // aapt resource value: 0x7f08009f public const int notification_small_icon_background_padding = 2131230879; // aapt resource value: 0x7f0800a0 public const int notification_small_icon_size_as_large = 2131230880; // aapt resource value: 0x7f0800a1 public const int notification_subtext_size = 2131230881; // aapt resource value: 0x7f0800a2 public const int notification_top_pad = 2131230882; // aapt resource value: 0x7f0800a3 public const int notification_top_pad_large_text = 2131230883; // aapt resource value: 0x7f080062 public const int tooltip_corner_radius = 2131230818; // aapt resource value: 0x7f080063 public const int tooltip_horizontal_padding = 2131230819; // aapt resource value: 0x7f080064 public const int tooltip_margin = 2131230820; // aapt resource value: 0x7f080065 public const int tooltip_precise_anchor_extra_offset = 2131230821; // aapt resource value: 0x7f080066 public const int tooltip_precise_anchor_threshold = 2131230822; // aapt resource value: 0x7f080067 public const int tooltip_vertical_padding = 2131230823; // aapt resource value: 0x7f080068 public const int tooltip_y_offset_non_touch = 2131230824; // aapt resource value: 0x7f080069 public const int tooltip_y_offset_touch = 2131230825; static Dimension() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } private Dimension() { } } public partial class Drawable { // aapt resource value: 0x7f020000 public const int abc_ab_share_pack_mtrl_alpha = 2130837504; // aapt resource value: 0x7f020001 public const int abc_action_bar_item_background_material = 2130837505; // aapt resource value: 0x7f020002 public const int abc_btn_borderless_material = 2130837506; // aapt resource value: 0x7f020003 public const int abc_btn_check_material = 2130837507; // aapt resource value: 0x7f020004 public const int abc_btn_check_to_on_mtrl_000 = 2130837508; // aapt resource value: 0x7f020005 public const int abc_btn_check_to_on_mtrl_015 = 2130837509; // aapt resource value: 0x7f020006 public const int abc_btn_colored_material = 2130837510; // aapt resource value: 0x7f020007 public const int abc_btn_default_mtrl_shape = 2130837511; // aapt resource value: 0x7f020008 public const int abc_btn_radio_material = 2130837512; // aapt resource value: 0x7f020009 public const int abc_btn_radio_to_on_mtrl_000 = 2130837513; // aapt resource value: 0x7f02000a public const int abc_btn_radio_to_on_mtrl_015 = 2130837514; // aapt resource value: 0x7f02000b public const int abc_btn_switch_to_on_mtrl_00001 = 2130837515; // aapt resource value: 0x7f02000c public const int abc_btn_switch_to_on_mtrl_00012 = 2130837516; // aapt resource value: 0x7f02000d public const int abc_cab_background_internal_bg = 2130837517; // aapt resource value: 0x7f02000e public const int abc_cab_background_top_material = 2130837518; // aapt resource value: 0x7f02000f public const int abc_cab_background_top_mtrl_alpha = 2130837519; // aapt resource value: 0x7f020010 public const int abc_control_background_material = 2130837520; // aapt resource value: 0x7f020011 public const int abc_dialog_material_background = 2130837521; // aapt resource value: 0x7f020012 public const int abc_edit_text_material = 2130837522; // aapt resource value: 0x7f020013 public const int abc_ic_ab_back_material = 2130837523; // aapt resource value: 0x7f020014 public const int abc_ic_arrow_drop_right_black_24dp = 2130837524; // aapt resource value: 0x7f020015 public const int abc_ic_clear_material = 2130837525; // aapt resource value: 0x7f020016 public const int abc_ic_commit_search_api_mtrl_alpha = 2130837526; // aapt resource value: 0x7f020017 public const int abc_ic_go_search_api_material = 2130837527; // aapt resource value: 0x7f020018 public const int abc_ic_menu_copy_mtrl_am_alpha = 2130837528; // aapt resource value: 0x7f020019 public const int abc_ic_menu_cut_mtrl_alpha = 2130837529; // aapt resource value: 0x7f02001a public const int abc_ic_menu_overflow_material = 2130837530; // aapt resource value: 0x7f02001b public const int abc_ic_menu_paste_mtrl_am_alpha = 2130837531; // aapt resource value: 0x7f02001c public const int abc_ic_menu_selectall_mtrl_alpha = 2130837532; // aapt resource value: 0x7f02001d public const int abc_ic_menu_share_mtrl_alpha = 2130837533; // aapt resource value: 0x7f02001e public const int abc_ic_search_api_material = 2130837534; // aapt resource value: 0x7f02001f public const int abc_ic_star_black_16dp = 2130837535; // aapt resource value: 0x7f020020 public const int abc_ic_star_black_36dp = 2130837536; // aapt resource value: 0x7f020021 public const int abc_ic_star_black_48dp = 2130837537; // aapt resource value: 0x7f020022 public const int abc_ic_star_half_black_16dp = 2130837538; // aapt resource value: 0x7f020023 public const int abc_ic_star_half_black_36dp = 2130837539; // aapt resource value: 0x7f020024 public const int abc_ic_star_half_black_48dp = 2130837540; // aapt resource value: 0x7f020025 public const int abc_ic_voice_search_api_material = 2130837541; // aapt resource value: 0x7f020026 public const int abc_item_background_holo_dark = 2130837542; // aapt resource value: 0x7f020027 public const int abc_item_background_holo_light = 2130837543; // aapt resource value: 0x7f020028 public const int abc_list_divider_mtrl_alpha = 2130837544; // aapt resource value: 0x7f020029 public const int abc_list_focused_holo = 2130837545; // aapt resource value: 0x7f02002a public const int abc_list_longpressed_holo = 2130837546; // aapt resource value: 0x7f02002b public const int abc_list_pressed_holo_dark = 2130837547; // aapt resource value: 0x7f02002c public const int abc_list_pressed_holo_light = 2130837548; // aapt resource value: 0x7f02002d public const int abc_list_selector_background_transition_holo_dark = 2130837549; // aapt resource value: 0x7f02002e public const int abc_list_selector_background_transition_holo_light = 2130837550; // aapt resource value: 0x7f02002f public const int abc_list_selector_disabled_holo_dark = 2130837551; // aapt resource value: 0x7f020030 public const int abc_list_selector_disabled_holo_light = 2130837552; // aapt resource value: 0x7f020031 public const int abc_list_selector_holo_dark = 2130837553; // aapt resource value: 0x7f020032 public const int abc_list_selector_holo_light = 2130837554; // aapt resource value: 0x7f020033 public const int abc_menu_hardkey_panel_mtrl_mult = 2130837555; // aapt resource value: 0x7f020034 public const int abc_popup_background_mtrl_mult = 2130837556; // aapt resource value: 0x7f020035 public const int abc_ratingbar_indicator_material = 2130837557; // aapt resource value: 0x7f020036 public const int abc_ratingbar_material = 2130837558; // aapt resource value: 0x7f020037 public const int abc_ratingbar_small_material = 2130837559; // aapt resource value: 0x7f020038 public const int abc_scrubber_control_off_mtrl_alpha = 2130837560; // aapt resource value: 0x7f020039 public const int abc_scrubber_control_to_pressed_mtrl_000 = 2130837561; // aapt resource value: 0x7f02003a public const int abc_scrubber_control_to_pressed_mtrl_005 = 2130837562; // aapt resource value: 0x7f02003b public const int abc_scrubber_primary_mtrl_alpha = 2130837563; // aapt resource value: 0x7f02003c public const int abc_scrubber_track_mtrl_alpha = 2130837564; // aapt resource value: 0x7f02003d public const int abc_seekbar_thumb_material = 2130837565; // aapt resource value: 0x7f02003e public const int abc_seekbar_tick_mark_material = 2130837566; // aapt resource value: 0x7f02003f public const int abc_seekbar_track_material = 2130837567; // aapt resource value: 0x7f020040 public const int abc_spinner_mtrl_am_alpha = 2130837568; // aapt resource value: 0x7f020041 public const int abc_spinner_textfield_background_material = 2130837569; // aapt resource value: 0x7f020042 public const int abc_switch_thumb_material = 2130837570; // aapt resource value: 0x7f020043 public const int abc_switch_track_mtrl_alpha = 2130837571; // aapt resource value: 0x7f020044 public const int abc_tab_indicator_material = 2130837572; // aapt resource value: 0x7f020045 public const int abc_tab_indicator_mtrl_alpha = 2130837573; // aapt resource value: 0x7f020046 public const int abc_text_cursor_material = 2130837574; // aapt resource value: 0x7f020047 public const int abc_text_select_handle_left_mtrl_dark = 2130837575; // aapt resource value: 0x7f020048 public const int abc_text_select_handle_left_mtrl_light = 2130837576; // aapt resource value: 0x7f020049 public const int abc_text_select_handle_middle_mtrl_dark = 2130837577; // aapt resource value: 0x7f02004a public const int abc_text_select_handle_middle_mtrl_light = 2130837578; // aapt resource value: 0x7f02004b public const int abc_text_select_handle_right_mtrl_dark = 2130837579; // aapt resource value: 0x7f02004c public const int abc_text_select_handle_right_mtrl_light = 2130837580; // aapt resource value: 0x7f02004d public const int abc_textfield_activated_mtrl_alpha = 2130837581; // aapt resource value: 0x7f02004e public const int abc_textfield_default_mtrl_alpha = 2130837582; // aapt resource value: 0x7f02004f public const int abc_textfield_search_activated_mtrl_alpha = 2130837583; // aapt resource value: 0x7f020050 public const int abc_textfield_search_default_mtrl_alpha = 2130837584; // aapt resource value: 0x7f020051 public const int abc_textfield_search_material = 2130837585; // aapt resource value: 0x7f020052 public const int abc_vector_test = 2130837586; // aapt resource value: 0x7f020053 public const int avd_hide_password = 2130837587; // aapt resource value: 0x7f02012f public const int avd_hide_password_1 = 2130837807; // aapt resource value: 0x7f020130 public const int avd_hide_password_2 = 2130837808; // aapt resource value: 0x7f020131 public const int avd_hide_password_3 = 2130837809; // aapt resource value: 0x7f020054 public const int avd_show_password = 2130837588; // aapt resource value: 0x7f020132 public const int avd_show_password_1 = 2130837810; // aapt resource value: 0x7f020133 public const int avd_show_password_2 = 2130837811; // aapt resource value: 0x7f020134 public const int avd_show_password_3 = 2130837812; // aapt resource value: 0x7f020055 public const int design_bottom_navigation_item_background = 2130837589; // aapt resource value: 0x7f020056 public const int design_fab_background = 2130837590; // aapt resource value: 0x7f020057 public const int design_ic_visibility = 2130837591; // aapt resource value: 0x7f020058 public const int design_ic_visibility_off = 2130837592; // aapt resource value: 0x7f020059 public const int design_password_eye = 2130837593; // aapt resource value: 0x7f02005a public const int design_snackbar_background = 2130837594; // aapt resource value: 0x7f02005b public const int ic_audiotrack_dark = 2130837595; // aapt resource value: 0x7f02005c public const int ic_audiotrack_light = 2130837596; // aapt resource value: 0x7f02005d public const int ic_dialog_close_dark = 2130837597; // aapt resource value: 0x7f02005e public const int ic_dialog_close_light = 2130837598; // aapt resource value: 0x7f02005f public const int ic_group_collapse_00 = 2130837599; // aapt resource value: 0x7f020060 public const int ic_group_collapse_01 = 2130837600; // aapt resource value: 0x7f020061 public const int ic_group_collapse_02 = 2130837601; // aapt resource value: 0x7f020062 public const int ic_group_collapse_03 = 2130837602; // aapt resource value: 0x7f020063 public const int ic_group_collapse_04 = 2130837603; // aapt resource value: 0x7f020064 public const int ic_group_collapse_05 = 2130837604; // aapt resource value: 0x7f020065 public const int ic_group_collapse_06 = 2130837605; // aapt resource value: 0x7f020066 public const int ic_group_collapse_07 = 2130837606; // aapt resource value: 0x7f020067 public const int ic_group_collapse_08 = 2130837607; // aapt resource value: 0x7f020068 public const int ic_group_collapse_09 = 2130837608; // aapt resource value: 0x7f020069 public const int ic_group_collapse_10 = 2130837609; // aapt resource value: 0x7f02006a public const int ic_group_collapse_11 = 2130837610; // aapt resource value: 0x7f02006b public const int ic_group_collapse_12 = 2130837611; // aapt resource value: 0x7f02006c public const int ic_group_collapse_13 = 2130837612; // aapt resource value: 0x7f02006d public const int ic_group_collapse_14 = 2130837613; // aapt resource value: 0x7f02006e public const int ic_group_collapse_15 = 2130837614; // aapt resource value: 0x7f02006f public const int ic_group_expand_00 = 2130837615; // aapt resource value: 0x7f020070 public const int ic_group_expand_01 = 2130837616; // aapt resource value: 0x7f020071 public const int ic_group_expand_02 = 2130837617; // aapt resource value: 0x7f020072 public const int ic_group_expand_03 = 2130837618; // aapt resource value: 0x7f020073 public const int ic_group_expand_04 = 2130837619; // aapt resource value: 0x7f020074 public const int ic_group_expand_05 = 2130837620; // aapt resource value: 0x7f020075 public const int ic_group_expand_06 = 2130837621; // aapt resource value: 0x7f020076 public const int ic_group_expand_07 = 2130837622; // aapt resource value: 0x7f020077 public const int ic_group_expand_08 = 2130837623; // aapt resource value: 0x7f020078 public const int ic_group_expand_09 = 2130837624; // aapt resource value: 0x7f020079 public const int ic_group_expand_10 = 2130837625; // aapt resource value: 0x7f02007a public const int ic_group_expand_11 = 2130837626; // aapt resource value: 0x7f02007b public const int ic_group_expand_12 = 2130837627; // aapt resource value: 0x7f02007c public const int ic_group_expand_13 = 2130837628; // aapt resource value: 0x7f02007d public const int ic_group_expand_14 = 2130837629; // aapt resource value: 0x7f02007e public const int ic_group_expand_15 = 2130837630; // aapt resource value: 0x7f02007f public const int ic_media_pause_dark = 2130837631; // aapt resource value: 0x7f020080 public const int ic_media_pause_light = 2130837632; // aapt resource value: 0x7f020081 public const int ic_media_play_dark = 2130837633; // aapt resource value: 0x7f020082 public const int ic_media_play_light = 2130837634; // aapt resource value: 0x7f020083 public const int ic_media_stop_dark = 2130837635; // aapt resource value: 0x7f020084 public const int ic_media_stop_light = 2130837636; // aapt resource value: 0x7f020085 public const int ic_mr_button_connected_00_dark = 2130837637; // aapt resource value: 0x7f020086 public const int ic_mr_button_connected_00_light = 2130837638; // aapt resource value: 0x7f020087 public const int ic_mr_button_connected_01_dark = 2130837639; // aapt resource value: 0x7f020088 public const int ic_mr_button_connected_01_light = 2130837640; // aapt resource value: 0x7f020089 public const int ic_mr_button_connected_02_dark = 2130837641; // aapt resource value: 0x7f02008a public const int ic_mr_button_connected_02_light = 2130837642; // aapt resource value: 0x7f02008b public const int ic_mr_button_connected_03_dark = 2130837643; // aapt resource value: 0x7f02008c public const int ic_mr_button_connected_03_light = 2130837644; // aapt resource value: 0x7f02008d public const int ic_mr_button_connected_04_dark = 2130837645; // aapt resource value: 0x7f02008e public const int ic_mr_button_connected_04_light = 2130837646; // aapt resource value: 0x7f02008f public const int ic_mr_button_connected_05_dark = 2130837647; // aapt resource value: 0x7f020090 public const int ic_mr_button_connected_05_light = 2130837648; // aapt resource value: 0x7f020091 public const int ic_mr_button_connected_06_dark = 2130837649; // aapt resource value: 0x7f020092 public const int ic_mr_button_connected_06_light = 2130837650; // aapt resource value: 0x7f020093 public const int ic_mr_button_connected_07_dark = 2130837651; // aapt resource value: 0x7f020094 public const int ic_mr_button_connected_07_light = 2130837652; // aapt resource value: 0x7f020095 public const int ic_mr_button_connected_08_dark = 2130837653; // aapt resource value: 0x7f020096 public const int ic_mr_button_connected_08_light = 2130837654; // aapt resource value: 0x7f020097 public const int ic_mr_button_connected_09_dark = 2130837655; // aapt resource value: 0x7f020098 public const int ic_mr_button_connected_09_light = 2130837656; // aapt resource value: 0x7f020099 public const int ic_mr_button_connected_10_dark = 2130837657; // aapt resource value: 0x7f02009a public const int ic_mr_button_connected_10_light = 2130837658; // aapt resource value: 0x7f02009b public const int ic_mr_button_connected_11_dark = 2130837659; // aapt resource value: 0x7f02009c public const int ic_mr_button_connected_11_light = 2130837660; // aapt resource value: 0x7f02009d public const int ic_mr_button_connected_12_dark = 2130837661; // aapt resource value: 0x7f02009e public const int ic_mr_button_connected_12_light = 2130837662; // aapt resource value: 0x7f02009f public const int ic_mr_button_connected_13_dark = 2130837663; // aapt resource value: 0x7f0200a0 public const int ic_mr_button_connected_13_light = 2130837664; // aapt resource value: 0x7f0200a1 public const int ic_mr_button_connected_14_dark = 2130837665; // aapt resource value: 0x7f0200a2 public const int ic_mr_button_connected_14_light = 2130837666; // aapt resource value: 0x7f0200a3 public const int ic_mr_button_connected_15_dark = 2130837667; // aapt resource value: 0x7f0200a4 public const int ic_mr_button_connected_15_light = 2130837668; // aapt resource value: 0x7f0200a5 public const int ic_mr_button_connected_16_dark = 2130837669; // aapt resource value: 0x7f0200a6 public const int ic_mr_button_connected_16_light = 2130837670; // aapt resource value: 0x7f0200a7 public const int ic_mr_button_connected_17_dark = 2130837671; // aapt resource value: 0x7f0200a8 public const int ic_mr_button_connected_17_light = 2130837672; // aapt resource value: 0x7f0200a9 public const int ic_mr_button_connected_18_dark = 2130837673; // aapt resource value: 0x7f0200aa public const int ic_mr_button_connected_18_light = 2130837674; // aapt resource value: 0x7f0200ab public const int ic_mr_button_connected_19_dark = 2130837675; // aapt resource value: 0x7f0200ac public const int ic_mr_button_connected_19_light = 2130837676; // aapt resource value: 0x7f0200ad public const int ic_mr_button_connected_20_dark = 2130837677; // aapt resource value: 0x7f0200ae public const int ic_mr_button_connected_20_light = 2130837678; // aapt resource value: 0x7f0200af public const int ic_mr_button_connected_21_dark = 2130837679; // aapt resource value: 0x7f0200b0 public const int ic_mr_button_connected_21_light = 2130837680; // aapt resource value: 0x7f0200b1 public const int ic_mr_button_connected_22_dark = 2130837681; // aapt resource value: 0x7f0200b2 public const int ic_mr_button_connected_22_light = 2130837682; // aapt resource value: 0x7f0200b3 public const int ic_mr_button_connected_23_dark = 2130837683; // aapt resource value: 0x7f0200b4 public const int ic_mr_button_connected_23_light = 2130837684; // aapt resource value: 0x7f0200b5 public const int ic_mr_button_connected_24_dark = 2130837685; // aapt resource value: 0x7f0200b6 public const int ic_mr_button_connected_24_light = 2130837686; // aapt resource value: 0x7f0200b7 public const int ic_mr_button_connected_25_dark = 2130837687; // aapt resource value: 0x7f0200b8 public const int ic_mr_button_connected_25_light = 2130837688; // aapt resource value: 0x7f0200b9 public const int ic_mr_button_connected_26_dark = 2130837689; // aapt resource value: 0x7f0200ba public const int ic_mr_button_connected_26_light = 2130837690; // aapt resource value: 0x7f0200bb public const int ic_mr_button_connected_27_dark = 2130837691; // aapt resource value: 0x7f0200bc public const int ic_mr_button_connected_27_light = 2130837692; // aapt resource value: 0x7f0200bd public const int ic_mr_button_connected_28_dark = 2130837693; // aapt resource value: 0x7f0200be public const int ic_mr_button_connected_28_light = 2130837694; // aapt resource value: 0x7f0200bf public const int ic_mr_button_connected_29_dark = 2130837695; // aapt resource value: 0x7f0200c0 public const int ic_mr_button_connected_29_light = 2130837696; // aapt resource value: 0x7f0200c1 public const int ic_mr_button_connected_30_dark = 2130837697; // aapt resource value: 0x7f0200c2 public const int ic_mr_button_connected_30_light = 2130837698; // aapt resource value: 0x7f0200c3 public const int ic_mr_button_connecting_00_dark = 2130837699; // aapt resource value: 0x7f0200c4 public const int ic_mr_button_connecting_00_light = 2130837700; // aapt resource value: 0x7f0200c5 public const int ic_mr_button_connecting_01_dark = 2130837701; // aapt resource value: 0x7f0200c6 public const int ic_mr_button_connecting_01_light = 2130837702; // aapt resource value: 0x7f0200c7 public const int ic_mr_button_connecting_02_dark = 2130837703; // aapt resource value: 0x7f0200c8 public const int ic_mr_button_connecting_02_light = 2130837704; // aapt resource value: 0x7f0200c9 public const int ic_mr_button_connecting_03_dark = 2130837705; // aapt resource value: 0x7f0200ca public const int ic_mr_button_connecting_03_light = 2130837706; // aapt resource value: 0x7f0200cb public const int ic_mr_button_connecting_04_dark = 2130837707; // aapt resource value: 0x7f0200cc public const int ic_mr_button_connecting_04_light = 2130837708; // aapt resource value: 0x7f0200cd public const int ic_mr_button_connecting_05_dark = 2130837709; // aapt resource value: 0x7f0200ce public const int ic_mr_button_connecting_05_light = 2130837710; // aapt resource value: 0x7f0200cf public const int ic_mr_button_connecting_06_dark = 2130837711; // aapt resource value: 0x7f0200d0 public const int ic_mr_button_connecting_06_light = 2130837712; // aapt resource value: 0x7f0200d1 public const int ic_mr_button_connecting_07_dark = 2130837713; // aapt resource value: 0x7f0200d2 public const int ic_mr_button_connecting_07_light = 2130837714; // aapt resource value: 0x7f0200d3 public const int ic_mr_button_connecting_08_dark = 2130837715; // aapt resource value: 0x7f0200d4 public const int ic_mr_button_connecting_08_light = 2130837716; // aapt resource value: 0x7f0200d5 public const int ic_mr_button_connecting_09_dark = 2130837717; // aapt resource value: 0x7f0200d6 public const int ic_mr_button_connecting_09_light = 2130837718; // aapt resource value: 0x7f0200d7 public const int ic_mr_button_connecting_10_dark = 2130837719; // aapt resource value: 0x7f0200d8 public const int ic_mr_button_connecting_10_light = 2130837720; // aapt resource value: 0x7f0200d9 public const int ic_mr_button_connecting_11_dark = 2130837721; // aapt resource value: 0x7f0200da public const int ic_mr_button_connecting_11_light = 2130837722; // aapt resource value: 0x7f0200db public const int ic_mr_button_connecting_12_dark = 2130837723; // aapt resource value: 0x7f0200dc public const int ic_mr_button_connecting_12_light = 2130837724; // aapt resource value: 0x7f0200dd public const int ic_mr_button_connecting_13_dark = 2130837725; // aapt resource value: 0x7f0200de public const int ic_mr_button_connecting_13_light = 2130837726; // aapt resource value: 0x7f0200df public const int ic_mr_button_connecting_14_dark = 2130837727; // aapt resource value: 0x7f0200e0 public const int ic_mr_button_connecting_14_light = 2130837728; // aapt resource value: 0x7f0200e1 public const int ic_mr_button_connecting_15_dark = 2130837729; // aapt resource value: 0x7f0200e2 public const int ic_mr_button_connecting_15_light = 2130837730; // aapt resource value: 0x7f0200e3 public const int ic_mr_button_connecting_16_dark = 2130837731; // aapt resource value: 0x7f0200e4 public const int ic_mr_button_connecting_16_light = 2130837732; // aapt resource value: 0x7f0200e5 public const int ic_mr_button_connecting_17_dark = 2130837733; // aapt resource value: 0x7f0200e6 public const int ic_mr_button_connecting_17_light = 2130837734; // aapt resource value: 0x7f0200e7 public const int ic_mr_button_connecting_18_dark = 2130837735; // aapt resource value: 0x7f0200e8 public const int ic_mr_button_connecting_18_light = 2130837736; // aapt resource value: 0x7f0200e9 public const int ic_mr_button_connecting_19_dark = 2130837737; // aapt resource value: 0x7f0200ea public const int ic_mr_button_connecting_19_light = 2130837738; // aapt resource value: 0x7f0200eb public const int ic_mr_button_connecting_20_dark = 2130837739; // aapt resource value: 0x7f0200ec public const int ic_mr_button_connecting_20_light = 2130837740; // aapt resource value: 0x7f0200ed public const int ic_mr_button_connecting_21_dark = 2130837741; // aapt resource value: 0x7f0200ee public const int ic_mr_button_connecting_21_light = 2130837742; // aapt resource value: 0x7f0200ef public const int ic_mr_button_connecting_22_dark = 2130837743; // aapt resource value: 0x7f0200f0 public const int ic_mr_button_connecting_22_light = 2130837744; // aapt resource value: 0x7f0200f1 public const int ic_mr_button_connecting_23_dark = 2130837745; // aapt resource value: 0x7f0200f2 public const int ic_mr_button_connecting_23_light = 2130837746; // aapt resource value: 0x7f0200f3 public const int ic_mr_button_connecting_24_dark = 2130837747; // aapt resource value: 0x7f0200f4 public const int ic_mr_button_connecting_24_light = 2130837748; // aapt resource value: 0x7f0200f5 public const int ic_mr_button_connecting_25_dark = 2130837749; // aapt resource value: 0x7f0200f6 public const int ic_mr_button_connecting_25_light = 2130837750; // aapt resource value: 0x7f0200f7 public const int ic_mr_button_connecting_26_dark = 2130837751; // aapt resource value: 0x7f0200f8 public const int ic_mr_button_connecting_26_light = 2130837752; // aapt resource value: 0x7f0200f9 public const int ic_mr_button_connecting_27_dark = 2130837753; // aapt resource value: 0x7f0200fa public const int ic_mr_button_connecting_27_light = 2130837754; // aapt resource value: 0x7f0200fb public const int ic_mr_button_connecting_28_dark = 2130837755; // aapt resource value: 0x7f0200fc public const int ic_mr_button_connecting_28_light = 2130837756; // aapt resource value: 0x7f0200fd public const int ic_mr_button_connecting_29_dark = 2130837757; // aapt resource value: 0x7f0200fe public const int ic_mr_button_connecting_29_light = 2130837758; // aapt resource value: 0x7f0200ff public const int ic_mr_button_connecting_30_dark = 2130837759; // aapt resource value: 0x7f020100 public const int ic_mr_button_connecting_30_light = 2130837760; // aapt resource value: 0x7f020101 public const int ic_mr_button_disabled_dark = 2130837761; // aapt resource value: 0x7f020102 public const int ic_mr_button_disabled_light = 2130837762; // aapt resource value: 0x7f020103 public const int ic_mr_button_disconnected_dark = 2130837763; // aapt resource value: 0x7f020104 public const int ic_mr_button_disconnected_light = 2130837764; // aapt resource value: 0x7f020105 public const int ic_mr_button_grey = 2130837765; // aapt resource value: 0x7f020106 public const int ic_vol_type_speaker_dark = 2130837766; // aapt resource value: 0x7f020107 public const int ic_vol_type_speaker_group_dark = 2130837767; // aapt resource value: 0x7f020108 public const int ic_vol_type_speaker_group_light = 2130837768; // aapt resource value: 0x7f020109 public const int ic_vol_type_speaker_light = 2130837769; // aapt resource value: 0x7f02010a public const int ic_vol_type_tv_dark = 2130837770; // aapt resource value: 0x7f02010b public const int ic_vol_type_tv_light = 2130837771; // aapt resource value: 0x7f02010c public const int mr_button_connected_dark = 2130837772; // aapt resource value: 0x7f02010d public const int mr_button_connected_light = 2130837773; // aapt resource value: 0x7f02010e public const int mr_button_connecting_dark = 2130837774; // aapt resource value: 0x7f02010f public const int mr_button_connecting_light = 2130837775; // aapt resource value: 0x7f020110 public const int mr_button_dark = 2130837776; // aapt resource value: 0x7f020111 public const int mr_button_light = 2130837777; // aapt resource value: 0x7f020112 public const int mr_dialog_close_dark = 2130837778; // aapt resource value: 0x7f020113 public const int mr_dialog_close_light = 2130837779; // aapt resource value: 0x7f020114 public const int mr_dialog_material_background_dark = 2130837780; // aapt resource value: 0x7f020115 public const int mr_dialog_material_background_light = 2130837781; // aapt resource value: 0x7f020116 public const int mr_group_collapse = 2130837782; // aapt resource value: 0x7f020117 public const int mr_group_expand = 2130837783; // aapt resource value: 0x7f020118 public const int mr_media_pause_dark = 2130837784; // aapt resource value: 0x7f020119 public const int mr_media_pause_light = 2130837785; // aapt resource value: 0x7f02011a public const int mr_media_play_dark = 2130837786; // aapt resource value: 0x7f02011b public const int mr_media_play_light = 2130837787; // aapt resource value: 0x7f02011c public const int mr_media_stop_dark = 2130837788; // aapt resource value: 0x7f02011d public const int mr_media_stop_light = 2130837789; // aapt resource value: 0x7f02011e public const int mr_vol_type_audiotrack_dark = 2130837790; // aapt resource value: 0x7f02011f public const int mr_vol_type_audiotrack_light = 2130837791; // aapt resource value: 0x7f020120 public const int navigation_empty_icon = 2130837792; // aapt resource value: 0x7f020121 public const int notification_action_background = 2130837793; // aapt resource value: 0x7f020122 public const int notification_bg = 2130837794; // aapt resource value: 0x7f020123 public const int notification_bg_low = 2130837795; // aapt resource value: 0x7f020124 public const int notification_bg_low_normal = 2130837796; // aapt resource value: 0x7f020125 public const int notification_bg_low_pressed = 2130837797; // aapt resource value: 0x7f020126 public const int notification_bg_normal = 2130837798; // aapt resource value: 0x7f020127 public const int notification_bg_normal_pressed = 2130837799; // aapt resource value: 0x7f020128 public const int notification_icon_background = 2130837800; // aapt resource value: 0x7f02012d public const int notification_template_icon_bg = 2130837805; // aapt resource value: 0x7f02012e public const int notification_template_icon_low_bg = 2130837806; // aapt resource value: 0x7f020129 public const int notification_tile_bg = 2130837801; // aapt resource value: 0x7f02012a public const int notify_panel_notification_icon_bg = 2130837802; // aapt resource value: 0x7f02012b public const int tooltip_frame_dark = 2130837803; // aapt resource value: 0x7f02012c public const int tooltip_frame_light = 2130837804; static Drawable() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } private Drawable() { } } public partial class Id { // aapt resource value: 0x7f090032 public const int ALT = 2131296306; // aapt resource value: 0x7f090033 public const int CTRL = 2131296307; // aapt resource value: 0x7f090034 public const int FUNCTION = 2131296308; // aapt resource value: 0x7f090035 public const int META = 2131296309; // aapt resource value: 0x7f090036 public const int SHIFT = 2131296310; // aapt resource value: 0x7f090037 public const int SYM = 2131296311; // aapt resource value: 0x7f0900b6 public const int action0 = 2131296438; // aapt resource value: 0x7f09007c public const int action_bar = 2131296380; // aapt resource value: 0x7f090001 public const int action_bar_activity_content = 2131296257; // aapt resource value: 0x7f09007b public const int action_bar_container = 2131296379; // aapt resource value: 0x7f090077 public const int action_bar_root = 2131296375; // aapt resource value: 0x7f090002 public const int action_bar_spinner = 2131296258; // aapt resource value: 0x7f09005b public const int action_bar_subtitle = 2131296347; // aapt resource value: 0x7f09005a public const int action_bar_title = 2131296346; // aapt resource value: 0x7f0900b3 public const int action_container = 2131296435; // aapt resource value: 0x7f09007d public const int action_context_bar = 2131296381; // aapt resource value: 0x7f0900ba public const int action_divider = 2131296442; // aapt resource value: 0x7f0900b4 public const int action_image = 2131296436; // aapt resource value: 0x7f090003 public const int action_menu_divider = 2131296259; // aapt resource value: 0x7f090004 public const int action_menu_presenter = 2131296260; // aapt resource value: 0x7f090079 public const int action_mode_bar = 2131296377; // aapt resource value: 0x7f090078 public const int action_mode_bar_stub = 2131296376; // aapt resource value: 0x7f09005c public const int action_mode_close_button = 2131296348; // aapt resource value: 0x7f0900b5 public const int action_text = 2131296437; // aapt resource value: 0x7f0900c3 public const int actions = 2131296451; // aapt resource value: 0x7f09005d public const int activity_chooser_view_content = 2131296349; // aapt resource value: 0x7f090027 public const int add = 2131296295; // aapt resource value: 0x7f090070 public const int alertTitle = 2131296368; // aapt resource value: 0x7f090052 public const int all = 2131296338; // aapt resource value: 0x7f090038 public const int always = 2131296312; // aapt resource value: 0x7f090056 public const int async = 2131296342; // aapt resource value: 0x7f090044 public const int auto = 2131296324; // aapt resource value: 0x7f09002f public const int beginning = 2131296303; // aapt resource value: 0x7f090057 public const int blocking = 2131296343; // aapt resource value: 0x7f09003d public const int bottom = 2131296317; // aapt resource value: 0x7f090063 public const int buttonPanel = 2131296355; // aapt resource value: 0x7f0900b7 public const int cancel_action = 2131296439; // aapt resource value: 0x7f090045 public const int center = 2131296325; // aapt resource value: 0x7f090046 public const int center_horizontal = 2131296326; // aapt resource value: 0x7f090047 public const int center_vertical = 2131296327; // aapt resource value: 0x7f090073 public const int checkbox = 2131296371; // aapt resource value: 0x7f0900bf public const int chronometer = 2131296447; // aapt resource value: 0x7f09004e public const int clip_horizontal = 2131296334; // aapt resource value: 0x7f09004f public const int clip_vertical = 2131296335; // aapt resource value: 0x7f090039 public const int collapseActionView = 2131296313; // aapt resource value: 0x7f09008d public const int container = 2131296397; // aapt resource value: 0x7f090066 public const int contentPanel = 2131296358; // aapt resource value: 0x7f09008e public const int coordinator = 2131296398; // aapt resource value: 0x7f09006d public const int custom = 2131296365; // aapt resource value: 0x7f09006c public const int customPanel = 2131296364; // aapt resource value: 0x7f09007a public const int decor_content_parent = 2131296378; // aapt resource value: 0x7f090060 public const int default_activity_button = 2131296352; // aapt resource value: 0x7f090090 public const int design_bottom_sheet = 2131296400; // aapt resource value: 0x7f090097 public const int design_menu_item_action_area = 2131296407; // aapt resource value: 0x7f090096 public const int design_menu_item_action_area_stub = 2131296406; // aapt resource value: 0x7f090095 public const int design_menu_item_text = 2131296405; // aapt resource value: 0x7f090094 public const int design_navigation_view = 2131296404; // aapt resource value: 0x7f090020 public const int disableHome = 2131296288; // aapt resource value: 0x7f09007e public const int edit_query = 2131296382; // aapt resource value: 0x7f090030 public const int end = 2131296304; // aapt resource value: 0x7f0900c5 public const int end_padder = 2131296453; // aapt resource value: 0x7f09003f public const int enterAlways = 2131296319; // aapt resource value: 0x7f090040 public const int enterAlwaysCollapsed = 2131296320; // aapt resource value: 0x7f090041 public const int exitUntilCollapsed = 2131296321; // aapt resource value: 0x7f09005e public const int expand_activities_button = 2131296350; // aapt resource value: 0x7f090072 public const int expanded_menu = 2131296370; // aapt resource value: 0x7f090050 public const int fill = 2131296336; // aapt resource value: 0x7f090051 public const int fill_horizontal = 2131296337; // aapt resource value: 0x7f090048 public const int fill_vertical = 2131296328; // aapt resource value: 0x7f090054 public const int @fixed = 2131296340; // aapt resource value: 0x7f090058 public const int forever = 2131296344; // aapt resource value: 0x7f09000a public const int ghost_view = 2131296266; // aapt resource value: 0x7f090005 public const int home = 2131296261; // aapt resource value: 0x7f090021 public const int homeAsUp = 2131296289; // aapt resource value: 0x7f090062 public const int icon = 2131296354; // aapt resource value: 0x7f0900c4 public const int icon_group = 2131296452; // aapt resource value: 0x7f09003a public const int ifRoom = 2131296314; // aapt resource value: 0x7f09005f public const int image = 2131296351; // aapt resource value: 0x7f0900c0 public const int info = 2131296448; // aapt resource value: 0x7f090059 public const int italic = 2131296345; // aapt resource value: 0x7f090000 public const int item_touch_helper_previous_elevation = 2131296256; // aapt resource value: 0x7f09008c public const int largeLabel = 2131296396; // aapt resource value: 0x7f090049 public const int left = 2131296329; // aapt resource value: 0x7f090017 public const int line1 = 2131296279; // aapt resource value: 0x7f090018 public const int line3 = 2131296280; // aapt resource value: 0x7f09001d public const int listMode = 2131296285; // aapt resource value: 0x7f090061 public const int list_item = 2131296353; // aapt resource value: 0x7f0900ca public const int masked = 2131296458; // aapt resource value: 0x7f0900b9 public const int media_actions = 2131296441; // aapt resource value: 0x7f0900c8 public const int message = 2131296456; // aapt resource value: 0x7f090031 public const int middle = 2131296305; // aapt resource value: 0x7f090053 public const int mini = 2131296339; // aapt resource value: 0x7f0900a5 public const int mr_art = 2131296421; // aapt resource value: 0x7f09009a public const int mr_chooser_list = 2131296410; // aapt resource value: 0x7f09009d public const int mr_chooser_route_desc = 2131296413; // aapt resource value: 0x7f09009b public const int mr_chooser_route_icon = 2131296411; // aapt resource value: 0x7f09009c public const int mr_chooser_route_name = 2131296412; // aapt resource value: 0x7f090099 public const int mr_chooser_title = 2131296409; // aapt resource value: 0x7f0900a2 public const int mr_close = 2131296418; // aapt resource value: 0x7f0900a8 public const int mr_control_divider = 2131296424; // aapt resource value: 0x7f0900ae public const int mr_control_playback_ctrl = 2131296430; // aapt resource value: 0x7f0900b1 public const int mr_control_subtitle = 2131296433; // aapt resource value: 0x7f0900b0 public const int mr_control_title = 2131296432; // aapt resource value: 0x7f0900af public const int mr_control_title_container = 2131296431; // aapt resource value: 0x7f0900a3 public const int mr_custom_control = 2131296419; // aapt resource value: 0x7f0900a4 public const int mr_default_control = 2131296420; // aapt resource value: 0x7f09009f public const int mr_dialog_area = 2131296415; // aapt resource value: 0x7f09009e public const int mr_expandable_area = 2131296414; // aapt resource value: 0x7f0900b2 public const int mr_group_expand_collapse = 2131296434; // aapt resource value: 0x7f0900a6 public const int mr_media_main_control = 2131296422; // aapt resource value: 0x7f0900a1 public const int mr_name = 2131296417; // aapt resource value: 0x7f0900a7 public const int mr_playback_control = 2131296423; // aapt resource value: 0x7f0900a0 public const int mr_title_bar = 2131296416; // aapt resource value: 0x7f0900a9 public const int mr_volume_control = 2131296425; // aapt resource value: 0x7f0900aa public const int mr_volume_group_list = 2131296426; // aapt resource value: 0x7f0900ac public const int mr_volume_item_icon = 2131296428; // aapt resource value: 0x7f0900ad public const int mr_volume_slider = 2131296429; // aapt resource value: 0x7f090028 public const int multiply = 2131296296; // aapt resource value: 0x7f090093 public const int navigation_header_container = 2131296403; // aapt resource value: 0x7f09003b public const int never = 2131296315; // aapt resource value: 0x7f090022 public const int none = 2131296290; // aapt resource value: 0x7f09001e public const int normal = 2131296286; // aapt resource value: 0x7f0900c2 public const int notification_background = 2131296450; // aapt resource value: 0x7f0900bc public const int notification_main_column = 2131296444; // aapt resource value: 0x7f0900bb public const int notification_main_column_container = 2131296443; // aapt resource value: 0x7f09004c public const int parallax = 2131296332; // aapt resource value: 0x7f090065 public const int parentPanel = 2131296357; // aapt resource value: 0x7f09000b public const int parent_matrix = 2131296267; // aapt resource value: 0x7f09004d public const int pin = 2131296333; // aapt resource value: 0x7f090006 public const int progress_circular = 2131296262; // aapt resource value: 0x7f090007 public const int progress_horizontal = 2131296263; // aapt resource value: 0x7f090075 public const int radio = 2131296373; // aapt resource value: 0x7f09004a public const int right = 2131296330; // aapt resource value: 0x7f0900c1 public const int right_icon = 2131296449; // aapt resource value: 0x7f0900bd public const int right_side = 2131296445; // aapt resource value: 0x7f09000c public const int save_image_matrix = 2131296268; // aapt resource value: 0x7f09000d public const int save_non_transition_alpha = 2131296269; // aapt resource value: 0x7f09000e public const int save_scale_type = 2131296270; // aapt resource value: 0x7f090029 public const int screen = 2131296297; // aapt resource value: 0x7f090042 public const int scroll = 2131296322; // aapt resource value: 0x7f09006b public const int scrollIndicatorDown = 2131296363; // aapt resource value: 0x7f090067 public const int scrollIndicatorUp = 2131296359; // aapt resource value: 0x7f090068 public const int scrollView = 2131296360; // aapt resource value: 0x7f090055 public const int scrollable = 2131296341; // aapt resource value: 0x7f090080 public const int search_badge = 2131296384; // aapt resource value: 0x7f09007f public const int search_bar = 2131296383; // aapt resource value: 0x7f090081 public const int search_button = 2131296385; // aapt resource value: 0x7f090086 public const int search_close_btn = 2131296390; // aapt resource value: 0x7f090082 public const int search_edit_frame = 2131296386; // aapt resource value: 0x7f090088 public const int search_go_btn = 2131296392; // aapt resource value: 0x7f090083 public const int search_mag_icon = 2131296387; // aapt resource value: 0x7f090084 public const int search_plate = 2131296388; // aapt resource value: 0x7f090085 public const int search_src_text = 2131296389; // aapt resource value: 0x7f090089 public const int search_voice_btn = 2131296393; // aapt resource value: 0x7f09008a public const int select_dialog_listview = 2131296394; // aapt resource value: 0x7f090074 public const int shortcut = 2131296372; // aapt resource value: 0x7f090023 public const int showCustom = 2131296291; // aapt resource value: 0x7f090024 public const int showHome = 2131296292; // aapt resource value: 0x7f090025 public const int showTitle = 2131296293; // aapt resource value: 0x7f0900c6 public const int sliding_tabs = 2131296454; // aapt resource value: 0x7f09008b public const int smallLabel = 2131296395; // aapt resource value: 0x7f090092 public const int snackbar_action = 2131296402; // aapt resource value: 0x7f090091 public const int snackbar_text = 2131296401; // aapt resource value: 0x7f090043 public const int snap = 2131296323; // aapt resource value: 0x7f090064 public const int spacer = 2131296356; // aapt resource value: 0x7f090008 public const int split_action_bar = 2131296264; // aapt resource value: 0x7f09002a public const int src_atop = 2131296298; // aapt resource value: 0x7f09002b public const int src_in = 2131296299; // aapt resource value: 0x7f09002c public const int src_over = 2131296300; // aapt resource value: 0x7f09004b public const int start = 2131296331; // aapt resource value: 0x7f0900b8 public const int status_bar_latest_event_content = 2131296440; // aapt resource value: 0x7f090076 public const int submenuarrow = 2131296374; // aapt resource value: 0x7f090087 public const int submit_area = 2131296391; // aapt resource value: 0x7f09001f public const int tabMode = 2131296287; // aapt resource value: 0x7f090019 public const int tag_transition_group = 2131296281; // aapt resource value: 0x7f09001a public const int text = 2131296282; // aapt resource value: 0x7f09001b public const int text2 = 2131296283; // aapt resource value: 0x7f09006a public const int textSpacerNoButtons = 2131296362; // aapt resource value: 0x7f090069 public const int textSpacerNoTitle = 2131296361; // aapt resource value: 0x7f090098 public const int text_input_password_toggle = 2131296408; // aapt resource value: 0x7f090014 public const int textinput_counter = 2131296276; // aapt resource value: 0x7f090015 public const int textinput_error = 2131296277; // aapt resource value: 0x7f0900be public const int time = 2131296446; // aapt resource value: 0x7f09001c public const int title = 2131296284; // aapt resource value: 0x7f090071 public const int titleDividerNoCustom = 2131296369; // aapt resource value: 0x7f09006f public const int title_template = 2131296367; // aapt resource value: 0x7f0900c7 public const int toolbar = 2131296455; // aapt resource value: 0x7f09003e public const int top = 2131296318; // aapt resource value: 0x7f09006e public const int topPanel = 2131296366; // aapt resource value: 0x7f09008f public const int touch_outside = 2131296399; // aapt resource value: 0x7f09000f public const int transition_current_scene = 2131296271; // aapt resource value: 0x7f090010 public const int transition_layout_save = 2131296272; // aapt resource value: 0x7f090011 public const int transition_position = 2131296273; // aapt resource value: 0x7f090012 public const int transition_scene_layoutid_cache = 2131296274; // aapt resource value: 0x7f090013 public const int transition_transform = 2131296275; // aapt resource value: 0x7f09002d public const int uniform = 2131296301; // aapt resource value: 0x7f090009 public const int up = 2131296265; // aapt resource value: 0x7f090026 public const int useLogo = 2131296294; // aapt resource value: 0x7f090016 public const int view_offset_helper = 2131296278; // aapt resource value: 0x7f0900c9 public const int visible = 2131296457; // aapt resource value: 0x7f0900ab public const int volume_item_container = 2131296427; // aapt resource value: 0x7f09003c public const int withText = 2131296316; // aapt resource value: 0x7f09002e public const int wrap_content = 2131296302; static Id() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } private Id() { } } public partial class Integer { // aapt resource value: 0x7f0b0003 public const int abc_config_activityDefaultDur = 2131427331; // aapt resource value: 0x7f0b0004 public const int abc_config_activityShortDur = 2131427332; // aapt resource value: 0x7f0b0008 public const int app_bar_elevation_anim_duration = 2131427336; // aapt resource value: 0x7f0b0009 public const int bottom_sheet_slide_duration = 2131427337; // aapt resource value: 0x7f0b0005 public const int cancel_button_image_alpha = 2131427333; // aapt resource value: 0x7f0b0006 public const int config_tooltipAnimTime = 2131427334; // aapt resource value: 0x7f0b0007 public const int design_snackbar_text_max_lines = 2131427335; // aapt resource value: 0x7f0b000a public const int hide_password_duration = 2131427338; // aapt resource value: 0x7f0b0000 public const int mr_controller_volume_group_list_animation_duration_ms = 2131427328; // aapt resource value: 0x7f0b0001 public const int mr_controller_volume_group_list_fade_in_duration_ms = 2131427329; // aapt resource value: 0x7f0b0002 public const int mr_controller_volume_group_list_fade_out_duration_ms = 2131427330; // aapt resource value: 0x7f0b000b public const int show_password_duration = 2131427339; // aapt resource value: 0x7f0b000c public const int status_bar_notification_info_maxnum = 2131427340; static Integer() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } private Integer() { } } public partial class Interpolator { // aapt resource value: 0x7f070000 public const int mr_fast_out_slow_in = 2131165184; // aapt resource value: 0x7f070001 public const int mr_linear_out_slow_in = 2131165185; static Interpolator() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } private Interpolator() { } } public partial class Layout { // aapt resource value: 0x7f040000 public const int abc_action_bar_title_item = 2130968576; // aapt resource value: 0x7f040001 public const int abc_action_bar_up_container = 2130968577; // aapt resource value: 0x7f040002 public const int abc_action_menu_item_layout = 2130968578; // aapt resource value: 0x7f040003 public const int abc_action_menu_layout = 2130968579; // aapt resource value: 0x7f040004 public const int abc_action_mode_bar = 2130968580; // aapt resource value: 0x7f040005 public const int abc_action_mode_close_item_material = 2130968581; // aapt resource value: 0x7f040006 public const int abc_activity_chooser_view = 2130968582; // aapt resource value: 0x7f040007 public const int abc_activity_chooser_view_list_item = 2130968583; // aapt resource value: 0x7f040008 public const int abc_alert_dialog_button_bar_material = 2130968584; // aapt resource value: 0x7f040009 public const int abc_alert_dialog_material = 2130968585; // aapt resource value: 0x7f04000a public const int abc_alert_dialog_title_material = 2130968586; // aapt resource value: 0x7f04000b public const int abc_dialog_title_material = 2130968587; // aapt resource value: 0x7f04000c public const int abc_expanded_menu_layout = 2130968588; // aapt resource value: 0x7f04000d public const int abc_list_menu_item_checkbox = 2130968589; // aapt resource value: 0x7f04000e public const int abc_list_menu_item_icon = 2130968590; // aapt resource value: 0x7f04000f public const int abc_list_menu_item_layout = 2130968591; // aapt resource value: 0x7f040010 public const int abc_list_menu_item_radio = 2130968592; // aapt resource value: 0x7f040011 public const int abc_popup_menu_header_item_layout = 2130968593; // aapt resource value: 0x7f040012 public const int abc_popup_menu_item_layout = 2130968594; // aapt resource value: 0x7f040013 public const int abc_screen_content_include = 2130968595; // aapt resource value: 0x7f040014 public const int abc_screen_simple = 2130968596; // aapt resource value: 0x7f040015 public const int abc_screen_simple_overlay_action_mode = 2130968597; // aapt resource value: 0x7f040016 public const int abc_screen_toolbar = 2130968598; // aapt resource value: 0x7f040017 public const int abc_search_dropdown_item_icons_2line = 2130968599; // aapt resource value: 0x7f040018 public const int abc_search_view = 2130968600; // aapt resource value: 0x7f040019 public const int abc_select_dialog_material = 2130968601; // aapt resource value: 0x7f04001a public const int design_bottom_navigation_item = 2130968602; // aapt resource value: 0x7f04001b public const int design_bottom_sheet_dialog = 2130968603; // aapt resource value: 0x7f04001c public const int design_layout_snackbar = 2130968604; // aapt resource value: 0x7f04001d public const int design_layout_snackbar_include = 2130968605; // aapt resource value: 0x7f04001e public const int design_layout_tab_icon = 2130968606; // aapt resource value: 0x7f04001f public const int design_layout_tab_text = 2130968607; // aapt resource value: 0x7f040020 public const int design_menu_item_action_area = 2130968608; // aapt resource value: 0x7f040021 public const int design_navigation_item = 2130968609; // aapt resource value: 0x7f040022 public const int design_navigation_item_header = 2130968610; // aapt resource value: 0x7f040023 public const int design_navigation_item_separator = 2130968611; // aapt resource value: 0x7f040024 public const int design_navigation_item_subheader = 2130968612; // aapt resource value: 0x7f040025 public const int design_navigation_menu = 2130968613; // aapt resource value: 0x7f040026 public const int design_navigation_menu_item = 2130968614; // aapt resource value: 0x7f040027 public const int design_text_input_password_icon = 2130968615; // aapt resource value: 0x7f040028 public const int mr_chooser_dialog = 2130968616; // aapt resource value: 0x7f040029 public const int mr_chooser_list_item = 2130968617; // aapt resource value: 0x7f04002a public const int mr_controller_material_dialog_b = 2130968618; // aapt resource value: 0x7f04002b public const int mr_controller_volume_item = 2130968619; // aapt resource value: 0x7f04002c public const int mr_playback_control = 2130968620; // aapt resource value: 0x7f04002d public const int mr_volume_control = 2130968621; // aapt resource value: 0x7f04002e public const int notification_action = 2130968622; // aapt resource value: 0x7f04002f public const int notification_action_tombstone = 2130968623; // aapt resource value: 0x7f040030 public const int notification_media_action = 2130968624; // aapt resource value: 0x7f040031 public const int notification_media_cancel_action = 2130968625; // aapt resource value: 0x7f040032 public const int notification_template_big_media = 2130968626; // aapt resource value: 0x7f040033 public const int notification_template_big_media_custom = 2130968627; // aapt resource value: 0x7f040034 public const int notification_template_big_media_narrow = 2130968628; // aapt resource value: 0x7f040035 public const int notification_template_big_media_narrow_custom = 2130968629; // aapt resource value: 0x7f040036 public const int notification_template_custom_big = 2130968630; // aapt resource value: 0x7f040037 public const int notification_template_icon_group = 2130968631; // aapt resource value: 0x7f040038 public const int notification_template_lines_media = 2130968632; // aapt resource value: 0x7f040039 public const int notification_template_media = 2130968633; // aapt resource value: 0x7f04003a public const int notification_template_media_custom = 2130968634; // aapt resource value: 0x7f04003b public const int notification_template_part_chronometer = 2130968635; // aapt resource value: 0x7f04003c public const int notification_template_part_time = 2130968636; // aapt resource value: 0x7f04003d public const int select_dialog_item_material = 2130968637; // aapt resource value: 0x7f04003e public const int select_dialog_multichoice_material = 2130968638; // aapt resource value: 0x7f04003f public const int select_dialog_singlechoice_material = 2130968639; // aapt resource value: 0x7f040040 public const int support_simple_spinner_dropdown_item = 2130968640; // aapt resource value: 0x7f040041 public const int Tabbar = 2130968641; // aapt resource value: 0x7f040042 public const int Toolbar = 2130968642; // aapt resource value: 0x7f040043 public const int tooltip = 2130968643; static Layout() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } private Layout() { } } public partial class Mipmap { // aapt resource value: 0x7f030000 public const int icon = 2130903040; // aapt resource value: 0x7f030001 public const int icon_round = 2130903041; // aapt resource value: 0x7f030002 public const int launcher_foreground = 2130903042; static Mipmap() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } private Mipmap() { } } public partial class String { // aapt resource value: 0x7f0a0015 public const int abc_action_bar_home_description = 2131361813; // aapt resource value: 0x7f0a0016 public const int abc_action_bar_up_description = 2131361814; // aapt resource value: 0x7f0a0017 public const int abc_action_menu_overflow_description = 2131361815; // aapt resource value: 0x7f0a0018 public const int abc_action_mode_done = 2131361816; // aapt resource value: 0x7f0a0019 public const int abc_activity_chooser_view_see_all = 2131361817; // aapt resource value: 0x7f0a001a public const int abc_activitychooserview_choose_application = 2131361818; // aapt resource value: 0x7f0a001b public const int abc_capital_off = 2131361819; // aapt resource value: 0x7f0a001c public const int abc_capital_on = 2131361820; // aapt resource value: 0x7f0a0027 public const int abc_font_family_body_1_material = 2131361831; // aapt resource value: 0x7f0a0028 public const int abc_font_family_body_2_material = 2131361832; // aapt resource value: 0x7f0a0029 public const int abc_font_family_button_material = 2131361833; // aapt resource value: 0x7f0a002a public const int abc_font_family_caption_material = 2131361834; // aapt resource value: 0x7f0a002b public const int abc_font_family_display_1_material = 2131361835; // aapt resource value: 0x7f0a002c public const int abc_font_family_display_2_material = 2131361836; // aapt resource value: 0x7f0a002d public const int abc_font_family_display_3_material = 2131361837; // aapt resource value: 0x7f0a002e public const int abc_font_family_display_4_material = 2131361838; // aapt resource value: 0x7f0a002f public const int abc_font_family_headline_material = 2131361839; // aapt resource value: 0x7f0a0030 public const int abc_font_family_menu_material = 2131361840; // aapt resource value: 0x7f0a0031 public const int abc_font_family_subhead_material = 2131361841; // aapt resource value: 0x7f0a0032 public const int abc_font_family_title_material = 2131361842; // aapt resource value: 0x7f0a001d public const int abc_search_hint = 2131361821; // aapt resource value: 0x7f0a001e public const int abc_searchview_description_clear = 2131361822; // aapt resource value: 0x7f0a001f public const int abc_searchview_description_query = 2131361823; // aapt resource value: 0x7f0a0020 public const int abc_searchview_description_search = 2131361824; // aapt resource value: 0x7f0a0021 public const int abc_searchview_description_submit = 2131361825; // aapt resource value: 0x7f0a0022 public const int abc_searchview_description_voice = 2131361826; // aapt resource value: 0x7f0a0023 public const int abc_shareactionprovider_share_with = 2131361827; // aapt resource value: 0x7f0a0024 public const int abc_shareactionprovider_share_with_application = 2131361828; // aapt resource value: 0x7f0a0025 public const int abc_toolbar_collapse_description = 2131361829; // aapt resource value: 0x7f0a0033 public const int appbar_scrolling_view_behavior = 2131361843; // aapt resource value: 0x7f0a0034 public const int bottom_sheet_behavior = 2131361844; // aapt resource value: 0x7f0a0035 public const int character_counter_pattern = 2131361845; // aapt resource value: 0x7f0a0000 public const int mr_button_content_description = 2131361792; // aapt resource value: 0x7f0a0001 public const int mr_cast_button_connected = 2131361793; // aapt resource value: 0x7f0a0002 public const int mr_cast_button_connecting = 2131361794; // aapt resource value: 0x7f0a0003 public const int mr_cast_button_disconnected = 2131361795; // aapt resource value: 0x7f0a0004 public const int mr_chooser_searching = 2131361796; // aapt resource value: 0x7f0a0005 public const int mr_chooser_title = 2131361797; // aapt resource value: 0x7f0a0006 public const int mr_controller_album_art = 2131361798; // aapt resource value: 0x7f0a0007 public const int mr_controller_casting_screen = 2131361799; // aapt resource value: 0x7f0a0008 public const int mr_controller_close_description = 2131361800; // aapt resource value: 0x7f0a0009 public const int mr_controller_collapse_group = 2131361801; // aapt resource value: 0x7f0a000a public const int mr_controller_disconnect = 2131361802; // aapt resource value: 0x7f0a000b public const int mr_controller_expand_group = 2131361803; // aapt resource value: 0x7f0a000c public const int mr_controller_no_info_available = 2131361804; // aapt resource value: 0x7f0a000d public const int mr_controller_no_media_selected = 2131361805; // aapt resource value: 0x7f0a000e public const int mr_controller_pause = 2131361806; // aapt resource value: 0x7f0a000f public const int mr_controller_play = 2131361807; // aapt resource value: 0x7f0a0010 public const int mr_controller_stop = 2131361808; // aapt resource value: 0x7f0a0011 public const int mr_controller_stop_casting = 2131361809; // aapt resource value: 0x7f0a0012 public const int mr_controller_volume_slider = 2131361810; // aapt resource value: 0x7f0a0013 public const int mr_system_route_name = 2131361811; // aapt resource value: 0x7f0a0014 public const int mr_user_route_category_name = 2131361812; // aapt resource value: 0x7f0a0036 public const int password_toggle_content_description = 2131361846; // aapt resource value: 0x7f0a0037 public const int path_password_eye = 2131361847; // aapt resource value: 0x7f0a0038 public const int path_password_eye_mask_strike_through = 2131361848; // aapt resource value: 0x7f0a0039 public const int path_password_eye_mask_visible = 2131361849; // aapt resource value: 0x7f0a003a public const int path_password_strike_through = 2131361850; // aapt resource value: 0x7f0a0026 public const int search_menu_title = 2131361830; // aapt resource value: 0x7f0a003b public const int status_bar_notification_info_overflow = 2131361851; static String() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } private String() { } } public partial class Style { // aapt resource value: 0x7f0c00a4 public const int AlertDialog_AppCompat = 2131493028; // aapt resource value: 0x7f0c00a5 public const int AlertDialog_AppCompat_Light = 2131493029; // aapt resource value: 0x7f0c00a6 public const int Animation_AppCompat_Dialog = 2131493030; // aapt resource value: 0x7f0c00a7 public const int Animation_AppCompat_DropDownUp = 2131493031; // aapt resource value: 0x7f0c00a8 public const int Animation_AppCompat_Tooltip = 2131493032; // aapt resource value: 0x7f0c016e public const int Animation_Design_BottomSheetDialog = 2131493230; // aapt resource value: 0x7f0c0191 public const int AppCompatDialogStyle = 2131493265; // aapt resource value: 0x7f0c00a9 public const int Base_AlertDialog_AppCompat = 2131493033; // aapt resource value: 0x7f0c00aa public const int Base_AlertDialog_AppCompat_Light = 2131493034; // aapt resource value: 0x7f0c00ab public const int Base_Animation_AppCompat_Dialog = 2131493035; // aapt resource value: 0x7f0c00ac public const int Base_Animation_AppCompat_DropDownUp = 2131493036; // aapt resource value: 0x7f0c00ad public const int Base_Animation_AppCompat_Tooltip = 2131493037; // aapt resource value: 0x7f0c000c public const int Base_CardView = 2131492876; // aapt resource value: 0x7f0c00ae public const int Base_DialogWindowTitle_AppCompat = 2131493038; // aapt resource value: 0x7f0c00af public const int Base_DialogWindowTitleBackground_AppCompat = 2131493039; // aapt resource value: 0x7f0c0048 public const int Base_TextAppearance_AppCompat = 2131492936; // aapt resource value: 0x7f0c0049 public const int Base_TextAppearance_AppCompat_Body1 = 2131492937; // aapt resource value: 0x7f0c004a public const int Base_TextAppearance_AppCompat_Body2 = 2131492938; // aapt resource value: 0x7f0c0036 public const int Base_TextAppearance_AppCompat_Button = 2131492918; // aapt resource value: 0x7f0c004b public const int Base_TextAppearance_AppCompat_Caption = 2131492939; // aapt resource value: 0x7f0c004c public const int Base_TextAppearance_AppCompat_Display1 = 2131492940; // aapt resource value: 0x7f0c004d public const int Base_TextAppearance_AppCompat_Display2 = 2131492941; // aapt resource value: 0x7f0c004e public const int Base_TextAppearance_AppCompat_Display3 = 2131492942; // aapt resource value: 0x7f0c004f public const int Base_TextAppearance_AppCompat_Display4 = 2131492943; // aapt resource value: 0x7f0c0050 public const int Base_TextAppearance_AppCompat_Headline = 2131492944; // aapt resource value: 0x7f0c001a public const int Base_TextAppearance_AppCompat_Inverse = 2131492890; // aapt resource value: 0x7f0c0051 public const int Base_TextAppearance_AppCompat_Large = 2131492945; // aapt resource value: 0x7f0c001b public const int Base_TextAppearance_AppCompat_Large_Inverse = 2131492891; // aapt resource value: 0x7f0c0052 public const int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 2131492946; // aapt resource value: 0x7f0c0053 public const int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 2131492947; // aapt resource value: 0x7f0c0054 public const int Base_TextAppearance_AppCompat_Medium = 2131492948; // aapt resource value: 0x7f0c001c public const int Base_TextAppearance_AppCompat_Medium_Inverse = 2131492892; // aapt resource value: 0x7f0c0055 public const int Base_TextAppearance_AppCompat_Menu = 2131492949; // aapt resource value: 0x7f0c00b0 public const int Base_TextAppearance_AppCompat_SearchResult = 2131493040; // aapt resource value: 0x7f0c0056 public const int Base_TextAppearance_AppCompat_SearchResult_Subtitle = 2131492950; // aapt resource value: 0x7f0c0057 public const int Base_TextAppearance_AppCompat_SearchResult_Title = 2131492951; // aapt resource value: 0x7f0c0058 public const int Base_TextAppearance_AppCompat_Small = 2131492952; // aapt resource value: 0x7f0c001d public const int Base_TextAppearance_AppCompat_Small_Inverse = 2131492893; // aapt resource value: 0x7f0c0059 public const int Base_TextAppearance_AppCompat_Subhead = 2131492953; // aapt resource value: 0x7f0c001e public const int Base_TextAppearance_AppCompat_Subhead_Inverse = 2131492894; // aapt resource value: 0x7f0c005a public const int Base_TextAppearance_AppCompat_Title = 2131492954; // aapt resource value: 0x7f0c001f public const int Base_TextAppearance_AppCompat_Title_Inverse = 2131492895; // aapt resource value: 0x7f0c00b1 public const int Base_TextAppearance_AppCompat_Tooltip = 2131493041; // aapt resource value: 0x7f0c0095 public const int Base_TextAppearance_AppCompat_Widget_ActionBar_Menu = 2131493013; // aapt resource value: 0x7f0c005b public const int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 2131492955; // aapt resource value: 0x7f0c005c public const int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 2131492956; // aapt resource value: 0x7f0c005d public const int Base_TextAppearance_AppCompat_Widget_ActionBar_Title = 2131492957; // aapt resource value: 0x7f0c005e public const int Base_TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 2131492958; // aapt resource value: 0x7f0c005f public const int Base_TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 2131492959; // aapt resource value: 0x7f0c0060 public const int Base_TextAppearance_AppCompat_Widget_ActionMode_Title = 2131492960; // aapt resource value: 0x7f0c0061 public const int Base_TextAppearance_AppCompat_Widget_Button = 2131492961; // aapt resource value: 0x7f0c009c public const int Base_TextAppearance_AppCompat_Widget_Button_Borderless_Colored = 2131493020; // aapt resource value: 0x7f0c009d public const int Base_TextAppearance_AppCompat_Widget_Button_Colored = 2131493021; // aapt resource value: 0x7f0c0096 public const int Base_TextAppearance_AppCompat_Widget_Button_Inverse = 2131493014; // aapt resource value: 0x7f0c00b2 public const int Base_TextAppearance_AppCompat_Widget_DropDownItem = 2131493042; // aapt resource value: 0x7f0c0062 public const int Base_TextAppearance_AppCompat_Widget_PopupMenu_Header = 2131492962; // aapt resource value: 0x7f0c0063 public const int Base_TextAppearance_AppCompat_Widget_PopupMenu_Large = 2131492963; // aapt resource value: 0x7f0c0064 public const int Base_TextAppearance_AppCompat_Widget_PopupMenu_Small = 2131492964; // aapt resource value: 0x7f0c0065 public const int Base_TextAppearance_AppCompat_Widget_Switch = 2131492965; // aapt resource value: 0x7f0c0066 public const int Base_TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 2131492966; // aapt resource value: 0x7f0c00b3 public const int Base_TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 2131493043; // aapt resource value: 0x7f0c0067 public const int Base_TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 2131492967; // aapt resource value: 0x7f0c0068 public const int Base_TextAppearance_Widget_AppCompat_Toolbar_Title = 2131492968; // aapt resource value: 0x7f0c0069 public const int Base_Theme_AppCompat = 2131492969; // aapt resource value: 0x7f0c00b4 public const int Base_Theme_AppCompat_CompactMenu = 2131493044; // aapt resource value: 0x7f0c0020 public const int Base_Theme_AppCompat_Dialog = 2131492896; // aapt resource value: 0x7f0c0021 public const int Base_Theme_AppCompat_Dialog_Alert = 2131492897; // aapt resource value: 0x7f0c00b5 public const int Base_Theme_AppCompat_Dialog_FixedSize = 2131493045; // aapt resource value: 0x7f0c0022 public const int Base_Theme_AppCompat_Dialog_MinWidth = 2131492898; // aapt resource value: 0x7f0c0010 public const int Base_Theme_AppCompat_DialogWhenLarge = 2131492880; // aapt resource value: 0x7f0c006a public const int Base_Theme_AppCompat_Light = 2131492970; // aapt resource value: 0x7f0c00b6 public const int Base_Theme_AppCompat_Light_DarkActionBar = 2131493046; // aapt resource value: 0x7f0c0023 public const int Base_Theme_AppCompat_Light_Dialog = 2131492899; // aapt resource value: 0x7f0c0024 public const int Base_Theme_AppCompat_Light_Dialog_Alert = 2131492900; // aapt resource value: 0x7f0c00b7 public const int Base_Theme_AppCompat_Light_Dialog_FixedSize = 2131493047; // aapt resource value: 0x7f0c0025 public const int Base_Theme_AppCompat_Light_Dialog_MinWidth = 2131492901; // aapt resource value: 0x7f0c0011 public const int Base_Theme_AppCompat_Light_DialogWhenLarge = 2131492881; // aapt resource value: 0x7f0c00b8 public const int Base_ThemeOverlay_AppCompat = 2131493048; // aapt resource value: 0x7f0c00b9 public const int Base_ThemeOverlay_AppCompat_ActionBar = 2131493049; // aapt resource value: 0x7f0c00ba public const int Base_ThemeOverlay_AppCompat_Dark = 2131493050; // aapt resource value: 0x7f0c00bb public const int Base_ThemeOverlay_AppCompat_Dark_ActionBar = 2131493051; // aapt resource value: 0x7f0c0026 public const int Base_ThemeOverlay_AppCompat_Dialog = 2131492902; // aapt resource value: 0x7f0c0027 public const int Base_ThemeOverlay_AppCompat_Dialog_Alert = 2131492903; // aapt resource value: 0x7f0c00bc public const int Base_ThemeOverlay_AppCompat_Light = 2131493052; // aapt resource value: 0x7f0c0028 public const int Base_V11_Theme_AppCompat_Dialog = 2131492904; // aapt resource value: 0x7f0c0029 public const int Base_V11_Theme_AppCompat_Light_Dialog = 2131492905; // aapt resource value: 0x7f0c002a public const int Base_V11_ThemeOverlay_AppCompat_Dialog = 2131492906; // aapt resource value: 0x7f0c0032 public const int Base_V12_Widget_AppCompat_AutoCompleteTextView = 2131492914; // aapt resource value: 0x7f0c0033 public const int Base_V12_Widget_AppCompat_EditText = 2131492915; // aapt resource value: 0x7f0c016f public const int Base_V14_Widget_Design_AppBarLayout = 2131493231; // aapt resource value: 0x7f0c006b public const int Base_V21_Theme_AppCompat = 2131492971; // aapt resource value: 0x7f0c006c public const int Base_V21_Theme_AppCompat_Dialog = 2131492972; // aapt resource value: 0x7f0c006d public const int Base_V21_Theme_AppCompat_Light = 2131492973; // aapt resource value: 0x7f0c006e public const int Base_V21_Theme_AppCompat_Light_Dialog = 2131492974; // aapt resource value: 0x7f0c006f public const int Base_V21_ThemeOverlay_AppCompat_Dialog = 2131492975; // aapt resource value: 0x7f0c016b public const int Base_V21_Widget_Design_AppBarLayout = 2131493227; // aapt resource value: 0x7f0c0093 public const int Base_V22_Theme_AppCompat = 2131493011; // aapt resource value: 0x7f0c0094 public const int Base_V22_Theme_AppCompat_Light = 2131493012; // aapt resource value: 0x7f0c0097 public const int Base_V23_Theme_AppCompat = 2131493015; // aapt resource value: 0x7f0c0098 public const int Base_V23_Theme_AppCompat_Light = 2131493016; // aapt resource value: 0x7f0c00a0 public const int Base_V26_Theme_AppCompat = 2131493024; // aapt resource value: 0x7f0c00a1 public const int Base_V26_Theme_AppCompat_Light = 2131493025; // aapt resource value: 0x7f0c00a2 public const int Base_V26_Widget_AppCompat_Toolbar = 2131493026; // aapt resource value: 0x7f0c016d public const int Base_V26_Widget_Design_AppBarLayout = 2131493229; // aapt resource value: 0x7f0c00bd public const int Base_V7_Theme_AppCompat = 2131493053; // aapt resource value: 0x7f0c00be public const int Base_V7_Theme_AppCompat_Dialog = 2131493054; // aapt resource value: 0x7f0c00bf public const int Base_V7_Theme_AppCompat_Light = 2131493055; // aapt resource value: 0x7f0c00c0 public const int Base_V7_Theme_AppCompat_Light_Dialog = 2131493056; // aapt resource value: 0x7f0c00c1 public const int Base_V7_ThemeOverlay_AppCompat_Dialog = 2131493057; // aapt resource value: 0x7f0c00c2 public const int Base_V7_Widget_AppCompat_AutoCompleteTextView = 2131493058; // aapt resource value: 0x7f0c00c3 public const int Base_V7_Widget_AppCompat_EditText = 2131493059; // aapt resource value: 0x7f0c00c4 public const int Base_V7_Widget_AppCompat_Toolbar = 2131493060; // aapt resource value: 0x7f0c00c5 public const int Base_Widget_AppCompat_ActionBar = 2131493061; // aapt resource value: 0x7f0c00c6 public const int Base_Widget_AppCompat_ActionBar_Solid = 2131493062; // aapt resource value: 0x7f0c00c7 public const int Base_Widget_AppCompat_ActionBar_TabBar = 2131493063; // aapt resource value: 0x7f0c0070 public const int Base_Widget_AppCompat_ActionBar_TabText = 2131492976; // aapt resource value: 0x7f0c0071 public const int Base_Widget_AppCompat_ActionBar_TabView = 2131492977; // aapt resource value: 0x7f0c0072 public const int Base_Widget_AppCompat_ActionButton = 2131492978; // aapt resource value: 0x7f0c0073 public const int Base_Widget_AppCompat_ActionButton_CloseMode = 2131492979; // aapt resource value: 0x7f0c0074 public const int Base_Widget_AppCompat_ActionButton_Overflow = 2131492980; // aapt resource value: 0x7f0c00c8 public const int Base_Widget_AppCompat_ActionMode = 2131493064; // aapt resource value: 0x7f0c00c9 public const int Base_Widget_AppCompat_ActivityChooserView = 2131493065; // aapt resource value: 0x7f0c0034 public const int Base_Widget_AppCompat_AutoCompleteTextView = 2131492916; // aapt resource value: 0x7f0c0075 public const int Base_Widget_AppCompat_Button = 2131492981; // aapt resource value: 0x7f0c0076 public const int Base_Widget_AppCompat_Button_Borderless = 2131492982; // aapt resource value: 0x7f0c0077 public const int Base_Widget_AppCompat_Button_Borderless_Colored = 2131492983; // aapt resource value: 0x7f0c00ca public const int Base_Widget_AppCompat_Button_ButtonBar_AlertDialog = 2131493066; // aapt resource value: 0x7f0c0099 public const int Base_Widget_AppCompat_Button_Colored = 2131493017; // aapt resource value: 0x7f0c0078 public const int Base_Widget_AppCompat_Button_Small = 2131492984; // aapt resource value: 0x7f0c0079 public const int Base_Widget_AppCompat_ButtonBar = 2131492985; // aapt resource value: 0x7f0c00cb public const int Base_Widget_AppCompat_ButtonBar_AlertDialog = 2131493067; // aapt resource value: 0x7f0c007a public const int Base_Widget_AppCompat_CompoundButton_CheckBox = 2131492986; // aapt resource value: 0x7f0c007b public const int Base_Widget_AppCompat_CompoundButton_RadioButton = 2131492987; // aapt resource value: 0x7f0c00cc public const int Base_Widget_AppCompat_CompoundButton_Switch = 2131493068; // aapt resource value: 0x7f0c000f public const int Base_Widget_AppCompat_DrawerArrowToggle = 2131492879; // aapt resource value: 0x7f0c00cd public const int Base_Widget_AppCompat_DrawerArrowToggle_Common = 2131493069; // aapt resource value: 0x7f0c007c public const int Base_Widget_AppCompat_DropDownItem_Spinner = 2131492988; // aapt resource value: 0x7f0c0035 public const int Base_Widget_AppCompat_EditText = 2131492917; // aapt resource value: 0x7f0c007d public const int Base_Widget_AppCompat_ImageButton = 2131492989; // aapt resource value: 0x7f0c00ce public const int Base_Widget_AppCompat_Light_ActionBar = 2131493070; // aapt resource value: 0x7f0c00cf public const int Base_Widget_AppCompat_Light_ActionBar_Solid = 2131493071; // aapt resource value: 0x7f0c00d0 public const int Base_Widget_AppCompat_Light_ActionBar_TabBar = 2131493072; // aapt resource value: 0x7f0c007e public const int Base_Widget_AppCompat_Light_ActionBar_TabText = 2131492990; // aapt resource value: 0x7f0c007f public const int Base_Widget_AppCompat_Light_ActionBar_TabText_Inverse = 2131492991; // aapt resource value: 0x7f0c0080 public const int Base_Widget_AppCompat_Light_ActionBar_TabView = 2131492992; // aapt resource value: 0x7f0c0081 public const int Base_Widget_AppCompat_Light_PopupMenu = 2131492993; // aapt resource value: 0x7f0c0082 public const int Base_Widget_AppCompat_Light_PopupMenu_Overflow = 2131492994; // aapt resource value: 0x7f0c00d1 public const int Base_Widget_AppCompat_ListMenuView = 2131493073; // aapt resource value: 0x7f0c0083 public const int Base_Widget_AppCompat_ListPopupWindow = 2131492995; // aapt resource value: 0x7f0c0084 public const int Base_Widget_AppCompat_ListView = 2131492996; // aapt resource value: 0x7f0c0085 public const int Base_Widget_AppCompat_ListView_DropDown = 2131492997; // aapt resource value: 0x7f0c0086 public const int Base_Widget_AppCompat_ListView_Menu = 2131492998; // aapt resource value: 0x7f0c0087 public const int Base_Widget_AppCompat_PopupMenu = 2131492999; // aapt resource value: 0x7f0c0088 public const int Base_Widget_AppCompat_PopupMenu_Overflow = 2131493000; // aapt resource value: 0x7f0c00d2 public const int Base_Widget_AppCompat_PopupWindow = 2131493074; // aapt resource value: 0x7f0c002b public const int Base_Widget_AppCompat_ProgressBar = 2131492907; // aapt resource value: 0x7f0c002c public const int Base_Widget_AppCompat_ProgressBar_Horizontal = 2131492908; // aapt resource value: 0x7f0c0089 public const int Base_Widget_AppCompat_RatingBar = 2131493001; // aapt resource value: 0x7f0c009a public const int Base_Widget_AppCompat_RatingBar_Indicator = 2131493018; // aapt resource value: 0x7f0c009b public const int Base_Widget_AppCompat_RatingBar_Small = 2131493019; // aapt resource value: 0x7f0c00d3 public const int Base_Widget_AppCompat_SearchView = 2131493075; // aapt resource value: 0x7f0c00d4 public const int Base_Widget_AppCompat_SearchView_ActionBar = 2131493076; // aapt resource value: 0x7f0c008a public const int Base_Widget_AppCompat_SeekBar = 2131493002; // aapt resource value: 0x7f0c00d5 public const int Base_Widget_AppCompat_SeekBar_Discrete = 2131493077; // aapt resource value: 0x7f0c008b public const int Base_Widget_AppCompat_Spinner = 2131493003; // aapt resource value: 0x7f0c0012 public const int Base_Widget_AppCompat_Spinner_Underlined = 2131492882; // aapt resource value: 0x7f0c008c public const int Base_Widget_AppCompat_TextView_SpinnerItem = 2131493004; // aapt resource value: 0x7f0c00a3 public const int Base_Widget_AppCompat_Toolbar = 2131493027; // aapt resource value: 0x7f0c008d public const int Base_Widget_AppCompat_Toolbar_Button_Navigation = 2131493005; // aapt resource value: 0x7f0c016c public const int Base_Widget_Design_AppBarLayout = 2131493228; // aapt resource value: 0x7f0c0170 public const int Base_Widget_Design_TabLayout = 2131493232; // aapt resource value: 0x7f0c000b public const int CardView = 2131492875; // aapt resource value: 0x7f0c000d public const int CardView_Dark = 2131492877; // aapt resource value: 0x7f0c000e public const int CardView_Light = 2131492878; // aapt resource value: 0x7f0c018f public const int MainTheme = 2131493263; // aapt resource value: 0x7f0c0190 public const int MainTheme_Base = 2131493264; // aapt resource value: 0x7f0c002d public const int Platform_AppCompat = 2131492909; // aapt resource value: 0x7f0c002e public const int Platform_AppCompat_Light = 2131492910; // aapt resource value: 0x7f0c008e public const int Platform_ThemeOverlay_AppCompat = 2131493006; // aapt resource value: 0x7f0c008f public const int Platform_ThemeOverlay_AppCompat_Dark = 2131493007; // aapt resource value: 0x7f0c0090 public const int Platform_ThemeOverlay_AppCompat_Light = 2131493008; // aapt resource value: 0x7f0c002f public const int Platform_V11_AppCompat = 2131492911; // aapt resource value: 0x7f0c0030 public const int Platform_V11_AppCompat_Light = 2131492912; // aapt resource value: 0x7f0c0037 public const int Platform_V14_AppCompat = 2131492919; // aapt resource value: 0x7f0c0038 public const int Platform_V14_AppCompat_Light = 2131492920; // aapt resource value: 0x7f0c0091 public const int Platform_V21_AppCompat = 2131493009; // aapt resource value: 0x7f0c0092 public const int Platform_V21_AppCompat_Light = 2131493010; // aapt resource value: 0x7f0c009e public const int Platform_V25_AppCompat = 2131493022; // aapt resource value: 0x7f0c009f public const int Platform_V25_AppCompat_Light = 2131493023; // aapt resource value: 0x7f0c0031 public const int Platform_Widget_AppCompat_Spinner = 2131492913; // aapt resource value: 0x7f0c003a public const int RtlOverlay_DialogWindowTitle_AppCompat = 2131492922; // aapt resource value: 0x7f0c003b public const int RtlOverlay_Widget_AppCompat_ActionBar_TitleItem = 2131492923; // aapt resource value: 0x7f0c003c public const int RtlOverlay_Widget_AppCompat_DialogTitle_Icon = 2131492924; // aapt resource value: 0x7f0c003d public const int RtlOverlay_Widget_AppCompat_PopupMenuItem = 2131492925; // aapt resource value: 0x7f0c003e public const int RtlOverlay_Widget_AppCompat_PopupMenuItem_InternalGroup = 2131492926; // aapt resource value: 0x7f0c003f public const int RtlOverlay_Widget_AppCompat_PopupMenuItem_Text = 2131492927; // aapt resource value: 0x7f0c0040 public const int RtlOverlay_Widget_AppCompat_Search_DropDown = 2131492928; // aapt resource value: 0x7f0c0041 public const int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon1 = 2131492929; // aapt resource value: 0x7f0c0042 public const int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon2 = 2131492930; // aapt resource value: 0x7f0c0043 public const int RtlOverlay_Widget_AppCompat_Search_DropDown_Query = 2131492931; // aapt resource value: 0x7f0c0044 public const int RtlOverlay_Widget_AppCompat_Search_DropDown_Text = 2131492932; // aapt resource value: 0x7f0c0045 public const int RtlOverlay_Widget_AppCompat_SearchView_MagIcon = 2131492933; // aapt resource value: 0x7f0c0046 public const int RtlUnderlay_Widget_AppCompat_ActionButton = 2131492934; // aapt resource value: 0x7f0c0047 public const int RtlUnderlay_Widget_AppCompat_ActionButton_Overflow = 2131492935; // aapt resource value: 0x7f0c00d6 public const int TextAppearance_AppCompat = 2131493078; // aapt resource value: 0x7f0c00d7 public const int TextAppearance_AppCompat_Body1 = 2131493079; // aapt resource value: 0x7f0c00d8 public const int TextAppearance_AppCompat_Body2 = 2131493080; // aapt resource value: 0x7f0c00d9 public const int TextAppearance_AppCompat_Button = 2131493081; // aapt resource value: 0x7f0c00da public const int TextAppearance_AppCompat_Caption = 2131493082; // aapt resource value: 0x7f0c00db public const int TextAppearance_AppCompat_Display1 = 2131493083; // aapt resource value: 0x7f0c00dc public const int TextAppearance_AppCompat_Display2 = 2131493084; // aapt resource value: 0x7f0c00dd public const int TextAppearance_AppCompat_Display3 = 2131493085; // aapt resource value: 0x7f0c00de public const int TextAppearance_AppCompat_Display4 = 2131493086; // aapt resource value: 0x7f0c00df public const int TextAppearance_AppCompat_Headline = 2131493087; // aapt resource value: 0x7f0c00e0 public const int TextAppearance_AppCompat_Inverse = 2131493088; // aapt resource value: 0x7f0c00e1 public const int TextAppearance_AppCompat_Large = 2131493089; // aapt resource value: 0x7f0c00e2 public const int TextAppearance_AppCompat_Large_Inverse = 2131493090; // aapt resource value: 0x7f0c00e3 public const int TextAppearance_AppCompat_Light_SearchResult_Subtitle = 2131493091; // aapt resource value: 0x7f0c00e4 public const int TextAppearance_AppCompat_Light_SearchResult_Title = 2131493092; // aapt resource value: 0x7f0c00e5 public const int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 2131493093; // aapt resource value: 0x7f0c00e6 public const int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 2131493094; // aapt resource value: 0x7f0c00e7 public const int TextAppearance_AppCompat_Medium = 2131493095; // aapt resource value: 0x7f0c00e8 public const int TextAppearance_AppCompat_Medium_Inverse = 2131493096; // aapt resource value: 0x7f0c00e9 public const int TextAppearance_AppCompat_Menu = 2131493097; // aapt resource value: 0x7f0c00ea public const int TextAppearance_AppCompat_SearchResult_Subtitle = 2131493098; // aapt resource value: 0x7f0c00eb public const int TextAppearance_AppCompat_SearchResult_Title = 2131493099; // aapt resource value: 0x7f0c00ec public const int TextAppearance_AppCompat_Small = 2131493100; // aapt resource value: 0x7f0c00ed public const int TextAppearance_AppCompat_Small_Inverse = 2131493101; // aapt resource value: 0x7f0c00ee public const int TextAppearance_AppCompat_Subhead = 2131493102; // aapt resource value: 0x7f0c00ef public const int TextAppearance_AppCompat_Subhead_Inverse = 2131493103; // aapt resource value: 0x7f0c00f0 public const int TextAppearance_AppCompat_Title = 2131493104; // aapt resource value: 0x7f0c00f1 public const int TextAppearance_AppCompat_Title_Inverse = 2131493105; // aapt resource value: 0x7f0c0039 public const int TextAppearance_AppCompat_Tooltip = 2131492921; // aapt resource value: 0x7f0c00f2 public const int TextAppearance_AppCompat_Widget_ActionBar_Menu = 2131493106; // aapt resource value: 0x7f0c00f3 public const int TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 2131493107; // aapt resource value: 0x7f0c00f4 public const int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 2131493108; // aapt resource value: 0x7f0c00f5 public const int TextAppearance_AppCompat_Widget_ActionBar_Title = 2131493109; // aapt resource value: 0x7f0c00f6 public const int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 2131493110; // aapt resource value: 0x7f0c00f7 public const int TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 2131493111; // aapt resource value: 0x7f0c00f8 public const int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse = 2131493112; // aapt resource value: 0x7f0c00f9 public const int TextAppearance_AppCompat_Widget_ActionMode_Title = 2131493113; // aapt resource value: 0x7f0c00fa public const int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse = 2131493114; // aapt resource value: 0x7f0c00fb public const int TextAppearance_AppCompat_Widget_Button = 2131493115; // aapt resource value: 0x7f0c00fc public const int TextAppearance_AppCompat_Widget_Button_Borderless_Colored = 2131493116; // aapt resource value: 0x7f0c00fd public const int TextAppearance_AppCompat_Widget_Button_Colored = 2131493117; // aapt resource value: 0x7f0c00fe public const int TextAppearance_AppCompat_Widget_Button_Inverse = 2131493118; // aapt resource value: 0x7f0c00ff public const int TextAppearance_AppCompat_Widget_DropDownItem = 2131493119; // aapt resource value: 0x7f0c0100 public const int TextAppearance_AppCompat_Widget_PopupMenu_Header = 2131493120; // aapt resource value: 0x7f0c0101 public const int TextAppearance_AppCompat_Widget_PopupMenu_Large = 2131493121; // aapt resource value: 0x7f0c0102 public const int TextAppearance_AppCompat_Widget_PopupMenu_Small = 2131493122; // aapt resource value: 0x7f0c0103 public const int TextAppearance_AppCompat_Widget_Switch = 2131493123; // aapt resource value: 0x7f0c0104 public const int TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 2131493124; // aapt resource value: 0x7f0c0188 public const int TextAppearance_Compat_Notification = 2131493256; // aapt resource value: 0x7f0c0189 public const int TextAppearance_Compat_Notification_Info = 2131493257; // aapt resource value: 0x7f0c0165 public const int TextAppearance_Compat_Notification_Info_Media = 2131493221; // aapt resource value: 0x7f0c018e public const int TextAppearance_Compat_Notification_Line2 = 2131493262; // aapt resource value: 0x7f0c0169 public const int TextAppearance_Compat_Notification_Line2_Media = 2131493225; // aapt resource value: 0x7f0c0166 public const int TextAppearance_Compat_Notification_Media = 2131493222; // aapt resource value: 0x7f0c018a public const int TextAppearance_Compat_Notification_Time = 2131493258; // aapt resource value: 0x7f0c0167 public const int TextAppearance_Compat_Notification_Time_Media = 2131493223; // aapt resource value: 0x7f0c018b public const int TextAppearance_Compat_Notification_Title = 2131493259; // aapt resource value: 0x7f0c0168 public const int TextAppearance_Compat_Notification_Title_Media = 2131493224; // aapt resource value: 0x7f0c0171 public const int TextAppearance_Design_CollapsingToolbar_Expanded = 2131493233; // aapt resource value: 0x7f0c0172 public const int TextAppearance_Design_Counter = 2131493234; // aapt resource value: 0x7f0c0173 public const int TextAppearance_Design_Counter_Overflow = 2131493235; // aapt resource value: 0x7f0c0174 public const int TextAppearance_Design_Error = 2131493236; // aapt resource value: 0x7f0c0175 public const int TextAppearance_Design_Hint = 2131493237; // aapt resource value: 0x7f0c0176 public const int TextAppearance_Design_Snackbar_Message = 2131493238; // aapt resource value: 0x7f0c0177 public const int TextAppearance_Design_Tab = 2131493239; // aapt resource value: 0x7f0c0000 public const int TextAppearance_MediaRouter_PrimaryText = 2131492864; // aapt resource value: 0x7f0c0001 public const int TextAppearance_MediaRouter_SecondaryText = 2131492865; // aapt resource value: 0x7f0c0002 public const int TextAppearance_MediaRouter_Title = 2131492866; // aapt resource value: 0x7f0c0105 public const int TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 2131493125; // aapt resource value: 0x7f0c0106 public const int TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 2131493126; // aapt resource value: 0x7f0c0107 public const int TextAppearance_Widget_AppCompat_Toolbar_Title = 2131493127; // aapt resource value: 0x7f0c0108 public const int Theme_AppCompat = 2131493128; // aapt resource value: 0x7f0c0109 public const int Theme_AppCompat_CompactMenu = 2131493129; // aapt resource value: 0x7f0c0013 public const int Theme_AppCompat_DayNight = 2131492883; // aapt resource value: 0x7f0c0014 public const int Theme_AppCompat_DayNight_DarkActionBar = 2131492884; // aapt resource value: 0x7f0c0015 public const int Theme_AppCompat_DayNight_Dialog = 2131492885; // aapt resource value: 0x7f0c0016 public const int Theme_AppCompat_DayNight_Dialog_Alert = 2131492886; // aapt resource value: 0x7f0c0017 public const int Theme_AppCompat_DayNight_Dialog_MinWidth = 2131492887; // aapt resource value: 0x7f0c0018 public const int Theme_AppCompat_DayNight_DialogWhenLarge = 2131492888; // aapt resource value: 0x7f0c0019 public const int Theme_AppCompat_DayNight_NoActionBar = 2131492889; // aapt resource value: 0x7f0c010a public const int Theme_AppCompat_Dialog = 2131493130; // aapt resource value: 0x7f0c010b public const int Theme_AppCompat_Dialog_Alert = 2131493131; // aapt resource value: 0x7f0c010c public const int Theme_AppCompat_Dialog_MinWidth = 2131493132; // aapt resource value: 0x7f0c010d public const int Theme_AppCompat_DialogWhenLarge = 2131493133; // aapt resource value: 0x7f0c010e public const int Theme_AppCompat_Light = 2131493134; // aapt resource value: 0x7f0c010f public const int Theme_AppCompat_Light_DarkActionBar = 2131493135; // aapt resource value: 0x7f0c0110 public const int Theme_AppCompat_Light_Dialog = 2131493136; // aapt resource value: 0x7f0c0111 public const int Theme_AppCompat_Light_Dialog_Alert = 2131493137; // aapt resource value: 0x7f0c0112 public const int Theme_AppCompat_Light_Dialog_MinWidth = 2131493138; // aapt resource value: 0x7f0c0113 public const int Theme_AppCompat_Light_DialogWhenLarge = 2131493139; // aapt resource value: 0x7f0c0114 public const int Theme_AppCompat_Light_NoActionBar = 2131493140; // aapt resource value: 0x7f0c0115 public const int Theme_AppCompat_NoActionBar = 2131493141; // aapt resource value: 0x7f0c0178 public const int Theme_Design = 2131493240; // aapt resource value: 0x7f0c0179 public const int Theme_Design_BottomSheetDialog = 2131493241; // aapt resource value: 0x7f0c017a public const int Theme_Design_Light = 2131493242; // aapt resource value: 0x7f0c017b public const int Theme_Design_Light_BottomSheetDialog = 2131493243; // aapt resource value: 0x7f0c017c public const int Theme_Design_Light_NoActionBar = 2131493244; // aapt resource value: 0x7f0c017d public const int Theme_Design_NoActionBar = 2131493245; // aapt resource value: 0x7f0c0003 public const int Theme_MediaRouter = 2131492867; // aapt resource value: 0x7f0c0004 public const int Theme_MediaRouter_Light = 2131492868; // aapt resource value: 0x7f0c0005 public const int Theme_MediaRouter_Light_DarkControlPanel = 2131492869; // aapt resource value: 0x7f0c0006 public const int Theme_MediaRouter_LightControlPanel = 2131492870; // aapt resource value: 0x7f0c0116 public const int ThemeOverlay_AppCompat = 2131493142; // aapt resource value: 0x7f0c0117 public const int ThemeOverlay_AppCompat_ActionBar = 2131493143; // aapt resource value: 0x7f0c0118 public const int ThemeOverlay_AppCompat_Dark = 2131493144; // aapt resource value: 0x7f0c0119 public const int ThemeOverlay_AppCompat_Dark_ActionBar = 2131493145; // aapt resource value: 0x7f0c011a public const int ThemeOverlay_AppCompat_Dialog = 2131493146; // aapt resource value: 0x7f0c011b public const int ThemeOverlay_AppCompat_Dialog_Alert = 2131493147; // aapt resource value: 0x7f0c011c public const int ThemeOverlay_AppCompat_Light = 2131493148; // aapt resource value: 0x7f0c0007 public const int ThemeOverlay_MediaRouter_Dark = 2131492871; // aapt resource value: 0x7f0c0008 public const int ThemeOverlay_MediaRouter_Light = 2131492872; // aapt resource value: 0x7f0c011d public const int Widget_AppCompat_ActionBar = 2131493149; // aapt resource value: 0x7f0c011e public const int Widget_AppCompat_ActionBar_Solid = 2131493150; // aapt resource value: 0x7f0c011f public const int Widget_AppCompat_ActionBar_TabBar = 2131493151; // aapt resource value: 0x7f0c0120 public const int Widget_AppCompat_ActionBar_TabText = 2131493152; // aapt resource value: 0x7f0c0121 public const int Widget_AppCompat_ActionBar_TabView = 2131493153; // aapt resource value: 0x7f0c0122 public const int Widget_AppCompat_ActionButton = 2131493154; // aapt resource value: 0x7f0c0123 public const int Widget_AppCompat_ActionButton_CloseMode = 2131493155; // aapt resource value: 0x7f0c0124 public const int Widget_AppCompat_ActionButton_Overflow = 2131493156; // aapt resource value: 0x7f0c0125 public const int Widget_AppCompat_ActionMode = 2131493157; // aapt resource value: 0x7f0c0126 public const int Widget_AppCompat_ActivityChooserView = 2131493158; // aapt resource value: 0x7f0c0127 public const int Widget_AppCompat_AutoCompleteTextView = 2131493159; // aapt resource value: 0x7f0c0128 public const int Widget_AppCompat_Button = 2131493160; // aapt resource value: 0x7f0c0129 public const int Widget_AppCompat_Button_Borderless = 2131493161; // aapt resource value: 0x7f0c012a public const int Widget_AppCompat_Button_Borderless_Colored = 2131493162; // aapt resource value: 0x7f0c012b public const int Widget_AppCompat_Button_ButtonBar_AlertDialog = 2131493163; // aapt resource value: 0x7f0c012c public const int Widget_AppCompat_Button_Colored = 2131493164; // aapt resource value: 0x7f0c012d public const int Widget_AppCompat_Button_Small = 2131493165; // aapt resource value: 0x7f0c012e public const int Widget_AppCompat_ButtonBar = 2131493166; // aapt resource value: 0x7f0c012f public const int Widget_AppCompat_ButtonBar_AlertDialog = 2131493167; // aapt resource value: 0x7f0c0130 public const int Widget_AppCompat_CompoundButton_CheckBox = 2131493168; // aapt resource value: 0x7f0c0131 public const int Widget_AppCompat_CompoundButton_RadioButton = 2131493169; // aapt resource value: 0x7f0c0132 public const int Widget_AppCompat_CompoundButton_Switch = 2131493170; // aapt resource value: 0x7f0c0133 public const int Widget_AppCompat_DrawerArrowToggle = 2131493171; // aapt resource value: 0x7f0c0134 public const int Widget_AppCompat_DropDownItem_Spinner = 2131493172; // aapt resource value: 0x7f0c0135 public const int Widget_AppCompat_EditText = 2131493173; // aapt resource value: 0x7f0c0136 public const int Widget_AppCompat_ImageButton = 2131493174; // aapt resource value: 0x7f0c0137 public const int Widget_AppCompat_Light_ActionBar = 2131493175; // aapt resource value: 0x7f0c0138 public const int Widget_AppCompat_Light_ActionBar_Solid = 2131493176; // aapt resource value: 0x7f0c0139 public const int Widget_AppCompat_Light_ActionBar_Solid_Inverse = 2131493177; // aapt resource value: 0x7f0c013a public const int Widget_AppCompat_Light_ActionBar_TabBar = 2131493178; // aapt resource value: 0x7f0c013b public const int Widget_AppCompat_Light_ActionBar_TabBar_Inverse = 2131493179; // aapt resource value: 0x7f0c013c public const int Widget_AppCompat_Light_ActionBar_TabText = 2131493180; // aapt resource value: 0x7f0c013d public const int Widget_AppCompat_Light_ActionBar_TabText_Inverse = 2131493181; // aapt resource value: 0x7f0c013e public const int Widget_AppCompat_Light_ActionBar_TabView = 2131493182; // aapt resource value: 0x7f0c013f public const int Widget_AppCompat_Light_ActionBar_TabView_Inverse = 2131493183; // aapt resource value: 0x7f0c0140 public const int Widget_AppCompat_Light_ActionButton = 2131493184; // aapt resource value: 0x7f0c0141 public const int Widget_AppCompat_Light_ActionButton_CloseMode = 2131493185; // aapt resource value: 0x7f0c0142 public const int Widget_AppCompat_Light_ActionButton_Overflow = 2131493186; // aapt resource value: 0x7f0c0143 public const int Widget_AppCompat_Light_ActionMode_Inverse = 2131493187; // aapt resource value: 0x7f0c0144 public const int Widget_AppCompat_Light_ActivityChooserView = 2131493188; // aapt resource value: 0x7f0c0145 public const int Widget_AppCompat_Light_AutoCompleteTextView = 2131493189; // aapt resource value: 0x7f0c0146 public const int Widget_AppCompat_Light_DropDownItem_Spinner = 2131493190; // aapt resource value: 0x7f0c0147 public const int Widget_AppCompat_Light_ListPopupWindow = 2131493191; // aapt resource value: 0x7f0c0148 public const int Widget_AppCompat_Light_ListView_DropDown = 2131493192; // aapt resource value: 0x7f0c0149 public const int Widget_AppCompat_Light_PopupMenu = 2131493193; // aapt resource value: 0x7f0c014a public const int Widget_AppCompat_Light_PopupMenu_Overflow = 2131493194; // aapt resource value: 0x7f0c014b public const int Widget_AppCompat_Light_SearchView = 2131493195; // aapt resource value: 0x7f0c014c public const int Widget_AppCompat_Light_Spinner_DropDown_ActionBar = 2131493196; // aapt resource value: 0x7f0c014d public const int Widget_AppCompat_ListMenuView = 2131493197; // aapt resource value: 0x7f0c014e public const int Widget_AppCompat_ListPopupWindow = 2131493198; // aapt resource value: 0x7f0c014f public const int Widget_AppCompat_ListView = 2131493199; // aapt resource value: 0x7f0c0150 public const int Widget_AppCompat_ListView_DropDown = 2131493200; // aapt resource value: 0x7f0c0151 public const int Widget_AppCompat_ListView_Menu = 2131493201; // aapt resource value: 0x7f0c0152 public const int Widget_AppCompat_PopupMenu = 2131493202; // aapt resource value: 0x7f0c0153 public const int Widget_AppCompat_PopupMenu_Overflow = 2131493203; // aapt resource value: 0x7f0c0154 public const int Widget_AppCompat_PopupWindow = 2131493204; // aapt resource value: 0x7f0c0155 public const int Widget_AppCompat_ProgressBar = 2131493205; // aapt resource value: 0x7f0c0156 public const int Widget_AppCompat_ProgressBar_Horizontal = 2131493206; // aapt resource value: 0x7f0c0157 public const int Widget_AppCompat_RatingBar = 2131493207; // aapt resource value: 0x7f0c0158 public const int Widget_AppCompat_RatingBar_Indicator = 2131493208; // aapt resource value: 0x7f0c0159 public const int Widget_AppCompat_RatingBar_Small = 2131493209; // aapt resource value: 0x7f0c015a public const int Widget_AppCompat_SearchView = 2131493210; // aapt resource value: 0x7f0c015b public const int Widget_AppCompat_SearchView_ActionBar = 2131493211; // aapt resource value: 0x7f0c015c public const int Widget_AppCompat_SeekBar = 2131493212; // aapt resource value: 0x7f0c015d public const int Widget_AppCompat_SeekBar_Discrete = 2131493213; // aapt resource value: 0x7f0c015e public const int Widget_AppCompat_Spinner = 2131493214; // aapt resource value: 0x7f0c015f public const int Widget_AppCompat_Spinner_DropDown = 2131493215; // aapt resource value: 0x7f0c0160 public const int Widget_AppCompat_Spinner_DropDown_ActionBar = 2131493216; // aapt resource value: 0x7f0c0161 public const int Widget_AppCompat_Spinner_Underlined = 2131493217; // aapt resource value: 0x7f0c0162 public const int Widget_AppCompat_TextView_SpinnerItem = 2131493218; // aapt resource value: 0x7f0c0163 public const int Widget_AppCompat_Toolbar = 2131493219; // aapt resource value: 0x7f0c0164 public const int Widget_AppCompat_Toolbar_Button_Navigation = 2131493220; // aapt resource value: 0x7f0c018c public const int Widget_Compat_NotificationActionContainer = 2131493260; // aapt resource value: 0x7f0c018d public const int Widget_Compat_NotificationActionText = 2131493261; // aapt resource value: 0x7f0c017e public const int Widget_Design_AppBarLayout = 2131493246; // aapt resource value: 0x7f0c017f public const int Widget_Design_BottomNavigationView = 2131493247; // aapt resource value: 0x7f0c0180 public const int Widget_Design_BottomSheet_Modal = 2131493248; // aapt resource value: 0x7f0c0181 public const int Widget_Design_CollapsingToolbar = 2131493249; // aapt resource value: 0x7f0c0182 public const int Widget_Design_CoordinatorLayout = 2131493250; // aapt resource value: 0x7f0c0183 public const int Widget_Design_FloatingActionButton = 2131493251; // aapt resource value: 0x7f0c0184 public const int Widget_Design_NavigationView = 2131493252; // aapt resource value: 0x7f0c0185 public const int Widget_Design_ScrimInsetsFrameLayout = 2131493253; // aapt resource value: 0x7f0c0186 public const int Widget_Design_Snackbar = 2131493254; // aapt resource value: 0x7f0c016a public const int Widget_Design_TabLayout = 2131493226; // aapt resource value: 0x7f0c0187 public const int Widget_Design_TextInputLayout = 2131493255; // aapt resource value: 0x7f0c0009 public const int Widget_MediaRouter_Light_MediaRouteButton = 2131492873; // aapt resource value: 0x7f0c000a public const int Widget_MediaRouter_MediaRouteButton = 2131492874; static Style() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } private Style() { } } public partial class Styleable { public static int[] ActionBar = new int[] { 2130772003, 2130772005, 2130772006, 2130772007, 2130772008, 2130772009, 2130772010, 2130772011, 2130772012, 2130772013, 2130772014, 2130772015, 2130772016, 2130772017, 2130772018, 2130772019, 2130772020, 2130772021, 2130772022, 2130772023, 2130772024, 2130772025, 2130772026, 2130772027, 2130772028, 2130772029, 2130772030, 2130772031, 2130772101}; // aapt resource value: 10 public const int ActionBar_background = 10; // aapt resource value: 12 public const int ActionBar_backgroundSplit = 12; // aapt resource value: 11 public const int ActionBar_backgroundStacked = 11; // aapt resource value: 21 public const int ActionBar_contentInsetEnd = 21; // aapt resource value: 25 public const int ActionBar_contentInsetEndWithActions = 25; // aapt resource value: 22 public const int ActionBar_contentInsetLeft = 22; // aapt resource value: 23 public const int ActionBar_contentInsetRight = 23; // aapt resource value: 20 public const int ActionBar_contentInsetStart = 20; // aapt resource value: 24 public const int ActionBar_contentInsetStartWithNavigation = 24; // aapt resource value: 13 public const int ActionBar_customNavigationLayout = 13; // aapt resource value: 3 public const int ActionBar_displayOptions = 3; // aapt resource value: 9 public const int ActionBar_divider = 9; // aapt resource value: 26 public const int ActionBar_elevation = 26; // aapt resource value: 0 public const int ActionBar_height = 0; // aapt resource value: 19 public const int ActionBar_hideOnContentScroll = 19; // aapt resource value: 28 public const int ActionBar_homeAsUpIndicator = 28; // aapt resource value: 14 public const int ActionBar_homeLayout = 14; // aapt resource value: 7 public const int ActionBar_icon = 7; // aapt resource value: 16 public const int ActionBar_indeterminateProgressStyle = 16; // aapt resource value: 18 public const int ActionBar_itemPadding = 18; // aapt resource value: 8 public const int ActionBar_logo = 8; // aapt resource value: 2 public const int ActionBar_navigationMode = 2; // aapt resource value: 27 public const int ActionBar_popupTheme = 27; // aapt resource value: 17 public const int ActionBar_progressBarPadding = 17; // aapt resource value: 15 public const int ActionBar_progressBarStyle = 15; // aapt resource value: 4 public const int ActionBar_subtitle = 4; // aapt resource value: 6 public const int ActionBar_subtitleTextStyle = 6; // aapt resource value: 1 public const int ActionBar_title = 1; // aapt resource value: 5 public const int ActionBar_titleTextStyle = 5; public static int[] ActionBarLayout = new int[] { 16842931}; // aapt resource value: 0 public const int ActionBarLayout_android_layout_gravity = 0; public static int[] ActionMenuItemView = new int[] { 16843071}; // aapt resource value: 0 public const int ActionMenuItemView_android_minWidth = 0; public static int[] ActionMenuView; public static int[] ActionMode = new int[] { 2130772003, 2130772009, 2130772010, 2130772014, 2130772016, 2130772032}; // aapt resource value: 3 public const int ActionMode_background = 3; // aapt resource value: 4 public const int ActionMode_backgroundSplit = 4; // aapt resource value: 5 public const int ActionMode_closeItemLayout = 5; // aapt resource value: 0 public const int ActionMode_height = 0; // aapt resource value: 2 public const int ActionMode_subtitleTextStyle = 2; // aapt resource value: 1 public const int ActionMode_titleTextStyle = 1; public static int[] ActivityChooserView = new int[] { 2130772033, 2130772034}; // aapt resource value: 1 public const int ActivityChooserView_expandActivityOverflowButtonDrawable = 1; // aapt resource value: 0 public const int ActivityChooserView_initialActivityCount = 0; public static int[] AlertDialog = new int[] { 16842994, 2130772035, 2130772036, 2130772037, 2130772038, 2130772039, 2130772040}; // aapt resource value: 0 public const int AlertDialog_android_layout = 0; // aapt resource value: 1 public const int AlertDialog_buttonPanelSideLayout = 1; // aapt resource value: 5 public const int AlertDialog_listItemLayout = 5; // aapt resource value: 2 public const int AlertDialog_listLayout = 2; // aapt resource value: 3 public const int AlertDialog_multiChoiceItemLayout = 3; // aapt resource value: 6 public const int AlertDialog_showTitle = 6; // aapt resource value: 4 public const int AlertDialog_singleChoiceItemLayout = 4; public static int[] AppBarLayout = new int[] { 16842964, 16843919, 16844096, 2130772030, 2130772248}; // aapt resource value: 0 public const int AppBarLayout_android_background = 0; // aapt resource value: 2 public const int AppBarLayout_android_keyboardNavigationCluster = 2; // aapt resource value: 1 public const int AppBarLayout_android_touchscreenBlocksFocus = 1; // aapt resource value: 3 public const int AppBarLayout_elevation = 3; // aapt resource value: 4 public const int AppBarLayout_expanded = 4; public static int[] AppBarLayoutStates = new int[] { 2130772249, 2130772250}; // aapt resource value: 0 public const int AppBarLayoutStates_state_collapsed = 0; // aapt resource value: 1 public const int AppBarLayoutStates_state_collapsible = 1; public static int[] AppBarLayout_Layout = new int[] { 2130772251, 2130772252}; // aapt resource value: 0 public const int AppBarLayout_Layout_layout_scrollFlags = 0; // aapt resource value: 1 public const int AppBarLayout_Layout_layout_scrollInterpolator = 1; public static int[] AppCompatImageView = new int[] { 16843033, 2130772041, 2130772042, 2130772043}; // aapt resource value: 0 public const int AppCompatImageView_android_src = 0; // aapt resource value: 1 public const int AppCompatImageView_srcCompat = 1; // aapt resource value: 2 public const int AppCompatImageView_tint = 2; // aapt resource value: 3 public const int AppCompatImageView_tintMode = 3; public static int[] AppCompatSeekBar = new int[] { 16843074, 2130772044, 2130772045, 2130772046}; // aapt resource value: 0 public const int AppCompatSeekBar_android_thumb = 0; // aapt resource value: 1 public const int AppCompatSeekBar_tickMark = 1; // aapt resource value: 2 public const int AppCompatSeekBar_tickMarkTint = 2; // aapt resource value: 3 public const int AppCompatSeekBar_tickMarkTintMode = 3; public static int[] AppCompatTextHelper = new int[] { 16842804, 16843117, 16843118, 16843119, 16843120, 16843666, 16843667}; // aapt resource value: 2 public const int AppCompatTextHelper_android_drawableBottom = 2; // aapt resource value: 6 public const int AppCompatTextHelper_android_drawableEnd = 6; // aapt resource value: 3 public const int AppCompatTextHelper_android_drawableLeft = 3; // aapt resource value: 4 public const int AppCompatTextHelper_android_drawableRight = 4; // aapt resource value: 5 public const int AppCompatTextHelper_android_drawableStart = 5; // aapt resource value: 1 public const int AppCompatTextHelper_android_drawableTop = 1; // aapt resource value: 0 public const int AppCompatTextHelper_android_textAppearance = 0; public static int[] AppCompatTextView = new int[] { 16842804, 2130772047, 2130772048, 2130772049, 2130772050, 2130772051, 2130772052, 2130772053}; // aapt resource value: 0 public const int AppCompatTextView_android_textAppearance = 0; // aapt resource value: 6 public const int AppCompatTextView_autoSizeMaxTextSize = 6; // aapt resource value: 5 public const int AppCompatTextView_autoSizeMinTextSize = 5; // aapt resource value: 4 public const int AppCompatTextView_autoSizePresetSizes = 4; // aapt resource value: 3 public const int AppCompatTextView_autoSizeStepGranularity = 3; // aapt resource value: 2 public const int AppCompatTextView_autoSizeTextType = 2; // aapt resource value: 7 public const int AppCompatTextView_fontFamily = 7; // aapt resource value: 1 public const int AppCompatTextView_textAllCaps = 1; public static int[] AppCompatTheme = new int[] { 16842839, 16842926, 2130772054, 2130772055, 2130772056, 2130772057, 2130772058, 2130772059, 2130772060, 2130772061, 2130772062, 2130772063, 2130772064, 2130772065, 2130772066, 2130772067, 2130772068, 2130772069, 2130772070, 2130772071, 2130772072, 2130772073, 2130772074, 2130772075, 2130772076, 2130772077, 2130772078, 2130772079, 2130772080, 2130772081, 2130772082, 2130772083, 2130772084, 2130772085, 2130772086, 2130772087, 2130772088, 2130772089, 2130772090, 2130772091, 2130772092, 2130772093, 2130772094, 2130772095, 2130772096, 2130772097, 2130772098, 2130772099, 2130772100, 2130772101, 2130772102, 2130772103, 2130772104, 2130772105, 2130772106, 2130772107, 2130772108, 2130772109, 2130772110, 2130772111, 2130772112, 2130772113, 2130772114, 2130772115, 2130772116, 2130772117, 2130772118, 2130772119, 2130772120, 2130772121, 2130772122, 2130772123, 2130772124, 2130772125, 2130772126, 2130772127, 2130772128, 2130772129, 2130772130, 2130772131, 2130772132, 2130772133, 2130772134, 2130772135, 2130772136, 2130772137, 2130772138, 2130772139, 2130772140, 2130772141, 2130772142, 2130772143, 2130772144, 2130772145, 2130772146, 2130772147, 2130772148, 2130772149, 2130772150, 2130772151, 2130772152, 2130772153, 2130772154, 2130772155, 2130772156, 2130772157, 2130772158, 2130772159, 2130772160, 2130772161, 2130772162, 2130772163, 2130772164, 2130772165, 2130772166, 2130772167, 2130772168, 2130772169, 2130772170}; // aapt resource value: 23 public const int AppCompatTheme_actionBarDivider = 23; // aapt resource value: 24 public const int AppCompatTheme_actionBarItemBackground = 24; // aapt resource value: 17 public const int AppCompatTheme_actionBarPopupTheme = 17; // aapt resource value: 22 public const int AppCompatTheme_actionBarSize = 22; // aapt resource value: 19 public const int AppCompatTheme_actionBarSplitStyle = 19; // aapt resource value: 18 public const int AppCompatTheme_actionBarStyle = 18; // aapt resource value: 13 public const int AppCompatTheme_actionBarTabBarStyle = 13; // aapt resource value: 12 public const int AppCompatTheme_actionBarTabStyle = 12; // aapt resource value: 14 public const int AppCompatTheme_actionBarTabTextStyle = 14; // aapt resource value: 20 public const int AppCompatTheme_actionBarTheme = 20; // aapt resource value: 21 public const int AppCompatTheme_actionBarWidgetTheme = 21; // aapt resource value: 50 public const int AppCompatTheme_actionButtonStyle = 50; // aapt resource value: 46 public const int AppCompatTheme_actionDropDownStyle = 46; // aapt resource value: 25 public const int AppCompatTheme_actionMenuTextAppearance = 25; // aapt resource value: 26 public const int AppCompatTheme_actionMenuTextColor = 26; // aapt resource value: 29 public const int AppCompatTheme_actionModeBackground = 29; // aapt resource value: 28 public const int AppCompatTheme_actionModeCloseButtonStyle = 28; // aapt resource value: 31 public const int AppCompatTheme_actionModeCloseDrawable = 31; // aapt resource value: 33 public const int AppCompatTheme_actionModeCopyDrawable = 33; // aapt resource value: 32 public const int AppCompatTheme_actionModeCutDrawable = 32; // aapt resource value: 37 public const int AppCompatTheme_actionModeFindDrawable = 37; // aapt resource value: 34 public const int AppCompatTheme_actionModePasteDrawable = 34; // aapt resource value: 39 public const int AppCompatTheme_actionModePopupWindowStyle = 39; // aapt resource value: 35 public const int AppCompatTheme_actionModeSelectAllDrawable = 35; // aapt resource value: 36 public const int AppCompatTheme_actionModeShareDrawable = 36; // aapt resource value: 30 public const int AppCompatTheme_actionModeSplitBackground = 30; // aapt resource value: 27 public const int AppCompatTheme_actionModeStyle = 27; // aapt resource value: 38 public const int AppCompatTheme_actionModeWebSearchDrawable = 38; // aapt resource value: 15 public const int AppCompatTheme_actionOverflowButtonStyle = 15; // aapt resource value: 16 public const int AppCompatTheme_actionOverflowMenuStyle = 16; // aapt resource value: 58 public const int AppCompatTheme_activityChooserViewStyle = 58; // aapt resource value: 95 public const int AppCompatTheme_alertDialogButtonGroupStyle = 95; // aapt resource value: 96 public const int AppCompatTheme_alertDialogCenterButtons = 96; // aapt resource value: 94 public const int AppCompatTheme_alertDialogStyle = 94; // aapt resource value: 97 public const int AppCompatTheme_alertDialogTheme = 97; // aapt resource value: 1 public const int AppCompatTheme_android_windowAnimationStyle = 1; // aapt resource value: 0 public const int AppCompatTheme_android_windowIsFloating = 0; // aapt resource value: 102 public const int AppCompatTheme_autoCompleteTextViewStyle = 102; // aapt resource value: 55 public const int AppCompatTheme_borderlessButtonStyle = 55; // aapt resource value: 52 public const int AppCompatTheme_buttonBarButtonStyle = 52; // aapt resource value: 100 public const int AppCompatTheme_buttonBarNegativeButtonStyle = 100; // aapt resource value: 101 public const int AppCompatTheme_buttonBarNeutralButtonStyle = 101; // aapt resource value: 99 public const int AppCompatTheme_buttonBarPositiveButtonStyle = 99; // aapt resource value: 51 public const int AppCompatTheme_buttonBarStyle = 51; // aapt resource value: 103 public const int AppCompatTheme_buttonStyle = 103; // aapt resource value: 104 public const int AppCompatTheme_buttonStyleSmall = 104; // aapt resource value: 105 public const int AppCompatTheme_checkboxStyle = 105; // aapt resource value: 106 public const int AppCompatTheme_checkedTextViewStyle = 106; // aapt resource value: 86 public const int AppCompatTheme_colorAccent = 86; // aapt resource value: 93 public const int AppCompatTheme_colorBackgroundFloating = 93; // aapt resource value: 90 public const int AppCompatTheme_colorButtonNormal = 90; // aapt resource value: 88 public const int AppCompatTheme_colorControlActivated = 88; // aapt resource value: 89 public const int AppCompatTheme_colorControlHighlight = 89; // aapt resource value: 87 public const int AppCompatTheme_colorControlNormal = 87; // aapt resource value: 118 public const int AppCompatTheme_colorError = 118; // aapt resource value: 84 public const int AppCompatTheme_colorPrimary = 84; // aapt resource value: 85 public const int AppCompatTheme_colorPrimaryDark = 85; // aapt resource value: 91 public const int AppCompatTheme_colorSwitchThumbNormal = 91; // aapt resource value: 92 public const int AppCompatTheme_controlBackground = 92; // aapt resource value: 44 public const int AppCompatTheme_dialogPreferredPadding = 44; // aapt resource value: 43 public const int AppCompatTheme_dialogTheme = 43; // aapt resource value: 57 public const int AppCompatTheme_dividerHorizontal = 57; // aapt resource value: 56 public const int AppCompatTheme_dividerVertical = 56; // aapt resource value: 75 public const int AppCompatTheme_dropDownListViewStyle = 75; // aapt resource value: 47 public const int AppCompatTheme_dropdownListPreferredItemHeight = 47; // aapt resource value: 64 public const int AppCompatTheme_editTextBackground = 64; // aapt resource value: 63 public const int AppCompatTheme_editTextColor = 63; // aapt resource value: 107 public const int AppCompatTheme_editTextStyle = 107; // aapt resource value: 49 public const int AppCompatTheme_homeAsUpIndicator = 49; // aapt resource value: 65 public const int AppCompatTheme_imageButtonStyle = 65; // aapt resource value: 83 public const int AppCompatTheme_listChoiceBackgroundIndicator = 83; // aapt resource value: 45 public const int AppCompatTheme_listDividerAlertDialog = 45; // aapt resource value: 115 public const int AppCompatTheme_listMenuViewStyle = 115; // aapt resource value: 76 public const int AppCompatTheme_listPopupWindowStyle = 76; // aapt resource value: 70 public const int AppCompatTheme_listPreferredItemHeight = 70; // aapt resource value: 72 public const int AppCompatTheme_listPreferredItemHeightLarge = 72; // aapt resource value: 71 public const int AppCompatTheme_listPreferredItemHeightSmall = 71; // aapt resource value: 73 public const int AppCompatTheme_listPreferredItemPaddingLeft = 73; // aapt resource value: 74 public const int AppCompatTheme_listPreferredItemPaddingRight = 74; // aapt resource value: 80 public const int AppCompatTheme_panelBackground = 80; // aapt resource value: 82 public const int AppCompatTheme_panelMenuListTheme = 82; // aapt resource value: 81 public const int AppCompatTheme_panelMenuListWidth = 81; // aapt resource value: 61 public const int AppCompatTheme_popupMenuStyle = 61; // aapt resource value: 62 public const int AppCompatTheme_popupWindowStyle = 62; // aapt resource value: 108 public const int AppCompatTheme_radioButtonStyle = 108; // aapt resource value: 109 public const int AppCompatTheme_ratingBarStyle = 109; // aapt resource value: 110 public const int AppCompatTheme_ratingBarStyleIndicator = 110; // aapt resource value: 111 public const int AppCompatTheme_ratingBarStyleSmall = 111; // aapt resource value: 69 public const int AppCompatTheme_searchViewStyle = 69; // aapt resource value: 112 public const int AppCompatTheme_seekBarStyle = 112; // aapt resource value: 53 public const int AppCompatTheme_selectableItemBackground = 53; // aapt resource value: 54 public const int AppCompatTheme_selectableItemBackgroundBorderless = 54; // aapt resource value: 48 public const int AppCompatTheme_spinnerDropDownItemStyle = 48; // aapt resource value: 113 public const int AppCompatTheme_spinnerStyle = 113; // aapt resource value: 114 public const int AppCompatTheme_switchStyle = 114; // aapt resource value: 40 public const int AppCompatTheme_textAppearanceLargePopupMenu = 40; // aapt resource value: 77 public const int AppCompatTheme_textAppearanceListItem = 77; // aapt resource value: 78 public const int AppCompatTheme_textAppearanceListItemSecondary = 78; // aapt resource value: 79 public const int AppCompatTheme_textAppearanceListItemSmall = 79; // aapt resource value: 42 public const int AppCompatTheme_textAppearancePopupMenuHeader = 42; // aapt resource value: 67 public const int AppCompatTheme_textAppearanceSearchResultSubtitle = 67; // aapt resource value: 66 public const int AppCompatTheme_textAppearanceSearchResultTitle = 66; // aapt resource value: 41 public const int AppCompatTheme_textAppearanceSmallPopupMenu = 41; // aapt resource value: 98 public const int AppCompatTheme_textColorAlertDialogListItem = 98; // aapt resource value: 68 public const int AppCompatTheme_textColorSearchUrl = 68; // aapt resource value: 60 public const int AppCompatTheme_toolbarNavigationButtonStyle = 60; // aapt resource value: 59 public const int AppCompatTheme_toolbarStyle = 59; // aapt resource value: 117 public const int AppCompatTheme_tooltipForegroundColor = 117; // aapt resource value: 116 public const int AppCompatTheme_tooltipFrameBackground = 116; // aapt resource value: 2 public const int AppCompatTheme_windowActionBar = 2; // aapt resource value: 4 public const int AppCompatTheme_windowActionBarOverlay = 4; // aapt resource value: 5 public const int AppCompatTheme_windowActionModeOverlay = 5; // aapt resource value: 9 public const int AppCompatTheme_windowFixedHeightMajor = 9; // aapt resource value: 7 public const int AppCompatTheme_windowFixedHeightMinor = 7; // aapt resource value: 6 public const int AppCompatTheme_windowFixedWidthMajor = 6; // aapt resource value: 8 public const int AppCompatTheme_windowFixedWidthMinor = 8; // aapt resource value: 10 public const int AppCompatTheme_windowMinWidthMajor = 10; // aapt resource value: 11 public const int AppCompatTheme_windowMinWidthMinor = 11; // aapt resource value: 3 public const int AppCompatTheme_windowNoTitle = 3; public static int[] BottomNavigationView = new int[] { 2130772030, 2130772291, 2130772292, 2130772293, 2130772294}; // aapt resource value: 0 public const int BottomNavigationView_elevation = 0; // aapt resource value: 4 public const int BottomNavigationView_itemBackground = 4; // aapt resource value: 2 public const int BottomNavigationView_itemIconTint = 2; // aapt resource value: 3 public const int BottomNavigationView_itemTextColor = 3; // aapt resource value: 1 public const int BottomNavigationView_menu = 1; public static int[] BottomSheetBehavior_Layout = new int[] { 2130772253, 2130772254, 2130772255}; // aapt resource value: 1 public const int BottomSheetBehavior_Layout_behavior_hideable = 1; // aapt resource value: 0 public const int BottomSheetBehavior_Layout_behavior_peekHeight = 0; // aapt resource value: 2 public const int BottomSheetBehavior_Layout_behavior_skipCollapsed = 2; public static int[] ButtonBarLayout = new int[] { 2130772171}; // aapt resource value: 0 public const int ButtonBarLayout_allowStacking = 0; public static int[] CardView = new int[] { 16843071, 16843072, 2130771991, 2130771992, 2130771993, 2130771994, 2130771995, 2130771996, 2130771997, 2130771998, 2130771999, 2130772000, 2130772001}; // aapt resource value: 1 public const int CardView_android_minHeight = 1; // aapt resource value: 0 public const int CardView_android_minWidth = 0; // aapt resource value: 2 public const int CardView_cardBackgroundColor = 2; // aapt resource value: 3 public const int CardView_cardCornerRadius = 3; // aapt resource value: 4 public const int CardView_cardElevation = 4; // aapt resource value: 5 public const int CardView_cardMaxElevation = 5; // aapt resource value: 7 public const int CardView_cardPreventCornerOverlap = 7; // aapt resource value: 6 public const int CardView_cardUseCompatPadding = 6; // aapt resource value: 8 public const int CardView_contentPadding = 8; // aapt resource value: 12 public const int CardView_contentPaddingBottom = 12; // aapt resource value: 9 public const int CardView_contentPaddingLeft = 9; // aapt resource value: 10 public const int CardView_contentPaddingRight = 10; // aapt resource value: 11 public const int CardView_contentPaddingTop = 11; public static int[] CollapsingToolbarLayout = new int[] { 2130772005, 2130772256, 2130772257, 2130772258, 2130772259, 2130772260, 2130772261, 2130772262, 2130772263, 2130772264, 2130772265, 2130772266, 2130772267, 2130772268, 2130772269, 2130772270}; // aapt resource value: 13 public const int CollapsingToolbarLayout_collapsedTitleGravity = 13; // aapt resource value: 7 public const int CollapsingToolbarLayout_collapsedTitleTextAppearance = 7; // aapt resource value: 8 public const int CollapsingToolbarLayout_contentScrim = 8; // aapt resource value: 14 public const int CollapsingToolbarLayout_expandedTitleGravity = 14; // aapt resource value: 1 public const int CollapsingToolbarLayout_expandedTitleMargin = 1; // aapt resource value: 5 public const int CollapsingToolbarLayout_expandedTitleMarginBottom = 5; // aapt resource value: 4 public const int CollapsingToolbarLayout_expandedTitleMarginEnd = 4; // aapt resource value: 2 public const int CollapsingToolbarLayout_expandedTitleMarginStart = 2; // aapt resource value: 3 public const int CollapsingToolbarLayout_expandedTitleMarginTop = 3; // aapt resource value: 6 public const int CollapsingToolbarLayout_expandedTitleTextAppearance = 6; // aapt resource value: 12 public const int CollapsingToolbarLayout_scrimAnimationDuration = 12; // aapt resource value: 11 public const int CollapsingToolbarLayout_scrimVisibleHeightTrigger = 11; // aapt resource value: 9 public const int CollapsingToolbarLayout_statusBarScrim = 9; // aapt resource value: 0 public const int CollapsingToolbarLayout_title = 0; // aapt resource value: 15 public const int CollapsingToolbarLayout_titleEnabled = 15; // aapt resource value: 10 public const int CollapsingToolbarLayout_toolbarId = 10; public static int[] CollapsingToolbarLayout_Layout = new int[] { 2130772271, 2130772272}; // aapt resource value: 0 public const int CollapsingToolbarLayout_Layout_layout_collapseMode = 0; // aapt resource value: 1 public const int CollapsingToolbarLayout_Layout_layout_collapseParallaxMultiplier = 1; public static int[] ColorStateListItem = new int[] { 16843173, 16843551, 2130772172}; // aapt resource value: 2 public const int ColorStateListItem_alpha = 2; // aapt resource value: 1 public const int ColorStateListItem_android_alpha = 1; // aapt resource value: 0 public const int ColorStateListItem_android_color = 0; public static int[] CompoundButton = new int[] { 16843015, 2130772173, 2130772174}; // aapt resource value: 0 public const int CompoundButton_android_button = 0; // aapt resource value: 1 public const int CompoundButton_buttonTint = 1; // aapt resource value: 2 public const int CompoundButton_buttonTintMode = 2; public static int[] CoordinatorLayout = new int[] { 2130772273, 2130772274}; // aapt resource value: 0 public const int CoordinatorLayout_keylines = 0; // aapt resource value: 1 public const int CoordinatorLayout_statusBarBackground = 1; public static int[] CoordinatorLayout_Layout = new int[] { 16842931, 2130772275, 2130772276, 2130772277, 2130772278, 2130772279, 2130772280}; // aapt resource value: 0 public const int CoordinatorLayout_Layout_android_layout_gravity = 0; // aapt resource value: 2 public const int CoordinatorLayout_Layout_layout_anchor = 2; // aapt resource value: 4 public const int CoordinatorLayout_Layout_layout_anchorGravity = 4; // aapt resource value: 1 public const int CoordinatorLayout_Layout_layout_behavior = 1; // aapt resource value: 6 public const int CoordinatorLayout_Layout_layout_dodgeInsetEdges = 6; // aapt resource value: 5 public const int CoordinatorLayout_Layout_layout_insetEdge = 5; // aapt resource value: 3 public const int CoordinatorLayout_Layout_layout_keyline = 3; public static int[] DesignTheme = new int[] { 2130772281, 2130772282, 2130772283}; // aapt resource value: 0 public const int DesignTheme_bottomSheetDialogTheme = 0; // aapt resource value: 1 public const int DesignTheme_bottomSheetStyle = 1; // aapt resource value: 2 public const int DesignTheme_textColorError = 2; public static int[] DrawerArrowToggle = new int[] { 2130772175, 2130772176, 2130772177, 2130772178, 2130772179, 2130772180, 2130772181, 2130772182}; // aapt resource value: 4 public const int DrawerArrowToggle_arrowHeadLength = 4; // aapt resource value: 5 public const int DrawerArrowToggle_arrowShaftLength = 5; // aapt resource value: 6 public const int DrawerArrowToggle_barLength = 6; // aapt resource value: 0 public const int DrawerArrowToggle_color = 0; // aapt resource value: 2 public const int DrawerArrowToggle_drawableSize = 2; // aapt resource value: 3 public const int DrawerArrowToggle_gapBetweenBars = 3; // aapt resource value: 1 public const int DrawerArrowToggle_spinBars = 1; // aapt resource value: 7 public const int DrawerArrowToggle_thickness = 7; public static int[] FloatingActionButton = new int[] { 2130772030, 2130772246, 2130772247, 2130772284, 2130772285, 2130772286, 2130772287, 2130772288}; // aapt resource value: 1 public const int FloatingActionButton_backgroundTint = 1; // aapt resource value: 2 public const int FloatingActionButton_backgroundTintMode = 2; // aapt resource value: 6 public const int FloatingActionButton_borderWidth = 6; // aapt resource value: 0 public const int FloatingActionButton_elevation = 0; // aapt resource value: 4 public const int FloatingActionButton_fabSize = 4; // aapt resource value: 5 public const int FloatingActionButton_pressedTranslationZ = 5; // aapt resource value: 3 public const int FloatingActionButton_rippleColor = 3; // aapt resource value: 7 public const int FloatingActionButton_useCompatPadding = 7; public static int[] FloatingActionButton_Behavior_Layout = new int[] { 2130772289}; // aapt resource value: 0 public const int FloatingActionButton_Behavior_Layout_behavior_autoHide = 0; public static int[] FontFamily = new int[] { 2130772330, 2130772331, 2130772332, 2130772333, 2130772334, 2130772335}; // aapt resource value: 0 public const int FontFamily_fontProviderAuthority = 0; // aapt resource value: 3 public const int FontFamily_fontProviderCerts = 3; // aapt resource value: 4 public const int FontFamily_fontProviderFetchStrategy = 4; // aapt resource value: 5 public const int FontFamily_fontProviderFetchTimeout = 5; // aapt resource value: 1 public const int FontFamily_fontProviderPackage = 1; // aapt resource value: 2 public const int FontFamily_fontProviderQuery = 2; public static int[] FontFamilyFont = new int[] { 16844082, 16844083, 16844095, 2130772336, 2130772337, 2130772338}; // aapt resource value: 0 public const int FontFamilyFont_android_font = 0; // aapt resource value: 2 public const int FontFamilyFont_android_fontStyle = 2; // aapt resource value: 1 public const int FontFamilyFont_android_fontWeight = 1; // aapt resource value: 4 public const int FontFamilyFont_font = 4; // aapt resource value: 3 public const int FontFamilyFont_fontStyle = 3; // aapt resource value: 5 public const int FontFamilyFont_fontWeight = 5; public static int[] ForegroundLinearLayout = new int[] { 16843017, 16843264, 2130772290}; // aapt resource value: 0 public const int ForegroundLinearLayout_android_foreground = 0; // aapt resource value: 1 public const int ForegroundLinearLayout_android_foregroundGravity = 1; // aapt resource value: 2 public const int ForegroundLinearLayout_foregroundInsidePadding = 2; public static int[] LinearLayoutCompat = new int[] { 16842927, 16842948, 16843046, 16843047, 16843048, 2130772013, 2130772183, 2130772184, 2130772185}; // aapt resource value: 2 public const int LinearLayoutCompat_android_baselineAligned = 2; // aapt resource value: 3 public const int LinearLayoutCompat_android_baselineAlignedChildIndex = 3; // aapt resource value: 0 public const int LinearLayoutCompat_android_gravity = 0; // aapt resource value: 1 public const int LinearLayoutCompat_android_orientation = 1; // aapt resource value: 4 public const int LinearLayoutCompat_android_weightSum = 4; // aapt resource value: 5 public const int LinearLayoutCompat_divider = 5; // aapt resource value: 8 public const int LinearLayoutCompat_dividerPadding = 8; // aapt resource value: 6 public const int LinearLayoutCompat_measureWithLargestChild = 6; // aapt resource value: 7 public const int LinearLayoutCompat_showDividers = 7; public static int[] LinearLayoutCompat_Layout = new int[] { 16842931, 16842996, 16842997, 16843137}; // aapt resource value: 0 public const int LinearLayoutCompat_Layout_android_layout_gravity = 0; // aapt resource value: 2 public const int LinearLayoutCompat_Layout_android_layout_height = 2; // aapt resource value: 3 public const int LinearLayoutCompat_Layout_android_layout_weight = 3; // aapt resource value: 1 public const int LinearLayoutCompat_Layout_android_layout_width = 1; public static int[] ListPopupWindow = new int[] { 16843436, 16843437}; // aapt resource value: 0 public const int ListPopupWindow_android_dropDownHorizontalOffset = 0; // aapt resource value: 1 public const int ListPopupWindow_android_dropDownVerticalOffset = 1; public static int[] MediaRouteButton = new int[] { 16843071, 16843072, 2130771989, 2130771990}; // aapt resource value: 1 public const int MediaRouteButton_android_minHeight = 1; // aapt resource value: 0 public const int MediaRouteButton_android_minWidth = 0; // aapt resource value: 2 public const int MediaRouteButton_externalRouteEnabledDrawable = 2; // aapt resource value: 3 public const int MediaRouteButton_mediaRouteButtonTint = 3; public static int[] MenuGroup = new int[] { 16842766, 16842960, 16843156, 16843230, 16843231, 16843232}; // aapt resource value: 5 public const int MenuGroup_android_checkableBehavior = 5; // aapt resource value: 0 public const int MenuGroup_android_enabled = 0; // aapt resource value: 1 public const int MenuGroup_android_id = 1; // aapt resource value: 3 public const int MenuGroup_android_menuCategory = 3; // aapt resource value: 4 public const int MenuGroup_android_orderInCategory = 4; // aapt resource value: 2 public const int MenuGroup_android_visible = 2; public static int[] MenuItem = new int[] { 16842754, 16842766, 16842960, 16843014, 16843156, 16843230, 16843231, 16843233, 16843234, 16843235, 16843236, 16843237, 16843375, 2130772186, 2130772187, 2130772188, 2130772189, 2130772190, 2130772191, 2130772192, 2130772193, 2130772194, 2130772195}; // aapt resource value: 16 public const int MenuItem_actionLayout = 16; // aapt resource value: 18 public const int MenuItem_actionProviderClass = 18; // aapt resource value: 17 public const int MenuItem_actionViewClass = 17; // aapt resource value: 13 public const int MenuItem_alphabeticModifiers = 13; // aapt resource value: 9 public const int MenuItem_android_alphabeticShortcut = 9; // aapt resource value: 11 public const int MenuItem_android_checkable = 11; // aapt resource value: 3 public const int MenuItem_android_checked = 3; // aapt resource value: 1 public const int MenuItem_android_enabled = 1; // aapt resource value: 0 public const int MenuItem_android_icon = 0; // aapt resource value: 2 public const int MenuItem_android_id = 2; // aapt resource value: 5 public const int MenuItem_android_menuCategory = 5; // aapt resource value: 10 public const int MenuItem_android_numericShortcut = 10; // aapt resource value: 12 public const int MenuItem_android_onClick = 12; // aapt resource value: 6 public const int MenuItem_android_orderInCategory = 6; // aapt resource value: 7 public const int MenuItem_android_title = 7; // aapt resource value: 8 public const int MenuItem_android_titleCondensed = 8; // aapt resource value: 4 public const int MenuItem_android_visible = 4; // aapt resource value: 19 public const int MenuItem_contentDescription = 19; // aapt resource value: 21 public const int MenuItem_iconTint = 21; // aapt resource value: 22 public const int MenuItem_iconTintMode = 22; // aapt resource value: 14 public const int MenuItem_numericModifiers = 14; // aapt resource value: 15 public const int MenuItem_showAsAction = 15; // aapt resource value: 20 public const int MenuItem_tooltipText = 20; public static int[] MenuView = new int[] { 16842926, 16843052, 16843053, 16843054, 16843055, 16843056, 16843057, 2130772196, 2130772197}; // aapt resource value: 4 public const int MenuView_android_headerBackground = 4; // aapt resource value: 2 public const int MenuView_android_horizontalDivider = 2; // aapt resource value: 5 public const int MenuView_android_itemBackground = 5; // aapt resource value: 6 public const int MenuView_android_itemIconDisabledAlpha = 6; // aapt resource value: 1 public const int MenuView_android_itemTextAppearance = 1; // aapt resource value: 3 public const int MenuView_android_verticalDivider = 3; // aapt resource value: 0 public const int MenuView_android_windowAnimationStyle = 0; // aapt resource value: 7 public const int MenuView_preserveIconSpacing = 7; // aapt resource value: 8 public const int MenuView_subMenuArrow = 8; public static int[] NavigationView = new int[] { 16842964, 16842973, 16843039, 2130772030, 2130772291, 2130772292, 2130772293, 2130772294, 2130772295, 2130772296}; // aapt resource value: 0 public const int NavigationView_android_background = 0; // aapt resource value: 1 public const int NavigationView_android_fitsSystemWindows = 1; // aapt resource value: 2 public const int NavigationView_android_maxWidth = 2; // aapt resource value: 3 public const int NavigationView_elevation = 3; // aapt resource value: 9 public const int NavigationView_headerLayout = 9; // aapt resource value: 7 public const int NavigationView_itemBackground = 7; // aapt resource value: 5 public const int NavigationView_itemIconTint = 5; // aapt resource value: 8 public const int NavigationView_itemTextAppearance = 8; // aapt resource value: 6 public const int NavigationView_itemTextColor = 6; // aapt resource value: 4 public const int NavigationView_menu = 4; public static int[] PopupWindow = new int[] { 16843126, 16843465, 2130772198}; // aapt resource value: 1 public const int PopupWindow_android_popupAnimationStyle = 1; // aapt resource value: 0 public const int PopupWindow_android_popupBackground = 0; // aapt resource value: 2 public const int PopupWindow_overlapAnchor = 2; public static int[] PopupWindowBackgroundState = new int[] { 2130772199}; // aapt resource value: 0 public const int PopupWindowBackgroundState_state_above_anchor = 0; public static int[] RecycleListView = new int[] { 2130772200, 2130772201}; // aapt resource value: 0 public const int RecycleListView_paddingBottomNoButtons = 0; // aapt resource value: 1 public const int RecycleListView_paddingTopNoTitle = 1; public static int[] RecyclerView = new int[] { 16842948, 16842993, 2130771968, 2130771969, 2130771970, 2130771971, 2130771972, 2130771973, 2130771974, 2130771975, 2130771976}; // aapt resource value: 1 public const int RecyclerView_android_descendantFocusability = 1; // aapt resource value: 0 public const int RecyclerView_android_orientation = 0; // aapt resource value: 6 public const int RecyclerView_fastScrollEnabled = 6; // aapt resource value: 9 public const int RecyclerView_fastScrollHorizontalThumbDrawable = 9; // aapt resource value: 10 public const int RecyclerView_fastScrollHorizontalTrackDrawable = 10; // aapt resource value: 7 public const int RecyclerView_fastScrollVerticalThumbDrawable = 7; // aapt resource value: 8 public const int RecyclerView_fastScrollVerticalTrackDrawable = 8; // aapt resource value: 2 public const int RecyclerView_layoutManager = 2; // aapt resource value: 4 public const int RecyclerView_reverseLayout = 4; // aapt resource value: 3 public const int RecyclerView_spanCount = 3; // aapt resource value: 5 public const int RecyclerView_stackFromEnd = 5; public static int[] ScrimInsetsFrameLayout = new int[] { 2130772297}; // aapt resource value: 0 public const int ScrimInsetsFrameLayout_insetForeground = 0; public static int[] ScrollingViewBehavior_Layout = new int[] { 2130772298}; // aapt resource value: 0 public const int ScrollingViewBehavior_Layout_behavior_overlapTop = 0; public static int[] SearchView = new int[] { 16842970, 16843039, 16843296, 16843364, 2130772202, 2130772203, 2130772204, 2130772205, 2130772206, 2130772207, 2130772208, 2130772209, 2130772210, 2130772211, 2130772212, 2130772213, 2130772214}; // aapt resource value: 0 public const int SearchView_android_focusable = 0; // aapt resource value: 3 public const int SearchView_android_imeOptions = 3; // aapt resource value: 2 public const int SearchView_android_inputType = 2; // aapt resource value: 1 public const int SearchView_android_maxWidth = 1; // aapt resource value: 8 public const int SearchView_closeIcon = 8; // aapt resource value: 13 public const int SearchView_commitIcon = 13; // aapt resource value: 7 public const int SearchView_defaultQueryHint = 7; // aapt resource value: 9 public const int SearchView_goIcon = 9; // aapt resource value: 5 public const int SearchView_iconifiedByDefault = 5; // aapt resource value: 4 public const int SearchView_layout = 4; // aapt resource value: 15 public const int SearchView_queryBackground = 15; // aapt resource value: 6 public const int SearchView_queryHint = 6; // aapt resource value: 11 public const int SearchView_searchHintIcon = 11; // aapt resource value: 10 public const int SearchView_searchIcon = 10; // aapt resource value: 16 public const int SearchView_submitBackground = 16; // aapt resource value: 14 public const int SearchView_suggestionRowLayout = 14; // aapt resource value: 12 public const int SearchView_voiceIcon = 12; public static int[] SnackbarLayout = new int[] { 16843039, 2130772030, 2130772299}; // aapt resource value: 0 public const int SnackbarLayout_android_maxWidth = 0; // aapt resource value: 1 public const int SnackbarLayout_elevation = 1; // aapt resource value: 2 public const int SnackbarLayout_maxActionInlineWidth = 2; public static int[] Spinner = new int[] { 16842930, 16843126, 16843131, 16843362, 2130772031}; // aapt resource value: 3 public const int Spinner_android_dropDownWidth = 3; // aapt resource value: 0 public const int Spinner_android_entries = 0; // aapt resource value: 1 public const int Spinner_android_popupBackground = 1; // aapt resource value: 2 public const int Spinner_android_prompt = 2; // aapt resource value: 4 public const int Spinner_popupTheme = 4; public static int[] SwitchCompat = new int[] { 16843044, 16843045, 16843074, 2130772215, 2130772216, 2130772217, 2130772218, 2130772219, 2130772220, 2130772221, 2130772222, 2130772223, 2130772224, 2130772225}; // aapt resource value: 1 public const int SwitchCompat_android_textOff = 1; // aapt resource value: 0 public const int SwitchCompat_android_textOn = 0; // aapt resource value: 2 public const int SwitchCompat_android_thumb = 2; // aapt resource value: 13 public const int SwitchCompat_showText = 13; // aapt resource value: 12 public const int SwitchCompat_splitTrack = 12; // aapt resource value: 10 public const int SwitchCompat_switchMinWidth = 10; // aapt resource value: 11 public const int SwitchCompat_switchPadding = 11; // aapt resource value: 9 public const int SwitchCompat_switchTextAppearance = 9; // aapt resource value: 8 public const int SwitchCompat_thumbTextPadding = 8; // aapt resource value: 3 public const int SwitchCompat_thumbTint = 3; // aapt resource value: 4 public const int SwitchCompat_thumbTintMode = 4; // aapt resource value: 5 public const int SwitchCompat_track = 5; // aapt resource value: 6 public const int SwitchCompat_trackTint = 6; // aapt resource value: 7 public const int SwitchCompat_trackTintMode = 7; public static int[] TabItem = new int[] { 16842754, 16842994, 16843087}; // aapt resource value: 0 public const int TabItem_android_icon = 0; // aapt resource value: 1 public const int TabItem_android_layout = 1; // aapt resource value: 2 public const int TabItem_android_text = 2; public static int[] TabLayout = new int[] { 2130772300, 2130772301, 2130772302, 2130772303, 2130772304, 2130772305, 2130772306, 2130772307, 2130772308, 2130772309, 2130772310, 2130772311, 2130772312, 2130772313, 2130772314, 2130772315}; // aapt resource value: 3 public const int TabLayout_tabBackground = 3; // aapt resource value: 2 public const int TabLayout_tabContentStart = 2; // aapt resource value: 5 public const int TabLayout_tabGravity = 5; // aapt resource value: 0 public const int TabLayout_tabIndicatorColor = 0; // aapt resource value: 1 public const int TabLayout_tabIndicatorHeight = 1; // aapt resource value: 7 public const int TabLayout_tabMaxWidth = 7; // aapt resource value: 6 public const int TabLayout_tabMinWidth = 6; // aapt resource value: 4 public const int TabLayout_tabMode = 4; // aapt resource value: 15 public const int TabLayout_tabPadding = 15; // aapt resource value: 14 public const int TabLayout_tabPaddingBottom = 14; // aapt resource value: 13 public const int TabLayout_tabPaddingEnd = 13; // aapt resource value: 11 public const int TabLayout_tabPaddingStart = 11; // aapt resource value: 12 public const int TabLayout_tabPaddingTop = 12; // aapt resource value: 10 public const int TabLayout_tabSelectedTextColor = 10; // aapt resource value: 8 public const int TabLayout_tabTextAppearance = 8; // aapt resource value: 9 public const int TabLayout_tabTextColor = 9; public static int[] TextAppearance = new int[] { 16842901, 16842902, 16842903, 16842904, 16842906, 16842907, 16843105, 16843106, 16843107, 16843108, 16843692, 2130772047, 2130772053}; // aapt resource value: 10 public const int TextAppearance_android_fontFamily = 10; // aapt resource value: 6 public const int TextAppearance_android_shadowColor = 6; // aapt resource value: 7 public const int TextAppearance_android_shadowDx = 7; // aapt resource value: 8 public const int TextAppearance_android_shadowDy = 8; // aapt resource value: 9 public const int TextAppearance_android_shadowRadius = 9; // aapt resource value: 3 public const int TextAppearance_android_textColor = 3; // aapt resource value: 4 public const int TextAppearance_android_textColorHint = 4; // aapt resource value: 5 public const int TextAppearance_android_textColorLink = 5; // aapt resource value: 0 public const int TextAppearance_android_textSize = 0; // aapt resource value: 2 public const int TextAppearance_android_textStyle = 2; // aapt resource value: 1 public const int TextAppearance_android_typeface = 1; // aapt resource value: 12 public const int TextAppearance_fontFamily = 12; // aapt resource value: 11 public const int TextAppearance_textAllCaps = 11; public static int[] TextInputLayout = new int[] { 16842906, 16843088, 2130772316, 2130772317, 2130772318, 2130772319, 2130772320, 2130772321, 2130772322, 2130772323, 2130772324, 2130772325, 2130772326, 2130772327, 2130772328, 2130772329}; // aapt resource value: 1 public const int TextInputLayout_android_hint = 1; // aapt resource value: 0 public const int TextInputLayout_android_textColorHint = 0; // aapt resource value: 6 public const int TextInputLayout_counterEnabled = 6; // aapt resource value: 7 public const int TextInputLayout_counterMaxLength = 7; // aapt resource value: 9 public const int TextInputLayout_counterOverflowTextAppearance = 9; // aapt resource value: 8 public const int TextInputLayout_counterTextAppearance = 8; // aapt resource value: 4 public const int TextInputLayout_errorEnabled = 4; // aapt resource value: 5 public const int TextInputLayout_errorTextAppearance = 5; // aapt resource value: 10 public const int TextInputLayout_hintAnimationEnabled = 10; // aapt resource value: 3 public const int TextInputLayout_hintEnabled = 3; // aapt resource value: 2 public const int TextInputLayout_hintTextAppearance = 2; // aapt resource value: 13 public const int TextInputLayout_passwordToggleContentDescription = 13; // aapt resource value: 12 public const int TextInputLayout_passwordToggleDrawable = 12; // aapt resource value: 11 public const int TextInputLayout_passwordToggleEnabled = 11; // aapt resource value: 14 public const int TextInputLayout_passwordToggleTint = 14; // aapt resource value: 15 public const int TextInputLayout_passwordToggleTintMode = 15; public static int[] Toolbar = new int[] { 16842927, 16843072, 2130772005, 2130772008, 2130772012, 2130772024, 2130772025, 2130772026, 2130772027, 2130772028, 2130772029, 2130772031, 2130772226, 2130772227, 2130772228, 2130772229, 2130772230, 2130772231, 2130772232, 2130772233, 2130772234, 2130772235, 2130772236, 2130772237, 2130772238, 2130772239, 2130772240, 2130772241, 2130772242}; // aapt resource value: 0 public const int Toolbar_android_gravity = 0; // aapt resource value: 1 public const int Toolbar_android_minHeight = 1; // aapt resource value: 21 public const int Toolbar_buttonGravity = 21; // aapt resource value: 23 public const int Toolbar_collapseContentDescription = 23; // aapt resource value: 22 public const int Toolbar_collapseIcon = 22; // aapt resource value: 6 public const int Toolbar_contentInsetEnd = 6; // aapt resource value: 10 public const int Toolbar_contentInsetEndWithActions = 10; // aapt resource value: 7 public const int Toolbar_contentInsetLeft = 7; // aapt resource value: 8 public const int Toolbar_contentInsetRight = 8; // aapt resource value: 5 public const int Toolbar_contentInsetStart = 5; // aapt resource value: 9 public const int Toolbar_contentInsetStartWithNavigation = 9; // aapt resource value: 4 public const int Toolbar_logo = 4; // aapt resource value: 26 public const int Toolbar_logoDescription = 26; // aapt resource value: 20 public const int Toolbar_maxButtonHeight = 20; // aapt resource value: 25 public const int Toolbar_navigationContentDescription = 25; // aapt resource value: 24 public const int Toolbar_navigationIcon = 24; // aapt resource value: 11 public const int Toolbar_popupTheme = 11; // aapt resource value: 3 public const int Toolbar_subtitle = 3; // aapt resource value: 13 public const int Toolbar_subtitleTextAppearance = 13; // aapt resource value: 28 public const int Toolbar_subtitleTextColor = 28; // aapt resource value: 2 public const int Toolbar_title = 2; // aapt resource value: 14 public const int Toolbar_titleMargin = 14; // aapt resource value: 18 public const int Toolbar_titleMarginBottom = 18; // aapt resource value: 16 public const int Toolbar_titleMarginEnd = 16; // aapt resource value: 15 public const int Toolbar_titleMarginStart = 15; // aapt resource value: 17 public const int Toolbar_titleMarginTop = 17; // aapt resource value: 19 public const int Toolbar_titleMargins = 19; // aapt resource value: 12 public const int Toolbar_titleTextAppearance = 12; // aapt resource value: 27 public const int Toolbar_titleTextColor = 27; public static int[] View = new int[] { 16842752, 16842970, 2130772243, 2130772244, 2130772245}; // aapt resource value: 1 public const int View_android_focusable = 1; // aapt resource value: 0 public const int View_android_theme = 0; // aapt resource value: 3 public const int View_paddingEnd = 3; // aapt resource value: 2 public const int View_paddingStart = 2; // aapt resource value: 4 public const int View_theme = 4; public static int[] ViewBackgroundHelper = new int[] { 16842964, 2130772246, 2130772247}; // aapt resource value: 0 public const int ViewBackgroundHelper_android_background = 0; // aapt resource value: 1 public const int ViewBackgroundHelper_backgroundTint = 1; // aapt resource value: 2 public const int ViewBackgroundHelper_backgroundTintMode = 2; public static int[] ViewStubCompat = new int[] { 16842960, 16842994, 16842995}; // aapt resource value: 0 public const int ViewStubCompat_android_id = 0; // aapt resource value: 2 public const int ViewStubCompat_android_inflatedId = 2; // aapt resource value: 1 public const int ViewStubCompat_android_layout = 1; static Styleable() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } private Styleable() { } } } } #pragma warning restore 1591
31.78934
138
0.731934
[ "MIT" ]
igupansini/Programming-Mobile-FATEC
MarcadorTruco/MarcadorTruco/MarcadorTruco.Android/Resources/Resource.designer.cs
238,588
C#
/* * QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. * Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ using System; using System.Collections.Generic; using System.Linq; using NUnit.Framework; using QuantConnect.Securities.Future; namespace QuantConnect.Tests.Common.Securities.Futures { [TestFixture] public class FuturesExpiryUtilityFunctionsTests { [TestCase("08/05/2017", 4, "12/05/2017")] [TestCase("10/05/2017", 5, "17/05/2017")] [TestCase("24/12/2017", 3, "28/12/2017")] public void AddBusinessDays_WithPositiveInput_ShouldReturnNthSuccedingBusinessDay(string time, int n, string actual) { //Arrange var inputTime = DateTime.ParseExact(time, "dd/MM/yyyy", null); var actualDate = DateTime.ParseExact(actual, "dd/MM/yyyy", null); //Act var calculatedDate = FuturesExpiryUtilityFunctions.AddBusinessDays(inputTime, n); //Assert Assert.AreEqual(calculatedDate, actualDate); } [TestCase("11/05/2017", -2, "09/05/2017")] [TestCase("15/05/2017", -3, "10/05/2017")] [TestCase("26/12/2017", -5, "18/12/2017")] public void AddBusinessDays_WithNegativeInput_ShouldReturnNthprecedingBusinessDay(string time, int n, string actual) { //Arrange var inputTime = DateTime.ParseExact(time, "dd/MM/yyyy", null); var actualDate = DateTime.ParseExact(actual, "dd/MM/yyyy", null); //Act var calculatedDate = FuturesExpiryUtilityFunctions.AddBusinessDays(inputTime, n); //Assert Assert.AreEqual(calculatedDate, actualDate); } [TestCase("01/03/2016", 5, "24/03/2016")] [TestCase("01/02/2014", 3, "26/02/2014")] [TestCase("05/07/2017", 7, "21/07/2017")] public void NthLastBusinessDay_WithInputsLessThanDaysInMonth_ShouldReturnNthLastBusinessDay(string time, int numberOfDays, string actual) { //Arrange var inputDate = DateTime.ParseExact(time, "dd/MM/yyyy", null); var actualDate = DateTime.ParseExact(actual, "dd/MM/yyyy", null); //Act var calculatedDate = FuturesExpiryUtilityFunctions.NthLastBusinessDay(inputDate, numberOfDays); //Assert Assert.AreEqual(calculatedDate, actualDate); } [TestCase("01/03/2016", 45)] [TestCase("05/02/2017", 30)] [ExpectedException(typeof(ArgumentOutOfRangeException))] public void NthLastBusinessDay_WithInputsMoreThanDaysInMonth_ShouldThrowException(string time, int numberOfDays) { //Arrange var inputDate = DateTime.ParseExact(time, "dd/MM/yyyy", null); //Act FuturesExpiryUtilityFunctions.NthLastBusinessDay(inputDate, numberOfDays); } [TestCase("01/01/2016", 1, "01/04/2016")] [TestCase("02/01/2019", 1, "02/01/2019")] [TestCase("01/01/2019", 1, "01/02/2019")] [TestCase("06/01/2019", 1, "06/03/2019")] [TestCase("07/01/2019", 5, "07/08/2019")] public void NthBusinessDay_ShouldReturnAccurateBusinessDay(string testDate, int nthBusinessDay, string actualDate) { var inputDate = DateTime.ParseExact(testDate, "MM/dd/yyyy", null); var expectedResult = DateTime.ParseExact(actualDate, "MM/dd/yyyy", null); var actual = FuturesExpiryUtilityFunctions.NthBusinessDay(inputDate, nthBusinessDay); Assert.AreEqual(expectedResult, actual); } [TestCase("01/01/2016", 1, "01/05/2016", "01/04/2016")] [TestCase("02/01/2019", 12, "02/20/2019", "02/19/2019")] [TestCase("01/01/2019", 1, "01/07/2019", "01/02/2019", "01/03/2019", "01/04/2019")] public void NthBusinessDay_ShouldReturnAccurateBusinessDay_WithHolidays(string testDate, int nthBusinessDay, string actualDate, params string[] holidayDates) { var inputDate = DateTime.ParseExact(testDate, "MM/dd/yyyy", null); var expectedResult = DateTime.ParseExact(actualDate, "MM/dd/yyyy", null); var holidays = holidayDates.Select(x => DateTime.ParseExact(x, "MM/dd/yyyy", null)); var actual = FuturesExpiryUtilityFunctions.NthBusinessDay(inputDate, nthBusinessDay, holidays); Assert.AreEqual(expectedResult, actual); } [TestCase("01/2015","16/01/2015")] [TestCase("06/2016", "17/06/2016")] [TestCase("12/2018", "21/12/2018")] public void ThirdFriday_WithNormalMonth_ShouldReturnThridFriday(string time, string actual) { //Arrange var inputMonth = DateTime.ParseExact(time,"MM/yyyy", null); var actualFriday = DateTime.ParseExact(actual, "dd/MM/yyyy", null); //Act var calculatedFriday = FuturesExpiryUtilityFunctions.ThirdFriday(inputMonth); //Assert Assert.AreEqual(calculatedFriday, actualFriday); } [TestCase("04/2017", "19/04/2017")] [TestCase("02/2015", "18/02/2015")] [TestCase("01/2003", "15/01/2003")] public void ThirdWednesday_WithNormalMonth_ShouldReturnThridWednesday(string time, string actual) { //Arrange var inputMonth = DateTime.ParseExact(time, "MM/yyyy", null); var actualFriday = DateTime.ParseExact(actual, "dd/MM/yyyy", null); //Act var calculatedFriday = FuturesExpiryUtilityFunctions.ThirdWednesday(inputMonth); //Assert Assert.AreEqual(calculatedFriday, actualFriday); } [TestCase("07/05/2017")] [TestCase("01/01/1998")] [TestCase("25/03/2005")] public void NotHoliday_ForAHoliday_ShouldReturnFalse(string time) { //Arrange var inputDate = DateTime.ParseExact(time, "dd/MM/yyyy", null); //Act var calculatedValue = FuturesExpiryUtilityFunctions.NotHoliday(inputDate); //Assert Assert.AreEqual(calculatedValue, false); } [TestCase("08/05/2017")] [TestCase("05/04/2007")] [TestCase("27/05/2003")] public void NotHoliday_ForABusinessDay_ShouldReturnTrue(string time) { //Arrange var inputDate = DateTime.ParseExact(time, "dd/MM/yyyy", null); //Act var calculatedValue = FuturesExpiryUtilityFunctions.NotHoliday(inputDate); //Assert Assert.AreEqual(calculatedValue, true); } [TestCase("09/04/2017")] [TestCase("02/04/2003")] [TestCase("02/03/2002")] [ExpectedException(typeof(ArgumentException))] public void NotPrecededByHoliday_WithNonThrusdayWeekday_ShouldThrowException(string day) { //Arrange var inputDate = DateTime.ParseExact(day, "dd/MM/yyyy", null); //Act FuturesExpiryUtilityFunctions.NotPrecededByHoliday(inputDate); } [TestCase("13/04/2017")] [TestCase("14/02/2002")] public void NotPrecededByHoliday_ForThursdayWithNoHolidayInFourPrecedingDays_ShouldReturnTrue(string day) { //Arrange var inputDate = DateTime.ParseExact(day, "dd/MM/yyyy", null); //Act var calculatedOutput = FuturesExpiryUtilityFunctions.NotPrecededByHoliday(inputDate); //Assert Assert.AreEqual(calculatedOutput, true); } [TestCase("31/03/2016")] [TestCase("30/05/2002")] public void NotPrecededByHoliday_ForThursdayWithHolidayInFourPrecedingDays_ShouldReturnFalse(string day) { //Arrange var inputDate = DateTime.ParseExact(day, "dd/MM/yyyy", null); //Act var calculatedOutput = FuturesExpiryUtilityFunctions.NotPrecededByHoliday(inputDate); //Assert Assert.AreEqual(calculatedOutput, false); } [TestCase("01/05/2019", "01/30/2019", "17:10:00")] [TestCase("01/31/2019", "01/30/2019", "12:00:00")] [TestCase("03/01/2012", "04/02/2012", "17:10:00")] public void DairyReportDates_ShouldNormalizeDateTimeAndReturnCorrectReportDate(string contractMonth, string reportDate, string lastTradeTime) { var actual = FuturesExpiryUtilityFunctions.DairyLastTradeDate( DateTime.ParseExact(contractMonth, "MM/dd/yyyy", null), TimeSpan.Parse(lastTradeTime)); var expected = DateTime.ParseExact(reportDate, "MM/dd/yyyy", null).AddDays(-1).Add(TimeSpan.Parse(lastTradeTime)); Assert.AreEqual(expected, actual); } } }
39.817797
165
0.631372
[ "Apache-2.0" ]
QilongChan/Lean
Tests/Common/Securities/Futures/FuturesExpiryUtilityFunctionsTests.cs
9,399
C#
using System.Collections; using System.Collections.Generic; using UnityEngine; public class DebugUtility { static public void Assert(bool isTrue, string message = "") { if (!isTrue) Debug.LogError(message); } }
22.9
65
0.71179
[ "MIT" ]
wood9366/freecell
Assets/scripts/share/DebugUtility.cs
231
C#
using PX.Data; using PX.Objects.PM; using PX.SM; using System; using System.IO; using System.Net; using Newtonsoft.Json.Linq; using System.Text; using Newtonsoft.Json; using System.Security.Cryptography; using System.Collections.Generic; using PX.Data.DependencyInjection; using Microsoft.AspNet.SignalR.Infrastructure; using PX.OAuthClient.Hubs; namespace SmartSheetIntegration { public class MyProfileMaintExt : PXGraphExtension<MyProfileMaint>, IGraphWithInitialization { [InjectDependency] private IConnectionManager _signalRConnectionManager { get; set; } #region Events protected virtual void Users_RowSelected(PXCache cache, PXRowSelectedEventArgs e) { if (e.Row == null) { return; } Users userRow = e.Row as Users; UsersSSExt userExtRow = PXCache<Users>.GetExtension<UsersSSExt>(userRow); refreshSSToken.SetEnabled(userExtRow != null && userExtRow.UsrSmartSheetStatus == SmartsheetConstants.Messages.SS_CONNECTED); } #endregion #region Actions public PXAction<Users> requestSSToken; [PXButton(CommitChanges = true)] [PXUIField(DisplayName = SmartsheetConstants.ActionsNames.REQUEST_SS_TOKEN, MapViewRights = PXCacheRights.Update, MapEnableRights = PXCacheRights.Update)] protected virtual void RequestSSToken() { PMSetup pmSetupRow = PXSelect<PMSetup>.Select(Base); PMSetupSSExt pmSetupSSExtRow = PXCache<PMSetup>.GetExtension<PMSetupSSExt>(pmSetupRow); string loginScopeCompany = PXDatabase.Companies.Length > 0 ? PXAccess.GetCompanyName() : String.Empty; string currentScope = String.Format(",{0},{1}", Base.Accessinfo.UserName, loginScopeCompany); if (pmSetupSSExtRow != null && pmSetupSSExtRow.UsrSmartsheetClientID != null) { string smartsheetRedirect = SmartsheetConstants.SSCodeRequest.ENDPOINT; smartsheetRedirect += SmartsheetConstants.SSCodeRequest.RESPONSE_TYPE; smartsheetRedirect += SmartsheetConstants.SSCodeRequest.CLIENT_ID + pmSetupSSExtRow.UsrSmartsheetClientID; smartsheetRedirect += SmartsheetConstants.SSCodeRequest.SCOPE; smartsheetRedirect += SmartsheetConstants.SSCodeRequest.STATE + currentScope; throw new PXRedirectToUrlException(smartsheetRedirect, PXBaseRedirectException.WindowMode.InlineWindow, string.Empty, false); } else throw new PXException(SmartsheetConstants.Messages.SMARTSHEET_ID_MISSING); } public PXAction<Users> refreshSSToken; [PXButton(CommitChanges = true)] [PXUIField(DisplayName = SmartsheetConstants.ActionsNames.REFRESH_SS_TOKEN, MapViewRights = PXCacheRights.Update, MapEnableRights = PXCacheRights.Update)] protected virtual void RefreshSSToken() { MyProfileMaintExt graphExtended = Base.GetExtension<MyProfileMaintExt>(); graphExtended.RefreshSmartsheetToken(); } #endregion #region SmartsheetToken methods public void GetSmartsheetToken(string currentURL) { Guid loggedUser = Base.Accessinfo.UserID; Users usersRow = PXSelect<Users, Where<Users.pKID, Equal<Required<Users.pKID>>>> .Select(this.Base, loggedUser); UsersSSExt usersSSExtRow = PXCache<Users>.GetExtension<UsersSSExt>(usersRow); this.Base.UserProfile.Current = this.Base.UserProfile.Search<Users.pKID>(usersRow.PKID); PMSetup setupRow = PXSelect<PMSetup>.Select(this.Base); PMSetupSSExt setupSSExtRow = PXCache<PMSetup>.GetExtension<PMSetupSSExt>(setupRow); if (currentURL.IndexOf(SmartsheetConstants.SSCodeRequest.STATE, StringComparison.CurrentCultureIgnoreCase) > 0) { string ssCode = GetSSCodeString(currentURL); if (ssCode.Trim().Length > 0) { List<string> ssToken = getSSToken(setupSSExtRow.UsrSmartsheetClientID, ssCode, setupSSExtRow.UsrSmartsheetAppSecret); if (ssToken.Count == 2) { usersSSExtRow.UsrSmartsheetToken = ssToken[0]; usersSSExtRow.UsrSmartsheetRefreshToken = ssToken[1]; this.Base.UserProfile.Update(usersRow); this.Base.Actions.PressSave(); } } } SendRefreshCall(); return; } /// <summary> /// Returns the code read from the URL parameter /// </summary> /// <param name="uRL"></param> /// <returns></returns> private string GetSSCodeString(string uRL) { int codePosition = uRL.IndexOf(SmartsheetConstants.SSTokenPOSTRequest.CODE_PREFIX, StringComparison.CurrentCultureIgnoreCase); if (codePosition > 0) { int endOfCodePosition = uRL.IndexOf(SmartsheetConstants.SSConstants.AMPERSAND, codePosition); if (endOfCodePosition > 0) { return uRL.Substring(codePosition + 5, endOfCodePosition - codePosition - 5); } else { return uRL.Substring(codePosition + 5); } } return string.Empty; } public string RefreshSmartsheetToken() { Guid loggedUser = PXAccess.GetUserID(); Users usersRow = PXSelect<Users, Where<Users.pKID, Equal<Required<Users.pKID>>>> .Select(this.Base, loggedUser); UsersSSExt usersSSExtRow = PXCache<Users>.GetExtension<UsersSSExt>(usersRow); PMSetup setupRow = PXSelect<PMSetup>.Select(this.Base); PMSetupSSExt setupSSExtRow = PXCache<PMSetup>.GetExtension<PMSetupSSExt>(setupRow); if (usersSSExtRow != null && usersSSExtRow.UsrSmartsheetRefreshToken != null) { List<string> ssToken = refreshToken(setupSSExtRow.UsrSmartsheetClientID, setupSSExtRow.UsrSmartsheetAppSecret, usersSSExtRow.UsrSmartsheetRefreshToken); if (ssToken.Count == 2) { usersSSExtRow.UsrSmartsheetToken = ssToken[0]; usersSSExtRow.UsrSmartsheetRefreshToken = ssToken[1]; this.Base.UserProfile.Update(usersRow); this.Base.Actions.PressSave(); return usersSSExtRow.UsrSmartsheetToken; } } return ""; } private List<string> getSSToken(string smartSheetClientID, string smartSheetcode, string smartSheetAppSecret) { string hashSeedFirstPart = smartSheetAppSecret.Trim() + SmartsheetConstants.SSConstants.PIPE; string hashSeedSecondpart = hashSeedFirstPart + smartSheetcode.Trim(); string sha256 = sha256Hash(hashSeedSecondpart); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(SmartsheetConstants.SSTokenPOSTRequest.ENDPOINT); string postData = SmartsheetConstants.SSTokenPOSTRequest.GRANT_TYPE; postData += SmartsheetConstants.SSTokenPOSTRequest.CODE_PREFIX_W_AMPERSAND + smartSheetcode.Trim(); postData += SmartsheetConstants.SSTokenPOSTRequest.CLIENT_ID + smartSheetClientID.Trim(); postData += SmartsheetConstants.SSTokenPOSTRequest.HASH + sha256; byte[] byteArray = Encoding.UTF8.GetBytes(postData); request.Method = SmartsheetConstants.SSTokenPOSTRequest.POST_REQUEST; request.ContentType = SmartsheetConstants.SSTokenPOSTRequest.CONTENT_TYPE; request.ContentLength = byteArray.Length; try { Stream requestStream = request.GetRequestStream(); requestStream.Write(byteArray, 0, byteArray.Length); HttpWebResponse response = (HttpWebResponse)request.GetResponse(); requestStream = response.GetResponseStream(); StreamReader reader = new StreamReader(requestStream); string responseFromServer = reader.ReadToEnd(); JObject jsonDataArray = (JObject)JsonConvert.DeserializeObject(responseFromServer); List<string> tokenStrings = new List<string>(); string ssAccessToken = ""; string ssRefreshToken = ""; if (jsonDataArray[SmartsheetConstants.SSTokenPOSTRequest.JSON_ACCESS_TOKEN].Value<string>() != null && jsonDataArray[SmartsheetConstants.SSTokenPOSTRequest.JSON_ACCESS_TOKEN].Value<string>() != "") { ssAccessToken = jsonDataArray[SmartsheetConstants.SSTokenPOSTRequest.JSON_ACCESS_TOKEN].Value<string>(); ssRefreshToken = jsonDataArray[SmartsheetConstants.SSTokenPOSTRequest.JSON_REFRESH_TOKEN].Value<string>(); tokenStrings.Add(ssAccessToken); tokenStrings.Add(ssRefreshToken); } requestStream.Close(); reader.Close(); response.Close(); return tokenStrings; } catch (Exception e) { throw new PXException(e.Message); } } private List<string> refreshToken(string smartSheetClientID, string smartSheetAppSecret, string refreshTokenValue) { string hashSeedFirstPart = smartSheetAppSecret.Trim() + SmartsheetConstants.SSConstants.PIPE; string hashSeedSecondpart = hashSeedFirstPart + refreshTokenValue.Trim(); string sha256 = sha256Hash(hashSeedSecondpart); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(SmartsheetConstants.SSTokenPOSTRequest.ENDPOINT); string postData = SmartsheetConstants.SSTokenPOSTRequest.GRANT_TYPE_REFRESH; postData += SmartsheetConstants.SSTokenPOSTRequest.CLIENT_ID + smartSheetClientID.Trim(); postData += SmartsheetConstants.SSTokenPOSTRequest.REFRESH_TOKEN + refreshTokenValue.Trim(); ; postData += SmartsheetConstants.SSTokenPOSTRequest.HASH + sha256; byte[] byteArray = Encoding.UTF8.GetBytes(postData); request.Method = SmartsheetConstants.SSTokenPOSTRequest.POST_REQUEST; request.ContentType = SmartsheetConstants.SSTokenPOSTRequest.CONTENT_TYPE; request.ContentLength = byteArray.Length; try { Stream requestStream = request.GetRequestStream(); requestStream.Write(byteArray, 0, byteArray.Length); HttpWebResponse response = (HttpWebResponse)request.GetResponse(); requestStream = response.GetResponseStream(); StreamReader reader = new StreamReader(requestStream); string responseFromServer = reader.ReadToEnd(); JObject jsonDataArray = (JObject)JsonConvert.DeserializeObject(responseFromServer); List<string> tokenStrings = new List<string>(); string ssAccessToken = ""; string ssRefreshToken = ""; if (jsonDataArray[SmartsheetConstants.SSTokenPOSTRequest.JSON_ACCESS_TOKEN].Value<string>() != null && jsonDataArray[SmartsheetConstants.SSTokenPOSTRequest.JSON_ACCESS_TOKEN].Value<string>() != "") { ssAccessToken = jsonDataArray[SmartsheetConstants.SSTokenPOSTRequest.JSON_ACCESS_TOKEN].Value<string>(); ssRefreshToken = jsonDataArray[SmartsheetConstants.SSTokenPOSTRequest.JSON_REFRESH_TOKEN].Value<string>(); tokenStrings.Add(ssAccessToken); tokenStrings.Add(ssRefreshToken); } requestStream.Close(); reader.Close(); response.Close(); return tokenStrings; } catch (Exception e) { throw new PXException(e.Message); } } /// <summary> /// Hash generator /// </summary> /// <param name="value"></param> /// <returns></returns> private string sha256Hash(String value) { StringBuilder Sb = new StringBuilder(); using (SHA256 hash = SHA256Managed.Create()) { Encoding enc = Encoding.UTF8; Byte[] result = hash.ComputeHash(enc.GetBytes(value)); foreach (Byte b in result) Sb.Append(b.ToString("x2")); } return Sb.ToString(); } #endregion private void SendRefreshCall() { var hubContext = _signalRConnectionManager.GetHubContext<RefreshHub>(); hubContext.Clients.All.RefreshPage(); } } }
43.622951
168
0.617813
[ "MIT" ]
Acumatica/Acumatica-Smartsheet
PX.SmartSheetIntegration/SM/MyProfileMaintExt.cs
13,305
C#
#nullable enable using System; using System.IO; using System.Threading; using System.Threading.Tasks; using Android.App; using Android.Content; using Android.Graphics; using Android.Graphics.Drawables; using Android.Views; using Android.Widget; using Bumptech.Glide; using Xamarin.Forms; using Xamarin.Forms.Platform.Android; using static Bumptech.Glide.Glide; namespace Android.Glide { public static class GlideExtensions { public static async Task LoadViaGlide (this ImageView imageView, ImageSource source, CancellationToken token) { try { if (!IsActivityAlive (imageView, source)) { CancelGlide (imageView); return; } RequestManager request = With (imageView.Context); RequestBuilder? builder = null; if (source is null) { Forms.Debug ("`{0}` is null, clearing image", nameof (ImageSource)); Clear (request, imageView); return; } switch (source) { case FileImageSource fileSource: builder = HandleFileImageSource (request, fileSource); break; case UriImageSource uriSource: builder = HandleUriImageSource (request, uriSource); break; case StreamImageSource streamSource: builder = await HandleStreamImageSource (request, streamSource, token, () => !IsActivityAlive (imageView, source)); break; } var handler = Forms.GlideHandler; if (handler != null) { Forms.Debug ("Calling into {0} of type `{1}`.", nameof (IGlideHandler), handler.GetType ()); if (handler.Build (imageView, source, builder, token)) { return; } } if (builder is null) { Clear (request, imageView); } else { imageView.Visibility = ViewStates.Visible; builder.Into (imageView); } } catch (Exception exc) { //Since developers can't catch this themselves, I think we should log it and silently fail Forms.Warn ("Unexpected exception in glidex: {0}", exc); } } /// <summary> /// Should only be used internally for IImageSourceHandler calls /// </summary> internal static async Task<Bitmap?> LoadViaGlide (this ImageSource source, Context context, CancellationToken token) { try { if (source is null) { Forms.Debug ("`{0}` is null", nameof (ImageSource)); return null; } if (!IsActivityAlive (context, source)) return null; RequestManager request = With (context); RequestBuilder? builder = null; switch (source) { case FileImageSource fileSource: builder = HandleFileImageSource (request, fileSource); break; case UriImageSource uriSource: builder = HandleUriImageSource (request, uriSource); break; case StreamImageSource streamSource: builder = await HandleStreamImageSource (request, streamSource, token, () => !IsActivityAlive (context, source)); break; } var handler = Forms.GlideHandler; if (handler != null) { Forms.Debug ("Calling into {0} of type `{1}`.", nameof (IGlideHandler), handler.GetType ()); handler.Build (source, ref builder, token); } if (builder is null) return null; var future = builder.Submit (); var result = await Task.Run (() => future.Get (), token); if (result is BitmapDrawable drawable) return drawable.Bitmap; } catch (Exception exc) { //Since developers can't catch this themselves, I think we should log it and silently fail Forms.Warn ("Unexpected exception in glidex: {0}", exc); } return null; } static RequestBuilder HandleFileImageSource (RequestManager request, FileImageSource source) { RequestBuilder builder; var fileName = source.File; var drawable = ResourceManager.GetDrawableByName (fileName); if (drawable != 0) { Forms.Debug ("Loading `{0}` as an Android resource", fileName); builder = request.Load (drawable); } else { Forms.Debug ("Loading `{0}` from disk", fileName); builder = request.Load (fileName); } return builder; } static RequestBuilder HandleUriImageSource (RequestManager request, UriImageSource source) { var url = source.Uri.OriginalString; Forms.Debug ("Loading `{0}` as a web URL", url); return request.Load (url); } static async Task<RequestBuilder?> HandleStreamImageSource (RequestManager request, StreamImageSource source, CancellationToken token, Func<bool> cancelled) { Forms.Debug ("Loading `{0}` as a byte[]. Consider using `AndroidResource` instead, as it would be more performant", nameof (StreamImageSource)); using var memoryStream = new MemoryStream (); using var stream = await source.Stream (token); if (token.IsCancellationRequested || cancelled ()) return null; if (stream is null) return null; await stream.CopyToAsync (memoryStream, token); if (token.IsCancellationRequested || cancelled ()) return null; return request.AsBitmap ().Load (memoryStream.ToArray ()); } static bool IsActivityAlive (ImageView imageView, ImageSource source) { // The imageView.Handle could be IntPtr.Zero? Meaning we somehow have a reference to a disposed ImageView... // I think this is within the realm of "possible" after the await call in LoadViaGlide(). if (imageView.Handle == IntPtr.Zero) { Forms.Warn ("imageView.Handle is IntPtr.Zero, aborting image load for `{0}`.", source); return false; } return IsActivityAlive (imageView.Context, source); } /// <summary> /// NOTE: see https://github.com/bumptech/glide/issues/1484#issuecomment-365625087 /// </summary> static bool IsActivityAlive (Context? context, ImageSource source) { //NOTE: in some cases ContextThemeWrapper is Context var activity = context as Activity ?? Forms.Activity; if (activity != null) { if (activity.IsFinishing) { Forms.Warn ("Activity of type `{0}` is finishing, aborting image load for `{1}`.", activity.GetType ().FullName, source); return false; } if (activity.IsDestroyed) { Forms.Warn ("Activity of type `{0}` is destroyed, aborting image load for `{1}`.", activity.GetType ().FullName, source); return false; } } else if (context != null) { Forms.Warn ("Context `{0}` is not an Android.App.Activity and could not use Android.Glide.Forms.Activity, aborting image load for `{1}`.", context, source); return false; } else { Forms.Warn ("Context is null and could not use Android.Glide.Forms.Activity, aborting image load for `{0}`.", source); return false; } return true; } /// <summary> /// Cancels the Request and "clears" the ImageView /// </summary> static void Clear (RequestManager request, ImageView imageView) { imageView.Visibility = ViewStates.Gone; imageView.SetImageBitmap (null); //We need to call Clear for Glide to know this image is now unused //https://bumptech.github.io/glide/doc/targets.html request.Clear (imageView); } internal static void CancelGlide (this ImageView imageView) { if (imageView.Handle == IntPtr.Zero) { return; } //NOTE: we may be doing a Cancel after the Activity has just exited // To make this work we have to use the Application.Context With (App.Application.Context).Clear (imageView); } } }
33.225806
160
0.68516
[ "MIT" ]
dimonovdd/glidex
glidex.forms/GlideExtensions.cs
7,212
C#
using System; namespace Inheritance { class BaseClass { public void Method() { Console.WriteLine("Method from BaseClass"); } } }
13.769231
55
0.536313
[ "MIT" ]
6e3veR6k/codewars-csharp
resources/csharp-essential-materials/003_Inheritance/003_Inheritance/Inheritance6/BaseClass.cs
181
C#
using System; namespace ELearning.Application.Assignments.Queries.GetPresentNotEvaluatedAssignmentsListById { public class PresentNotEvaluatedAssignmentLookupModel { public int AssignmentId { get; set; } public int UserId { get; set; } public string UserName { get; set; } public string Date { get; set; } public DateTime DateTime { get; set; } public string Solution { get; set; } public int GroupId { get; set; } } }
28.823529
93
0.657143
[ "MIT" ]
MKafar/ELearning
ELearning.Application/Assignments/Queries/GetPresentNotEvaluatedAssignmentsListById/PresentNotEvaluatedAssignmentLookupModel.cs
492
C#
using Microsoft.Extensions.Options; using MongoDB.Driver; using System.Linq; using System; using System.Threading.Tasks; using Mongo=MongoDB.Driver; using MongoDB.Driver.Linq; using MongoDB.Driver.GridFS; using ImageWizard.MongoDB.Models; using System.IO; using ImageWizard.Caches; namespace ImageWizard.MongoDB { /// <summary> /// MongoDBCache /// </summary> public class MongoDBCache : ICache { public MongoDBCache(IOptions<MongoDBCacheOptions> settings) { var mongoSetttings = new Mongo.MongoClientSettings() { Server = new Mongo.MongoServerAddress(settings.Value.Hostname) }; if(settings.Value.Username != null) { mongoSetttings.Credential = MongoCredential.CreateCredential(settings.Value.Database, settings.Value.Username, settings.Value.Password); } Client = new Mongo.MongoClient(mongoSetttings); Database = Client.GetDatabase(settings.Value.Database); ImageMetadatas = Database.GetCollection<ImageMetadataModel>("ImageMetadata"); ImageBuffer = new GridFSBucket(Database, new GridFSBucketOptions() { BucketName = "ImageBuffer" }); //create index ImageMetadatas.Indexes.CreateOne(new CreateIndexModel<ImageMetadataModel>(new IndexKeysDefinitionBuilder<ImageMetadataModel>().Ascending(x => x.Key))); ImageMetadatas.Indexes.CreateOne(new CreateIndexModel<ImageMetadataModel>(new IndexKeysDefinitionBuilder<ImageMetadataModel>().Ascending(x => x.Created))); ImageMetadatas.Indexes.CreateOne(new CreateIndexModel<ImageMetadataModel>(new IndexKeysDefinitionBuilder<ImageMetadataModel>().Ascending(x => x.MimeType))); ImageMetadatas.Indexes.CreateOne(new CreateIndexModel<ImageMetadataModel>(new IndexKeysDefinitionBuilder<ImageMetadataModel>().Ascending(x => x.DPR))); ImageMetadatas.Indexes.CreateOne(new CreateIndexModel<ImageMetadataModel>(new IndexKeysDefinitionBuilder<ImageMetadataModel>().Ascending(x => x.Width))); ImageMetadatas.Indexes.CreateOne(new CreateIndexModel<ImageMetadataModel>(new IndexKeysDefinitionBuilder<ImageMetadataModel>().Ascending(x => x.Height))); } /// <summary> /// Client /// </summary> public Mongo.MongoClient Client { get; } /// <summary> /// Database /// </summary> public Mongo.IMongoDatabase Database { get; } /// <summary> /// ImageMetadatas /// </summary> public Mongo.IMongoCollection<ImageMetadataModel> ImageMetadatas { get; set; } /// <summary> /// ImageDatas /// </summary> public IGridFSBucket ImageBuffer { get; } public async Task<ICachedData> ReadAsync(string key) { ImageMetadataModel foundMetadata = await ImageMetadatas .AsQueryable() .FirstOrDefaultAsync(x => x.Key == key); if(foundMetadata == null) { return null; } CachedData cachedImage = new CachedData(foundMetadata, async () => await ImageBuffer.OpenDownloadStreamByNameAsync(key)); return cachedImage; } public async Task WriteAsync(string key, IMetadata metadata, Stream stream) { ImageMetadataModel model = new ImageMetadataModel() { Created = metadata.Created, Cache = metadata.Cache, Hash = metadata.Hash, Key = metadata.Key, LoaderSource = metadata.LoaderSource, Filters = metadata.Filters, LoaderType = metadata.LoaderType, MimeType = metadata.MimeType, Width = metadata.Width, Height = metadata.Height, DPR = metadata.DPR, FileLength = metadata.FileLength }; //upload image metadata await ImageMetadatas.ReplaceOneAsync(Builders<ImageMetadataModel>.Filter.Where(x => x.Key == key), model, new ReplaceOptions() { IsUpsert = true }); //upload transformed image await ImageBuffer.UploadFromStreamAsync(key, stream); } } }
40.509259
168
0.624229
[ "MIT" ]
haiduong87/ImageWizard
src/ImageWizard.MongoDB/Caches/MongoDBCache.cs
4,377
C#
/* * Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the route53-2013-04-01.normal.json service model. */ using System; namespace Amazon.Route53.Model { /// <summary> /// Configuration for accessing Amazon UpdateHealthCheck service /// </summary> public partial class UpdateHealthCheckResponse : UpdateHealthCheckResult { /// <summary> /// Gets and sets the UpdateHealthCheckResult property. /// Represents the output of a UpdateHealthCheck operation. /// </summary> [Obsolete(@"This property has been deprecated. All properties of the UpdateHealthCheckResult class are now available on the UpdateHealthCheckResponse class. You should use the properties on UpdateHealthCheckResponse instead of accessing them through UpdateHealthCheckResult.")] public UpdateHealthCheckResult UpdateHealthCheckResult { get { return this; } } } }
37.285714
285
0.697957
[ "Apache-2.0" ]
ermshiperete/aws-sdk-net
AWSSDK_DotNet35/Amazon.Route53/Model/UpdateHealthCheckResponse.cs
1,566
C#
// <copyright file="DirectoryInfoBaseAbstractionAdapter.cs" company="QutEcoacoustics"> // All code in this file and all associated files are the copyright and property of the QUT Ecoacoustics Research Group. // </copyright> namespace MetadataUtility.Utilities.FileSystem { using System.IO.Abstractions; /// <summary> /// Bridges System.IO.Abstractions and Microsoft.Extensions.FileSystemGlobbing for directory info. Based off of: /// https://github.com/dotnet/runtime/blob/9c5d363bf8903e269284e660875e8fae0c1b9a79/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Abstractions/DirectoryInfoWrapper.cs. /// </summary> public class DirectoryInfoBaseAbstractionAdapter : Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoBase { private readonly IDirectoryInfo directory; private readonly bool isParentPath; public DirectoryInfoBaseAbstractionAdapter(IDirectoryInfo directory) : this(directory, false) { } public DirectoryInfoBaseAbstractionAdapter(IDirectoryInfo directory, bool isParentPath) { this.directory = directory; this.isParentPath = isParentPath; } public override string Name => this.isParentPath ? ".." : this.directory.Name; public override string FullName => this.directory.FullName; public override Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoBase ParentDirectory => new DirectoryInfoBaseAbstractionAdapter(this.directory.Parent); public override IEnumerable<Microsoft.Extensions.FileSystemGlobbing.Abstractions.FileSystemInfoBase> EnumerateFileSystemInfos() { if (this.directory.Exists) { IEnumerable<IFileSystemInfo> fileSystemInfos; try { fileSystemInfos = this.directory.EnumerateFileSystemInfos("*", System.IO.SearchOption.TopDirectoryOnly); } catch (System.IO.DirectoryNotFoundException) { yield break; } foreach (IFileSystemInfo fileSystemInfo in fileSystemInfos) { if (fileSystemInfo is IDirectoryInfo directoryInfo) { yield return new DirectoryInfoBaseAbstractionAdapter(directoryInfo); } else { yield return new FileInfoBaseAbstractionAdapter((IFileInfo)fileSystemInfo); } } } } public override Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoBase GetDirectory(string path) { bool isParentPath = string.Equals(path, "..", StringComparison.Ordinal); if (isParentPath) { return new DirectoryInfoBaseAbstractionAdapter( this.directory.FileSystem.DirectoryInfo.FromDirectoryName(this.directory.FileSystem.Path.Combine(this.directory.FullName, path)), isParentPath); } else { IDirectoryInfo[] dirs = this.directory.GetDirectories(path); if (dirs.Length == 1) { return new DirectoryInfoBaseAbstractionAdapter(dirs[0], isParentPath); } else if (dirs.Length == 0) { return null; } else { // This shouldn't happen. The parameter path isn't supposed to contain wild card. throw new InvalidOperationException( string.Format( "More than one sub directories are found under {0} with path {1}.", this.directory.FullName, path)); } } } public override Microsoft.Extensions.FileSystemGlobbing.Abstractions.FileInfoBase GetFile(string path) => new FileInfoBaseAbstractionAdapter(this.directory.FileSystem.FileInfo.FromFileName(path)); } }
41.262136
183
0.602353
[ "MIT" ]
JordanMercerECCC/emu
src/MetadataUtility/Utilities/FileSystem/DirectoryInfoBaseAbstractionAdapter.cs
4,250
C#
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using Dapper; using System.ComponentModel; namespace CodegenCS.AdventureWorksPOCOSample { [Table("ProductSubcategory", Schema = "Production")] public partial class ProductSubcategory : INotifyPropertyChanged { #region Members private int _productSubcategoryId; [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int ProductSubcategoryId { get { return _productSubcategoryId; } set { SetField(ref _productSubcategoryId, value, nameof(ProductSubcategoryId)); } } private DateTime _modifiedDate; public DateTime ModifiedDate { get { return _modifiedDate; } set { SetField(ref _modifiedDate, value, nameof(ModifiedDate)); } } private string _name; public string Name { get { return _name; } set { SetField(ref _name, value, nameof(Name)); } } private int _productCategoryId; public int ProductCategoryId { get { return _productCategoryId; } set { SetField(ref _productCategoryId, value, nameof(ProductCategoryId)); } } private Guid _rowguid; public Guid Rowguid { get { return _rowguid; } set { SetField(ref _rowguid, value, nameof(Rowguid)); } } #endregion Members #region ActiveRecord public void Save() { if (ProductSubcategoryId == default(int)) Insert(); else Update(); } public void Insert() { using (var conn = IDbConnectionFactory.CreateConnection()) { string cmd = @" INSERT INTO [Production].[ProductSubcategory] ( [ModifiedDate], [Name], [ProductCategoryID] ) VALUES ( @ModifiedDate, @Name, @ProductCategoryId )"; this.ProductSubcategoryId = conn.Query<int>(cmd + "SELECT SCOPE_IDENTITY();", this).Single(); } } public void Update() { using (var conn = IDbConnectionFactory.CreateConnection()) { string cmd = @" UPDATE [Production].[ProductSubcategory] SET [ModifiedDate] = @ModifiedDate, [Name] = @Name, [ProductCategoryID] = @ProductCategoryId WHERE [ProductSubcategoryID] = @ProductSubcategoryId"; conn.Execute(cmd, this); } } #endregion ActiveRecord #region Equals/GetHashCode public override bool Equals(object obj) { if (ReferenceEquals(null, obj)) { return false; } if (ReferenceEquals(this, obj)) { return true; } ProductSubcategory other = obj as ProductSubcategory; if (other == null) return false; if (ModifiedDate != other.ModifiedDate) return false; if (Name != other.Name) return false; if (ProductCategoryId != other.ProductCategoryId) return false; if (Rowguid != other.Rowguid) return false; return true; } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + (ModifiedDate == default(DateTime) ? 0 : ModifiedDate.GetHashCode()); hash = hash * 23 + (Name == null ? 0 : Name.GetHashCode()); hash = hash * 23 + (ProductCategoryId == default(int) ? 0 : ProductCategoryId.GetHashCode()); hash = hash * 23 + (Rowguid == default(Guid) ? 0 : Rowguid.GetHashCode()); return hash; } } public static bool operator ==(ProductSubcategory left, ProductSubcategory right) { return Equals(left, right); } public static bool operator !=(ProductSubcategory left, ProductSubcategory right) { return !Equals(left, right); } #endregion Equals/GetHashCode #region INotifyPropertyChanged/IsDirty public HashSet<string> ChangedProperties = new HashSet<string>(StringComparer.OrdinalIgnoreCase); public void MarkAsClean() { ChangedProperties.Clear(); } public virtual bool IsDirty => ChangedProperties.Any(); public event PropertyChangedEventHandler PropertyChanged; protected void SetField<T>(ref T field, T value, string propertyName) { if (!EqualityComparer<T>.Default.Equals(field, value)) { field = value; ChangedProperties.Add(propertyName); OnPropertyChanged(propertyName); } } protected virtual void OnPropertyChanged(string propertyName) { if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } #endregion INotifyPropertyChanged/IsDirty } }
34.485549
109
0.526148
[ "MIT" ]
Drizin/CodegenCS
src/CodegenCS.DbSchema.Templates/SimplePOCOGenerator/SampleOutput/ProductSubcategory.generated.cs
5,968
C#
using System.Collections; using System.Collections.Generic; using UnityEngine; public class WorldManager : MonoBehaviour { [Header("Debug")] public BiomeSettings debugBiome; [Header("Settings")] private int biomeId = 0; public int[] biomeMeters = new int[4]; public LevelChunk introChunk; public LevelChunk finalChunk; public ParallaxBackgroundController background; public LevelChunkController level; public ForegroundController foreground; public WeatherController weather; public BiomeSettings[] biomeSettings; private PlayerController player; private void Awake() { player = FindObjectOfType<PlayerController>(); } private void Update() { if(player.transform.position.x > biomeMeters[biomeId]) { biomeId++; if(biomeId >= 4) { level.SpawnFinalChunk(finalChunk); } else { SetBiome(biomeSettings[biomeId]); } } if (Input.GetKeyDown(KeyCode.D)) { //SetBiome(debugBiome); } if (Input.GetKeyDown(KeyCode.Q)) { //level.SpawnFinalChunk(finalChunk); } } private void SetBiome(BiomeSettings biome, bool skipTransition = false) { background.SetBiome(biome, skipTransition); level.SetBiome(biome); foreground.SetBiome(biome); weather.SetBiome(biome); if(biome.mergeChunk != null) level.introChunks.Enqueue(biome.mergeChunk); #pragma warning disable CS0618 player.dustParticles.startColor = biome.dustColor; #pragma warning restore CS0618 } private void Start() { level.introChunks.Enqueue(introChunk); level.introChunks.Enqueue(introChunk); level.introChunks.Enqueue(introChunk); SetBiome(biomeSettings[0], true); } }
25.613333
75
0.625195
[ "CC0-1.0" ]
snorbertas/starpath
Assets/_Jam/Scripts/Level/WorldManager.cs
1,923
C#
using System; using System.Collections.Generic; using System.Linq; using NestorHub.Sentinels.Domain.Class; using NestorHub.Sentinels.Domain.Interfaces; using NFluent; using NSubstitute; using Xunit; namespace NestorHub.SentinelsLibrary.Tests { public class PackagesInstancesShould { private readonly IPackageToRunStorage _packageToRunStorage; public PackagesInstancesShould() { _packageToRunStorage = Substitute.For<IPackageToRunStorage>(); _packageToRunStorage.LoadFromPersistence().Returns(new List<PackageToRun>()); } [Fact] public void return_empty_list_when_no_package_added() { var packageInstances = new PackagesInstances(_packageToRunStorage); Check.That(packageInstances.GetAllInstancesToRun().Count()).IsEqualTo(0); } [Fact] public void return_one_when_add_one_package_instance() { var packageInstances = new PackagesInstances(_packageToRunStorage); packageInstances.AddInstanceToRun(new PackageToRun("PackageId", "InstanceOne", false, Guid.NewGuid(), 0, null)); Check.That(packageInstances.GetAllInstancesToRun().Count()).IsEqualTo(1); Check.That(packageInstances.GetAllInstancesToRun().First().RunOrder).IsEqualTo(1); } [Fact] public void return_one_when_add_one_package_instance_and_then_updated() { var instanceId = Guid.NewGuid(); var packageInstances = new PackagesInstances(_packageToRunStorage); packageInstances.AddInstanceToRun(new PackageToRun("PackageId", "InstanceOne", false, instanceId, 0, null)); packageInstances.AddInstanceToRun(new PackageToRun("PackageId", "InstanceOne", true, instanceId, 0, null)); Check.That(packageInstances.GetAllInstancesToRun().Count()).IsEqualTo(1); } [Fact] public void return_one_when_add_two_package_instance_and_then_delete_one() { var instanceOneId = Guid.NewGuid(); var instanceTwoId = Guid.NewGuid(); var packageInstances = new PackagesInstances(_packageToRunStorage); packageInstances.AddInstanceToRun(new PackageToRun("PackageId", "InstanceOne", false, instanceOneId, 0, null)); packageInstances.AddInstanceToRun(new PackageToRun("PackageId", "InstanceTwo", true, instanceTwoId, 0, null)); packageInstances.DeleteInstance(instanceTwoId); Check.That(packageInstances.GetAllInstancesToRun().Count()).IsEqualTo(1); } [Fact] public void return_InstanceTwo_when_search_on_instance_id_two() { var instanceOneId = Guid.NewGuid(); var instanceTwoId = Guid.NewGuid(); var packageInstances = new PackagesInstances(_packageToRunStorage); packageInstances.AddInstanceToRun(new PackageToRun("PackageId", "InstanceOne", false, instanceOneId, 0, null)); packageInstances.AddInstanceToRun(new PackageToRun("PackageId", "InstanceTwo", true, instanceTwoId, 0, null)); var instancePackageTwo = packageInstances.GetInstanceToRunById(instanceTwoId); Check.That(instancePackageTwo.InstanceName).IsEqualTo("InstanceTwo"); } [Fact] public void return_empty_list_when_add_two_package_instance_and_then_delete_all() { var instanceOneId = Guid.NewGuid(); var instanceTwoId = Guid.NewGuid(); var instanceOne = new PackageToRun("PackageId", "InstanceOne", false, instanceOneId, 0, null); var instanceTwo = new PackageToRun("PackageId", "InstanceTwo", true, instanceTwoId, 0, null); var packageInstances = new PackagesInstances(_packageToRunStorage); packageInstances.AddInstanceToRun(instanceOne); packageInstances.AddInstanceToRun(instanceTwo); packageInstances.DeleteInstances(new List<PackageToRun>() {instanceOne, instanceTwo}); Check.That(packageInstances.GetAllInstancesToRun().Count()).IsEqualTo(0); } [Fact] public void return_two_when_search_all_instances_of_one_package() { var instanceOneId = Guid.NewGuid(); var instanceTwoId = Guid.NewGuid(); var instanceThreeId = Guid.NewGuid(); var instanceOne = new PackageToRun("PackageId", "InstanceOne", false, instanceOneId, 0, null); var instanceTwo = new PackageToRun("PackageId", "InstanceTwo", true, instanceTwoId, 0, null); var instanceThree = new PackageToRun("PackageTwoId", "InstanceThree", true, instanceThreeId, 0, null); var packageInstances = new PackagesInstances(_packageToRunStorage); packageInstances.AddInstanceToRun(instanceOne); packageInstances.AddInstanceToRun(instanceTwo); packageInstances.AddInstanceToRun(instanceThree); Check.That(packageInstances.GetInstancesToRunByPackageId("PackageId").Count()).IsEqualTo(2); } [Fact] public void return_3_when_reorder_fourth_package() { var instanceOneId = Guid.NewGuid(); var instanceTwoId = Guid.NewGuid(); var instanceThreeId = Guid.NewGuid(); var instanceFourId = Guid.NewGuid(); var instanceFiveId = Guid.NewGuid(); var instanceOne = new PackageToRun("PackageId", "InstanceOne", false, instanceOneId, 1, null); var instanceTwo = new PackageToRun("PackageId", "InstanceTwo", true, instanceTwoId, 2, null); var instanceThree = new PackageToRun("PackageTwoId", "InstanceThree", true, instanceThreeId, 3, null); var instanceFour = new PackageToRun("PackageTwoId", "InstanceFour", true, instanceFourId, 4, null); var instanceFive= new PackageToRun("PackageTwoId", "InstanceFive", true, instanceFiveId, 5, null); var packageInstances = new PackagesInstances(_packageToRunStorage); packageInstances.AddInstanceToRun(instanceOne); packageInstances.AddInstanceToRun(instanceTwo); packageInstances.AddInstanceToRun(instanceThree); packageInstances.AddInstanceToRun(instanceFour); packageInstances.AddInstanceToRun(instanceFive); var instanceFourNew = new PackageToRun("PackageTwoId", "InstanceFour", true, instanceFourId, 2, null); packageInstances.AddInstanceToRun(instanceFourNew); var packages = packageInstances.GetAllInstancesToRun().ToList().OrderBy(p => p.RunOrder).ToList(); Check.That(packages[2].RunOrder).IsEqualTo(3); Check.That(packages[2].InstanceName).IsEqualTo("InstanceTwo"); Check.That(packages[3].InstanceName).IsEqualTo("InstanceThree"); Check.That(packages[3].RunOrder).IsEqualTo(4); Check.That(packages[4].RunOrder).IsEqualTo(5); } [Fact] public void return_3_when_reorder_two_package() { var instanceOneId = Guid.NewGuid(); var instanceTwoId = Guid.NewGuid(); var instanceThreeId = Guid.NewGuid(); var instanceFourId = Guid.NewGuid(); var instanceFiveId = Guid.NewGuid(); var instanceOne = new PackageToRun("PackageId", "InstanceOne", false, instanceOneId, 1, null); var instanceTwo = new PackageToRun("PackageId", "InstanceTwo", true, instanceTwoId, 2, null); var instanceThree = new PackageToRun("PackageTwoId", "InstanceThree", true, instanceThreeId, 3, null); var instanceFour = new PackageToRun("PackageTwoId", "InstanceFour", true, instanceFourId, 4, null); var instanceFive = new PackageToRun("PackageTwoId", "InstanceFive", true, instanceFiveId, 5, null); var packageInstances = new PackagesInstances(_packageToRunStorage); packageInstances.AddInstanceToRun(instanceOne); packageInstances.AddInstanceToRun(instanceTwo); packageInstances.AddInstanceToRun(instanceThree); packageInstances.AddInstanceToRun(instanceFour); packageInstances.AddInstanceToRun(instanceFive); var instanceTwoNew = new PackageToRun("PackageId", "InstanceTwo", true, instanceTwoId, 4, null); packageInstances.AddInstanceToRun(instanceTwoNew); var packages = packageInstances.GetAllInstancesToRun().ToList().OrderBy(p => p.RunOrder).ToList(); Check.That(packages[2].RunOrder).IsEqualTo(3); Check.That(packages[2].InstanceName).IsEqualTo("InstanceFour"); Check.That(packages[3].InstanceName).IsEqualTo("InstanceTwo"); Check.That(packages[3].RunOrder).IsEqualTo(4); Check.That(packages[4].RunOrder).IsEqualTo(5); } [Fact] public void return_1_when_reorder_last_package() { var instanceOneId = Guid.NewGuid(); var instanceTwoId = Guid.NewGuid(); var instanceThreeId = Guid.NewGuid(); var instanceFourId = Guid.NewGuid(); var instanceFiveId = Guid.NewGuid(); var instanceOne = new PackageToRun("PackageId", "InstanceOne", false, instanceOneId, 1, null); var instanceTwo = new PackageToRun("PackageId", "InstanceTwo", true, instanceTwoId, 2, null); var instanceThree = new PackageToRun("PackageTwoId", "InstanceThree", true, instanceThreeId, 3, null); var instanceFour = new PackageToRun("PackageTwoId", "InstanceFour", true, instanceFourId, 4, null); var instanceFive = new PackageToRun("PackageTwoId", "InstanceFive", true, instanceFiveId, 5, null); var packageInstances = new PackagesInstances(_packageToRunStorage); packageInstances.AddInstanceToRun(instanceOne); packageInstances.AddInstanceToRun(instanceTwo); packageInstances.AddInstanceToRun(instanceThree); packageInstances.AddInstanceToRun(instanceFour); packageInstances.AddInstanceToRun(instanceFive); var instanceFiveNew = new PackageToRun("PackageTwoId", "InstanceFive", true, instanceFiveId, 1, null); packageInstances.AddInstanceToRun(instanceFiveNew); var packages = packageInstances.GetAllInstancesToRun().ToList().OrderBy(p => p.RunOrder).ToList(); Check.That(packages[2].RunOrder).IsEqualTo(3); Check.That(packages[2].InstanceName).IsEqualTo("InstanceTwo"); Check.That(packages[3].InstanceName).IsEqualTo("InstanceThree"); Check.That(packages[3].RunOrder).IsEqualTo(4); Check.That(packages[4].RunOrder).IsEqualTo(5); } [Fact] public void return_1_when_reorder_packages_and_some_packages_have_0_in_run_order_property() { var instanceOneId = Guid.NewGuid(); var instanceTwoId = Guid.NewGuid(); var instanceThreeId = Guid.NewGuid(); var instanceFourId = Guid.NewGuid(); var instanceFiveId = Guid.NewGuid(); var instanceOne = new PackageToRun("PackageId", "InstanceOne", false, instanceOneId, 1, null); var instanceTwo = new PackageToRun("PackageId", "InstanceTwo", true, instanceTwoId, 0, null); var instanceThree = new PackageToRun("PackageTwoId", "InstanceThree", true, instanceThreeId, 0, null); var instanceFour = new PackageToRun("PackageTwoId", "InstanceFour", true, instanceFourId, 0, null); var packageInstances = new PackagesInstances(_packageToRunStorage); packageInstances.AddInstanceToRun(instanceOne); packageInstances.AddInstanceToRun(instanceTwo); packageInstances.AddInstanceToRun(instanceThree); packageInstances.AddInstanceToRun(instanceFour); var packages = packageInstances.GetAllInstancesToRun().ToList().OrderBy(p => p.RunOrder).ToList(); Check.That(packages[2].RunOrder).IsEqualTo(3); Check.That(packages[2].InstanceName).IsEqualTo("InstanceThree"); Check.That(packages[3].InstanceName).IsEqualTo("InstanceFour"); Check.That(packages[3].RunOrder).IsEqualTo(4); } [Fact] public void return_1_on_next_run_order_when_store_is_empty() { var packageInstances = new PackagesInstances(_packageToRunStorage); Check.That(packageInstances.GetNextRunOrderIndex()).IsEqualTo(1); } [Fact] public void return_3_on_next_run_order_when_store_contains_2_instances() { var instanceOneId = Guid.NewGuid(); var instanceTwoId = Guid.NewGuid(); var instanceOne = new PackageToRun("PackageId", "InstanceOne", false, instanceOneId, 1, null); var instanceTwo = new PackageToRun("PackageId", "InstanceTwo", true, instanceTwoId, 2, null); var packageInstances = new PackagesInstances(_packageToRunStorage); packageInstances.AddInstanceToRun(instanceOne); packageInstances.AddInstanceToRun(instanceTwo); Check.That(packageInstances.GetNextRunOrderIndex()).IsEqualTo(3); } } }
49.151852
124
0.669957
[ "MIT" ]
NestorHub/NestorHubServer
SentinelsLibrary/SentinelsLibrary.Tests/PackagesInstancesShould.cs
13,271
C#
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System; using System.Runtime.InteropServices; using System.Runtime.CompilerServices; using System.Text; using Silk.NET.Core; using Silk.NET.Core.Native; using Silk.NET.Core.Attributes; using Silk.NET.Core.Contexts; using Silk.NET.Core.Loader; #pragma warning disable 1591 namespace Silk.NET.OpenGL.Legacy.Extensions.IBM { public static class IbmMultimodeDrawArraysOverloads { public static unsafe void MultiModeDrawArrays(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] IBM* mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] int* first, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<uint> count, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawArrays(mode, first, in count.GetPinnableReference(), primcount, modestride); } public static unsafe void MultiModeDrawArrays(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] IBM* mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<int> first, [Count(Computed = "primcount"), Flow(FlowDirection.In)] uint* count, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawArrays(mode, in first.GetPinnableReference(), count, primcount, modestride); } public static unsafe void MultiModeDrawArrays(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] IBM* mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<int> first, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<uint> count, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawArrays(mode, in first.GetPinnableReference(), in count.GetPinnableReference(), primcount, modestride); } public static unsafe void MultiModeDrawArrays(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<IBM> mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] int* first, [Count(Computed = "primcount"), Flow(FlowDirection.In)] uint* count, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawArrays(in mode.GetPinnableReference(), first, count, primcount, modestride); } public static unsafe void MultiModeDrawArrays(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<IBM> mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] int* first, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<uint> count, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawArrays(in mode.GetPinnableReference(), first, in count.GetPinnableReference(), primcount, modestride); } public static unsafe void MultiModeDrawArrays(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<IBM> mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<int> first, [Count(Computed = "primcount"), Flow(FlowDirection.In)] uint* count, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawArrays(in mode.GetPinnableReference(), in first.GetPinnableReference(), count, primcount, modestride); } public static unsafe void MultiModeDrawArrays(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<IBM> mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<int> first, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<uint> count, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawArrays(in mode.GetPinnableReference(), in first.GetPinnableReference(), in count.GetPinnableReference(), primcount, modestride); } public static unsafe void MultiModeDrawArrays(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] PrimitiveType* mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] int* first, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<uint> count, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawArrays(mode, first, in count.GetPinnableReference(), primcount, modestride); } public static unsafe void MultiModeDrawArrays(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] PrimitiveType* mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<int> first, [Count(Computed = "primcount"), Flow(FlowDirection.In)] uint* count, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawArrays(mode, in first.GetPinnableReference(), count, primcount, modestride); } public static unsafe void MultiModeDrawArrays(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] PrimitiveType* mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<int> first, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<uint> count, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawArrays(mode, in first.GetPinnableReference(), in count.GetPinnableReference(), primcount, modestride); } public static unsafe void MultiModeDrawArrays(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<PrimitiveType> mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] int* first, [Count(Computed = "primcount"), Flow(FlowDirection.In)] uint* count, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawArrays(in mode.GetPinnableReference(), first, count, primcount, modestride); } public static unsafe void MultiModeDrawArrays(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<PrimitiveType> mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] int* first, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<uint> count, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawArrays(in mode.GetPinnableReference(), first, in count.GetPinnableReference(), primcount, modestride); } public static unsafe void MultiModeDrawArrays(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<PrimitiveType> mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<int> first, [Count(Computed = "primcount"), Flow(FlowDirection.In)] uint* count, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawArrays(in mode.GetPinnableReference(), in first.GetPinnableReference(), count, primcount, modestride); } public static unsafe void MultiModeDrawArrays(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<PrimitiveType> mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<int> first, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<uint> count, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawArrays(in mode.GetPinnableReference(), in first.GetPinnableReference(), in count.GetPinnableReference(), primcount, modestride); } public static unsafe void MultiModeDrawElements(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] IBM* mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<uint> count, [Flow(FlowDirection.In)] IBM type, [Count(Computed = "primcount"), Flow(FlowDirection.In)] void** indices, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawElements(mode, in count.GetPinnableReference(), type, indices, primcount, modestride); } public static unsafe void MultiModeDrawElements(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] IBM* mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<uint> count, [Flow(FlowDirection.In)] IBM type, [Count(Computed = "primcount"), Flow(FlowDirection.In)] in void* indices, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawElements(mode, in count.GetPinnableReference(), type, in indices, primcount, modestride); } public static unsafe void MultiModeDrawElements(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<IBM> mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] uint* count, [Flow(FlowDirection.In)] IBM type, [Count(Computed = "primcount"), Flow(FlowDirection.In)] void** indices, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawElements(in mode.GetPinnableReference(), count, type, indices, primcount, modestride); } public static unsafe void MultiModeDrawElements(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<IBM> mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] uint* count, [Flow(FlowDirection.In)] IBM type, [Count(Computed = "primcount"), Flow(FlowDirection.In)] in void* indices, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawElements(in mode.GetPinnableReference(), count, type, in indices, primcount, modestride); } public static unsafe void MultiModeDrawElements(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<IBM> mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<uint> count, [Flow(FlowDirection.In)] IBM type, [Count(Computed = "primcount"), Flow(FlowDirection.In)] void** indices, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawElements(in mode.GetPinnableReference(), in count.GetPinnableReference(), type, indices, primcount, modestride); } public static unsafe void MultiModeDrawElements(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<IBM> mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<uint> count, [Flow(FlowDirection.In)] IBM type, [Count(Computed = "primcount"), Flow(FlowDirection.In)] in void* indices, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawElements(in mode.GetPinnableReference(), in count.GetPinnableReference(), type, in indices, primcount, modestride); } public static unsafe void MultiModeDrawElements(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] IBM* mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<uint> count, [Flow(FlowDirection.In)] DrawElementsType type, [Count(Computed = "primcount"), Flow(FlowDirection.In)] void** indices, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawElements(mode, in count.GetPinnableReference(), type, indices, primcount, modestride); } public static unsafe void MultiModeDrawElements(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] IBM* mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<uint> count, [Flow(FlowDirection.In)] DrawElementsType type, [Count(Computed = "primcount"), Flow(FlowDirection.In)] in void* indices, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawElements(mode, in count.GetPinnableReference(), type, in indices, primcount, modestride); } public static unsafe void MultiModeDrawElements(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<IBM> mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] uint* count, [Flow(FlowDirection.In)] DrawElementsType type, [Count(Computed = "primcount"), Flow(FlowDirection.In)] void** indices, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawElements(in mode.GetPinnableReference(), count, type, indices, primcount, modestride); } public static unsafe void MultiModeDrawElements(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<IBM> mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] uint* count, [Flow(FlowDirection.In)] DrawElementsType type, [Count(Computed = "primcount"), Flow(FlowDirection.In)] in void* indices, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawElements(in mode.GetPinnableReference(), count, type, in indices, primcount, modestride); } public static unsafe void MultiModeDrawElements(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<IBM> mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<uint> count, [Flow(FlowDirection.In)] DrawElementsType type, [Count(Computed = "primcount"), Flow(FlowDirection.In)] void** indices, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawElements(in mode.GetPinnableReference(), in count.GetPinnableReference(), type, indices, primcount, modestride); } public static unsafe void MultiModeDrawElements(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<IBM> mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<uint> count, [Flow(FlowDirection.In)] DrawElementsType type, [Count(Computed = "primcount"), Flow(FlowDirection.In)] in void* indices, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawElements(in mode.GetPinnableReference(), in count.GetPinnableReference(), type, in indices, primcount, modestride); } public static unsafe void MultiModeDrawElements(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] PrimitiveType* mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<uint> count, [Flow(FlowDirection.In)] IBM type, [Count(Computed = "primcount"), Flow(FlowDirection.In)] void** indices, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawElements(mode, in count.GetPinnableReference(), type, indices, primcount, modestride); } public static unsafe void MultiModeDrawElements(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] PrimitiveType* mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<uint> count, [Flow(FlowDirection.In)] IBM type, [Count(Computed = "primcount"), Flow(FlowDirection.In)] in void* indices, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawElements(mode, in count.GetPinnableReference(), type, in indices, primcount, modestride); } public static unsafe void MultiModeDrawElements(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<PrimitiveType> mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] uint* count, [Flow(FlowDirection.In)] IBM type, [Count(Computed = "primcount"), Flow(FlowDirection.In)] void** indices, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawElements(in mode.GetPinnableReference(), count, type, indices, primcount, modestride); } public static unsafe void MultiModeDrawElements(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<PrimitiveType> mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] uint* count, [Flow(FlowDirection.In)] IBM type, [Count(Computed = "primcount"), Flow(FlowDirection.In)] in void* indices, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawElements(in mode.GetPinnableReference(), count, type, in indices, primcount, modestride); } public static unsafe void MultiModeDrawElements(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<PrimitiveType> mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<uint> count, [Flow(FlowDirection.In)] IBM type, [Count(Computed = "primcount"), Flow(FlowDirection.In)] void** indices, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawElements(in mode.GetPinnableReference(), in count.GetPinnableReference(), type, indices, primcount, modestride); } public static unsafe void MultiModeDrawElements(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<PrimitiveType> mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<uint> count, [Flow(FlowDirection.In)] IBM type, [Count(Computed = "primcount"), Flow(FlowDirection.In)] in void* indices, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawElements(in mode.GetPinnableReference(), in count.GetPinnableReference(), type, in indices, primcount, modestride); } public static unsafe void MultiModeDrawElements(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] PrimitiveType* mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<uint> count, [Flow(FlowDirection.In)] DrawElementsType type, [Count(Computed = "primcount"), Flow(FlowDirection.In)] void** indices, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawElements(mode, in count.GetPinnableReference(), type, indices, primcount, modestride); } public static unsafe void MultiModeDrawElements(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] PrimitiveType* mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<uint> count, [Flow(FlowDirection.In)] DrawElementsType type, [Count(Computed = "primcount"), Flow(FlowDirection.In)] in void* indices, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawElements(mode, in count.GetPinnableReference(), type, in indices, primcount, modestride); } public static unsafe void MultiModeDrawElements(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<PrimitiveType> mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] uint* count, [Flow(FlowDirection.In)] DrawElementsType type, [Count(Computed = "primcount"), Flow(FlowDirection.In)] void** indices, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawElements(in mode.GetPinnableReference(), count, type, indices, primcount, modestride); } public static unsafe void MultiModeDrawElements(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<PrimitiveType> mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] uint* count, [Flow(FlowDirection.In)] DrawElementsType type, [Count(Computed = "primcount"), Flow(FlowDirection.In)] in void* indices, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawElements(in mode.GetPinnableReference(), count, type, in indices, primcount, modestride); } public static unsafe void MultiModeDrawElements(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<PrimitiveType> mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<uint> count, [Flow(FlowDirection.In)] DrawElementsType type, [Count(Computed = "primcount"), Flow(FlowDirection.In)] void** indices, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawElements(in mode.GetPinnableReference(), in count.GetPinnableReference(), type, indices, primcount, modestride); } public static unsafe void MultiModeDrawElements(this IbmMultimodeDrawArrays thisApi, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<PrimitiveType> mode, [Count(Computed = "primcount"), Flow(FlowDirection.In)] ReadOnlySpan<uint> count, [Flow(FlowDirection.In)] DrawElementsType type, [Count(Computed = "primcount"), Flow(FlowDirection.In)] in void* indices, [Flow(FlowDirection.In)] uint primcount, [Flow(FlowDirection.In)] int modestride) { // SpanOverloader thisApi.MultiModeDrawElements(in mode.GetPinnableReference(), in count.GetPinnableReference(), type, in indices, primcount, modestride); } } }
95.232
468
0.724924
[ "MIT" ]
HurricanKai/Silk.NET
src/OpenGL/Extensions/Silk.NET.OpenGL.Legacy.Extensions.IBM/IbmMultimodeDrawArraysOverloads.gen.cs
23,808
C#
namespace Ploeh.AutoFixture { /// <summary> /// Encapsulates a customization of an <see cref="IFixture"/>. /// </summary> public interface ICustomization { /// <summary> /// Customizes the specified fixture. /// </summary> /// <param name="fixture">The fixture to customize.</param> void Customize(IFixture fixture); } }
26.666667
68
0.565
[ "MIT" ]
TeaDrivenDev/AutoFixture
Src/AutoFixture/ICustomization.cs
402
C#
using Flamingo.Condiments; using Telegram.Bot.Types; namespace Flamingo.Filters.MessageFilters { /// <summary> /// Filter messages that are forwarded. /// </summary> public class ForwardedFilter : FilterBase<ICondiment<Message>> { /// <summary> /// Filter messages that are forwarded. /// </summary> public ForwardedFilter() : base(x=> x.InComing.ForwardFrom != null || x.InComing.ForwardFromChat != null || x.InComing.ForwardSenderName != null || x.InComing.ForwardSignature != null ) { } } }
27.695652
66
0.565149
[ "Apache-2.0" ]
immmdreza/FlamingoFramework
Flamingo/Filters/MessageFilters/ForwardedFilter.cs
639
C#
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Android.App; // 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("RoboWikiAppXamarin.Android")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("RoboWikiAppXamarin.Android")] [assembly: AssemblyCopyright("Copyright © 2014")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] // Add some common permissions, these can be removed if not needed [assembly: UsesPermission(Android.Manifest.Permission.Internet)] [assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
36.612903
77
0.770044
[ "MIT" ]
Andre0007/RoboWikiAppXamarin
RoboWikiAppXamarin/RoboWikiAppXamarin.Android/Properties/AssemblyInfo.cs
1,138
C#
namespace f { partial class DictionaryBlend { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DictionaryBlend)); this.panelMain = new System.Windows.Forms.Panel(); this.panel3 = new System.Windows.Forms.Panel(); this.panelUnderComboBox = new System.Windows.Forms.Panel(); this.webBrowser1 = new f.WebBrowserForForm(); this.paForComboBox = new System.Windows.Forms.Panel(); this.comboBox = new f.ComboBoxWithHistory(); this.panel4 = new System.Windows.Forms.Panel(); this.button1 = new System.Windows.Forms.Button(); this.panel2 = new System.Windows.Forms.Panel(); this.btSearch2 = new System.Windows.Forms.Button(); this.panelOverBrowser = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel(); this.paTop = new System.Windows.Forms.Panel(); this.toolStripMainMenu = new System.Windows.Forms.ToolStrip(); this.btPrev = new System.Windows.Forms.ToolStripButton(); this.btNext = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); this.btSearch = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); this.btPasteText = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator(); this.btSpeak = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); this.miLanguages = new System.Windows.Forms.ToolStripDropDownButton(); this.btReverse = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.btConfiguration = new System.Windows.Forms.ToolStripDropDownButton(); this.btTopMost = new System.Windows.Forms.ToolStripMenuItem(); this.btEditFavoritList = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator(); this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.btExit = new System.Windows.Forms.ToolStripMenuItem(); this.miHelpRequests = new System.Windows.Forms.ToolStripMenuItem(); this.pictureBoxWating = new System.Windows.Forms.PictureBox(); this.toolStripDictionary = new System.Windows.Forms.ToolStrip(); this.panelMainBorder = new System.Windows.Forms.Panel(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.panelMain.SuspendLayout(); this.panel3.SuspendLayout(); this.panelUnderComboBox.SuspendLayout(); this.paForComboBox.SuspendLayout(); this.panelOverBrowser.SuspendLayout(); this.paTop.SuspendLayout(); this.toolStripMainMenu.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxWating)).BeginInit(); this.panelMainBorder.SuspendLayout(); this.SuspendLayout(); // // panelMain // this.panelMain.BackColor = System.Drawing.Color.White; this.panelMain.Controls.Add(this.panel3); this.panelMain.Controls.Add(this.toolStripDictionary); this.panelMain.Dock = System.Windows.Forms.DockStyle.Fill; this.panelMain.Location = new System.Drawing.Point(4, 4); this.panelMain.Name = "panelMain"; this.panelMain.Padding = new System.Windows.Forms.Padding(4); this.panelMain.Size = new System.Drawing.Size(784, 795); this.panelMain.TabIndex = 3; // // panel3 // this.panel3.Controls.Add(this.panelUnderComboBox); this.panel3.Controls.Add(this.paForComboBox); this.panel3.Controls.Add(this.panelOverBrowser); this.panel3.Controls.Add(this.paTop); this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; this.panel3.Location = new System.Drawing.Point(30, 4); this.panel3.Margin = new System.Windows.Forms.Padding(13, 3, 3, 3); this.panel3.Name = "panel3"; this.panel3.Padding = new System.Windows.Forms.Padding(6); this.panel3.Size = new System.Drawing.Size(750, 787); this.panel3.TabIndex = 26; // // panelUnderComboBox // this.panelUnderComboBox.Controls.Add(this.webBrowser1); this.panelUnderComboBox.Dock = System.Windows.Forms.DockStyle.Fill; this.panelUnderComboBox.Location = new System.Drawing.Point(6, 89); this.panelUnderComboBox.Name = "panelUnderComboBox"; this.panelUnderComboBox.Size = new System.Drawing.Size(738, 692); this.panelUnderComboBox.TabIndex = 26; // // webBrowser1 // this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill; this.webBrowser1.Location = new System.Drawing.Point(0, 0); this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20); this.webBrowser1.Name = "webBrowser1"; this.webBrowser1.OpenUrlInExternalWindow = true; this.webBrowser1.ScriptErrorsSuppressed = true; this.webBrowser1.Size = new System.Drawing.Size(738, 692); this.webBrowser1.TabIndex = 25; this.webBrowser1.TempContent = null; this.webBrowser1.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.webBrowser1_PreviewKeyDown); // // paForComboBox // this.paForComboBox.Controls.Add(this.comboBox); this.paForComboBox.Controls.Add(this.panel4); this.paForComboBox.Controls.Add(this.button1); this.paForComboBox.Controls.Add(this.panel2); this.paForComboBox.Controls.Add(this.btSearch2); this.paForComboBox.Dock = System.Windows.Forms.DockStyle.Top; this.paForComboBox.Location = new System.Drawing.Point(6, 53); this.paForComboBox.Name = "paForComboBox"; this.paForComboBox.Padding = new System.Windows.Forms.Padding(4, 4, 8, 4); this.paForComboBox.Size = new System.Drawing.Size(738, 36); this.paForComboBox.TabIndex = 27; // // comboBox // this.comboBox.AllowDrop = true; this.comboBox.Dock = System.Windows.Forms.DockStyle.Fill; this.comboBox.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; this.comboBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); this.comboBox.FormattingEnabled = true; this.comboBox.Location = new System.Drawing.Point(47, 4); this.comboBox.MaxDropDownItems = 10; this.comboBox.MinimumSize = new System.Drawing.Size(400, 0); this.comboBox.Name = "comboBox"; this.comboBox.Size = new System.Drawing.Size(656, 27); this.comboBox.TabIndex = 0; // // panel4 // this.panel4.Dock = System.Windows.Forms.DockStyle.Left; this.panel4.Location = new System.Drawing.Point(36, 4); this.panel4.Name = "panel4"; this.panel4.Size = new System.Drawing.Size(11, 28); this.panel4.TabIndex = 5; this.panel4.Visible = false; // // button1 // this.button1.Location = new System.Drawing.Point(537, 8); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(75, 23); this.button1.TabIndex = 1; this.button1.TabStop = false; this.button1.Text = "button1"; this.button1.UseVisualStyleBackColor = true; this.button1.Visible = false; this.button1.Click += new System.EventHandler(this.button1_Click); // // panel2 // this.panel2.Dock = System.Windows.Forms.DockStyle.Right; this.panel2.Location = new System.Drawing.Point(703, 4); this.panel2.Name = "panel2"; this.panel2.Size = new System.Drawing.Size(27, 28); this.panel2.TabIndex = 3; // // btSearch2 // this.btSearch2.Dock = System.Windows.Forms.DockStyle.Left; this.btSearch2.ForeColor = System.Drawing.Color.White; this.btSearch2.Image = global::f.db.Properties.Resources.search16; this.btSearch2.Location = new System.Drawing.Point(4, 4); this.btSearch2.Name = "btSearch2"; this.btSearch2.Size = new System.Drawing.Size(32, 28); this.btSearch2.TabIndex = 4; this.btSearch2.TabStop = false; this.btSearch2.UseVisualStyleBackColor = false; this.btSearch2.Visible = false; // // panelOverBrowser // this.panelOverBrowser.Controls.Add(this.panel1); this.panelOverBrowser.Dock = System.Windows.Forms.DockStyle.Top; this.panelOverBrowser.Location = new System.Drawing.Point(6, 38); this.panelOverBrowser.Name = "panelOverBrowser"; this.panelOverBrowser.Padding = new System.Windows.Forms.Padding(0, 5, 0, 5); this.panelOverBrowser.Size = new System.Drawing.Size(738, 15); this.panelOverBrowser.TabIndex = 26; this.panelOverBrowser.Visible = false; // // panel1 // this.panel1.BackColor = System.Drawing.SystemColors.Control; this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; this.panel1.Location = new System.Drawing.Point(0, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(738, 5); this.panel1.TabIndex = 27; // // paTop // this.paTop.BackColor = System.Drawing.Color.White; this.paTop.Controls.Add(this.toolStripMainMenu); this.paTop.Controls.Add(this.pictureBoxWating); this.paTop.Dock = System.Windows.Forms.DockStyle.Top; this.paTop.Location = new System.Drawing.Point(6, 6); this.paTop.Name = "paTop"; this.paTop.Padding = new System.Windows.Forms.Padding(3, 3, 33, 0); this.paTop.Size = new System.Drawing.Size(738, 32); this.paTop.TabIndex = 28; // // toolStripMainMenu // this.toolStripMainMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.btPrev, this.btNext, this.toolStripSeparator3, this.btSearch, this.toolStripSeparator2, this.btPasteText, this.toolStripSeparator5, this.btSpeak, this.toolStripSeparator4, this.miLanguages, this.btReverse, this.toolStripSeparator1, this.btConfiguration}); this.toolStripMainMenu.Location = new System.Drawing.Point(3, 3); this.toolStripMainMenu.Name = "toolStripMainMenu"; this.toolStripMainMenu.Size = new System.Drawing.Size(702, 25); this.toolStripMainMenu.TabIndex = 27; this.toolStripMainMenu.Text = "toolStrip1"; // // btPrev // this.btPrev.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.btPrev.Image = ((System.Drawing.Image)(resources.GetObject("btPrev.Image"))); this.btPrev.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.btPrev.ImageTransparentColor = System.Drawing.Color.Magenta; this.btPrev.Name = "btPrev"; this.btPrev.Size = new System.Drawing.Size(23, 22); this.btPrev.Text = "Previous word"; this.btPrev.ToolTipText = "Previous word in history (Arrow down)"; // // btNext // this.btNext.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.btNext.Image = ((System.Drawing.Image)(resources.GetObject("btNext.Image"))); this.btNext.ImageTransparentColor = System.Drawing.Color.Magenta; this.btNext.Name = "btNext"; this.btNext.Size = new System.Drawing.Size(23, 22); this.btNext.Text = "Next word"; this.btNext.ToolTipText = "Next word in history (Arrow Up)"; // // toolStripSeparator3 // this.toolStripSeparator3.Name = "toolStripSeparator3"; this.toolStripSeparator3.Size = new System.Drawing.Size(6, 25); // // btSearch // this.btSearch.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.btSearch.Image = ((System.Drawing.Image)(resources.GetObject("btSearch.Image"))); this.btSearch.Name = "btSearch"; this.btSearch.Size = new System.Drawing.Size(23, 22); this.btSearch.Text = "Search (Enter)"; // // toolStripSeparator2 // this.toolStripSeparator2.Name = "toolStripSeparator2"; this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25); // // btPasteText // this.btPasteText.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.btPasteText.Image = global::f.db.Properties.Resources.PasteText; this.btPasteText.ImageTransparentColor = System.Drawing.Color.Magenta; this.btPasteText.Name = "btPasteText"; this.btPasteText.Size = new System.Drawing.Size(23, 22); this.btPasteText.ToolTipText = "Paste (Ctrl+ V)"; // // toolStripSeparator5 // this.toolStripSeparator5.Name = "toolStripSeparator5"; this.toolStripSeparator5.Size = new System.Drawing.Size(6, 25); // // btSpeak // this.btSpeak.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.btSpeak.Image = global::f.db.Properties.Resources.speaker; this.btSpeak.ImageTransparentColor = System.Drawing.Color.Magenta; this.btSpeak.Name = "btSpeak"; this.btSpeak.Size = new System.Drawing.Size(23, 22); this.btSpeak.Text = "Listen"; this.btSpeak.Click += new System.EventHandler(this.btSpeak_Click); // // toolStripSeparator4 // this.toolStripSeparator4.Name = "toolStripSeparator4"; this.toolStripSeparator4.Size = new System.Drawing.Size(6, 25); // // miLanguages // this.miLanguages.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.miLanguages.Image = ((System.Drawing.Image)(resources.GetObject("miLanguages.Image"))); this.miLanguages.ImageTransparentColor = System.Drawing.Color.Magenta; this.miLanguages.Name = "miLanguages"; this.miLanguages.Size = new System.Drawing.Size(106, 22); this.miLanguages.Text = "Select Language"; this.miLanguages.ToolTipText = "Select Language Pair"; // // btReverse // this.btReverse.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.btReverse.Image = global::f.db.Properties.Resources.Reverse_; this.btReverse.ImageTransparentColor = System.Drawing.Color.Magenta; this.btReverse.Name = "btReverse"; this.btReverse.Size = new System.Drawing.Size(23, 22); this.btReverse.Text = "Reverse Languages"; this.btReverse.ToolTipText = "Reverse Languages (Alt-R)"; this.btReverse.Click += new System.EventHandler(this.btReverse_Click); // // toolStripSeparator1 // this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25); // // btConfiguration // this.btConfiguration.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.btConfiguration.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.btTopMost, this.btEditFavoritList, this.toolStripMenuItem1, this.aboutToolStripMenuItem, this.btExit, this.miHelpRequests}); this.btConfiguration.Image = global::f.db.Properties.Resources.Options; this.btConfiguration.ImageTransparentColor = System.Drawing.Color.Magenta; this.btConfiguration.Name = "btConfiguration"; this.btConfiguration.Size = new System.Drawing.Size(29, 22); this.btConfiguration.Text = "Options"; this.btConfiguration.ToolTipText = "Options + About"; // // btTopMost // this.btTopMost.CheckOnClick = true; this.btTopMost.Image = global::f.db.Properties.Resources.PinSmall; this.btTopMost.Name = "btTopMost"; this.btTopMost.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.T))); this.btTopMost.Size = new System.Drawing.Size(224, 22); this.btTopMost.Text = "TopMost"; this.btTopMost.CheckedChanged += new System.EventHandler(this.btTopMost_CheckedChanged); // // btEditFavoritList // this.btEditFavoritList.Name = "btEditFavoritList"; this.btEditFavoritList.Size = new System.Drawing.Size(224, 22); this.btEditFavoritList.Text = "Favorit List"; this.btEditFavoritList.ToolTipText = "Check/Uncheck Dictionaries for Favorit List"; this.btEditFavoritList.Click += new System.EventHandler(this.btEditFavoritList_Click); // // toolStripMenuItem1 // this.toolStripMenuItem1.Name = "toolStripMenuItem1"; this.toolStripMenuItem1.Size = new System.Drawing.Size(221, 6); // // aboutToolStripMenuItem // this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem"; this.aboutToolStripMenuItem.Size = new System.Drawing.Size(224, 22); this.aboutToolStripMenuItem.Text = "About"; this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click); // // btExit // this.btExit.Name = "btExit"; this.btExit.Size = new System.Drawing.Size(224, 22); this.btExit.Text = "Exit"; this.btExit.Click += new System.EventHandler(this.btExit_Click); // // miHelpRequests // this.miHelpRequests.Image = global::f.db.Properties.Resources.email; this.miHelpRequests.Name = "miHelpRequests"; this.miHelpRequests.Size = new System.Drawing.Size(224, 22); this.miHelpRequests.Text = "Send feedback or bug report"; this.miHelpRequests.ToolTipText = "For example: How add a new dictionary www.somewebsite.com"; // // pictureBoxWating // this.pictureBoxWating.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.pictureBoxWating.Image = global::f.db.Properties.Resources.icon_wait; this.pictureBoxWating.Location = new System.Drawing.Point(709, 2); this.pictureBoxWating.Name = "pictureBoxWating"; this.pictureBoxWating.Size = new System.Drawing.Size(26, 26); this.pictureBoxWating.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.pictureBoxWating.TabIndex = 23; this.pictureBoxWating.TabStop = false; this.pictureBoxWating.Visible = false; // // toolStripDictionary // this.toolStripDictionary.Dock = System.Windows.Forms.DockStyle.Left; this.toolStripDictionary.Location = new System.Drawing.Point(4, 4); this.toolStripDictionary.Name = "toolStripDictionary"; this.toolStripDictionary.Size = new System.Drawing.Size(26, 787); this.toolStripDictionary.TabIndex = 26; this.toolStripDictionary.Text = "toolStrip2"; // // panelMainBorder // this.panelMainBorder.Controls.Add(this.panelMain); this.panelMainBorder.Dock = System.Windows.Forms.DockStyle.Fill; this.panelMainBorder.Location = new System.Drawing.Point(0, 0); this.panelMainBorder.Name = "panelMainBorder"; this.panelMainBorder.Padding = new System.Windows.Forms.Padding(4); this.panelMainBorder.Size = new System.Drawing.Size(792, 803); this.panelMainBorder.TabIndex = 4; // // DictionaryBlend // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(792, 803); this.Controls.Add(this.panelMainBorder); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Location = new System.Drawing.Point(200, 100); this.MinimumSize = new System.Drawing.Size(400, 200); this.Name = "DictionaryBlend"; this.RightToLeftLayout = true; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; this.panelMain.ResumeLayout(false); this.panelMain.PerformLayout(); this.panel3.ResumeLayout(false); this.panelUnderComboBox.ResumeLayout(false); this.paForComboBox.ResumeLayout(false); this.panelOverBrowser.ResumeLayout(false); this.paTop.ResumeLayout(false); this.paTop.PerformLayout(); this.toolStripMainMenu.ResumeLayout(false); this.toolStripMainMenu.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxWating)).EndInit(); this.panelMainBorder.ResumeLayout(false); this.ResumeLayout(false); } #endregion private System.Windows.Forms.Panel panelMain; private System.Windows.Forms.PictureBox pictureBoxWating; private System.Windows.Forms.Panel panel3; private f.WebBrowserForForm webBrowser1; private System.Windows.Forms.Panel panelUnderComboBox; private System.Windows.Forms.ToolStrip toolStripDictionary; private System.Windows.Forms.ToolStrip toolStripMainMenu; private System.Windows.Forms.ToolStripDropDownButton miLanguages; private System.Windows.Forms.Panel paTop; private System.Windows.Forms.Panel panelOverBrowser; private System.Windows.Forms.Panel panelMainBorder; private System.Windows.Forms.ToolStripDropDownButton btConfiguration; private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem; private System.Windows.Forms.ToolStripSeparator toolStripMenuItem1; private System.Windows.Forms.ToolStripMenuItem btTopMost; private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; private System.Windows.Forms.Panel panel1; private System.Windows.Forms.ToolStripMenuItem btEditFavoritList; private System.Windows.Forms.ToolStripButton btReverse; private System.Windows.Forms.ToolStripMenuItem btExit; internal ComboBoxWithHistory comboBox; private System.Windows.Forms.ToolStripButton btPrev; private System.Windows.Forms.ToolStripButton btNext; private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; private System.Windows.Forms.Panel paForComboBox; private System.Windows.Forms.ToolStripMenuItem miHelpRequests; private System.Windows.Forms.ToolStripButton btSpeak; private System.Windows.Forms.ToolStripSeparator toolStripSeparator4; private System.Windows.Forms.Button button1; private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; private System.Windows.Forms.ToolStripButton btPasteText; private System.Windows.Forms.Panel panel2; private System.Windows.Forms.ToolTip toolTip1; private System.Windows.Forms.ToolStripButton btSearch; private System.Windows.Forms.ToolStripSeparator toolStripSeparator5; private System.Windows.Forms.Button btSearch2; private System.Windows.Forms.Panel panel4; } }
52.420432
170
0.621767
[ "MIT" ]
easably/easy2learn
DictionaryBlend/DictionaryBlend.Designer.cs
26,684
C#
// <copyright file="ASCIISevenBitTruncatingEncodingTests.cs" company="Rnwood.SmtpServer project contributors"> // Copyright (c) Rnwood.SmtpServer project contributors. All rights reserved. // Licensed under the BSD license. See LICENSE.md file in the project root for full license information. // </copyright> namespace Rnwood.SmtpServer.Tests { using Xunit; /// <summary> /// Defines the <see cref="ASCIISevenBitTruncatingEncodingTests" /> /// </summary> public class ASCIISevenBitTruncatingEncodingTests { /// <summary> /// The GetBytes_ASCIIChar_ReturnsOriginal /// </summary> [Fact] public void GetBytes_ASCIIChar_ReturnsOriginal() { ASCIISevenBitTruncatingEncoding encoding = new ASCIISevenBitTruncatingEncoding(); byte[] bytes = encoding.GetBytes(new[] { 'a', 'b', 'c' }, 0, 3); Assert.Equal(new[] { (byte)'a', (byte)'b', (byte)'c' }, bytes); } /// <summary> /// The GetBytes_ExtendedChar_ReturnsTruncated /// </summary> [Fact] public void GetBytes_ExtendedChar_ReturnsTruncated() { ASCIISevenBitTruncatingEncoding encoding = new ASCIISevenBitTruncatingEncoding(); byte[] bytes = encoding.GetBytes(new[] { (char)250 }, 0, 1); Assert.Equal(new[] { (byte)'z' }, bytes); } /// <summary> /// The GetChars_ASCIIChar_ReturnsOriginal /// </summary> [Fact] public void GetChars_ASCIIChar_ReturnsOriginal() { ASCIISevenBitTruncatingEncoding encoding = new ASCIISevenBitTruncatingEncoding(); char[] chars = encoding.GetChars(new[] { (byte)'a', (byte)'b', (byte)'c' }, 0, 3); Assert.Equal(new[] { 'a', 'b', 'c' }, chars); } /// <summary> /// The GetChars_ExtendedChar_ReturnsTruncated /// </summary> [Fact] public void GetChars_ExtendedChar_ReturnsTruncated() { ASCIISevenBitTruncatingEncoding encoding = new ASCIISevenBitTruncatingEncoding(); char[] chars = encoding.GetChars(new[] { (byte)250 }, 0, 1); Assert.Equal(new[] { 'z' }, chars); } } }
35.125
111
0.603648
[ "BSD-3-Clause" ]
fossabot/smtpserver
Rnwood.SmtpServer.Tests/ASCIISevenBitTruncatingEncodingTests.cs
2,250
C#
/* ==================================================================== Copyright (C) 2004-2008 fyiReporting Software, LLC Copyright (C) 2011 Peter Gill <peter@majorsilence.com> This file is part of the fyiReporting RDL project. 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. For additional information, email info@fyireporting.com or visit the website www.fyiReporting.com. */ using System; using System.Collections; using System.Collections.Generic; using System.Drawing; using System.Drawing.Imaging; using System.Text; using System.IO; using System.Net; using RdlEngine.Resources; namespace fyiReporting.RDL { ///<summary> /// PageTextHtml handles text that should to be formatted as HTML. It only handles /// a subset of HTML (e.g. "<b>,<br>, ..." ///</summary> public class PageTextHtml : PageText, IEnumerable, ICloneable { List<PageItem> _items=null; Stack _StyleStack; // work variable when processing styles float _TotalHeight=0; public PageTextHtml(string t) : base(t) { } /// <summary> /// Reset will force a recalculation of the embedded PageItems; /// </summary> public void Reset() { _items = null; } public float TotalHeight { get { if (_items == null) throw new Exception(Strings.PageTextHtml_Error_BuildMethodMustCalledPriorTotalHeight); return _TotalHeight; } } public void Build(Graphics g) { System.Drawing.Drawing2D.Matrix transform = g.Transform; try { g.ResetTransform(); BuildPrivate(g); } finally { g.Transform = transform; } return; } private void BuildPrivate(Graphics g) { PageText model = new PageText(""); model.AllowSelect = false; model.Page = this.Page; model.HyperLink=null; model.Tooltip=null; int fontSizeModel = 3; if (_items != null) // this has already been built return; _items = new List<PageItem>(); _StyleStack = new Stack(); // The first item is always a text box with the border and background attributes PageText pt = new PageText(""); pt.AllowSelect = true; // This item represents HTML item for selection in RdlViewer pt.Page = this.Page; pt.HtmlParent = this; pt.X = this.X; pt.Y = this.Y; pt.H = this.H; pt.W = this.W; pt.CanGrow = false; pt.SI = this.SI.Clone() as StyleInfo; pt.SI.PaddingBottom = pt.SI.PaddingLeft = pt.SI.PaddingRight = pt.SI.PaddingTop = 0; pt.SI.TextAlign = TextAlignEnum.Left; _items.Add(pt); // Now we create multiple items that represent what is in the box PageTextHtmlLexer hl = new PageTextHtmlLexer(this.Text); List<string> tokens = hl.Lex(); float textWidth = this.W - pt.SI.PaddingLeft - pt.SI.PaddingRight; // Now set the default style for the rest of the members StyleInfo si = this.SI.Clone() as StyleInfo; si.BStyleBottom = si.BStyleLeft = si.BStyleRight = si.BStyleTop = BorderStyleEnum.None; pt.SI.TextAlign = TextAlignEnum.Left; pt.SI.VerticalAlign = VerticalAlignEnum.Top; si.BackgroundColor = Color.Empty; si.BackgroundGradientType = BackgroundGradientTypeEnum.None; si.BackgroundImage = null; bool bFirstInLine=true; StringBuilder sb = new StringBuilder(); // this will hold the accumulating line float lineXPos=0; float xPos = 0; float yPos = 0; float maxLineHeight=0; float maxDescent=0; float descent; // working value for descent SizeF ms; bool bWhiteSpace=false; List<PageItem> lineItems = new List<PageItem>(); foreach (string token in tokens) { if (token[0] == PageTextHtmlLexer.HTMLCMD) // indicates an HTML command { // we need to create a PageText since the styleinfo is changing if (sb.Length != 0) { pt = new PageText(sb.ToString()); pt.AllowSelect = false; pt.Page = this.Page; pt.HtmlParent = this; pt.HyperLink = model.HyperLink; pt.Tooltip = model.Tooltip; pt.NoClip = true; sb = new StringBuilder(); pt.X = this.X + lineXPos; pt.Y = this.Y + yPos; pt.CanGrow = false; pt.SI = CurrentStyle(si).Clone() as StyleInfo; _items.Add(pt); lineItems.Add(pt); ms = this.MeasureString(pt.Text, pt.SI, g, out descent); maxDescent = Math.Max(maxDescent, descent); pt.W = ms.Width; pt.H = ms.Height; pt.Descent = descent; maxLineHeight = Math.Max(maxLineHeight, ms.Height); lineXPos = xPos; } // Now reset the styleinfo StyleInfo cs = CurrentStyle(si); string ltoken = token.Substring(1,Math.Min(token.Length-1,10)).ToLower(); if (ltoken == "<b>" || ltoken == "<strong>") cs.FontWeight = FontWeightEnum.Bold; else if (ltoken == "</b>" || ltoken == "</strong>") cs.FontWeight = FontWeightEnum.Normal; else if (ltoken == "<i>" || ltoken == "<cite>" || ltoken == "<var>" || ltoken == "<em>") cs.FontStyle = FontStyleEnum.Italic; else if (ltoken == "</i>" || ltoken == "</cite>" || ltoken == "</var>" || ltoken == "</em>") cs.FontStyle = FontStyleEnum.Normal; else if (ltoken == "<code>" || ltoken == "<samp>") cs.FontFamily = "Courier New"; else if (ltoken == "</code>" || ltoken == "</samp>") cs.FontFamily = this.SI.FontFamily; else if (ltoken == "<kbd>") { cs.FontFamily = "Courier New"; cs.FontWeight = FontWeightEnum.Bold; } else if (ltoken == "</kdd>") { cs.FontFamily = this.SI.FontFamily; cs.FontWeight = FontWeightEnum.Normal; } else if (ltoken == "<big>") { // big makes it bigger by 20% for each time over the baseline of 3 fontSizeModel++; float inc = 1; for (int i=3; i < fontSizeModel; i++) { inc += .2f; } float h = this.SI.FontSize * inc; cs.FontSize = h; } else if (ltoken == "</big>") { // undoes the effect of big fontSizeModel--; float inc = 1; for (int i=3; i < fontSizeModel; i++) { inc += .2f; } float h = this.SI.FontSize / inc; cs.FontSize = h; } else if (ltoken == "<small>") { // small makes it smaller by 20% for each time under the baseline of 3 fontSizeModel--; float inc = 1; for (int i=3; i > fontSizeModel; i--) { inc += .2f; } float h = this.SI.FontSize / inc; cs.FontSize = h; } else if (ltoken == "</small>") { // undoes the effect of small fontSizeModel++; float inc = 1; for (int i=3; i > fontSizeModel; i--) { inc += .2f; } float h = this.SI.FontSize * inc; cs.FontSize = h; } else if (ltoken.StartsWith("<br")) { yPos += maxLineHeight; NormalizeLineHeight(lineItems, maxLineHeight, maxDescent); maxLineHeight = xPos = lineXPos = maxDescent = 0; bFirstInLine = true; bWhiteSpace = false; } else if (ltoken.StartsWith("<hr")) { // Add a line // Process existing line if any yPos += maxLineHeight; NormalizeLineHeight(lineItems, maxLineHeight, maxDescent); maxLineHeight = xPos = lineXPos = maxDescent = 0; bFirstInLine = true; bWhiteSpace = false; PageLine pl = new PageLine(); pl.AllowSelect = false; pl.Page = this.Page; const int horzLineHeight = 10; pl.SI = cs.Clone() as StyleInfo; pl.SI.BStyleLeft = BorderStyleEnum.Ridge; pl.Y = pl.Y2 = this.Y + yPos + horzLineHeight / 2; pl.X = this.X; pl.X2 = pl.X + this.W; _items.Add(pl); yPos += horzLineHeight; // skip past horizontal line } else if (ltoken.StartsWith("<p")) { yPos += maxLineHeight * 2; NormalizeLineHeight(lineItems, maxLineHeight, maxDescent); maxLineHeight = xPos = lineXPos = maxDescent = 0; bFirstInLine = true; bWhiteSpace = false; } else if (ltoken.StartsWith("<a")) { BuildAnchor(token.Substring(1), cs, model); } else if (ltoken.StartsWith("<img")) { PageImage pimg = BuildImage(g, token.Substring(1), cs, model); if (pimg != null) // We got an image; add to process list { pimg.Y = this.Y + yPos; pimg.X = this.X; _items.Add(pimg); yPos += pimg.H; // Increment y position maxLineHeight = xPos = lineXPos = maxDescent = 0; bFirstInLine = true; bWhiteSpace = false; } } else if (ltoken == "</a>") { model.HyperLink = model.Tooltip = null; PopStyle(); } else if (ltoken.StartsWith("<span")) { HandleStyle(token.Substring(1), si); } else if (ltoken == "</span>") { // we really should match span and font but it shouldn't matter very often? PopStyle(); } else if (ltoken.StartsWith("<font")) { HandleFont(token.Substring(1), si); } else if (ltoken == "</font>") { // we really should match span and font but it shouldn't matter very often? PopStyle(); } continue; } if (token == PageTextHtmlLexer.WHITESPACE) { if (!bFirstInLine) bWhiteSpace = true; continue; } if (token != PageTextHtmlLexer.EOF) { string ntoken; if (token == PageTextHtmlLexer.NBSP.ToString()) ntoken = bWhiteSpace ? " " : " "; else ntoken = bWhiteSpace ? " " + token : token; ntoken = ntoken.Replace(PageTextHtmlLexer.NBSP, ' '); bWhiteSpace = false; // can only use whitespace once ms = this.MeasureString(ntoken, CurrentStyle(si), g, out descent); if (xPos + ms.Width < textWidth) { bFirstInLine = false; sb.Append(ntoken); maxDescent = Math.Max(maxDescent, descent); maxLineHeight = Math.Max(maxLineHeight, ms.Height); xPos += ms.Width; continue; } } else if (sb.Length == 0) // EOF and no previous string means we're done continue; pt = new PageText(sb.ToString()); pt.AllowSelect = false; pt.Page = this.Page; pt.HtmlParent = this; pt.NoClip = true; pt.HyperLink = model.HyperLink; pt.Tooltip = model.Tooltip; sb = new StringBuilder(); sb.Append(token.Replace(PageTextHtmlLexer.NBSP, ' ')); pt.SI = CurrentStyle(si).Clone() as StyleInfo; ms = this.MeasureString(pt.Text, pt.SI, g, out descent); pt.X = this.X + lineXPos; pt.Y = this.Y + yPos; pt.H = ms.Height; pt.W = ms.Width; pt.Descent = descent; pt.CanGrow = false; _items.Add(pt); lineItems.Add(pt); maxDescent = Math.Max(maxDescent, descent); maxLineHeight = Math.Max(maxLineHeight, ms.Height); yPos += maxLineHeight; // Increment y position NormalizeLineHeight(lineItems, maxLineHeight, maxDescent); lineXPos = maxLineHeight = maxDescent = 0; // start line height over // Now set the xPos just after the current token ms = this.MeasureString(token, CurrentStyle(si), g, out descent); xPos = ms.Width; } _TotalHeight = yPos; // set the calculated height of the result _StyleStack = null; return; } private void BuildAnchor(string token, StyleInfo oldsi, PageText model) { StyleInfo si= oldsi.Clone() as StyleInfo; // always push a StyleInfo _StyleStack.Push(si); // since they will always be popped Hashtable ht = ParseHtmlCmd(token); string href = (string) ht["href"]; if (href == null || href.Length < 1) return; model.HyperLink = model.Tooltip = href; si.TextDecoration = TextDecorationEnum.Underline; si.Color = Color.Blue; } private PageImage BuildImage(Graphics g, string token, StyleInfo oldsi, PageText model) { PageTextHtmlCmdLexer hc = new PageTextHtmlCmdLexer(token.Substring(4)); Hashtable ht = hc.Lex(); string src = (string)ht["src"]; if (src == null || src.Length < 1) return null; string alt = (string)ht["alt"]; string height = (string)ht["height"]; string width = (string)ht["width"]; string align = (string)ht["align"]; Stream strm = null; System.Drawing.Image im = null; PageImage pi = null; try { // Obtain the image stream if (src.StartsWith("http:") || src.StartsWith("file:") || src.StartsWith("https:")) { WebRequest wreq = WebRequest.Create(src); WebResponse wres = wreq.GetResponse(); strm = wres.GetResponseStream(); } else strm = new FileStream(src, System.IO.FileMode.Open, FileAccess.Read); im = System.Drawing.Image.FromStream(strm); int h = im.Height; int w = im.Width; MemoryStream ostrm = new MemoryStream(); ImageFormat imf; imf = ImageFormat.Jpeg; im.Save(ostrm, imf); byte[] ba = ostrm.ToArray(); ostrm.Close(); pi = new PageImage(imf, ba, w, h); pi.AllowSelect = false; pi.Page = this.Page; pi.HyperLink = model.HyperLink; pi.Tooltip = alt == null ? model.Tooltip : alt; pi.X = 0; pi.Y = 0; pi.W = RSize.PointsFromPixels(g, width != null? Convert.ToInt32(width): w); pi.H = RSize.PointsFromPixels(g, height != null? Convert.ToInt32(height): h); pi.SI = new StyleInfo(); } catch { pi = null; } finally { if (strm != null) strm.Close(); if (im != null) im.Dispose(); } return pi; } private StyleInfo CurrentStyle(StyleInfo def) { if (_StyleStack == null || _StyleStack.Count == 0) return def; else return (StyleInfo) _StyleStack.Peek(); } private void HandleStyle(string token, StyleInfo model) { StyleInfo si= model.Clone() as StyleInfo; // always push a StyleInfo _StyleStack.Push(si); // since they will always be popped Hashtable ht = ParseHtmlCmd(token); string style = (string) ht["style"]; HandleStyleString(style, si); return; } private void HandleFont(string token, StyleInfo model) { StyleInfo si = model.Clone() as StyleInfo; // always push a StyleInfo _StyleStack.Push(si); // since they will always be popped PageTextHtmlCmdLexer hc = new PageTextHtmlCmdLexer(token.Substring(5)); Hashtable ht = hc.Lex(); string style = (string)ht["style"]; HandleStyleString(style, si); string color = (string)ht["color"]; if (color != null && color.Length > 0) si.Color = XmlUtil.ColorFromHtml(color, si.Color); string size = (string)ht["size"]; if (size != null && size.Length > 0) HandleStyleFontSize(si, size); string face = (string)ht["face"]; if (face != null && face.Length > 0) si.FontFamily = face; return; } private void HandleStyleString(string style, StyleInfo si) { if (style == null || style.Length < 1) return; string[] styleList = style.Split(new char[] {';'}); foreach (string item in styleList) { string[] val = item.Split(new char[] {':'}); if (val.Length != 2) continue; // must be illegal syntax string tval = val[1].Trim(); switch (val[0].ToLower().Trim()) { case "background": case "background-color": si.BackgroundColor = XmlUtil.ColorFromHtml(tval, si.Color); break; case "color": si.Color = XmlUtil.ColorFromHtml(tval, si.Color); break; case "font-family": si.FontFamily = tval; break; case "font-size": HandleStyleFontSize(si, tval); break; case "font-style": if (tval == "italic") si.FontStyle = FontStyleEnum.Italic; break; case "font-weight": HandleStyleFontWeight(si, tval); break; } } return; } private void HandleStyleFontSize(StyleInfo si, string size) { try { int i = size.IndexOf("pt"); if (i > 0) { size = size.Remove(i, 2); float n = (float) Convert.ToDouble(size); if (size[0] == '+') si.FontSize += n; else si.FontSize = n; return; } i = size.IndexOf("%"); if (i > 0) { size = size.Remove(i, 1); float n = (float) Convert.ToDouble(size); si.FontSize = n*si.FontSize; return; } switch (size) { case "xx-small": si.FontSize = 6; break; case "x-small": si.FontSize = 8; break; case "small": si.FontSize = 10; break; case "medium": si.FontSize = 12; break; case "large": si.FontSize = 14; break; case "x-large": si.FontSize = 16; break; case "xx-large": si.FontSize = 18; break; case "1": si.FontSize = 8; break; case "2": si.FontSize = 10; break; case "3": si.FontSize = 12; break; case "4": si.FontSize = 14; break; case "5": si.FontSize = 18; break; case "6": si.FontSize = 24; break; case "7": si.FontSize = 36; break; } } catch {} // lots of user errors will cause an exception; ignore return; } private void HandleStyleFontWeight(StyleInfo si, string w) { try { switch (w) { case "bold": si.FontWeight = FontWeightEnum.Bold; break; case "bolder": if (si.FontWeight > FontWeightEnum.Bolder) { if (si.FontWeight < FontWeightEnum.W900) si.FontWeight++; } else if (si.FontWeight == FontWeightEnum.Normal) si.FontWeight = FontWeightEnum.W700; else if (si.FontWeight == FontWeightEnum.Bold) si.FontWeight = FontWeightEnum.W900; else if (si.FontWeight != FontWeightEnum.Bolder) si.FontWeight = FontWeightEnum.Normal; break; case "lighter": if (si.FontWeight > FontWeightEnum.Bolder) { if (si.FontWeight > FontWeightEnum.W100) si.FontWeight--; } else if (si.FontWeight == FontWeightEnum.Normal) si.FontWeight = FontWeightEnum.W300; else if (si.FontWeight == FontWeightEnum.Bold) si.FontWeight = FontWeightEnum.W400; else if (si.FontWeight != FontWeightEnum.Lighter) si.FontWeight = FontWeightEnum.Normal; break; case "normal": si.FontWeight = FontWeightEnum.Normal; break; case "100": si.FontWeight = FontWeightEnum.W100; break; case "200": si.FontWeight = FontWeightEnum.W200; break; case "300": si.FontWeight = FontWeightEnum.W300; break; case "400": si.FontWeight = FontWeightEnum.W400; break; case "500": si.FontWeight = FontWeightEnum.W500; break; case "600": si.FontWeight = FontWeightEnum.W600; break; case "700": si.FontWeight = FontWeightEnum.W700; break; case "800": si.FontWeight = FontWeightEnum.W800; break; case "900": si.FontWeight = FontWeightEnum.W900; break; } } catch {} // lots of user errors will cause an exception; ignore return; } private void PopStyle() { if (_StyleStack != null && _StyleStack.Count > 0) _StyleStack.Pop(); } private void NormalizeLineHeight(List<PageItem> lineItems, float maxLineHeight, float maxDescent) { foreach (PageItem pi in lineItems) { if (pi is PageText) { // force the text to line up PageText pt = (PageText) pi; if (pt.H >= maxLineHeight) continue; pt.Y += maxLineHeight - pt.H; if (pt.Descent > 0 && pt.Descent < maxDescent) pt.Y -= (maxDescent - pt.Descent); } } lineItems.Clear(); } private Hashtable ParseHtmlCmd(string token) { Hashtable ht = new Hashtable(); // find the start and the end of the command int start = token.IndexOf(' '); // look for first blank if (start < 0) return ht; int end = token.LastIndexOf('>'); if (end < 0 || end <= start) return ht; string cmd = token.Substring(start, end - start); string[] keys = cmd.Split(new char[] {'='}); if (keys == null || keys.Length < 2) return ht; try { for (int i = 0; i < keys.Length - 1; i += 2) { // remove " from the value if any string v = keys[i + 1]; if (v.Length > 0 && (v[0] == '"' || v[0] == '\'')) v = v.Substring(1); if (v.Length > 0 && (v[v.Length - 1] == '"' || v[v.Length - 1] == '\'')) v = v.Substring(0, v.Length - 1); // normalize key to lower case string key = keys[i].ToLower().Trim(); ht.Add(key, v); } } catch { } // there are any number of ill formed strings that could cause problems; keep what we've found return ht; } private SizeF MeasureString(string s, StyleInfo si, Graphics g, out float descent) { Font drawFont=null; StringFormat drawFormat=null; SizeF ms = SizeF.Empty; descent = 0; if (s == null || s.Length == 0) return ms; try { // STYLE System.Drawing.FontStyle fs = 0; if (si.FontStyle == FontStyleEnum.Italic) fs |= System.Drawing.FontStyle.Italic; // WEIGHT switch (si.FontWeight) { case FontWeightEnum.Bold: case FontWeightEnum.Bolder: case FontWeightEnum.W500: case FontWeightEnum.W600: case FontWeightEnum.W700: case FontWeightEnum.W800: case FontWeightEnum.W900: fs |= System.Drawing.FontStyle.Bold; break; default: break; } try { FontFamily ff = si.GetFontFamily(); drawFont = new Font(ff, si.FontSize, fs); // following algorithm comes from the C# Font Metrics documentation float descentPixel = si.FontSize * ff.GetCellDescent(fs) / ff.GetEmHeight(fs); descent = RSize.PointsFromPixels(g, descentPixel); } catch { drawFont = new Font("Arial", si.FontSize, fs); // usually because font not found descent = 0; } drawFormat = new StringFormat(); drawFormat.Alignment = StringAlignment.Near; CharacterRange[] cr = {new CharacterRange(0, s.Length)}; drawFormat.SetMeasurableCharacterRanges(cr); Region[] rs = new Region[1]; rs = g.MeasureCharacterRanges(s, drawFont, new RectangleF(0,0,float.MaxValue,float.MaxValue), drawFormat); RectangleF mr = rs[0].GetBounds(g); ms.Height = RSize.PointsFromPixels(g, mr.Height); // convert to points from pixels ms.Width = RSize.PointsFromPixels(g, mr.Width); // convert to points from pixels return ms; } finally { if (drawFont != null) drawFont.Dispose(); if (drawFormat != null) drawFont.Dispose(); } } #region IEnumerable Members public IEnumerator GetEnumerator() { if (_items == null) return null; return _items.GetEnumerator(); } #endregion #region ICloneable Members new public object Clone() { return this.MemberwiseClone(); } #endregion } }
31.041716
118
0.537705
[ "Apache-2.0" ]
Kernel-Klink/My-FyiReporting
RdlEngine/Runtime/PageTextHtml.cs
26,044
C#
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace NoCaml.UserProfiles { [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)] public class ProfilePropertySourceLogAttribute : Attribute { public string LogPropertyName { get; set; } public int HistoryLength { get; set; } public bool StorePastValues { get; set; } public bool StoreUsername { get; set; } public bool StoreDate { get; set; } public bool StoreHash { get; set; } public ProfilePropertySourceLogAttribute() { LogPropertyName = "SourceLog"; HistoryLength = 0; StoreDate = true; StorePastValues = false; StoreUsername = true; StoreHash = false; } } }
25.558824
71
0.596087
[ "MIT" ]
tqc/NoCaml
NoCaml/UserProfiles/ProfilePropertySourceLogAttribute.cs
871
C#
using System; using System.Collections.Generic; using System.Linq; namespace CinemaAPI.Core.CustomEntities { public class PagedList<T> : List<T> { public int CurrentPage { get; set; } public int TotalPages { get; set; } public int PageSize { get; set; } public int TotalCount { get; set; } public bool HasPreviousPage => CurrentPage > 1; public bool HasNextPage => CurrentPage < TotalPages; public int? NextPageNumber => HasNextPage ? CurrentPage + 1 : (int?)null; public int? PreviousPageNumber => HasPreviousPage ? CurrentPage - 1 : (int?)null; public PagedList(List<T> items, int count, int pageNumber, int pageSize) { CurrentPage = pageNumber; PageSize = pageSize; TotalCount = count; TotalPages = (int)Math.Ceiling(count / (double)pageSize); AddRange(items); } public static PagedList<T> Create(IEnumerable<T> source, int pageNumber, int pageSize) { var count = source.Count(); var items = source.Skip((pageNumber - 1) * pageSize).Take(pageSize).ToList(); return new PagedList<T>(items, count, pageNumber, pageSize); } } }
31.45
94
0.608108
[ "Apache-2.0" ]
FrankcoMiguel/CinemaAPI
CinemaAPI.Core/CustomEntities/PagedList.cs
1,260
C#
/* MIT License Copyright (c) 2011-2019 Markus Wendt (http://www.dodoni-project.net) All rights reserved. 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. Please see http://www.dodoni-project.net/ for more information concerning the Dodoni.net project. */ using System; using System.Globalization; using System.Collections.Generic; using Dodoni.BasicComponents; namespace Dodoni.MathLibrary.Miscellaneous { public partial class MultiDimRegion { /// <summary>Serves as factory for n-dimensional constraint, where the boundary is represented by a specific polynomial (in n variables). /// </summary> public abstract partial class Polynomial : IMultiDimRegion { #region protected constructors /// <summary>Initializes a new instance of the <see cref="MultiDimRegion.Polynomial" /> class. /// </summary> /// <param name="dimension">The dimension of the feasible region.</param> /// <param name="lowerBound">The lower bound, perhaps <see cref="System.Double.NegativeInfinity"/>.</param> /// <param name="upperBound">The upper bound, perhaps <see cref="System.Double.PositiveInfinity"/>.</param> protected Polynomial(int dimension, double lowerBound, double upperBound) { if (dimension < 1) { throw new ArgumentOutOfRangeException(nameof(dimension), String.Format(CultureInfo.InvariantCulture, ExceptionMessages.ArgumentOutOfRangeGreaterEqual, "Dimension", 1)); } Dimension = dimension; if ((Double.IsNaN(lowerBound) == true) || (Double.IsNegativeInfinity(lowerBound) == true)) { LowerBound = Double.NegativeInfinity; } else { LowerBound = lowerBound; } if ((Double.IsNaN(upperBound) == true) || (Double.IsPositiveInfinity(upperBound) == true)) { UpperBound = Double.PositiveInfinity; } else { UpperBound = upperBound; } if (UpperBound < LowerBound) { throw new ArgumentOutOfRangeException("upper-/lower bound", String.Format(CultureInfo.InvariantCulture, ExceptionMessages.ArgumentCombinationInvalid, "Lower/upper bound")); } } #endregion #region public properties #region IMultiDimRegion Members /// <summary>Gets the dimension of the region. /// </summary> /// <value>The dimension.</value> public int Dimension { get; private set; } #endregion /// <summary>Gets the lower bound, perhaps <see cref="System.Double.NegativeInfinity"/>. /// </summary> /// <value>The lower bound.</value> public double LowerBound { get; private set; } /// <summary>Gets the upper bound, perhaps <see cref="System.Double.PositiveInfinity"/>. /// </summary> /// <value>The upper bound.</value> public double UpperBound { get; private set; } /// <summary>Gets the collection of terms of the polynomial that represents the constraint, where the polynomial is the sum of the terms. The first component represents /// the coefficient and the second component represents the monomial to multiply with these coefficient. /// </summary> /// <value>The collection of terms of the polynomial that represents the constraint, where the polynomial is the sum of the terms.</value> public abstract IEnumerable<Tuple<double, IEnumerable<Monomial>>> Terms { get; } #endregion #region public methods #region IMultiDimRegion Members /// <summary>Gets a value indicating whether a specific point is inside the region. /// </summary> /// <param name="x">The argument, i.e. a point of dimension <see cref="IMultiDimRegion.Dimension" />.</param> /// <param name="tolerance">This parameter will be ignored in this implementation.</param> /// <returns>A value indicating whether <paramref name="x" /> is inside the represented region.</returns> public abstract PointRegionRelation GetPointPosition(double[] x, double tolerance = MachineConsts.Epsilon); /// <summary>Gets a value indicating whether a specific point is inside the region. /// </summary> /// <param name="x">The argument, i.e. a point of dimension <see cref="IMultiDimRegion.Dimension" />.</param> /// <param name="distance">The distance to the region represented by the current instance (output).</param> /// <param name="tolerance">This parameter will be ignored in this implementation.</param> /// <returns>A value indicating whether <paramref name="x" /> is inside the region and has some strictly positive distance to the region represented by the current instance.</returns> public abstract PointRegionRelation GetDistance(double[] x, out double distance, double tolerance = MachineConsts.Epsilon); #endregion #endregion #region public static methods /// <summary>Create a new <see cref="MultiDimRegion.Polynomial" /> instance, where the constraint is represented by /// <para>a \leq c * x_{j_1}^{k_1} * ... * x_{j_m}^{k_m} \leq b,</para> where c is a specific coefficient. /// </summary> /// <param name="dimension">The dimension of the feasible region.</param> /// <param name="lowerBound">The lower bound, perhaps <see cref="System.Double.NegativeInfinity"/>.</param> /// <param name="upperBound">The upper bound, perhaps <see cref="System.Double.PositiveInfinity"/>.</param> /// <param name="coefficient">The (single) coefficient.</param> /// <param name="monomials">A collection of monomials, i.e. powers and corresponding argument indices.</param> /// <returns>The specified <see cref="MultiDimRegion.Polynomial"/> object.</returns> /// <exception cref="ArgumentOutOfRangeException">Thrown, if <paramref name="dimension"/> is less than <c>1</c> or if some monomial is specified with respect to some higher dimension than <paramref name="dimension"/>.</exception> public static MultiDimRegion.Polynomial Create(int dimension, double lowerBound, double upperBound, double coefficient, params Monomial[] monomials) { return new OneCoefficientPolynomialRegion(dimension, lowerBound, upperBound, coefficient, monomials); } /// <summary>Create a new <see cref="MultiDimRegion.Polynomial" /> instance, where the constraint is represented by /// <para>a \leq \sum_{j=0}^m c_j * x_{j,1}^{k_{j,1}} * ... * x_{j,n_j}^{k_{j,n_j}} \leq b.</para> /// </summary> /// <param name="dimension">The dimension of the feasible region.</param> /// <param name="lowerBound">The lower bound, perhaps <see cref="System.Double.NegativeInfinity"/>.</param> /// <param name="upperBound">The upper bound, perhaps <see cref="System.Double.PositiveInfinity"/>.</param> /// <param name="coefficients">The coefficients.</param> /// <param name="monomials">A collection of monomials, i.e. powers and corresponding argument indices, where the first corresponds to the index of the sum of the polynomial, i.e. with respect to <paramref name="coefficients"/>. /// The second null-based index corresponds to the monomial in the product of the polynomial representation of the constraint.</param> /// <returns>The specified <see cref="MultiDimRegion.Polynomial"/> object.</returns> /// <exception cref="ArgumentOutOfRangeException">Thrown, if <paramref name="dimension"/> is less than <c>1</c> or if some monomial is specified with respect to some higher dimension than <paramref name="dimension"/>.</exception> public static MultiDimRegion.Polynomial Create(int dimension, double lowerBound, double upperBound, double[] coefficients, params IList<Monomial>[] monomials) { return new GeneralPolynomialRegion(dimension, lowerBound, upperBound, coefficients, monomials); } /// <summary>Create a new <see cref="MultiDimRegion.Polynomial"/> instance where the constraint is represented by /// <para>a \leq c_1 * x_{j_1}^{k_1} + c_2 * x_{j_2}^{k_2} + ... + c_m * x_{j_m}^{k_m} \leq b.</para> /// </summary> /// <param name="dimension">The dimension of the feasible region.</param> /// <param name="lowerBound">The lower bound, perhaps <see cref="System.Double.NegativeInfinity"/>.</param> /// <param name="upperBound">The upper bound, perhaps <see cref="System.Double.PositiveInfinity"/>.</param> /// <param name="coefficients">The coefficients (c_j).</param> /// <param name="monomials">A collection of monomials, i.e. powers and corresponding argument indices, for each coefficient c_j.</param> /// <exception cref="ArgumentOutOfRangeException">Thrown, if <paramref name="dimension"/> is less than <c>1</c> or if some monomial is specified with respect to some higher dimension than <paramref name="dimension"/>.</exception> public static MultiDimRegion.Polynomial Create(int dimension, double lowerBound, double upperBound, double[] coefficients, params Monomial[] monomials) { return new MonomialSumPolynomialRegion(dimension, lowerBound, upperBound, coefficients, monomials); } #endregion } } }
58.852632
241
0.63629
[ "MIT" ]
dodoni/dodoni.net
BasicMathLibrary/Miscellaneous/Regions/MultiDimRegion.Polynomial.cs
11,184
C#
//*******************************************************************************************// // // // Download Free Evaluation Version From: https://bytescout.com/download/web-installer // // // // Also available as Web API! Free Trial Sign Up: https://secure.bytescout.com/users/sign_up // // // // Copyright © 2017-2018 ByteScout Inc. All rights reserved. // // http://www.bytescout.com // // // //*******************************************************************************************// using System; using Bytescout.BarCode; namespace printBarcodeCSharp2008 { class Program { static void Main(string[] args) { BarcodePrinter bPrinter = new BarcodePrinter(); bPrinter.Print(SymbologyType.Code39, "0123456789", "Case Number", 3.5f, 1f); } } }
46.25
95
0.309653
[ "Apache-2.0" ]
jboddiford/ByteScout-SDK-SourceCode
BarCode SDK/C#/Print Barcode/Program.cs
1,296
C#
using System; using Aop.Api.Domain; using System.Collections.Generic; using Aop.Api.Response; namespace Aop.Api.Request { /// <summary> /// AOP API: alipay.user.agreement.sign.effect /// </summary> public class AlipayUserAgreementSignEffectRequest : IAopRequest<AlipayUserAgreementSignEffectResponse> { /// <summary> /// 支付宝个人协议签约生效接口 /// </summary> public string BizContent { get; set; } #region IAopRequest 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 AopObject bizModel; public void SetNeedEncrypt(bool needEncrypt){ this.needEncrypt=needEncrypt; } public bool GetNeedEncrypt(){ return this.needEncrypt; } public void SetNotifyUrl(string notifyUrl){ this.notifyUrl = notifyUrl; } public string GetNotifyUrl(){ return this.notifyUrl; } public void SetReturnUrl(string returnUrl){ this.returnUrl = returnUrl; } public string GetReturnUrl(){ return this.returnUrl; } public void SetTerminalType(String terminalType){ this.terminalType=terminalType; } public string GetTerminalType(){ return this.terminalType; } public void SetTerminalInfo(String terminalInfo){ this.terminalInfo=terminalInfo; } public string GetTerminalInfo(){ return this.terminalInfo; } public void SetProdCode(String prodCode){ this.prodCode=prodCode; } public string GetProdCode(){ return this.prodCode; } public string GetApiName() { return "alipay.user.agreement.sign.effect"; } public void SetApiVersion(string apiVersion){ this.apiVersion=apiVersion; } public string GetApiVersion(){ return this.apiVersion; } public IDictionary<string, string> GetParameters() { AopDictionary parameters = new AopDictionary(); parameters.Add("biz_content", this.BizContent); return parameters; } public AopObject GetBizModel() { return this.bizModel; } public void SetBizModel(AopObject bizModel) { this.bizModel = bizModel; } #endregion } }
23.6
106
0.605932
[ "Apache-2.0" ]
Varorbc/alipay-sdk-net-all
AlipaySDKNet/Request/AlipayUserAgreementSignEffectRequest.cs
2,622
C#
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. namespace Microsoft.DotNet.UpgradeAssistant { public static class WellKnownStepIds { public const string BackupStepId = "Microsoft.DotNet.UpgradeAssistant.Steps.Backup.BackupStep"; public const string ConfigUpdaterStepId = "Microsoft.DotNet.UpgradeAssistant.Steps.Configuration.ConfigUpdaterStep"; public const string PackageUpdaterPreTFMStepId = "Microsoft.DotNet.UpgradeAssistant.Steps.Packages.PackageUpdaterPreTFMStep"; public const string PackageUpdaterStepId = "Microsoft.DotNet.UpgradeAssistant.Steps.Packages.PackageUpdaterStep"; public const string TryConvertProjectConverterStepId = "Microsoft.DotNet.UpgradeAssistant.Steps.ProjectFormat.TryConvertProjectConverterStep"; public const string SetTFMStepId = "Microsoft.DotNet.UpgradeAssistant.Steps.ProjectFormat.SetTFMStep"; public const string CurrentProjectSelectionStepId = "Microsoft.DotNet.UpgradeAssistant.Steps.Solution.CurrentProjectSelectionStep"; public const string EntrypointSelectionStepId = "Microsoft.DotNet.UpgradeAssistant.Steps.Solution.EntrypointSelectionStep"; public const string NextProjectStepId = "Microsoft.DotNet.UpgradeAssistant.Steps.Solution.NextProjectStep"; public const string FinalizeSolutionStepId = "Microsoft.DotNet.UpgradeAssistant.Steps.Solution.FinalizeSolutionStep"; public const string SourceUpdaterStepId = "Microsoft.DotNet.UpgradeAssistant.Steps.Source.SourceUpdaterStep"; public const string RazorUpdaterStepId = "Microsoft.DotNet.UpgradeAssistant.Steps.Razor.RazorUpdaterStep"; public const string TemplateInserterStepId = "Microsoft.DotNet.UpgradeAssistant.Steps.Templates.TemplateInserterStep"; public const string VisualBasicProjectUpdaterStepId = "Microsoft.DotNet.UpgradeAssistant.Extensions.VisualBasic.VisualBasicProjectUpdaterStep"; } }
83.875
151
0.80924
[ "MIT" ]
kreghek/upgrade-assistant
src/common/Microsoft.DotNet.UpgradeAssistant.Abstractions/WellKnownStepIds.cs
2,015
C#
using System.Collections; using System.Collections.Generic; using UnityEngine; using Action; public class AnimatedGestureAbility : GestureAbility { [Tooltip("Mandatory field: How much energy this ability uses")] [SerializeField] private int energyCost; [Tooltip("Mandatory field: The name of the animation state & trigger associated with this ability. Name of animation trigger and of the state it transitions to are assumed to be the same")] [SerializeField] private string animStateName; [Tooltip("Optional field: Prefab that is instantiated when the InstantiateFX(state) animation callback is triggered")] [SerializeField] private GameObject abilityPrefab; [Tooltip("Optional field: Transform that ability prefab is instantiated at")] [SerializeField] private Transform spawnPoint; [Tooltip("Optional field: Sound effect that is played on ability activation")] [SerializeField] private AudioClip activationSFX; [Tooltip("Optional field: Sound effect that is played upon ability prefab instantiation")] [SerializeField] private AudioClip instantiationSFX; private PlayerStats stats; private AudioSource audioSource; private Animator animator; private AnimationListener animListener; private bool isAnimating; void Start() { stats = GetComponent<PlayerStats>(); audioSource = GetComponent<AudioSource>(); animator = GetComponent<Animator>(); animListener = new AnimationListener(this, animStateName, null, OnAnimationExit); isAnimating = false; } public string getAnimName() { return animStateName; } public override void ActivateAbility() { if (isAnimating) return; Debug.Log(animStateName + " ability was activated!"); //Send the trigger to the opponent over the net Constants.animParam trigger = (Constants.animParam)System.Enum.Parse(typeof(Constants.animParam), animStateName); RequestPushUpdate.setTrigger(trigger); if (stats.DepleteEnergy(energyCost)) { if (activationSFX != null) audioSource.PlayOneShot(activationSFX); animator.SetTrigger(animStateName); isAnimating = true; } // Replacement method of moving player forward towards enemy during an Uppercut if (animStateName == "Uppercut") { this.gameObject.transform.localPosition += new Vector3(0f, 0f, .8f); } } void InstantiateFX(string stateName) { if (stateName != animStateName) return; if (abilityPrefab != null && spawnPoint != null) { var prefab = Instantiate(abilityPrefab, spawnPoint.position, spawnPoint.rotation); // set the prefab layer according to which player this is // prefab.layer = gameObject.layer == 12 ? LayerMask.NameToLayer("PlayerProjectile") : LayerMask.NameToLayer("OpponentProjectile"); prefab.layer = gameObject.layer; if (stateName == "Uppercut") { prefab.GetComponent<Uppercut>().setFollow(GameObject.Find("mixamorig:RightHand").transform); } if (instantiationSFX != null) audioSource.PlayOneShot(instantiationSFX); } } private void OnAnimationExit() { isAnimating = false; } }
36.554348
193
0.67975
[ "MIT" ]
669-Development-Team/Mecha-Fighter-VR
Mecha Fighter VR/Assets/Scripts/Action/AnimatedGestureAbility.cs
3,365
C#
namespace PacMan.GameComponents.Ghosts; /// Moves the ghosts while they are inside of the house public class GhostInsideHouseMover : GhostMover { readonly GhostHouseDoor _door; readonly Vector2[] _routeOut; readonly Vector2 _topPos; readonly Vector2 _bottomPos; Vector2 _cellToMoveFrom; Vector2 _cellToMoveTo; bool _readyToExit; int _indexInRouteOut; bool _finished; public GhostInsideHouseMover( Ghost ghost, IMaze maze, GhostHouseDoor ghostHouseDoor) : base(ghost, GhostMovementMode.InHouse, maze, () => new(CellIndex.Zero)) { _door = ghostHouseDoor; Vector2 center = Maze.PixelCenterOfHouse; float x = center.X + (ghost.OffsetInHouse * 16); _topPos = new(x, (float)((13.5 * 8) + 4)); _bottomPos = new(x, (float)((15.5 * 8) - 4)); var centerOfUpDown = new Vector2(_topPos.X, Maze.PixelCenterOfHouse.Y); ghost.Position = _topPos + new Vector2(0, (_bottomPos.Y - _topPos.Y) / 2); _cellToMoveFrom = ghost.Position; if (ghost.Direction.Current == Direction.Down) { _cellToMoveTo = _bottomPos; } else if (ghost.Direction.Current == Direction.Up) { _cellToMoveTo = _topPos; } else { throw new InvalidOperationException("Ghost must be pointing up or down at start."); } _routeOut = new[] { centerOfUpDown, Maze.PixelCenterOfHouse, Maze.PixelHouseEntrancePoint }; } void whenAtTargetCell() { _cellToMoveFrom = _cellToMoveTo; if (!_readyToExit) { if (_cellToMoveTo == _topPos) { _cellToMoveTo = _bottomPos; } else { _cellToMoveTo = _topPos; } return; } if (_indexInRouteOut == _routeOut.Length) { _finished = true; } else { _cellToMoveTo = _routeOut[_indexInRouteOut++]; } } public override ValueTask<MovementResult> Update(CanvasTimingInformation context) { if (!_readyToExit && _door.CanGhostLeave(Ghost)) { _readyToExit = true; return new(MovementResult.NotFinished); } if (_finished) { Ghost.Direction = new(Direction.Left, Direction.Left); Ghost.SetMovementMode(GhostMovementMode.Undecided); return new(MovementResult.Finished); } Vector2 diff = _cellToMoveTo - _cellToMoveFrom; if (diff != Vector2.Zero) { diff = diff.Normalize(); Ghost.Position += (diff / Vector2s.Two); var dir = DirectionToIndexLookup.GetDirectionFromVector(diff); Ghost.Direction = new(dir, dir); } if (Ghost.Position.Floor() == _cellToMoveTo.Floor()) { Ghost.Position = _cellToMoveTo; whenAtTargetCell(); } return new(MovementResult.NotFinished); } }
26.161017
112
0.574668
[ "MIT" ]
ScriptBox99/PacManBlazor
src/PacMan.GameComponents/Ghosts/GhostInsideHouseMover.cs
3,089
C#
using System; using System.Collections.Generic; using System.Text; namespace CQELight.Abstractions.IoC.Interfaces { /// <summary> /// Contract interface for type registration into Ioc container. /// </summary> public interface ITypeRegistration { /// <summary> /// Type of abstraction that is concerned by this registration. /// </summary> IEnumerable<Type> AbstractionTypes { get; } } }
24.777778
71
0.656951
[ "MIT" ]
Thanouz/CQELight
src/CQELight/Abstractions/IoC/Interfaces/ITypeRegistration.cs
448
C#
namespace ZKWeb.Plugins.Shopping.Order.src.Domain.Enums { /// <summary> /// 买家或卖家留言 /// </summary> public enum OrderCommentSide { /// <summary> /// 买家留言 /// </summary> BuyerComment = 0, /// <summary> /// 卖家留言 /// </summary> SellerComment = 1 } }
17.6875
59
0.558304
[ "MIT" ]
303248153/ZKWeb.Plugins
src/ZKWeb.Plugins/Shopping.Order/src/Domain/Enums/OrderCommentSide.cs
315
C#