Exemple #1
0
        public void Test1()
        {
            Map.Extensions = TypeExtension.GetExtensions("Mapping.xml");

            Enum1 e1 = (Enum1)Map.ValueToEnum("3", typeof(Enum1));

            Assert.AreEqual(Enum1.Value2, e1);

            Enum2 e2 = (Enum2)Map.ValueToEnum("3", typeof(Enum2));

            Assert.AreEqual(Enum2.Value2, e2);

            Enum3 e3 = (Enum3)Map.ValueToEnum("4", typeof(Enum3));

            Assert.AreEqual(Enum3.Value2, e3);

            Enum4 e4 = (Enum4)Map.ValueToEnum("4", typeof(Enum4));

            Assert.AreEqual(Enum4.Value2, e4);

            Dest o = (Dest)Map.ObjectToObject(new Source(), typeof(Dest));

            Assert.AreEqual(Enum1.Value2, o.Field1);
            Assert.AreEqual(Enum1.Value1, o.Field2);
            Assert.AreEqual(Enum2.Value1, o.Field3);
        }
Exemple #2
0
 // Token: 0x060011BF RID: 4543 RVA: 0x00003B6C File Offset: 0x00001D6C
 public void CdromRipStateChange(GInterface4 pCdromRip, Enum3 wmprs)
 {
     if (this.delegate52_0 != null)
     {
         this.delegate52_0(pCdromRip, wmprs);
         return;
     }
 }
Exemple #3
0
        public void method_1(Class82 class82_0, Class101[] class101_1)
        {
            bool flag = false;

            while (true)
            {
                int num = class82_0.method_9(this.byte_0);
                this.int_14 = num;
                if (this.byte_0 == Class82.byte_1)
                {
                    this.enum3_0 = (Enum3)(num >> 19 & 1);
                    if ((num >> 20 & 1) == 0)
                    {
                        if (this.enum3_0 != Enum3.const_0)
                        {
                            goto IL_1EE;
                        }
                        this.enum3_0 = Enum3.const_2;
                    }
                    if ((this.int_6 = (num >> 10 & 3)) == 3)
                    {
                        goto Block_20;
                    }
                }
                this.int_1   = (4 - (num >> 17) & 3);
                this.int_2   = (num >> 16 & 1);
                this.int_3   = (num >> 12 & 15);
                this.int_4   = (num >> 9 & 1);
                this.enum5_0 = (Enum5)(num >> 6 & 3);
                this.int_5   = (num >> 4 & 3);
                if (this.enum5_0 == Enum5.const_1)
                {
                    this.int_8 = (this.int_5 << 2) + 4;
                }
                else
                {
                    this.int_8 = 0;
                }
                if ((num >> 3 & 1) == 1)
                {
                    this.bool_0 = true;
                }
                if ((num >> 2 & 1) == 1)
                {
                    this.bool_1 = true;
                }
                if (this.int_1 == 1)
                {
                    this.int_7 = 32;
                }
                else
                {
                    int num2 = this.int_3;
                    if (this.enum5_0 != Enum5.const_3)
                    {
                        if (num2 == 4)
                        {
                            num2 = 1;
                        }
                        else
                        {
                            num2 -= 4;
                        }
                    }
                    if (num2 != 1)
                    {
                        if (num2 != 2)
                        {
                            if (this.int_6 != 1 && (num2 < 3 || num2 > 5))
                            {
                                this.int_7 = 30;
                                goto IL_102;
                            }
                            this.int_7 = 27;
                            goto IL_102;
                        }
                    }
                    this.int_7 = ((this.int_6 == 2) ? 12 : 8);
                }
IL_102:
                if (this.int_8 > this.int_7)
                {
                    this.int_8 = this.int_7;
                }
                this.method_15();
                int num3 = class82_0.method_11(this.int_12);
                if (this.int_12 >= 0 && num3 != this.int_12)
                {
                    break;
                }
                if (class82_0.method_8((int)this.byte_0))
                {
                    if (this.byte_0 == Class82.byte_1)
                    {
                        this.byte_0 = Class82.byte_2;
                        class82_0.method_14(num & -521024);
                    }
                    flag = true;
                }
                else
                {
                    class82_0.method_6();
                }
                if (flag)
                {
                    goto Block_17;
                }
            }
            throw new BitstreamException(BitstreamError.InvalidFrame);
Block_17:
            class82_0.method_12();
            if (this.int_2 == 0)
            {
                this.short_0 = (short)class82_0.method_13(16);
                if (this.class101_0 == null)
                {
                    this.class101_0 = new Class101();
                }
                int num = 0;
                this.class101_0.method_0(num, 16);
                class101_1[0] = this.class101_0;
            }
            else
            {
                class101_1[0] = null;
            }
            return;

Block_20:
            throw new BitstreamException(BitstreamError.UnknownError);
IL_1EE:
            throw new BitstreamException(BitstreamError.UnknownError);
        }
Exemple #4
0
 public void method_1(Enum3 enum3_1)
 {
     this.enum3_0 = enum3_1;
 }
Exemple #5
0
 public void method_1(Class82 class82_0, Class101[] class101_1)
 {
     bool flag = false;
     while (true)
     {
         int num = class82_0.method_9(this.byte_0);
         this.int_14 = num;
         if (this.byte_0 == Class82.byte_1)
         {
             this.enum3_0 = (Enum3)(num >> 19 & 1);
             if ((num >> 20 & 1) == 0)
             {
                 if (this.enum3_0 != Enum3.const_0)
                 {
                     goto IL_1EE;
                 }
                 this.enum3_0 = Enum3.const_2;
             }
             if ((this.int_6 = (num >> 10 & 3)) == 3)
             {
                 goto Block_20;
             }
         }
         this.int_1 = (4 - (num >> 17) & 3);
         this.int_2 = (num >> 16 & 1);
         this.int_3 = (num >> 12 & 15);
         this.int_4 = (num >> 9 & 1);
         this.enum5_0 = (Enum5)(num >> 6 & 3);
         this.int_5 = (num >> 4 & 3);
         if (this.enum5_0 == Enum5.const_1)
         {
             this.int_8 = (this.int_5 << 2) + 4;
         }
         else
         {
             this.int_8 = 0;
         }
         if ((num >> 3 & 1) == 1)
         {
             this.bool_0 = true;
         }
         if ((num >> 2 & 1) == 1)
         {
             this.bool_1 = true;
         }
         if (this.int_1 == 1)
         {
             this.int_7 = 32;
         }
         else
         {
             int num2 = this.int_3;
             if (this.enum5_0 != Enum5.const_3)
             {
                 if (num2 == 4)
                 {
                     num2 = 1;
                 }
                 else
                 {
                     num2 -= 4;
                 }
             }
             if (num2 != 1)
             {
                 if (num2 != 2)
                 {
                     if (this.int_6 != 1 && (num2 < 3 || num2 > 5))
                     {
                         this.int_7 = 30;
                         goto IL_102;
                     }
                     this.int_7 = 27;
                     goto IL_102;
                 }
             }
             this.int_7 = ((this.int_6 == 2) ? 12 : 8);
         }
         IL_102:
         if (this.int_8 > this.int_7)
         {
             this.int_8 = this.int_7;
         }
         this.method_15();
         int num3 = class82_0.method_11(this.int_12);
         if (this.int_12 >= 0 && num3 != this.int_12)
         {
             break;
         }
         if (class82_0.method_8((int)this.byte_0))
         {
             if (this.byte_0 == Class82.byte_1)
             {
                 this.byte_0 = Class82.byte_2;
                 class82_0.method_14(num & -521024);
             }
             flag = true;
         }
         else
         {
             class82_0.method_6();
         }
         if (flag)
         {
             goto Block_17;
         }
     }
     throw new BitstreamException(BitstreamError.InvalidFrame);
     Block_17:
     class82_0.method_12();
     if (this.int_2 == 0)
     {
         this.short_0 = (short)class82_0.method_13(16);
         if (this.class101_0 == null)
         {
             this.class101_0 = new Class101();
         }
         int num=0;
         this.class101_0.method_0(num, 16);
         class101_1[0] = this.class101_0;
     }
     else
     {
         class101_1[0] = null;
     }
     return;
     Block_20:
     throw new BitstreamException(BitstreamError.UnknownError);
     IL_1EE:
     throw new BitstreamException(BitstreamError.UnknownError);
 }
 // Token: 0x060013B1 RID: 5041 RVA: 0x00004D94 File Offset: 0x00002F94
 public Class52(GInterface4 ginterface4_1, Enum3 enum3_1)
 {
     this.ginterface4_0 = ginterface4_1;
     this.enum3_0       = enum3_1;
 }
Exemple #7
0
        public void method_1(Class82 class820, Class101[] class1011)
        {
            var flag = false;

            while (true)
            {
                var num = class820.method_9(_byte0);
                _int14 = num;
                if (_byte0 == Class82.Byte1)
                {
                    _enum30 = (Enum3)(num >> 19 & 1);
                    if ((num >> 20 & 1) == 0)
                    {
                        if (_enum30 != Enum3.Const0)
                        {
                            goto IL_1EE;
                        }
                        _enum30 = Enum3.Const2;
                    }
                    if ((_int6 = (num >> 10 & 3)) == 3)
                    {
                        goto Block_20;
                    }
                }
                _int1   = (4 - (num >> 17) & 3);
                _int2   = (num >> 16 & 1);
                _int3   = (num >> 12 & 15);
                _int4   = (num >> 9 & 1);
                _enum50 = (Enum5)(num >> 6 & 3);
                _int5   = (num >> 4 & 3);
                if (_enum50 == Enum5.Const1)
                {
                    _int8 = (_int5 << 2) + 4;
                }
                else
                {
                    _int8 = 0;
                }
                if ((num >> 3 & 1) == 1)
                {
                    _bool0 = true;
                }
                if ((num >> 2 & 1) == 1)
                {
                    _bool1 = true;
                }
                if (_int1 == 1)
                {
                    _int7 = 32;
                }
                else
                {
                    var num2 = _int3;
                    if (_enum50 != Enum5.Const3)
                    {
                        if (num2 == 4)
                        {
                            num2 = 1;
                        }
                        else
                        {
                            num2 -= 4;
                        }
                    }
                    if (num2 != 1)
                    {
                        if (num2 != 2)
                        {
                            if (_int6 != 1 && (num2 < 3 || num2 > 5))
                            {
                                _int7 = 30;
                                goto IL_102;
                            }
                            _int7 = 27;
                            goto IL_102;
                        }
                    }
                    _int7 = ((_int6 == 2) ? 12 : 8);
                }
IL_102:
                if (_int8 > _int7)
                {
                    _int8 = _int7;
                }
                method_15();
                var num3 = class820.method_11(Int12);
                if (Int12 >= 0 && num3 != Int12)
                {
                    break;
                }
                if (class820.method_8(_byte0))
                {
                    if (_byte0 == Class82.Byte1)
                    {
                        _byte0 = Class82.Byte2;
                        class820.method_14(num & -521024);
                    }
                    flag = true;
                }
                else
                {
                    class820.method_6();
                }
                if (flag)
                {
                    goto Block_17;
                }
            }
            throw new BitstreamException(BitstreamError.InvalidFrame);
Block_17:
            class820.method_12();
            if (_int2 == 0)
            {
                Short0 = (short)class820.method_13(16);
                if (_class1010 == null)
                {
                    _class1010 = new Class101();
                }
                var num = 0;
                _class1010.method_0(num, 16);
                class1011[0] = _class1010;
            }
            else
            {
                class1011[0] = null;
            }
            return;

Block_20:
            throw new BitstreamException(BitstreamError.UnknownError);
IL_1EE:
            throw new BitstreamException(BitstreamError.UnknownError);
        }
Exemple #8
0
 // Token: 0x06000E44 RID: 3652
 // RVA: 0x0000EBF0 File Offset: 0x0000CDF0
 public Class23(Enum3 enum3_1, object object_1, bool bool_1)
 {
     this.enum3_0 = enum3_1;
     this.object_0 = object_1;
     this.bool_0 = bool_1;
 }
Exemple #9
0
        // Token: 0x06001454 RID: 5204 RVA: 0x00025020 File Offset: 0x00023220
        public void CdromRipStateChange(GInterface4 pCdromRip, Enum3 wmprs)
        {
            Class52 class52_ = new Class52(pCdromRip, wmprs);

            this.class24_0.method_32(this.class24_0, class52_);
        }
Exemple #10
0
 public void Prueba_con_array(Enum1 valorEnum, Enum3 enum3, bool valorBooleano)
 {
     valorBooleano.Should().Be(valorBooleano);
     valorEnum.Should().Be(valorEnum);
     enum3.Should().Be(enum3);
 }