Exemple #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));
 }
Exemple #2
0
        // Token: 0x06000A08 RID: 2568 RVA: 0x00038A0C File Offset: 0x00036C0C
        internal object method_0(object[] object_0)
        {
            object result;

            try
            {
                if (object_0 != null)
                {
                    Type[]          types       = object_0.Select(new Func <object, Type>(Class124.Class126.class126_0.method_0)).ToArray <Type>();
                    ConstructorInfo constructor = this.type_0.GetConstructor(types);
                    if (!(constructor != null))
                    {
                        throw new JsonException("No matching parameterized constructor found for '{0}'.".smethod_0(CultureInfo.InvariantCulture, this.type_0));
                    }
                    result = Class124.smethod_19().vmethod_1(constructor)(object_0);
                }
                else
                {
                    if (this.func_0 == null)
                    {
                        throw new JsonException("No parameterless constructor defined for '{0}'.".smethod_0(CultureInfo.InvariantCulture, this.type_0));
                    }
                    result = this.func_0();
                }
            }
            catch (Exception innerException)
            {
                throw new JsonException("Error creating '{0}'.".smethod_0(CultureInfo.InvariantCulture, this.type_0), innerException);
            }
            return(result);
        }
Exemple #3
0
    // Token: 0x060005B3 RID: 1459 RVA: 0x000273FC File Offset: 0x000255FC
    private static Func <object, object> smethod_5(Struct9 <Type, Type> struct9_0)
    {
        Class23.Class24 @class   = new Class23.Class24();
        Type            gparam_  = struct9_0.gparam_0;
        Type            gparam_2 = struct9_0.gparam_1;
        MethodInfo      method;

        if ((method = gparam_2.GetMethod("op_Implicit", new Type[]
        {
            gparam_
        })) == null)
        {
            method = gparam_2.GetMethod("op_Explicit", new Type[]
            {
                gparam_
            });
        }
        MethodInfo methodInfo = method;

        if (methodInfo == null)
        {
            return(null);
        }
        @class.delegate1_0 = Class124.smethod_19().vmethod_0 <object>(methodInfo);
        return(new Func <object, object>(@class.method_0));
    }
Exemple #4
0
        // Token: 0x0600067A RID: 1658 RVA: 0x0002B34C File Offset: 0x0002954C
        private static void smethod_2()
        {
            Type type  = Type.GetType("Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo, Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", true);
            Type type2 = Type.GetType("Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags, Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", true);
            Type type3 = Type.GetType("Microsoft.CSharp.RuntimeBinder.Binder, Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", true);
            Type type4 = typeof(IEnumerable <>).MakeGenericType(new Type[]
            {
                type
            });
            MethodInfo method = type3.GetMethod("GetMember", new Type[]
            {
                type2,
                typeof(string),
                typeof(Type),
                type4
            });

            Class47.Class48.delegate1_0 = Class124.smethod_19().vmethod_0 <object>(method);
            MethodInfo method2 = type3.GetMethod("SetMember", new Type[]
            {
                type2,
                typeof(string),
                typeof(Type),
                type4
            });

            Class47.Class48.delegate1_1 = Class124.smethod_19().vmethod_0 <object>(method2);
        }
Exemple #5
0
 // Token: 0x060006BC RID: 1724 RVA: 0x0002C2A8 File Offset: 0x0002A4A8
 public static void smethod_9(Assembly assembly_1)
 {
     if (!Class59.bool_0)
     {
         object obj = Class59.object_0;
         lock (obj)
         {
             if (!Class59.bool_0)
             {
                 Class59.smethod_1(assembly_1);
                 Type       type        = assembly_1.GetType("Microsoft.FSharp.Reflection.FSharpType");
                 MethodInfo methodBase_ = Class59.smethod_10(type, "IsUnion", BindingFlags.Static | BindingFlags.Public);
                 Class59.IsUnion = Class124.smethod_19().vmethod_0 <object>(methodBase_);
                 MethodInfo methodBase_2 = Class59.smethod_10(type, "GetUnionCases", BindingFlags.Static | BindingFlags.Public);
                 Class59.GetUnionCases = Class124.smethod_19().vmethod_0 <object>(methodBase_2);
                 Type type2 = assembly_1.GetType("Microsoft.FSharp.Reflection.FSharpValue");
                 Class59.PreComputeUnionTagReader   = Class59.smethod_11(type2, "PreComputeUnionTagReader");
                 Class59.PreComputeUnionReader      = Class59.smethod_11(type2, "PreComputeUnionReader");
                 Class59.PreComputeUnionConstructor = Class59.smethod_11(type2, "PreComputeUnionConstructor");
                 Type type3 = assembly_1.GetType("Microsoft.FSharp.Reflection.UnionCaseInfo");
                 Class59.smethod_5(Class124.smethod_19().vmethod_3 <object>(type3.GetProperty("Name")));
                 Class59.smethod_7(Class124.smethod_19().vmethod_3 <object>(type3.GetProperty("Tag")));
                 Class59.smethod_3(Class124.smethod_19().vmethod_3 <object>(type3.GetProperty("DeclaringType")));
                 Class59.smethod_8(Class124.smethod_19().vmethod_0 <object>(type3.GetMethod("GetFields")));
                 Class59.methodInfo_0 = assembly_1.GetType("Microsoft.FSharp.Collections.ListModule").GetMethod("OfSeq");
                 Class59.kXkxeOrhTr   = assembly_1.GetType("Microsoft.FSharp.Collections.FSharpMap`2");
                 Thread.MemoryBarrier();
                 Class59.bool_0 = true;
             }
         }
     }
 }
Exemple #6
0
 // Token: 0x060006D0 RID: 1744 RVA: 0x0002C5BC File Offset: 0x0002A7BC
 internal static bool smethod_0(Type type_0, Type type_1, out Type type_2, out ObjectConstructor <object> objectConstructor_0)
 {
     if (type_0.smethod_4())
     {
         Class64.Class66 @class = new Class64.Class66();
         Type            genericTypeDefinition = type_0.GetGenericTypeDefinition();
         @class.string_0 = genericTypeDefinition.FullName;
         Class64.Class65 class2 = Class64.ilist_0.FirstOrDefault(new Func <Class64.Class65, bool>(@class.method_0));
         if (class2 != null)
         {
             Type type  = genericTypeDefinition.smethod_7().GetType(class2.method_2());
             Type type2 = genericTypeDefinition.smethod_7().GetType(class2.method_4());
             if (type != null && type2 != null)
             {
                 MethodInfo methodInfo = type2.GetMethods().FirstOrDefault(new Func <MethodInfo, bool>(Class64.Class67.class67_0.method_0));
                 if (methodInfo != null)
                 {
                     type_2 = type.MakeGenericType(new Type[]
                     {
                         type_1
                     });
                     MethodInfo methodBase_ = methodInfo.MakeGenericMethod(new Type[]
                     {
                         type_1
                     });
                     objectConstructor_0 = Class124.smethod_19().vmethod_1(methodBase_);
                     return(true);
                 }
             }
         }
     }
     type_2 = null;
     objectConstructor_0 = null;
     return(false);
 }
Exemple #7
0
    // Token: 0x060006BF RID: 1727 RVA: 0x0002C4C8 File Offset: 0x0002A6C8
    public static ObjectConstructor <object> smethod_12(Type type_0)
    {
        MethodInfo methodBase_ = Class59.methodInfo_0.MakeGenericMethod(new Type[]
        {
            type_0
        });

        return(Class124.smethod_19().vmethod_1(methodBase_));
    }
Exemple #8
0
    // Token: 0x060006BE RID: 1726 RVA: 0x0002C46C File Offset: 0x0002A66C
    private static Delegate1 <object, object> smethod_11(Type type_0, string string_0)
    {
        Class59.Class60 @class     = new Class59.Class60();
        MethodInfo      methodInfo = Class59.smethod_10(type_0, string_0, BindingFlags.Static | BindingFlags.Public);
        MethodInfo      method     = methodInfo.ReturnType.GetMethod("Invoke", BindingFlags.Instance | BindingFlags.Public);

        @class.delegate1_0 = Class124.smethod_19().vmethod_0 <object>(methodInfo);
        @class.delegate1_1 = Class124.smethod_19().vmethod_0 <object>(method);
        return(new Delegate1 <object, object>(@class.method_0));
    }
Exemple #9
0
    // Token: 0x060006C1 RID: 1729 RVA: 0x0002C4F8 File Offset: 0x0002A6F8
    public static ObjectConstructor <object> BuildMapCreator <TKey, TValue>()
    {
        Class59.Class61 <TKey, TValue> @class = new Class59.Class61 <TKey, TValue>();
        ConstructorInfo constructor           = Class59.kXkxeOrhTr.MakeGenericType(new Type[]
        {
            typeof(TKey),
            typeof(TValue)
        }).GetConstructor(new Type[]
        {
            typeof(IEnumerable <Tuple <TKey, TValue> >)
        });

        @class.objectConstructor_0 = Class124.smethod_19().vmethod_1(constructor);
        return(new ObjectConstructor <object>(@class.method_0));
    }