コード例 #1
0
ファイル: FlexEnumTests.cs プロジェクト: NGPVAN/osdi.net
        public void DistinctReferencesWithDifferentValues_AreNotEqual()
        {
            var test1 = new TestEnum("Test1");
            var test2 = new TestEnum("Test2");

            Assert.NotEqual(test1, test2);
        }
コード例 #2
0
ファイル: FlexEnumTests.cs プロジェクト: NGPVAN/osdi.net
        public void DistinctReferencesWithSameValue_AreEqual()
        {
            var test1 = new TestEnum("Test");
            var test2 = new TestEnum("Test");

            Assert.Equal(test1, test2);
        }
コード例 #3
0
 public void AllSupportedTypes(short srtArg, int intArg, long lngArg, float fltArg, TestEnum enumArg, Guid guidArg)
 {
     if (this.IsEnabled(EventLevel.Informational, EventKeywords.None))
     {
         this.WriteEvent(8, srtArg, intArg, lngArg, fltArg, (int)enumArg, guidArg); 
     }
 }
コード例 #4
0
        static void assign( TestElement rData,
					bool bBool, char cChar, byte nByte,
					short nShort, ushort nUShort,
					int nLong, uint nULong,
					long nHyper, ulong nUHyper,
					float fFloat, double fDouble,
					TestEnum eEnum, string rStr,
					Object xTest,
					Any rAny )
        {
            rData.Bool = bBool;
            rData.Char = cChar;
            rData.Byte = nByte;
            rData.Short = nShort;
            rData.UShort = nUShort;
            rData.Long = nLong;
            rData.ULong = nULong;
            rData.Hyper = nHyper;
            rData.UHyper = nUHyper;
            rData.Float = fFloat;
            rData.Double = fDouble;
            rData.Enum = eEnum;
            rData.String = rStr;
            rData.Interface = xTest;
            rData.Any = rAny;
        }
コード例 #5
0
ファイル: TestCaseDemo.cs プロジェクト: jmrgn/TestCase
 public void A_TestStandard(int toTest, string toTestString, int constant, TestEnum testEnum)
 {
     int myInt = int.Parse(toTestString);
     Assert.That(toTest == myInt);
     Assert.That(toTest == constant);
     Assert.That(toTest == (int)testEnum);
 }
コード例 #6
0
ファイル: FlexEnumTests.cs プロジェクト: NGPVAN/osdi.net
        public void ToString_ReturnsValue()
        {
            var test = new TestEnum("Test");

            string testValue = test.ToString();

            Assert.Equal(test.Value, testValue);
        }
コード例 #7
0
ファイル: FlexEnumTests.cs プロジェクト: NGPVAN/osdi.net
        public void ImplicitAssignmentToString_HasSameValue()
        {
            var test = new TestEnum("Test");

            string testValue = test;

            Assert.Equal(test.Value, testValue);
        }
コード例 #8
0
ファイル: SpecialTestCase.cs プロジェクト: rexwhitten/Siege
 public SpecialTestCase(string stringArg, int intArg, bool boolArg, TestEnum enumArg, TestStruct structArg)
 {
     StringInput = stringArg;
     IntInput = intArg;
     BoolInput = boolArg;
     EnumInput = enumArg;
     StructInput = structArg;
 }
コード例 #9
0
 public Dictionary<string, string> this[TestEnum appEnum]
 {
     get
     {
         return _dictionary.ContainsKey(appEnum)
                    ? _dictionary[appEnum]
                    : _dictionary[appEnum] = new Dictionary<string, string>();
     }
 }
 public SimpleShortOptionsAreParsedCorrectlyAttribute(
     string arguments,
     bool? expectedBoolean = null,
     string expectedString = null,
     int? expectedInt32 = null,
     double? expectedDouble = null,
     TestEnum? expectedEnum = null)
     : base(arguments, expectedBoolean, expectedString, expectedInt32, expectedDouble, expectedEnum)
 {
 }
コード例 #11
0
ファイル: Program.cs プロジェクト: gregharding/TinyJSON
		public void Init()
		{
			priv1 = 1;
			priv2 = 2;

			prop1 = 1;
			prop2 = 2;
			prop3 = 3;

			name = "Rumpelstiltskin Jones";
			type = TestEnum.Thing2;
		}
コード例 #12
0
ファイル: TestService_Impl.cs プロジェクト: Phrynohyas/margo
        public TestStructure MethodWithComplexTypes(TestStructure[] data, TestStructure singleStructure, TestEnum expectedResult)
        {
            switch (expectedResult)
            {
                case TestEnum.First:
                    return data[0];
                case TestEnum.Second:
                    return data[1];
                case TestEnum.Single:
                    return singleStructure;

                default:
                    return null;
            }
        }
コード例 #13
0
 public void EnumTypeEnumerable()
 {
     TestEnum[] enumerable = new TestEnum[] { TestEnum.First, TestEnum.Second };
     this.TestSuccessfulEnumerableGeneration <string>(enumerable);
 }
コード例 #14
0
 public void RandomEnum_EnumRange_Distinct([Random(COUNT, Distinct = true)] TestEnum x)
 {
     Assert.That(previousEnumValues, Does.Not.Contain(x));
     previousEnumValues.Add(x);
 }
コード例 #15
0
        public ulong Method1()
        {
            String[]       local1 = new String[] { };
            byte[]         local2 = new byte[] { };
            bool           local3 = true;
            TypedReference local4 = __makeref(App.m_xFwd1);

            String[] local5 = new String[] { "120", "70", "105" };
            if (local3)
            {
                while (local3)
                {
                    TestEnum[] local6 = new TestEnum[] { TestEnum.red };
                    do
                    {
                        sbyte[]  local7  = (new sbyte[117]);
                        sbyte    local8  = App.m_suFwd2;
                        double[] local9  = new double[] { 72.0 };
                        char[]   local10 = (new char[118]);
                        int[]    local11 = new int[] { 98, 126, 35 };
                        for (new TestEnum(); local3; new sbyte())
                        {
                            int[]    local12 = new int[] { };
                            String[] local13 = (new String[9]);
                            ulong[]  local14 = (new ulong[56]);
                            App.m_asuFwd3 = (new sbyte[116]);
                            Break();
                        }
                        try
                        {
                            double     local12 = 48.0;
                            TestEnum[] local13 = AA.m_axStatic1;
                            char[]     local14 = (new char[83]);
                            sbyte      local15 = App.m_suFwd2;
                            Array[]    local16 = (new Array[73]);
                            throw new IndexOutOfRangeException();
                        }
                        catch (IndexOutOfRangeException)
                        {
                            byte[]   local12 = (new byte[19]);
                            sbyte[]  local13 = App.m_asbFwd4;
                            TestEnum local14 = TestEnum.red;
                            return(App.m_ulFwd5);
                        }
                    }while (local3);
                }
            }
            else
            {
                goto label1;
            }
            while (local3)
            {
                ulong    local6  = App.m_ulFwd5;
                object   local7  = null;
                double[] local8  = (new double[71]);
                byte     local9  = App.m_bFwd6;
                AA[]     local10 = (new AA[47]);
                do
                {
                    object local11 = null;
                    float  local12 = 72.0f;
                    int[]  local13 = new int[] { 76 };
                    int    local14 = 23;
                    for (local14 = local14; local3; new double())
                    {
                        int[]    local15 = new int[] { 91, 54 };
                        byte[]   local16 = (new byte[14]);
                        double   local17 = 94.0;
                        TestEnum local18 = 0;
                        local10 = local10;
                    }
                }while (local3);
            }
            if (local3)
            {
                try
                {
                    float[]    local6 = new float[] { 113.0f, 23.0f };
                    sbyte      local7 = App.m_suFwd2;
                    TestEnum[] local8 = AA.m_axStatic1;
                    uint       local9 = 1u;
                    throw new InvalidOperationException();
                }
                finally
                {
                    double local6 = 61.0;
                    object local7 = null;
                    uint[] local8 = new uint[] { 38u };
                    char[] local9 = (new char[17]);
                    for (App.m_iFwd7 = App.m_iFwd7; local3; local7 = local7)
                    {
                        char[]   local10 = new char[] { };
                        sbyte[]  local11 = (new sbyte[39]);
                        object[] local12 = (new object[50]);
                        Array[]  local13 = App.m_axFwd8;
                        local11 = local11;
                    }
                }
            }
label1:
            return(App.m_ulFwd5);
        }
コード例 #16
0
 protected override void Init()
 {
     standardValue  = new StandardStruct(1, "John", "Doe", isLoggedIn: false);
     blittableValue = new BlittableStruct(59, 92);
     testEnum       = TestEnum.HatesAll;
 }
コード例 #17
0
 public void TestGetDescription(TestEnum enumValue, string expected)
 {
     Assert.That(enumValue.GetDescription(), Is.EqualTo(expected));
 }
コード例 #18
0
 partial void OnEnumPropChanging(TestEnum value);
コード例 #19
0
 public TestEnum ReturnEnumParameter(TestEnum a)
 {
     return a;
 }
コード例 #20
0
        public void TestFormatQueryParam_enum()
        {
            TestEnum value = TestEnum.DISABLED;

            Assert.Equal("DISABLED", new QueryStringBuilder().FormatQueryParam(value));
        }
コード例 #21
0
ファイル: TestService.cs プロジェクト: Croissong/krpc
 public static TestEnum EnumDefaultArg(TestEnum x = TestEnum.ValueC)
 {
     return(x);
 }
コード例 #22
0
ファイル: TestService.cs プロジェクト: Croissong/krpc
 public static TestEnum EnumEcho(TestEnum x)
 {
     return(x);
 }
コード例 #23
0
ファイル: BaseConvertTo.cs プロジェクト: deipax/Deipax
 public virtual TTo From_Enum(TestEnum input) => Convert(input);
コード例 #24
0
 public void CanConvertStringToEnum(TestEnum expected, string value)
 {
     Assert.That(_converter.ConvertBack(value, typeof(TestEnum), null, CultureInfo.InvariantCulture), Is.EqualTo(expected));
 }
コード例 #25
0
 public void CanConvertEnumToString(TestEnum value, string expected)
 {
     Assert.That(_converter.Convert(value, typeof(string), null, CultureInfo.InvariantCulture), Is.EqualTo(expected));
 }
コード例 #26
0
ファイル: b55197.cs プロジェクト: CheneyWu/coreclr
 public uint Method1(int[] param1)
 {
     uint[] local3 = new uint[1];
     long local4 = App.m_lFwd1;
     {
         float[] local5 = new float[] { 108.0f };
         {
             byte[] local7 = new byte[] { };
             sbyte local8 = App.m_sbFwd3;
             long local9 = App.m_lFwd1;
             sbyte[] local10 = (new sbyte[4]);
             App.m_asbFwd6 = (new sbyte[111]);
             try
             {
                 sbyte[] local11 = new sbyte[] { };
                 throw new Exception();
             }
             catch (ArgumentException) { }
         }
         {
             sbyte local7 = App.m_sbFwd3;
             String[] local8 = new String[] { };
             char[] local9 = (new char[81]);
             BB local10 = new BB();
             object[] local11 = new object[] { null, null, null, null, null };
             double[] local12 = new double[] { 109.0 };
             {
                 BB[] local13 = (new BB[22]);
                 sbyte local14 = App.m_sbFwd3;
                 ulong[] local15 = App.m_aulFwd7;
                 //for (new long[]{ local4 }; App.m_bFwd2; ) - not a valid statement, see VS7 #244656.
                 for (long[] b244656 = new long[] { local4 }; App.m_bFwd2; )
                 {
                     int[] local16 = (new int[30]);
                     TestEnum local17 = new TestEnum();
                     BB local18 = new BB();
                     float local19 = 55.0f;
                     BB local20 = new BB();
                     local15 = (new ulong[77]);
                 }
             }
         }
         if (App.m_bFwd2)
         {
             try
             {
                 TestEnum local7 = new TestEnum();
                 String local8 = "109";
                 bool local9 = false;
                 float local10 = 110.0f;
                 long[] local11 = App.m_alFwd8;
                 TestEnum[] local12 = new TestEnum[] { new TestEnum(), new TestEnum() };
                 byte[] local13 = App.m_abFwd9;
                 throw new IndexOutOfRangeException();
             }
             finally
             {
                 Array[] local7 = App.m_axFwd10;
                 String local8 = "122";
                 float local9 = 22.0f;
                 int[] local10 = (new int[69]);
                 String[] local11 = (new String[75]);
                 ulong[] local12 = (new ulong[81]);
                 uint local13 = 67u;
                 while (App.m_bFwd2)
                 {
                     int[] local14 = new int[] { 1, 50, 79 };
                     byte[] local15 = App.m_asiFwd11;
                     ulong[] local16 = (new ulong[20]);
                 }
             }
         }
     }
     {
         int local5 = 18;
         object local6 = null;
         ulong[] local7 = App.m_aulFwd7;
         TestEnum local8 = new TestEnum();
         long[] local9 = App.m_alFwd8;
         sbyte[] local10 = App.m_asuFwd12;
         try
         {
             char[] local11 = new char[] { '\x25' };
             byte[] local12 = App.m_asiFwd11;
             double local13 = (0.0);
             throw new NullReferenceException();
         }
         catch (Exception)
         {
         }
     }
     return 72u;
 }
 public static void GetDataFromConfig(string s, int i, bool b, TestEnum e)
 {
 }
コード例 #28
0
 public int TestMethodEnum(TestEnum x)
 {
     throw new NotImplementedException();
 }
コード例 #29
0
 /// <summary>
 /// Asynchronously invokes the 'TestPredefined_Online' method of the DomainService.
 /// </summary>
 /// <param name="entity">The value for the 'entity' parameter of this action.</param>
 /// <param name="s">The value for the 's' parameter of this action.</param>
 /// <param name="d">The value for the 'd' parameter of this action.</param>
 /// <param name="dt">The value for the 'dt' parameter of this action.</param>
 /// <param name="ts">The value for the 'ts' parameter of this action.</param>
 /// <param name="strings">The value for the 'strings' parameter of this action.</param>
 /// <param name="uri">The value for the 'uri' parameter of this action.</param>
 /// <param name="g">The value for the 'g' parameter of this action.</param>
 /// <param name="b">The value for the 'b' parameter of this action.</param>
 /// <param name="x">The value for the 'x' parameter of this action.</param>
 /// <param name="bArray">The value for the 'bArray' parameter of this action.</param>
 /// <param name="en">The value for the 'en' parameter of this action.</param>
 /// <param name="guids">The value for the 'guids' parameter of this action.</param>
 /// <param name="ulongs">The value for the 'ulongs' parameter of this action.</param>
 /// <param name="dto">The value for the 'dto' parameter of this action.</param>
 /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
 public InvokeOperation<bool> TestPredefined_Online(MixedType entity, string s, decimal d, DateTime dt, TimeSpan ts, IEnumerable<string> strings, Uri uri, Guid g, byte[] b, XElement x, byte[] bArray, TestEnum en, Guid[] guids, ulong[] ulongs, DateTimeOffset dto)
 {
     Dictionary<string, object> parameters = new Dictionary<string, object>();
     parameters.Add("entity", entity);
     parameters.Add("s", s);
     parameters.Add("d", d);
     parameters.Add("dt", dt);
     parameters.Add("ts", ts);
     parameters.Add("strings", strings);
     parameters.Add("uri", uri);
     parameters.Add("g", g);
     parameters.Add("b", b);
     parameters.Add("x", x);
     parameters.Add("bArray", bArray);
     parameters.Add("en", en);
     parameters.Add("guids", guids);
     parameters.Add("ulongs", ulongs);
     parameters.Add("dto", dto);
     this.ValidateMethod("TestPredefined_Online", parameters);
     return this.InvokeOperation<bool>("TestPredefined_Online", typeof(bool), parameters, true, null, null);
 }
コード例 #30
0
 private static void SetEnumValue(TestEnum value)
 {
     _enumValue = value;
 }
コード例 #31
0
        public static float SameCode(TestEnum val1, TestEnum val2)
        {
            float diff = val2 - val1;

            return(diff);
        }
コード例 #32
0
        private static void TestEnumParseCaseIgnoreCaseParam(string value, bool ignoreCase, TestEnum expected, bool expectedReturn)
        {
            TestEnum result;

            var returnResult = ConversionHelpers.TryParse(value, ignoreCase, out result);

            Assert.Equal(expected, result);
            Assert.Equal(expectedReturn, returnResult);
        }
コード例 #33
0
 public TestShortTransfer(TestEnum testEnum, string name)
     : base(testEnum, name)
 {
 }
コード例 #34
0
 /// <inheritdoc />
 public TestSerializableType2(TestEnum enumVal, byte[] testOneSizedArray)
 {
     EnumVal           = enumVal;
     TestOneSizedArray = testOneSizedArray;
 }
コード例 #35
0
 public TestItem(int id, TestCollection parent, TestEnum @enum)
 {
     Id     = id;
     Parent = parent;
     Enum   = @enum;
 }
コード例 #36
0
 public void DoesNothingGivenInRangeEnum(TestEnum enumValue)
 {
     Guard.Against.OutOfRange(enumValue, nameof(enumValue));
 }
コード例 #37
0
 public void RandomEnum([Random(COUNT)] TestEnum x)
 {
     Assert.That(x, Is.EqualTo(TestEnum.A).Or.EqualTo(TestEnum.B).Or.EqualTo(TestEnum.C));
 }
コード例 #38
0
 public void ThrowsGivenOutOfRangeEnum(TestEnum enumValue)
 {
     Assert.Throws <InvalidEnumArgumentException>(() => Guard.Against.OutOfRange(enumValue, nameof(enumValue)));
 }
コード例 #39
0
 public TestShortDomain(TestEnum testEnum, string name)
     : base(testEnum, name)
 {
 }
コード例 #40
0
        public void ReturnsExpectedValueGivenInRangeEnum(TestEnum enumValue)
        {
            var expected = enumValue;

            Assert.Equal(expected, Guard.Against.OutOfRange(enumValue, nameof(enumValue)));
        }
コード例 #41
0
 partial void OnTestPredefinedInvoking(string s, decimal d, DateTime dt, TimeSpan ts, IEnumerable<string> strings, Uri uri, Guid g, byte[] b, byte[] bArray, TestEnum en, Dictionary<string, string> dictionary, DateTimeOffset dto);
コード例 #42
0
 /// <summary>
 /// Gets an EntityQuery instance that can be used to load <see cref="MixedType"/> entity instances using the 'GetMixedTypes_Predefined' query.
 /// </summary>
 /// <param name="idToChange">The value for the 'idToChange' parameter of the query.</param>
 /// <param name="s">The value for the 's' parameter of the query.</param>
 /// <param name="d">The value for the 'd' parameter of the query.</param>
 /// <param name="dt">The value for the 'dt' parameter of the query.</param>
 /// <param name="ts">The value for the 'ts' parameter of the query.</param>
 /// <param name="dto">The value for the 'dto' parameter of the query.</param>
 /// <param name="strings">The value for the 'strings' parameter of the query.</param>
 /// <param name="uri">The value for the 'uri' parameter of the query.</param>
 /// <param name="g">The value for the 'g' parameter of the query.</param>
 /// <param name="b">The value for the 'b' parameter of the query.</param>
 /// <param name="x">The value for the 'x' parameter of the query.</param>
 /// <param name="bArray">The value for the 'bArray' parameter of the query.</param>
 /// <param name="en">The value for the 'en' parameter of the query.</param>
 /// <param name="ints">The value for the 'ints' parameter of the query.</param>
 /// <param name="dictionaryDateTime">The value for the 'dictionaryDateTime' parameter of the query.</param>
 /// <param name="dictionaryGuid">The value for the 'dictionaryGuid' parameter of the query.</param>
 /// <param name="dictionaryString">The value for the 'dictionaryString' parameter of the query.</param>
 /// <param name="dictionaryTestEnum">The value for the 'dictionaryTestEnum' parameter of the query.</param>
 /// <param name="dictionaryXElement">The value for the 'dictionaryXElement' parameter of the query.</param>
 /// <param name="dictionaryDateTimeOffset">The value for the 'dictionaryDateTimeOffset' parameter of the query.</param>
 /// <returns>An EntityQuery that can be loaded to retrieve <see cref="MixedType"/> entity instances.</returns>
 public EntityQuery<MixedType> GetMixedTypes_PredefinedQuery(
             string idToChange, 
             string s, 
             decimal d, 
             DateTime dt, 
             TimeSpan ts, 
             DateTimeOffset dto, 
             IEnumerable<string> strings, 
             Uri uri, 
             Guid g, 
             byte[] b, 
             XElement x, 
             byte[] bArray, 
             TestEnum en, 
             int[] ints, 
             Dictionary<DateTime, DateTime> dictionaryDateTime, 
             Dictionary<Guid, Guid> dictionaryGuid, 
             Dictionary<string, string> dictionaryString, 
             Dictionary<TestEnum, TestEnum> dictionaryTestEnum, 
             Dictionary<XElement, XElement> dictionaryXElement, 
             Dictionary<DateTimeOffset, DateTimeOffset> dictionaryDateTimeOffset)
 {
     Dictionary<string, object> parameters = new Dictionary<string, object>();
     parameters.Add("idToChange", idToChange);
     parameters.Add("s", s);
     parameters.Add("d", d);
     parameters.Add("dt", dt);
     parameters.Add("ts", ts);
     parameters.Add("dto", dto);
     parameters.Add("strings", strings);
     parameters.Add("uri", uri);
     parameters.Add("g", g);
     parameters.Add("b", b);
     parameters.Add("x", x);
     parameters.Add("bArray", bArray);
     parameters.Add("en", en);
     parameters.Add("ints", ints);
     parameters.Add("dictionaryDateTime", dictionaryDateTime);
     parameters.Add("dictionaryGuid", dictionaryGuid);
     parameters.Add("dictionaryString", dictionaryString);
     parameters.Add("dictionaryTestEnum", dictionaryTestEnum);
     parameters.Add("dictionaryXElement", dictionaryXElement);
     parameters.Add("dictionaryDateTimeOffset", dictionaryDateTimeOffset);
     this.ValidateMethod("GetMixedTypes_PredefinedQuery", parameters);
     return base.CreateQuery<MixedType>("GetMixedTypes_Predefined", parameters, false, true);
 }
コード例 #43
0
 public TestEnum TestEchoEnumVal(TestEnum arg) {
     return arg;
 }
コード例 #44
0
 /// <summary>
 /// Asynchronously invokes the 'ReturnsEnum_Online' method of the DomainService.
 /// </summary>
 /// <param name="value">The value for the 'value' parameter of this action.</param>
 /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
 public InvokeOperation<TestEnum> ReturnsEnum_Online(TestEnum value)
 {
     Dictionary<string, object> parameters = new Dictionary<string, object>();
     parameters.Add("value", value);
     this.ValidateMethod("ReturnsEnum_Online", parameters);
     return this.InvokeOperation<TestEnum>("ReturnsEnum_Online", typeof(TestEnum), parameters, true, null, null);
 }
コード例 #45
0
 public void GetDescriptionGetsValueOfDescriptionAttributeOrValueNameIfNoDescriptionAttributeExists(TestEnum enumValue, string expectedDescription)
 {
     var actualDescription = enumValue.GetDescription();
     Assert.AreEqual(expectedDescription, actualDescription);
 }
コード例 #46
0
ファイル: b66533.cs プロジェクト: l1183479157/coreclr
 public ulong Method1()
 {
     String[] local1 = new String[] { };
     byte[] local2 = new byte[] { };
     bool local3 = true;
     TypedReference local4 = __makeref(App.m_xFwd1);
     String[] local5 = new String[] { "120", "70", "105" };
     if (local3)
         while (local3)
         {
             TestEnum[] local6 = new TestEnum[] { TestEnum.red };
             do
             {
                 sbyte[] local7 = (new sbyte[117]);
                 sbyte local8 = App.m_suFwd2;
                 double[] local9 = new double[] { 72.0 };
                 char[] local10 = (new char[118]);
                 int[] local11 = new int[] { 98, 126, 35 };
                 for (new TestEnum(); local3; new sbyte())
                 {
                     int[] local12 = new int[] { };
                     String[] local13 = (new String[9]);
                     ulong[] local14 = (new ulong[56]);
                     App.m_asuFwd3 = (new sbyte[116]);
                     Break();
                 }
                 try
                 {
                     double local12 = 48.0;
                     TestEnum[] local13 = AA.m_axStatic1;
                     char[] local14 = (new char[83]);
                     sbyte local15 = App.m_suFwd2;
                     Array[] local16 = (new Array[73]);
                     throw new IndexOutOfRangeException();
                 }
                 catch (IndexOutOfRangeException)
                 {
                     byte[] local12 = (new byte[19]);
                     sbyte[] local13 = App.m_asbFwd4;
                     TestEnum local14 = TestEnum.red;
                     return App.m_ulFwd5;
                 }
             }
             while (local3);
         }
     else
         goto label1;
     while (local3)
     {
         ulong local6 = App.m_ulFwd5;
         object local7 = null;
         double[] local8 = (new double[71]);
         byte local9 = App.m_bFwd6;
         AA[] local10 = (new AA[47]);
         do
         {
             object local11 = null;
             float local12 = 72.0f;
             int[] local13 = new int[] { 76 };
             int local14 = 23;
             for (local14 = local14; local3; new double())
             {
                 int[] local15 = new int[] { 91, 54 };
                 byte[] local16 = (new byte[14]);
                 double local17 = 94.0;
                 TestEnum local18 = 0;
                 local10 = local10;
             }
         }
         while (local3);
     }
     if (local3)
         try
         {
             float[] local6 = new float[] { 113.0f, 23.0f };
             sbyte local7 = App.m_suFwd2;
             TestEnum[] local8 = AA.m_axStatic1;
             uint local9 = 1u;
             throw new InvalidOperationException();
         }
         finally
         {
             double local6 = 61.0;
             object local7 = null;
             uint[] local8 = new uint[] { 38u };
             char[] local9 = (new char[17]);
             for (App.m_iFwd7 = App.m_iFwd7; local3; local7 = local7)
             {
                 char[] local10 = new char[] { };
                 sbyte[] local11 = (new sbyte[39]);
                 object[] local12 = (new object[50]);
                 Array[] local13 = App.m_axFwd8;
                 local11 = local11;
             }
         }
     label1:
     return App.m_ulFwd5;
 }
コード例 #47
0
 public void GetEnumValueByCustomValue_ValidValueName_ReturnsValidValue(object databaseRepresentation, TestEnum expectedValue)
 {
     Assert.AreEqual(expectedValue, EnumExtendedInfoAttribute.GetEnumValueByCustomValue<TestEnum>(databaseRepresentation));
 }
コード例 #48
0
 public void StringToEnum(string actual, TestEnum expected)
 {
     Assert.Equal(expected, actual.ToEnum <TestEnum>());
 }
コード例 #49
0
 /// <summary>
 /// Asynchronously invokes the 'TestPredefined_Online' method of the DomainService.
 /// </summary>
 /// <param name="entity">The value for the 'entity' parameter of this action.</param>
 /// <param name="s">The value for the 's' parameter of this action.</param>
 /// <param name="d">The value for the 'd' parameter of this action.</param>
 /// <param name="dt">The value for the 'dt' parameter of this action.</param>
 /// <param name="ts">The value for the 'ts' parameter of this action.</param>
 /// <param name="strings">The value for the 'strings' parameter of this action.</param>
 /// <param name="uri">The value for the 'uri' parameter of this action.</param>
 /// <param name="g">The value for the 'g' parameter of this action.</param>
 /// <param name="b">The value for the 'b' parameter of this action.</param>
 /// <param name="x">The value for the 'x' parameter of this action.</param>
 /// <param name="bArray">The value for the 'bArray' parameter of this action.</param>
 /// <param name="en">The value for the 'en' parameter of this action.</param>
 /// <param name="guids">The value for the 'guids' parameter of this action.</param>
 /// <param name="ulongs">The value for the 'ulongs' parameter of this action.</param>
 /// <param name="dto">The value for the 'dto' parameter of this action.</param>
 /// <param name="cancellationToken">A cancellation token that can be used to cancel the work</param>
 /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
 public System.Threading.Tasks.Task<InvokeResult<bool>> TestPredefined_OnlineAsync(
             MixedType entity, 
             string s, 
             decimal d, 
             DateTime dt, 
             TimeSpan ts, 
             IEnumerable<string> strings, 
             Uri uri, 
             Guid g, 
             byte[] b, 
             XElement x, 
             byte[] bArray, 
             TestEnum en, 
             Guid[] guids, 
             ulong[] ulongs, 
             DateTimeOffset dto, 
             CancellationToken cancellationToken = default(CancellationToken))
 {
     Dictionary<string, object> parameters = new Dictionary<string, object>();
     parameters.Add("entity", entity);
     parameters.Add("s", s);
     parameters.Add("d", d);
     parameters.Add("dt", dt);
     parameters.Add("ts", ts);
     parameters.Add("strings", strings);
     parameters.Add("uri", uri);
     parameters.Add("g", g);
     parameters.Add("b", b);
     parameters.Add("x", x);
     parameters.Add("bArray", bArray);
     parameters.Add("en", en);
     parameters.Add("guids", guids);
     parameters.Add("ulongs", ulongs);
     parameters.Add("dto", dto);
     this.ValidateMethod("TestPredefined_Online", parameters);
     return this.InvokeOperationAsync<bool>("TestPredefined_Online", parameters, true, cancellationToken);
 }
コード例 #50
0
        private void AddRow(DataTable table, int id, object firstName, DateTime birthday, TestEnum propertyEnum)
        {
            var row = table.NewRow();

            row["Id"]           = id;
            row["FirstName"]    = firstName;
            row["birthday"]     = birthday;
            row["PropertyEnum"] = propertyEnum;

            table.Rows.Add(row);
        }
コード例 #51
0
 partial void OnEnumsPropChanging(TestEnum[] value);
コード例 #52
0
ファイル: TestService.cs プロジェクト: tkleingarn/krpc
 public static void ProcedureEnumArg(TestEnum x)
 {
     Service.ProcedureEnumArg(x);
 }
コード例 #53
0
 public void TestPredefined(string s, decimal d, DateTime dt, TimeSpan ts, IEnumerable<string> strings, Uri uri, Guid g, byte[] b, byte[] bArray, TestEnum en, Dictionary<string, string> dictionary, DateTimeOffset dto)
 {
     this.OnTestPredefinedInvoking(s, d, dt, ts, strings, uri, g, b, bArray, en, dictionary, dto);
     base.InvokeAction("TestPredefined", s, d, dt, ts, strings, uri, g, b, bArray, en, dictionary, dto);
     this.OnTestPredefinedInvoked();
 }
コード例 #54
0
 public TestException3(TestEnum errorCode, string message, object developerContext, Exception innerException) : base(message, developerContext, innerException)
 {
     ErrorCode = errorCode;
 }
コード例 #55
0
 /// <summary>
 /// Invokes the 'TestPredefined' method of the specified <see cref="MixedType"/> entity.
 /// </summary>
 /// <param name="entity">The <see cref="MixedType"/> entity instance.</param>
 /// <param name="s">The value for the 's' parameter for this action.</param>
 /// <param name="d">The value for the 'd' parameter for this action.</param>
 /// <param name="dt">The value for the 'dt' parameter for this action.</param>
 /// <param name="ts">The value for the 'ts' parameter for this action.</param>
 /// <param name="strings">The value for the 'strings' parameter for this action.</param>
 /// <param name="uri">The value for the 'uri' parameter for this action.</param>
 /// <param name="g">The value for the 'g' parameter for this action.</param>
 /// <param name="b">The value for the 'b' parameter for this action.</param>
 /// <param name="bArray">The value for the 'bArray' parameter for this action.</param>
 /// <param name="en">The value for the 'en' parameter for this action.</param>
 /// <param name="dictionary">The value for the 'dictionary' parameter for this action.</param>
 /// <param name="dto">The value for the 'dto' parameter for this action.</param>
 public void TestPredefined(MixedType entity, string s, decimal d, DateTime dt, TimeSpan ts, IEnumerable<string> strings, Uri uri, Guid g, byte[] b, byte[] bArray, TestEnum en, Dictionary<string, string> dictionary, DateTimeOffset dto)
 {
     entity.TestPredefined(s, d, dt, ts, strings, uri, g, b, bArray, en, dictionary, dto);
 }
コード例 #56
0
 public TestException3(TestEnum errorCode, string message) : base(message)
 {
     ErrorCode = errorCode;
 }
コード例 #57
0
 /// <summary>
 /// Asynchronously invokes the 'ReturnsEnum_Online' method of the DomainService.
 /// </summary>
 /// <param name="value">The value for the 'value' parameter of this action.</param>
 /// <param name="cancellationToken">A cancellation token that can be used to cancel the work</param>
 /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
 public System.Threading.Tasks.Task<InvokeResult<TestEnum>> ReturnsEnum_OnlineAsync(TestEnum value, CancellationToken cancellationToken = default(CancellationToken))
 {
     Dictionary<string, object> parameters = new Dictionary<string, object>();
     parameters.Add("value", value);
     this.ValidateMethod("ReturnsEnum_Online", parameters);
     return this.InvokeOperationAsync<TestEnum>("ReturnsEnum_Online", parameters, true, cancellationToken);
 }
コード例 #58
0
 public TestException3(TestEnum errorCode, string message, Exception innerException) : base(message, innerException)
 {
     ErrorCode = errorCode;
 }
コード例 #59
0
ファイル: DbConfigTests.cs プロジェクト: furesoft/deveeldb
        public void GetEnumValue(object value, TestEnum expected)
        {
            IConfiguration config = null;
            Assert.DoesNotThrow(() => config = Configuration.SystemDefault);
            Assert.IsNotNull(config);

            ConfigKey configKey = new ConfigKey("test", typeof(TestEnum));
            Assert.DoesNotThrow(() => config.SetKey(configKey));
            Assert.DoesNotThrow(() => config.SetValue(configKey, value));

            ConfigValue configValue = null;
            Assert.DoesNotThrow(() => configValue = config.GetValue(configKey));

            TestEnum enumValue = new TestEnum();
            Assert.DoesNotThrow(() => enumValue = configValue.ToType<TestEnum>());
            Assert.AreEqual(expected, enumValue);
        }
コード例 #60
0
        public void ConvertsCorrectly(string input, TestEnum expected)
        {
            var actual = _service.ConvertStringTo <TestEnum>(input);

            actual.Should().Be(expected);
        }