Exemplo n.º 1
0
        // Token: 0x06000B07 RID: 2823 RVA: 0x0003FB28 File Offset: 0x0003DD28
        private bool pmethod_1929()
        {
            switch (this.field_10)
            {
            case Class_286.NClass_0.field_21:
                base.tmethod_1902(Class_508.PropertyName, "$code");
                this.field_10 = Class_286.NClass_0.field_22;
                return(true);

            case Class_286.NClass_0.field_22:
                this.cmethod_1944();
                base.tmethod_1902(Class_508.String, this.lmethod_1938());
                this.field_10 = Class_286.NClass_0.field_23;
                return(true);

            case Class_286.NClass_0.field_23:
            {
                if (base.prop_0 == Class_285.NClass_0.field_13)
                {
                    base.tmethod_1902(Class_508.PropertyName, "$scope");
                    return(true);
                }
                base.xmethod_1901(Class_508.StartObject);
                this.field_10 = Class_286.NClass_0.field_24;
                Class_286.NClass_1 nclass_ = new Class_286.NClass_1(Class_295.Object);
                this.gmethod_1933(nclass_);
                nclass_.field_27 = this.cmethod_1944();
                return(true);
            }

            case Class_286.NClass_0.field_24:
            {
                bool flag = this.xmethod_1931();
                if (flag && this.prop_9 == Class_508.EndObject)
                {
                    this.field_10 = Class_286.NClass_0.field_25;
                }
                return(flag);
            }

            case Class_286.NClass_0.field_25:
                base.xmethod_1901(Class_508.EndObject);
                this.field_10 = Class_286.NClass_0.field_17;
                return(true);

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Exemplo n.º 2
0
        // Token: 0x06000B0D RID: 2829 RVA: 0x0003FF24 File Offset: 0x0003E124
        private void vmethod_1935(Class_295 arg_0)
        {
            switch (arg_0)
            {
            case Class_295.Number:
            {
                double num = this.gmethod_1943();
                if (this.field_11 == Class_315.Decimal)
                {
                    base.tmethod_1902(Class_508.Float, Convert.ToDecimal(num, CultureInfo.InvariantCulture));
                    return;
                }
                base.tmethod_1902(Class_508.Float, num);
                return;
            }

            case Class_295.String:
            case Class_295.Symbol:
                base.tmethod_1902(Class_508.String, this.lmethod_1938());
                return;

            case Class_295.Object:
            {
                base.xmethod_1901(Class_508.StartObject);
                Class_286.NClass_1 nclass_ = new Class_286.NClass_1(Class_295.Object);
                this.gmethod_1933(nclass_);
                nclass_.field_27 = this.cmethod_1944();
                return;
            }

            case Class_295.Array:
            {
                base.xmethod_1901(Class_508.StartArray);
                Class_286.NClass_1 nclass_2 = new Class_286.NClass_1(Class_295.Array);
                this.gmethod_1933(nclass_2);
                nclass_2.field_27 = this.cmethod_1944();
                return;
            }

            case Class_295.Binary:
            {
                Class_283 class_;
                byte[]    array = this.dmethod_1936(out class_);
                object    obje_ = (class_ != Class_283.Uuid) ? array : new Guid(array);
                base.tmethod_1902(Class_508.Bytes, obje_);
                return;
            }

            case Class_295.Undefined:
                base.xmethod_1901(Class_508.Undefined);
                return;

            case Class_295.Oid:
            {
                byte[] obje_2 = this.lmethod_1948(12);
                base.tmethod_1902(Class_508.Bytes, obje_2);
                return;
            }

            case Class_295.Boolean:
            {
                bool flag = Convert.ToBoolean(this.cmethod_1934());
                base.tmethod_1902(Class_508.Boolean, flag);
                return;
            }

            case Class_295.Date:
            {
                long     javaScriptTicks = this.vmethod_1945();
                DateTime dateTime        = Class_502.ConvertJavaScriptTicksToDateTime(javaScriptTicks);
                DateTime dateTime2;
                switch (this.prop_2)
                {
                case DateTimeKind.Unspecified:
                    dateTime2 = DateTime.SpecifyKind(dateTime, DateTimeKind.Unspecified);
                    goto IL_1A7;

                case DateTimeKind.Local:
                    dateTime2 = dateTime.ToLocalTime();
                    goto IL_1A7;
                }
                dateTime2 = dateTime;
IL_1A7:
                base.tmethod_1902(Class_508.Date, dateTime2);
                return;
            }

            case Class_295.Null:
                base.xmethod_1901(Class_508.Null);
                return;

            case Class_295.Regex:
            {
                string str    = this.kmethod_1937();
                string str2   = this.kmethod_1937();
                string obje_3 = "/" + str + "/" + str2;
                base.tmethod_1902(Class_508.String, obje_3);
                return;
            }

            case Class_295.Reference:
                base.xmethod_1901(Class_508.StartObject);
                this.field_10 = Class_286.NClass_0.field_18;
                return;

            case Class_295.Code:
                base.tmethod_1902(Class_508.String, this.lmethod_1938());
                return;

            case Class_295.CodeWScope:
                base.xmethod_1901(Class_508.StartObject);
                this.field_10 = Class_286.NClass_0.field_21;
                return;

            case Class_295.Integer:
                base.tmethod_1902(Class_508.Integer, (long)this.cmethod_1944());
                return;

            case Class_295.TimeStamp:
            case Class_295.Long:
                base.tmethod_1902(Class_508.Integer, this.vmethod_1945());
                return;

            default:
                throw new ArgumentOutOfRangeException("type", "Unexpected BsonType value: " + arg_0);
            }
        }
Exemplo n.º 3
0
 // Token: 0x06000B0B RID: 2827 RVA: 0x0003FEFB File Offset: 0x0003E0FB
 private void gmethod_1933(Class_286.NClass_1 arg_0)
 {
     this.field_6.Add(arg_0);
     this.field_11 = arg_0;
 }
Exemplo n.º 4
0
        // Token: 0x06000B09 RID: 2825 RVA: 0x0003FD20 File Offset: 0x0003DF20
        private bool xmethod_1931()
        {
            switch (base.prop_0)
            {
            case Class_285.NClass_0.field_5:
            {
                Class_508 arg_  = (!this.field_12) ? Class_508.StartObject : Class_508.StartArray;
                Class_295 arg_2 = (!this.field_12) ? Class_295.Object : Class_295.Array;
                base.xmethod_1901(arg_);
                Class_286.NClass_1 nclass_ = new Class_286.NClass_1(arg_2);
                this.gmethod_1933(nclass_);
                nclass_.field_27 = this.cmethod_1944();
                return(true);
            }

            case Class_285.NClass_0.field_6:
            case Class_285.NClass_0.field_12:
                return(false);

            case Class_285.NClass_0.field_7:
                this.vmethod_1935(this.field_9);
                return(true);

            case Class_285.NClass_0.field_8:
            case Class_285.NClass_0.field_10:
            case Class_285.NClass_0.field_13:
            {
                Class_286.NClass_1 nclass_2 = this.field_11;
                if (nclass_2 == null)
                {
                    return(false);
                }
                int num = nclass_2.field_27 - 1;
                if (nclass_2.field_28 < num)
                {
                    if (nclass_2.field_26 == Class_295.Array)
                    {
                        this.pmethod_1919();
                        this.vmethod_1935(this.field_9);
                        return(true);
                    }
                    base.tmethod_1902(Class_508.PropertyName, this.pmethod_1919());
                    return(true);
                }
                else
                {
                    if (nclass_2.field_28 != num)
                    {
                        throw Class_414.lmethod_3098(this, "Read past end of current container context.");
                    }
                    if (this.cmethod_1934() != 0)
                    {
                        throw Class_414.lmethod_3098(this, "Unexpected end of object byte value.");
                    }
                    this.tmethod_1932();
                    if (this.field_11 != null)
                    {
                        this.kmethod_1947(nclass_2.field_27);
                    }
                    Class_508 arg_3 = (nclass_2.field_26 == Class_295.Object) ? Class_508.EndObject : Class_508.EndArray;
                    base.xmethod_1901(arg_3);
                    return(true);
                }
                break;
            }

            case Class_285.NClass_0.field_14:
            case Class_285.NClass_0.field_15:
            case Class_285.NClass_0.field_16:
            case Class_285.NClass_0.field_17:
                return(false);
            }
            throw new ArgumentOutOfRangeException();
        }