Exemplo n.º 1
0
 private Class138 method_0(Type type_0)
 {
     lock (this.dictionary_0)
     {
         if (this.dictionary_0.ContainsKey(type_0))
         {
             return(this.dictionary_0[type_0]);
         }
         FieldInfo[]      fields = type_0.GetFields(BindingFlags.GetField | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance);
         List <FieldInfo> list   = new List <FieldInfo>();
         foreach (FieldInfo info in fields)
         {
             if (info.GetCustomAttributes(typeof(NotSerializedCompactlyAttribute), true).Length <= 0)
             {
                 list.Add(info);
             }
         }
         if (comparison_0 == null)
         {
             comparison_0 = new Comparison <FieldInfo>(Class136.smethod_1);
         }
         list.Sort(comparison_0);
         Class138 class3 = new Class138(list.ToArray());
         this.dictionary_0.Add(type_0, class3);
         return(class3);
     }
 }
Exemplo n.º 2
0
        // Token: 0x06000080 RID: 128 RVA: 0x0000AA18 File Offset: 0x00008C18
        void IAsyncStateMachine.MoveNext()
        {
            int num = this.int_0;

            try
            {
                TaskAwaiter <string> awaiter;
                if (num != 0)
                {
                    awaiter = Class138.smethod_1(File.OpenRead("audio.mp3")).GetAwaiter();
                    if (!awaiter.IsCompleted)
                    {
                        this.int_0         = 0;
                        this.taskAwaiter_0 = awaiter;
                        this.asyncVoidMethodBuilder_0.AwaitUnsafeOnCompleted <TaskAwaiter <string>, MainWindow.Struct0>(ref awaiter, ref this);
                        return;
                    }
                }
                else
                {
                    awaiter            = this.taskAwaiter_0;
                    this.taskAwaiter_0 = default(TaskAwaiter <string>);
                    this.int_0         = -1;
                }
                Console.WriteLine(awaiter.GetResult());
            }
            catch (Exception exception)
            {
                this.int_0 = -2;
                this.asyncVoidMethodBuilder_0.SetException(exception);
                return;
            }
            this.int_0 = -2;
            this.asyncVoidMethodBuilder_0.SetResult();
        }
Exemplo n.º 3
0
        public Class134(Class144 class144_0, Class140 class140_1, Class136 class136_0, int int_4, int int_5, int int_6) : base(class140_1, int_5)
        {
            this.int_3 = class136_0.vmethod_2();
            this.int_1 = int_6;
            for (int i = 0; i < int_6; i++)
            {
                this.int_2[i] = class144_0.vmethod_12(int_4);
            }
            int num  = class144_0.vmethod_10(2);
            int num2 = num;

            if (num2 == 0)
            {
                int      int_7  = class144_0.vmethod_10(4);
                Class138 @class = new Class138();
                this.class137_0   = @class;
                @class.int_0      = int_7;
                @class.class143_0 = class136_0.vmethod_1();
                @class.vmethod_0(class144_0, int_6, @class.int_0, class140_1, class136_0.vmethod_2());
                Buffer.BlockCopy(this.int_2, 0, class136_0.vmethod_0(), 0, int_6 << 2);
                BlackMagic.CopyArrayOffset(this.int_3, class140_1.int_0 - int_6, int_6, class136_0.vmethod_0(), int_6);
                return;
            }
            throw new IOException("STREAM_DECODER_UNPARSEABLE_STREAM");
        }
Exemplo n.º 4
0
        public Class134(Class144 class1440, Class140 class1401, Class136 class1360, int int4, int int5,
                        int int6) : base(class1401, int5)
        {
            _int3 = class1360.vmethod_2();
            _int1 = int6;
            for (var i = 0; i < int6; i++)
            {
                _int2[i] = class1440.vmethod_12(int4);
            }
            var num  = class1440.vmethod_10(2);
            var num2 = num;

            if (num2 == 0)
            {
                var int7   = class1440.vmethod_10(4);
                var @class = new Class138();
                _class1370       = @class;
                @class.Int0      = int7;
                @class.Class1430 = class1360.vmethod_1();
                @class.vmethod_0(class1440, int6, @class.Int0, class1401, class1360.vmethod_2());
                Buffer.BlockCopy(_int2, 0, class1360.vmethod_0(), 0, int6 << 2);
                BlackMagic.CopyArrayOffset(_int3, class1401.Int0 - int6, int6, class1360.vmethod_0(), int6);
                return;
            }
            throw new IOException("STREAM_DECODER_UNPARSEABLE_STREAM");
        }
Exemplo n.º 5
0
    // Token: 0x06000070 RID: 112 RVA: 0x0000A478 File Offset: 0x00008678
    public async void method_3()
    {
        TaskAwaiter <string> taskAwaiter = Class138.smethod_1(File.OpenRead("audio.mp3")).GetAwaiter();

        if (!taskAwaiter.IsCompleted)
        {
            await taskAwaiter;
            TaskAwaiter <string> taskAwaiter2;
            taskAwaiter  = taskAwaiter2;
            taskAwaiter2 = default(TaskAwaiter <string>);
        }
        Console.WriteLine(taskAwaiter.GetResult());
    }
Exemplo n.º 6
0
    protected override object DoDeserializeComplicatedType(Type type, byte[] buff, ref int offset)
    {
        int    num  = ByteConverter.Parse <int>(buff, ref offset);
        object obj2 = null;

        if (num > -1)
        {
            obj2 = Activator.CreateInstance(type);
            Class138 class2 = this.method_0(type);
            for (int i = 0; i < class2.method_0().Length; i++)
            {
                object val = base.DoDeserialize(class2.method_0()[i].FieldType, buff, ref offset);
                ReflectionHelper.SetFieldValue(obj2, class2.method_0()[i].Name, val);
            }
        }
        return(obj2);
    }
Exemplo n.º 7
0
 protected override void DoSerializeComplicatedType(Type type, object obj, MemoryStream stream)
 {
     if (obj == null)
     {
         byte[] buffer3 = ByteConverter.ToBytes <int>(-1);
         stream.Write(buffer3, 0, buffer3.Length);
     }
     else
     {
         Class138     class2  = this.method_0(type);
         MemoryStream stream2 = new MemoryStream();
         for (int i = 0; i < class2.method_0().Length; i++)
         {
             object fieldValue = ReflectionHelper.GetFieldValue(obj, class2.method_0()[i].Name);
             base.DoSerialize(stream2, class2.method_0()[i].FieldType, fieldValue);
         }
         byte[] buffer  = stream2.ToArray();
         byte[] buffer2 = ByteConverter.ToBytes <int>(buffer.Length);
         stream.Write(buffer2, 0, buffer2.Length);
         stream.Write(buffer, 0, buffer.Length);
     }
 }
Exemplo n.º 8
0
 internal void method_1(Class138 A_0)
 {
     this.arrayList_0.Add(A_0);
 }
 public abstract void Visit(Class138 c);
 public override void Visit(Class138 c) { }