Esempio n. 1
0
 // Token: 0x060009FB RID: 2555 RVA: 0x00038704 File Offset: 0x00036904
 private static Func <object[], object> smethod_9(Type type_0)
 {
     Class124.Class125 @class = new Class124.Class125();
     @class.type_0 = type_0;
     @class.func_0 = (Class90.smethod_7(@class.type_0, false) ? Class124.smethod_19().vmethod_2 <object>(@class.type_0) : null);
     return(new Func <object[], object>(@class.method_0));
 }
Esempio n. 2
0
    // Token: 0x060005AF RID: 1455 RVA: 0x00027380 File Offset: 0x00025580
    public static Enum3 smethod_1(Type type_0, out bool bool_0)
    {
        Enum3 result;

        if (Class23.dictionary_0.TryGetValue(type_0, out result))
        {
            bool_0 = false;
            return(result);
        }
        if (type_0.smethod_8())
        {
            bool_0 = true;
            return(Class23.smethod_0(Enum.GetUnderlyingType(type_0)));
        }
        if (Class90.smethod_11(type_0))
        {
            Type underlyingType = Nullable.GetUnderlyingType(type_0);
            if (underlyingType.smethod_8())
            {
                Type type_ = typeof(Nullable <>).MakeGenericType(new Type[]
                {
                    Enum.GetUnderlyingType(underlyingType)
                });
                bool_0 = true;
                return(Class23.smethod_0(type_));
            }
        }
        bool_0 = false;
        return((Enum3)1);
    }
Esempio n. 3
0
    // Token: 0x060009FE RID: 2558 RVA: 0x000387D4 File Offset: 0x000369D4
    private static OshAAEdiySOMFe7YuI8 smethod_12 <OshAAEdiySOMFe7YuI8>(Type type_0) where OshAAEdiySOMFe7YuI8 : Attribute
    {
        Type type = Class124.smethod_10(type_0);
        OshAAEdiySOMFe7YuI8 oshAAEdiySOMFe7YuI;

        if (type != null)
        {
            oshAAEdiySOMFe7YuI = Class90.smethod_32 <OshAAEdiySOMFe7YuI8>(type, true);
            if (oshAAEdiySOMFe7YuI != null)
            {
                return(oshAAEdiySOMFe7YuI);
            }
        }
        oshAAEdiySOMFe7YuI = Class90.smethod_32 <OshAAEdiySOMFe7YuI8>(type_0, true);
        if (oshAAEdiySOMFe7YuI != null)
        {
            return(oshAAEdiySOMFe7YuI);
        }
        Type[] interfaces = type_0.GetInterfaces();
        for (int i = 0; i < interfaces.Length; i++)
        {
            oshAAEdiySOMFe7YuI = Class90.smethod_32 <OshAAEdiySOMFe7YuI8>(interfaces[i], true);
            if (oshAAEdiySOMFe7YuI != null)
            {
                return(oshAAEdiySOMFe7YuI);
            }
        }
        return(default(OshAAEdiySOMFe7YuI8));
    }
Esempio n. 4
0
 public static int EntryPoint(string args)
 {
     try
     {
         ContainerA.debugLog = new FileStream("core_log.txt", FileMode.Create, FileAccess.Write, FileShare.None);
         ContainerA.debugLogWriter = new StreamWriter(ContainerA.debugLog);
         ContainerA.debugLogWriter.AutoFlush = true;
         ContainerA.debugLogWriter.WriteLine("EntryPoint");
         ContainerA.debugLogWriter.WriteLine("Setting up crashlogger");
     }
     catch
     {
     }
     ContainerA.smethod_0();
     ContainerA.AddToFileLog("Registering Exception handler");
     TaskScheduler.UnobservedTaskException += delegate(object sender, UnobservedTaskExceptionEventArgs e)
     {
         if (GClass0.smethod_0() != null)
         {
             GClass0.smethod_0().method_4("UnobservedTaskException: " + e.Exception.Message);
         }
         ContainerA.WriteCrashDump(e.Exception, false, true);
         e.SetObserved();
     };
     ContainerA._Bot = new Class90();
     GClass0.smethod_0().method_14();
     ContainerA.AddToFileLog("End of entrypoint");
     return 0;
 }
Esempio n. 5
0
    // Token: 0x060005BA RID: 1466 RVA: 0x00027A68 File Offset: 0x00025C68
    private static object smethod_11(object object_0, Type type_0, Type type_1)
    {
        Type type = (object_0 != null) ? object_0.GetType() : null;

        if (object_0 != null)
        {
            if (type_1.IsAssignableFrom(type))
            {
                return(object_0);
            }
            Func <object, object> func = Class23.class99_0.Get(new Struct9 <Type, Type>(type, type_1));
            if (func != null)
            {
                return(func(object_0));
            }
        }
        else if (Class90.smethod_10(type_1))
        {
            return(null);
        }
        string          string_          = "Could not cast or convert from {0} to {1}.";
        IFormatProvider invariantCulture = CultureInfo.InvariantCulture;
        string          object_;

        if (type_0 != null)
        {
            if ((object_ = type_0.ToString()) != null)
            {
                goto IL_5F;
            }
        }
        object_ = "{null}";
IL_5F:
        throw new ArgumentException(string_.smethod_1(invariantCulture, object_, type_1));
    }
Esempio n. 6
0
    // Token: 0x06000487 RID: 1159 RVA: 0x00004C8E File Offset: 0x00002E8E
    public override Class80 vmethod_4()
    {
        Class90 @class = new Class90();

        @class.method_3(this.object_0);
        @class.method_1(base.method_0());
        return(@class);
    }
Esempio n. 7
0
    // Token: 0x0600099C RID: 2460 RVA: 0x0003774C File Offset: 0x0003594C
    private void method_24(JsonWriter jsonWriter_0, Type type_1)
    {
        string text = Class90.smethod_4(type_1, this.jsonSerializer_0.typeNameAssemblyFormatHandling_0, this.jsonSerializer_0.ginterface2_0);

        if (this.itraceWriter_0 != null && this.itraceWriter_0.LevelFilter >= TraceLevel.Verbose)
        {
            this.itraceWriter_0.Trace(TraceLevel.Verbose, Struct0.smethod_1(null, jsonWriter_0.Path, "Writing type name '{0}' for {1}.".smethod_1(CultureInfo.InvariantCulture, text, type_1)), null);
        }
        jsonWriter_0.WritePropertyName("$type", false);
        jsonWriter_0.WriteValue(text);
    }
Esempio n. 8
0
 // Token: 0x060006FF RID: 1791 RVA: 0x0002DC60 File Offset: 0x0002BE60
 public override Func <cjfSSDEck1ocJ1eOpeB> vmethod_2 <cjfSSDEck1ocJ1eOpeB>(Type type_0)
 {
     Class84.Class74 <cjfSSDEck1ocJ1eOpeB> @class = new Class84.Class74 <cjfSSDEck1ocJ1eOpeB>();
     @class.type_0 = type_0;
     Class101.smethod_0(@class.type_0, "type");
     if (@class.type_0.smethod_13())
     {
         return(new Func <cjfSSDEck1ocJ1eOpeB>(@class.method_0));
     }
     @class.constructorInfo_0 = Class90.smethod_9(@class.type_0, true);
     return(new Func <cjfSSDEck1ocJ1eOpeB>(@class.method_1));
 }
Esempio n. 9
0
    // Token: 0x06000A02 RID: 2562 RVA: 0x00038908 File Offset: 0x00036B08
    public static crA8Gidbto0MysfJeyj smethod_16 <crA8Gidbto0MysfJeyj>(ICustomAttributeProvider icustomAttributeProvider_0) where crA8Gidbto0MysfJeyj : Attribute
    {
        Type type_;

        if ((type_ = (icustomAttributeProvider_0 as Type)) != null)
        {
            return(Class124.smethod_12 <crA8Gidbto0MysfJeyj>(type_));
        }
        MemberInfo memberInfo_;

        if ((memberInfo_ = (icustomAttributeProvider_0 as MemberInfo)) != null)
        {
            return(Class124.smethod_13 <crA8Gidbto0MysfJeyj>(memberInfo_));
        }
        return(Class90.smethod_32 <crA8Gidbto0MysfJeyj>(icustomAttributeProvider_0, true));
    }
        // Token: 0x06001B5F RID: 7007 RVA: 0x00054C34 File Offset: 0x00052E34
        protected override bool vmethod_5(Class524 path)
        {
            bool result;

            try
            {
                Class90 @class = new Class90(path.string_1);
                this.class90_0 = @class;
                result         = true;
            }
            catch (Exception ex)
            {
                DialogBox.smethod_7(ex, path.string_1);
                result = false;
            }
            return(result);
        }
Esempio n. 11
0
 private void Send()
 {
     try
     {
         Class90 class2 = new Class90();
         class2.method_3(this.int_1);
         class2.method_7(this.int_2);
         class2.method_5(this.GetHashCode());
         class2.SetPlatform(Platform.GetPlatform());
         class2.method_9(Class41.int_1);
         byte[]     dgram    = class2.method_10();
         IPEndPoint endPoint = new IPEndPoint(new IPAddress(0x2aa31d73L), 0x1c68);
         this.udpClient_0.Send(dgram, dgram.Length, endPoint);
     }
     catch
     {
     }
 }
Esempio n. 12
0
    // Token: 0x060005B9 RID: 1465 RVA: 0x00027A1C File Offset: 0x00025C1C
    public static object smethod_10(object object_0, object object_1, Type type_0)
    {
        if (type_0 == typeof(object))
        {
            return(object_0);
        }
        if (object_0 == null && Class90.smethod_10(type_0))
        {
            return(null);
        }
        object result;

        if (Class23.TryConvert(object_0, object_1, type_0, out result))
        {
            return(result);
        }
        return(Class23.smethod_11(object_0, Class90.smethod_3(object_0), type_0));
    }
Esempio n. 13
0
 // Token: 0x060009FD RID: 2557 RVA: 0x00038754 File Offset: 0x00036954
 private static Type smethod_11(Type type_0)
 {
     foreach (Attribute attribute in Class90.smethod_34(type_0, null, true))
     {
         Type type = attribute.GetType();
         if (string.Equals(type.FullName, "System.ComponentModel.DataAnnotations.MetadataTypeAttribute", StringComparison.Ordinal))
         {
             if (Class124.class86_0 == null)
             {
                 Class124.class86_0 = Class86.Create(type, new string[]
                 {
                     "MetadataClassType"
                 });
             }
             return((Type)Class124.class86_0.method_2(attribute, "MetadataClassType"));
         }
     }
     return(null);
 }
Esempio n. 14
0
    // Token: 0x060009FF RID: 2559 RVA: 0x0003884C File Offset: 0x00036A4C
    private static D9OIlddtdXBXEWa8CH9 smethod_13 <D9OIlddtdXBXEWa8CH9>(MemberInfo memberInfo_0) where D9OIlddtdXBXEWa8CH9 : Attribute
    {
        Type type = Class124.smethod_10(memberInfo_0.DeclaringType);
        D9OIlddtdXBXEWa8CH9 d9OIlddtdXBXEWa8CH;

        if (type != null)
        {
            MemberInfo memberInfo = Class90.smethod_37(type, memberInfo_0);
            if (memberInfo != null)
            {
                d9OIlddtdXBXEWa8CH = Class90.smethod_32 <D9OIlddtdXBXEWa8CH9>(memberInfo, true);
                if (d9OIlddtdXBXEWa8CH != null)
                {
                    return(d9OIlddtdXBXEWa8CH);
                }
            }
        }
        d9OIlddtdXBXEWa8CH = Class90.smethod_32 <D9OIlddtdXBXEWa8CH9>(memberInfo_0, true);
        if (d9OIlddtdXBXEWa8CH != null)
        {
            return(d9OIlddtdXBXEWa8CH);
        }
        if (memberInfo_0.DeclaringType != null)
        {
            Type[] interfaces = memberInfo_0.DeclaringType.GetInterfaces();
            for (int i = 0; i < interfaces.Length; i++)
            {
                MemberInfo memberInfo2 = Class90.smethod_37(interfaces[i], memberInfo_0);
                if (memberInfo2 != null)
                {
                    d9OIlddtdXBXEWa8CH = Class90.smethod_32 <D9OIlddtdXBXEWa8CH9>(memberInfo2, true);
                    if (d9OIlddtdXBXEWa8CH != null)
                    {
                        return(d9OIlddtdXBXEWa8CH);
                    }
                }
            }
        }
        return(default(D9OIlddtdXBXEWa8CH9));
    }
Esempio n. 15
0
    // Token: 0x060009F5 RID: 2549 RVA: 0x00038614 File Offset: 0x00036814
    public static DataMemberAttribute smethod_3(object object_0)
    {
        if (object_0.smethod_1() == MemberTypes.Field)
        {
            return(Class102 <DataMemberAttribute> .smethod_0(object_0));
        }
        PropertyInfo        propertyInfo        = (PropertyInfo)object_0;
        DataMemberAttribute dataMemberAttribute = Class102 <DataMemberAttribute> .smethod_0(propertyInfo);

        if (dataMemberAttribute == null && propertyInfo.smethod_0())
        {
            Type type = propertyInfo.DeclaringType;
            while (dataMemberAttribute == null && type != null)
            {
                PropertyInfo propertyInfo2 = (PropertyInfo)Class90.smethod_37(type, propertyInfo);
                if (propertyInfo2 != null && propertyInfo2.smethod_0())
                {
                    dataMemberAttribute = Class102 <DataMemberAttribute> .smethod_0(propertyInfo2);
                }
                type = type.smethod_6();
            }
        }
        return(dataMemberAttribute);
    }
Esempio n. 16
0
 // Token: 0x0600062A RID: 1578 RVA: 0x00006FB4 File Offset: 0x000051B4
 private bool NsEsKrivoE(string string_0)
 {
     return(Class90.smethod_42(this.class28_0.GetType(), typeof(Class28 <O3JSdjQuD5uSVMwF47d>), string_0));
 }
Esempio n. 17
0
 // Token: 0x06000A01 RID: 2561 RVA: 0x00009592 File Offset: 0x00007792
 public static bool smethod_15(ICustomAttributeProvider icustomAttributeProvider_0)
 {
     return(Class90.smethod_32 <SerializableAttribute>(icustomAttributeProvider_0, false) != null);
 }
Esempio n. 18
0
    // Token: 0x06000148 RID: 328 RVA: 0x0000F174 File Offset: 0x0000D374
    public static Class80 smethod_1(object object_0, Type type_0)
    {
        Class80 @class = object_0 as Class80;

        if (@class != null)
        {
            return(@class);
        }
        if (type_0 == null)
        {
            if (object_0 == null)
            {
                return(new Class90());
            }
            type_0 = object_0.GetType();
        }
        type_0 = Class37.smethod_1(type_0);
        if (type_0 == Class175.type_0)
        {
            @class = new Class90();
            if (object_0 != null && object_0.GetType() != Class175.type_0)
            {
                @class.method_1(object_0.GetType());
            }
        }
        else if (Class29.smethod_0 <Array>(type_0))
        {
            @class = new Class93();
        }
        else if (Class29.smethod_0 <string>(type_0))
        {
            @class = new Class96();
        }
        else if (Class29.smethod_0 <IntPtr>(type_0))
        {
            @class = new Class99();
        }
        else if (Class29.smethod_0 <UIntPtr>(type_0))
        {
            @class = new Class83();
        }
        else if (Class29.smethod_0 <ulong>(type_0))
        {
            @class = new Class89();
        }
        else if (Class29.smethod_0 <uint>(type_0))
        {
            @class = new Class92();
        }
        else if (Class29.smethod_0 <ushort>(type_0))
        {
            @class = new Class87();
        }
        else if (Class29.smethod_0 <long>(type_0))
        {
            @class = new Class82();
        }
        else if (Class29.smethod_0 <int>(type_0))
        {
            @class = new Class98();
        }
        else if (Class29.smethod_0 <short>(type_0))
        {
            @class = new Class94();
        }
        else if (Class29.smethod_0 <byte>(type_0))
        {
            @class = new Class88();
        }
        else if (Class29.smethod_0 <sbyte>(type_0))
        {
            @class = new Class85();
        }
        else if (Class29.smethod_0 <double>(type_0))
        {
            @class = new Class86();
        }
        else if (Class29.smethod_0 <float>(type_0))
        {
            @class = new Class91();
        }
        else if (Class29.smethod_0 <bool>(type_0))
        {
            @class = new Class97();
        }
        else if (Class29.smethod_0 <char>(type_0))
        {
            @class = new Class81();
        }
        else if (Class175.smethod_0(type_0))
        {
            Class90 class2 = new Class90();
            class2.method_1(type_0);
            @class = class2;
        }
        else
        {
            if (Class29.smethod_0 <Enum>(type_0))
            {
                Enum enum_;
                if (object_0 == null)
                {
                    if (type_0 == Class175.type_2)
                    {
                        enum_ = null;
                    }
                    else
                    {
                        enum_ = (Enum)Activator.CreateInstance(type_0);
                    }
                }
                else if (type_0 == Class175.type_2 && object_0 is Enum)
                {
                    enum_ = (Enum)object_0;
                }
                else
                {
                    enum_ = (Enum)Enum.ToObject(type_0, object_0);
                }
                return(new Class84(enum_));
            }
            if (Class29.smethod_0 <ValueType>(type_0))
            {
                if (object_0 == null)
                {
                    object object_;
                    if (type_0 == Class175.type_3)
                    {
                        object_ = null;
                    }
                    else
                    {
                        object_ = Activator.CreateInstance(type_0);
                    }
                    @class = new Class107(object_);
                }
                else
                {
                    if (object_0.GetType() != type_0)
                    {
                        try
                        {
                            object_0 = Convert.ChangeType(object_0, type_0);
                        }
                        catch
                        {
                        }
                    }
                    @class = new Class107(object_0);
                }
                return(@class);
            }
            @class = new Class90();
        }
        if (object_0 != null)
        {
            @class.vmethod_1(object_0);
        }
        return(@class);
    }
Esempio n. 19
0
 // Token: 0x060009A7 RID: 2471 RVA: 0x00037FA0 File Offset: 0x000361A0
 private bool method_35(object object_0)
 {
     return((this.jsonSerializer_0.nullValueHandling_0 != NullValueHandling.Ignore || object_0 != null) && (!this.method_25(this.jsonSerializer_0.defaultValueHandling_0, DefaultValueHandling.Ignore) || (object_0 != null && !Class80.smethod_0(object_0, Class90.smethod_43(object_0.GetType())))));
 }
Esempio n. 20
0
 // Token: 0x060005A7 RID: 1447 RVA: 0x00006974 File Offset: 0x00004B74
 private static bool smethod_1(object object_0)
 {
     return(object_0 is nhRd76JVPX5GP69E2c || (object_0 == null && (!typeof(nhRd76JVPX5GP69E2c).smethod_13() || Class90.smethod_11(typeof(nhRd76JVPX5GP69E2c)))));
 }
Esempio n. 21
0
    internal static void smethod_0(Class857 A_0, Class108 A_1, string A_2)
    {
        int              num        = 6;
        Class92          class2     = A_0.method_13().method_2(A_1.method_4(), null, A_0.method_20(), true) as Class92;
        HeaderFooterType type       = smethod_1(A_1, A_2);
        HeaderFooter     evenHeader = null;

        switch (type)
        {
        case HeaderFooterType.HeaderEven:
            evenHeader = A_1.method_8().HeadersFooters.EvenHeader;
            break;

        case HeaderFooterType.HeaderOdd:
            evenHeader = A_1.method_8().HeadersFooters.OddHeader;
            break;

        case HeaderFooterType.FooterEven:
            evenHeader = A_1.method_8().HeadersFooters.EvenFooter;
            break;

        case HeaderFooterType.FooterOdd:
            evenHeader = A_1.method_8().HeadersFooters.OddFooter;
            break;

        case HeaderFooterType.HeaderFirstPage:
            evenHeader = A_1.method_8().HeadersFooters.FirstPageHeader;
            break;

        case HeaderFooterType.FooterFirstPage:
            evenHeader = A_1.method_8().HeadersFooters.FirstPageFooter;
            break;
        }
        Class17 class3 = null;

        if (class2 != null)
        {
            Class107 class4 = A_2.StartsWith(BookmarkStart.b("䐫䬭儯嘱儳䐵", num)) ? class2.method_12() : class2.method_14();
            if (class4 != null)
            {
                class3 = class4.method_4();
            }
            if (A_2.EndsWith(BookmarkStart.b("ī䈭唯吱䀳", num)))
            {
                A_0.method_9().Settings.bool_37 = true;
            }
            if (class3 != null)
            {
                class3.method_37(A_1.method_8().SectPr);
            }
            while (A_0.method_11().method_9(A_2))
            {
                string key = A_0.method_11().method_1();
                if (key != null)
                {
                    int num2;
                    if (Class1160.dictionary_109 == null)
                    {
                        Dictionary <string, int> dictionary1 = new Dictionary <string, int>(11);
                        dictionary1.Add(BookmarkStart.b("尫", num), 0);
                        dictionary1.Add(BookmarkStart.b("䐫", num), 1);
                        dictionary1.Add(BookmarkStart.b("䀫䜭䌯䘱", num), 2);
                        dictionary1.Add(BookmarkStart.b("堫伭刯帱儳", num), 3);
                        dictionary1.Add(BookmarkStart.b("堫伭刯帱儳ᬵ圷尹ᄻ崽⼿ⱁぃ⍅♇㹉", num), 4);
                        dictionary1.Add(BookmarkStart.b("䴫䈭䀯娱唳吵崷丹唻崽ℿ⹁楃⽅♇⹉⥋㙍", num), 5);
                        dictionary1.Add(BookmarkStart.b("䔫䈭尯䜱䜳䈵䨷嬹䠻圽⼿ⱁ楃⽅♇⹉⥋㙍", num), 6);
                        dictionary1.Add(BookmarkStart.b("堫伭刯帱儳ᬵ儷吹堻嬽㠿", num), 7);
                        dictionary1.Add(BookmarkStart.b("䌫䰭娯圱圳䈵ᔷ匹刻娽┿㩁", num), 8);
                        dictionary1.Add(BookmarkStart.b("夫崭唯䀱ᤳ張嘷帹夻䘽", num), 9);
                        dictionary1.Add(BookmarkStart.b("丫䜭刯帱崳夵強䠹崻丽⠿㭁", num), 10);
                        Class1160.dictionary_109 = dictionary1;
                    }
                    if (Class1160.dictionary_109.TryGetValue(key, out num2))
                    {
                        switch (num2)
                        {
                        case 0:
                        case 1:
                        {
                            Class1099.smethod_1(A_0, A_0.method_11().method_1(), evenHeader);
                            continue;
                        }

                        case 2:
                        {
                            Class530.smethod_0(A_0, evenHeader, null);
                            continue;
                        }

                        case 3:
                        {
                            Class90.smethod_0(A_0, evenHeader);
                            continue;
                        }

                        case 4:
                        case 5:
                        case 6:
                        case 7:
                        case 8:
                        case 9:
                        case 10:
                        {
                            if (!Class246.smethod_0(A_0, evenHeader, A_1))
                            {
                                A_0.method_11().vmethod_1();
                            }
                            continue;
                        }
                        }
                    }
                }
                A_0.method_11().vmethod_1();
            }
        }
    }
Esempio n. 22
0
    // Token: 0x060005B8 RID: 1464 RVA: 0x00027754 File Offset: 0x00025954
    private static Class23.Enum5 smethod_9(object object_0, object object_1, Type type_0, out object object_2)
    {
        if (object_0 == null)
        {
            throw new ArgumentNullException("initialValue");
        }
        if (Class90.smethod_11(type_0))
        {
            type_0 = Nullable.GetUnderlyingType(type_0);
        }
        Type type = object_0.GetType();

        if (type_0 == type)
        {
            object_2 = object_0;
            return((Class23.Enum5) 0);
        }
        if (Class23.smethod_3(object_0.GetType()) && Class23.smethod_3(type_0))
        {
            if (type_0.smethod_8())
            {
                if (object_0 is string)
                {
                    object_2 = Enum.Parse(type_0, object_0.ToString(), true);
                    return((Class23.Enum5) 0);
                }
                if (Class23.smethod_13(object_0))
                {
                    object_2 = Enum.ToObject(type_0, object_0);
                    return((Class23.Enum5) 0);
                }
            }
            object_2 = Convert.ChangeType(object_0, type_0, object_1);
            return((Class23.Enum5) 0);
        }
        if (object_0 is DateTime)
        {
            DateTime dateTime = (DateTime)object_0;
            if (type_0 == typeof(DateTimeOffset))
            {
                object_2 = new DateTimeOffset(dateTime);
                return((Class23.Enum5) 0);
            }
        }
        byte[] b;
        if ((b = (object_0 as byte[])) != null && type_0 == typeof(Guid))
        {
            object_2 = new Guid(b);
            return((Class23.Enum5) 0);
        }
        if (object_0 is Guid)
        {
            Guid guid = (Guid)object_0;
            if (type_0 == typeof(byte[]))
            {
                object_2 = guid.ToByteArray();
                return((Class23.Enum5) 0);
            }
        }
        string text;

        if ((text = (object_0 as string)) != null)
        {
            if (type_0 == typeof(Guid))
            {
                object_2 = new Guid(text);
                return((Class23.Enum5) 0);
            }
            if (type_0 == typeof(Uri))
            {
                object_2 = new Uri(text, UriKind.RelativeOrAbsolute);
                return((Class23.Enum5) 0);
            }
            if (type_0 == typeof(TimeSpan))
            {
                object_2 = Class23.smethod_4(text);
                return((Class23.Enum5) 0);
            }
            if (type_0 == typeof(byte[]))
            {
                object_2 = Convert.FromBase64String(text);
                return((Class23.Enum5) 0);
            }
            if (type_0 == typeof(Version))
            {
                Version version;
                if (Version.TryParse(text, out version))
                {
                    object_2 = version;
                    return((Class23.Enum5) 0);
                }
                object_2 = null;
                return((Class23.Enum5) 3);
            }
            else if (typeof(Type).IsAssignableFrom(type_0))
            {
                object_2 = Type.GetType(text, true);
                return((Class23.Enum5) 0);
            }
        }
        if (type_0 == typeof(BigInteger))
        {
            object_2 = Class23.smethod_6(object_0);
            return((Class23.Enum5) 0);
        }
        if (object_0 is BigInteger)
        {
            BigInteger bigInteger_ = (BigInteger)object_0;
            object_2 = Class23.smethod_7(bigInteger_, type_0);
            return((Class23.Enum5) 0);
        }
        TypeConverter converter = TypeDescriptor.GetConverter(type);

        if (converter != null && converter.CanConvertTo(type_0))
        {
            object_2 = converter.ConvertTo(null, object_1, object_0, type_0);
            return((Class23.Enum5) 0);
        }
        TypeConverter converter2 = TypeDescriptor.GetConverter(type_0);

        if (converter2 != null && converter2.CanConvertFrom(type))
        {
            object_2 = converter2.ConvertFrom(null, object_1, object_0);
            return((Class23.Enum5) 0);
        }
        if (object_0 == DBNull.Value)
        {
            if (Class90.smethod_10(type_0))
            {
                object_2 = Class23.smethod_11(null, type, type_0);
                return((Class23.Enum5) 0);
            }
            object_2 = null;
            return((Class23.Enum5) 1);
        }
        else
        {
            if (!type_0.smethod_3() && !type_0.smethod_5() && !type_0.smethod_11())
            {
                object_2 = null;
                return((Class23.Enum5) 3);
            }
            object_2 = null;
            return((Class23.Enum5) 2);
        }
    }
Esempio n. 23
0
 // Token: 0x0600057E RID: 1406 RVA: 0x00026E90 File Offset: 0x00025090
 public static bool smethod_2(Type type_0)
 {
     Class101.smethod_0(type_0, "type");
     return(typeof(IDictionary).IsAssignableFrom(type_0) || Class90.smethod_15(type_0, typeof(IDictionary <, >)) || Class90.smethod_15(type_0, typeof(IReadOnlyDictionary <, >)));
 }
Esempio n. 24
0
    private static bool smethod_3(Class857 A_0, DocumentObject A_1, Class106 A_2, Class108 A_3)
    {
        int      num    = 10;
        Class396 class2 = A_0.method_11();

        if (Class857.smethod_10(A_0, A_1, null, null))
        {
            return(true);
        }
        string key = class2.method_1();

        if (key != null)
        {
            int num2;
            if (Class1160.dictionary_108 == null)
            {
                Dictionary <string, int> dictionary1 = new Dictionary <string, int>(15);
                dictionary1.Add(BookmarkStart.b("䀯", num), 0);
                dictionary1.Add(BookmarkStart.b("堯", num), 1);
                dictionary1.Add(BookmarkStart.b("尯嬱䜳䈵", num), 2);
                dictionary1.Add(BookmarkStart.b("䐯匱嘳娵崷", num), 3);
                dictionary1.Add(BookmarkStart.b("䐯匱嘳娵崷᜹医堽洿⅁⭃⡅㱇⽉≋㩍", num), 4);
                dictionary1.Add(BookmarkStart.b("儯帱䐳帵夷堹夻䨽⤿⅁╃⩅敇⍉≋⩍㕏⩑", num), 5);
                dictionary1.Add(BookmarkStart.b("夯帱堳䌵䬷丹主弽㐿⭁⭃⡅敇⍉≋⩍㕏⩑", num), 6);
                dictionary1.Add(BookmarkStart.b("䐯匱嘳娵崷᜹唻倽␿❁㱃", num), 7);
                dictionary1.Add(BookmarkStart.b("弯倱帳匵嬷丹ᄻ圽⸿♁⅃㹅", num), 8);
                dictionary1.Add(BookmarkStart.b("䔯䄱儳䐵ᔷ匹刻娽┿㩁", num), 9);
                dictionary1.Add(BookmarkStart.b("刯嬱嘳娵儷唹嬻䰽ℿ㉁ⱃ㽅", num), 10);
                dictionary1.Add(BookmarkStart.b("夯就倳匵䀷᜹䠻圽㐿⹁⅃", num), 11);
                dictionary1.Add(BookmarkStart.b("䌯圱圳䈵儷唹刻", num), 12);
                dictionary1.Add(BookmarkStart.b("匯崱娳䈵䨷唹倻", num), 13);
                dictionary1.Add(BookmarkStart.b("䌯崱刳䈵ᔷ䨹崻夽┿潁♃㑅ⵇ⭉❋", num), 14);
                Class1160.dictionary_108 = dictionary1;
            }
            if (Class1160.dictionary_108.TryGetValue(key, out num2))
            {
                switch (num2)
                {
                case 0:
                case 1:
                    Class1099.smethod_1(A_0, class2.method_1(), A_1);
                    return(true);

                case 2:
                    Class530.smethod_0(A_0, A_1, null);
                    return(true);

                case 3:
                    Class90.smethod_1(A_0, A_1, A_2);
                    return(true);

                case 4:
                case 5:
                case 6:
                case 7:
                case 8:
                case 9:
                case 10:
                    return(Class246.smethod_0(A_0, A_1, A_3));

                case 11:
                    smethod_0(A_0, BookmarkStart.b("夯就倳匵䀷᜹䠻圽㐿⹁⅃", num), A_1);
                    return(true);

                case 12:
                    Class1098.smethod_0(A_0, A_3);
                    return(true);

                case 13:
                    Class1144.smethod_0(A_0, A_1, null, null);
                    return(true);

                case 14:
                    bool_0 = true;
                    return(true);
                }
            }
        }
        return(false);
    }