Exemplo n.º 1
0
        public static T smethod_9 <T>(this IEnumerable <T> ienumerable_0, Func <T, string> func_0, string string_2)
        {
            Func <T, bool> predicate = null;
            Class199 <T>   class2    = new Class199 <T> {
                func_0   = func_0,
                string_0 = string_2
            };

            if (ienumerable_0 == null)
            {
                throw new ArgumentNullException("source");
            }
            if (class2.func_0 == null)
            {
                throw new ArgumentNullException("valueSelector");
            }
            IEnumerable <T> source = ienumerable_0.Where <T>(new Func <T, bool>(class2.method_0));

            if (source.Count <T>() <= 1)
            {
                return(source.SingleOrDefault <T>());
            }
            if (predicate == null)
            {
                predicate = new Func <T, bool>(class2.method_1);
            }
            return(ienumerable_0.Where <T>(predicate).SingleOrDefault <T>());
        }
Exemplo n.º 2
0
    int IComparable.CompareTo(object A_0)
    {
        int num = 1;

        if (!(A_0 is Class199))
        {
            throw new NotImplementedException(BookmarkStart.b("栦䬨䄪ബ䘮䈰ጲ嬴堶䴸ᬺ尼Ἶᅀ⩂♄㍆㱈㥊⡌๎㽐㝒Ŕ㉖⅘⽚൜ぞበ੢ᅤ๦٨ժ⑬Ůᝰᱲ呴", num));
        }
        Class199 class2 = A_0 as Class199;

        if (this.method_6() > class2.method_6())
        {
            return(1);
        }
        if (this.method_6() >= class2.method_6())
        {
            if ((this.method_0() == null) && (class2.method_0() != null))
            {
                return(1);
            }
            if ((this.method_0() == null) || (class2.method_0() != null))
            {
                return(0);
            }
        }
        return(-1);
    }
 public abstract void Visit(Class199 c);
 public override void Visit(Class199 c) { }
Exemplo n.º 5
0
    // Token: 0x06001068 RID: 4200 RVA: 0x0004A810 File Offset: 0x00048A10
    private void method_5(Class191 class191_0)
    {
        switch (class191_0.Type)
        {
        case (Enum13)1:
        {
            Class195 @class = (Class195)class191_0;
            this.binaryWriter_0.Write(Convert.ToDouble(@class.Value, CultureInfo.InvariantCulture));
            return;
        }

        case (Enum13)2:
        {
            Class197 class2 = (Class197)class191_0;
            this.method_6((string)class2.Value, class2.method_4(), new int?(class2.method_2() - 4));
            return;
        }

        case (Enum13)3:
        {
            Class192 class3 = (Class192)class191_0;
            this.binaryWriter_0.Write(class3.method_2());
            foreach (Class200 class4 in class3)
            {
                this.binaryWriter_0.Write((sbyte)class4.Value.Type);
                this.method_6((string)class4.Name.Value, class4.Name.method_4(), null);
                this.method_5(class4.Value);
            }
            this.binaryWriter_0.Write(0);
            return;
        }

        case (Enum13)4:
        {
            Class193 class5 = (Class193)class191_0;
            this.binaryWriter_0.Write(class5.method_2());
            ulong num = 0UL;
            foreach (Class191 class6 in class5)
            {
                this.binaryWriter_0.Write((sbyte)class6.Type);
                this.method_6(num.ToString(CultureInfo.InvariantCulture), Class79.smethod_0(num), null);
                this.method_5(class6);
                num += 1UL;
            }
            this.binaryWriter_0.Write(0);
            return;
        }

        case (Enum13)5:
        {
            Class198 class7 = (Class198)class191_0;
            byte[]   array  = (byte[])class7.Value;
            this.binaryWriter_0.Write(array.Length);
            this.binaryWriter_0.Write((byte)class7.method_4());
            this.binaryWriter_0.Write(array);
            return;
        }

        case (Enum13)6:
        case (Enum13)10:
            return;

        case (Enum13)7:
        {
            byte[] buffer = (byte[])((Class195)class191_0).Value;
            this.binaryWriter_0.Write(buffer);
            return;
        }

        case (Enum13)8:
            this.binaryWriter_0.Write(class191_0 == Class196.class196_1);
            return;

        case (Enum13)9:
        {
            Class195 class8 = (Class195)class191_0;
            object   value;
            long     value2;
            if ((value = class8.Value) is DateTime)
            {
                DateTime dateTime_ = (DateTime)value;
                if (this.method_0() == DateTimeKind.Utc)
                {
                    dateTime_ = dateTime_.ToUniversalTime();
                }
                else if (this.method_0() == DateTimeKind.Local)
                {
                    dateTime_ = dateTime_.ToLocalTime();
                }
                value2 = Class25.smethod_9(dateTime_, false);
            }
            else
            {
                DateTimeOffset dateTimeOffset = (DateTimeOffset)class8.Value;
                value2 = Class25.smethod_7(dateTimeOffset.UtcDateTime, dateTimeOffset.Offset);
            }
            this.binaryWriter_0.Write(value2);
            return;
        }

        case (Enum13)11:
        {
            Class199 class9 = (Class199)class191_0;
            this.method_6((string)class9.Pattern.Value, class9.Pattern.method_4(), null);
            this.method_6((string)class9.Options.Value, class9.Options.method_4(), null);
            return;
        }

        case (Enum13)16:
        {
            Class195 class10 = (Class195)class191_0;
            this.binaryWriter_0.Write(Convert.ToInt32(class10.Value, CultureInfo.InvariantCulture));
            return;
        }

        case (Enum13)18:
        {
            Class195 class11 = (Class195)class191_0;
            this.binaryWriter_0.Write(Convert.ToInt64(class11.Value, CultureInfo.InvariantCulture));
            return;
        }
        }
        throw new ArgumentOutOfRangeException("t", "Unexpected token when writing BSON: {0}".smethod_0(CultureInfo.InvariantCulture, class191_0.Type));
    }
Exemplo n.º 6
0
    // Token: 0x0600106D RID: 4205 RVA: 0x0004AC80 File Offset: 0x00048E80
    private int method_10(Class191 class191_0)
    {
        switch (class191_0.Type)
        {
        case (Enum13)1:
            return(8);

        case (Enum13)2:
        {
            Class197 @class = (Class197)class191_0;
            string   text   = (string)@class.Value;
            @class.method_5((text != null) ? Class189.utf8Encoding_0.GetByteCount(text) : 0);
            @class.method_3(this.method_9(@class.method_4(), @class.method_6()));
            return(@class.method_2());
        }

        case (Enum13)3:
        {
            Class192 class2 = (Class192)class191_0;
            int      num    = 4;
            foreach (Class200 class3 in class2)
            {
                int num2 = 1 + this.method_10(class3.Name);
                num2 += this.method_10(class3.Value);
                num  += num2;
            }
            num++;
            class2.method_3(num);
            return(num);
        }

        case (Enum13)4:
        {
            Class193 class4 = (Class193)class191_0;
            int      num3   = 4;
            ulong    num4   = 0UL;
            foreach (Class191 class191_ in class4)
            {
                num3++;
                num3 += this.method_8(Class79.smethod_0(num4));
                num3 += this.method_10(class191_);
                num4 += 1UL;
            }
            num3++;
            class4.method_3(num3);
            return(class4.method_2());
        }

        case (Enum13)5:
        {
            Class198 class5 = (Class198)class191_0;
            byte[]   array  = (byte[])class5.Value;
            class5.method_3(5 + array.Length);
            return(class5.method_2());
        }

        case (Enum13)6:
        case (Enum13)10:
            return(0);

        case (Enum13)7:
            return(12);

        case (Enum13)8:
            return(1);

        case (Enum13)9:
            return(8);

        case (Enum13)11:
        {
            Class199 class6 = (Class199)class191_0;
            int      num5   = 0 + this.method_10(class6.Pattern);
            num5 += this.method_10(class6.Options);
            class6.method_3(num5);
            return(class6.method_2());
        }

        case (Enum13)16:
            return(4);

        case (Enum13)18:
            return(8);
        }
        throw new ArgumentOutOfRangeException("t", "Unexpected token when writing BSON: {0}".smethod_0(CultureInfo.InvariantCulture, class191_0.Type));
    }