Exemplo n.º 1
0
        // Token: 0x0600162F RID: 5679 RVA: 0x00069740 File Offset: 0x00067940
        public virtual Func <T, object> cmethod_4034 <T>(PropertyInfo arg_0)
        {
            Class_517.ArgumentNotNull(arg_0, "propertyInfo");
            Type typeFromHandle  = typeof(T);
            Type typeFromHandle2 = typeof(object);
            ParameterExpression parameterExpression = Expression.Parameter(typeFromHandle, "instance");
            MethodInfo          getMethod           = arg_0.GetGetMethod(true);
            Expression          expression;

            if (getMethod.IsStatic)
            {
                expression = Expression.MakeMemberAccess(null, arg_0);
            }
            else
            {
                Expression expression2 = this.lmethod_4038(parameterExpression, arg_0.DeclaringType);
                expression = Expression.MakeMemberAccess(expression2, arg_0);
            }
            expression = this.lmethod_4038(expression, typeFromHandle2);
            LambdaExpression lambdaExpression = Expression.Lambda(typeof(Func <T, object>), expression, new ParameterExpression[]
            {
                parameterExpression
            });

            return((Func <T, object>)lambdaExpression.Compile());
        }
Exemplo n.º 2
0
        // Token: 0x06001727 RID: 5927 RVA: 0x0006D760 File Offset: 0x0006B960
        public static IList <Class_506 <TUnderlyingType> > GetNamesAndValues <TUnderlyingType>(Type enumType) where TUnderlyingType : struct
        {
            if (enumType == null)
            {
                throw new ArgumentNullException("enumType");
            }
            Class_517.ArgumentTypeIsEnum(enumType, "enumType");
            IList <object> values = Class_505.GetValues(enumType);
            IList <string> names  = Class_505.GetNames(enumType);
            IList <Class_506 <TUnderlyingType> > list = new List <Class_506 <TUnderlyingType> >();

            for (int i = 0; i < values.Count; i++)
            {
                try
                {
                    list.Add(new Class_506 <TUnderlyingType>(names[i], (TUnderlyingType)((object)Convert.ChangeType(values[i], typeof(TUnderlyingType), CultureInfo.CurrentCulture))));
                }
                catch (OverflowException innerException)
                {
                    throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "Value from enum with the underlying type of {0} cannot be added to dictionary with a value type of {1}. Value was too large: {2}", new object[]
                    {
                        Enum.GetUnderlyingType(enumType),
                        typeof(TUnderlyingType),
                        Convert.ToUInt64(values[i], CultureInfo.InvariantCulture)
                    }), innerException);
                }
            }
            return(list);
        }
Exemplo n.º 3
0
        // Token: 0x0600177D RID: 6013 RVA: 0x0006F204 File Offset: 0x0006D404
        public static bool IsIndexedProperty(MemberInfo member)
        {
            Class_517.ArgumentNotNull(member, "member");
            PropertyInfo propertyInfo = member as PropertyInfo;

            return(propertyInfo != null && Class_514.IsIndexedProperty(propertyInfo));
        }
Exemplo n.º 4
0
        // Token: 0x0600162E RID: 5678 RVA: 0x00069678 File Offset: 0x00067878
        public virtual Func <T> gmethod_4033 <T>(Type arg_0)
        {
            Func <T> func = null;

            Class_483 <T> .NClass_1 nclass_ = new Class_483 <T> .NClass_1();

            nclass_.type = arg_0;
            Class_517.ArgumentNotNull(nclass_.type, "type");
            if (nclass_.type.IsAbstract)
            {
                return(new Func <T>(nclass_.< CreateDefaultConstructor > b__1));
            }
            Func <T> result;

            try
            {
                Type       typeFromHandle = typeof(T);
                Expression expression     = Expression.New(nclass_.type);
                expression = this.lmethod_4038(expression, typeFromHandle);
                LambdaExpression lambdaExpression = Expression.Lambda(typeof(Func <T>), expression, new ParameterExpression[0]);
                Func <T>         func2            = (Func <T>)lambdaExpression.Compile();
                result = func2;
            }
            catch
            {
                if (func == null)
                {
                    func = new Func <T>(nclass_.< CreateDefaultConstructor > b__2);
                }
                result = func;
            }
            return(result);
        }
Exemplo n.º 5
0
 // Token: 0x06001776 RID: 6006 RVA: 0x0006EEB0 File Offset: 0x0006D0B0
 public static bool ImplementsGenericDefinition(Type type, Type genericInterfaceDefinition, out Type implementingType)
 {
     Class_517.ArgumentNotNull(type, "type");
     Class_517.ArgumentNotNull(genericInterfaceDefinition, "genericInterfaceDefinition");
     if (!genericInterfaceDefinition.IsInterface || !genericInterfaceDefinition.IsGenericTypeDefinition)
     {
         throw new ArgumentNullException("'{0}' is not a generic interface definition.".FormatWith(CultureInfo.InvariantCulture, genericInterfaceDefinition));
     }
     if (type.IsInterface && type.IsGenericType)
     {
         Type genericTypeDefinition = type.GetGenericTypeDefinition();
         if (genericInterfaceDefinition == genericTypeDefinition)
         {
             implementingType = type;
             return(true);
         }
     }
     foreach (Type type2 in type.GetInterfaces())
     {
         if (type2.IsGenericType)
         {
             Type genericTypeDefinition2 = type2.GetGenericTypeDefinition();
             if (genericInterfaceDefinition == genericTypeDefinition2)
             {
                 implementingType = type2;
                 return(true);
             }
         }
     }
     implementingType = null;
     return(false);
 }
Exemplo n.º 6
0
        // Token: 0x06001631 RID: 5681 RVA: 0x00069884 File Offset: 0x00067A84
        public virtual Action <T, object> dmethod_4036 <T>(FieldInfo arg_0)
        {
            Class_517.ArgumentNotNull(arg_0, "fieldInfo");
            if (arg_0.DeclaringType.IsValueType || arg_0.IsInitOnly)
            {
                return(Class_488.prop_0.gmethod_4013 <T>(arg_0));
            }
            ParameterExpression parameterExpression  = Expression.Parameter(typeof(T), "source");
            ParameterExpression parameterExpression2 = Expression.Parameter(typeof(object), "value");
            Expression          expression;

            if (arg_0.IsStatic)
            {
                expression = Expression.Field(null, arg_0);
            }
            else
            {
                Expression expression2 = this.lmethod_4038(parameterExpression, arg_0.DeclaringType);
                expression = Expression.Field(expression2, arg_0);
            }
            Expression       right            = this.lmethod_4038(parameterExpression2, expression.Type);
            BinaryExpression body             = Expression.Assign(expression, right);
            LambdaExpression lambdaExpression = Expression.Lambda(typeof(Action <T, object>), body, new ParameterExpression[]
            {
                parameterExpression,
                parameterExpression2
            });

            return((Action <T, object>)lambdaExpression.Compile());
        }
Exemplo n.º 7
0
        // Token: 0x0600177B RID: 6011 RVA: 0x0006F0E0 File Offset: 0x0006D2E0
        public static void GetDictionaryKeyValueTypes(Type dictionaryType, out Type keyType, out Type valueType)
        {
            Class_517.ArgumentNotNull(dictionaryType, "type");
            Type type;

            if (Class_514.ImplementsGenericDefinition(dictionaryType, typeof(IDictionary <, >), out type))
            {
                if (type.IsGenericTypeDefinition)
                {
                    throw new Exception("Type {0} is not a dictionary.".FormatWith(CultureInfo.InvariantCulture, dictionaryType));
                }
                Type[] genericArguments = type.GetGenericArguments();
                keyType   = genericArguments[0];
                valueType = genericArguments[1];
                return;
            }
            else
            {
                if (typeof(IDictionary).IsAssignableFrom(dictionaryType))
                {
                    keyType   = null;
                    valueType = null;
                    return;
                }
                throw new Exception("Type {0} is not a dictionary.".FormatWith(CultureInfo.InvariantCulture, dictionaryType));
            }
        }
Exemplo n.º 8
0
        // Token: 0x0600177C RID: 6012 RVA: 0x0006F17C File Offset: 0x0006D37C
        public static Type GetMemberUnderlyingType(MemberInfo member)
        {
            Class_517.ArgumentNotNull(member, "member");
            MemberTypes memberType = member.MemberType;

            switch (memberType)
            {
            case MemberTypes.Event:
                return(((EventInfo)member).EventHandlerType);

            case MemberTypes.Constructor | MemberTypes.Event:
                break;

            case MemberTypes.Field:
                return(((FieldInfo)member).FieldType);

            default:
                if (memberType == MemberTypes.Method)
                {
                    return(((MethodInfo)member).ReturnType);
                }
                if (memberType == MemberTypes.Property)
                {
                    return(((PropertyInfo)member).PropertyType);
                }
                break;
            }
            throw new ArgumentException("MemberInfo must be of type FieldInfo, PropertyInfo, EventInfo or MethodInfo", "member");
        }
Exemplo n.º 9
0
        // Token: 0x06001632 RID: 5682 RVA: 0x00069974 File Offset: 0x00067B74
        public virtual Action <T, object> kmethod_4037 <T>(PropertyInfo arg_0)
        {
            Class_517.ArgumentNotNull(arg_0, "propertyInfo");
            if (arg_0.DeclaringType.IsValueType)
            {
                return(Class_488.prop_0.cmethod_4014 <T>(arg_0));
            }
            Type typeFromHandle  = typeof(T);
            Type typeFromHandle2 = typeof(object);
            ParameterExpression parameterExpression  = Expression.Parameter(typeFromHandle, "instance");
            ParameterExpression parameterExpression2 = Expression.Parameter(typeFromHandle2, "value");
            Expression          expression           = this.lmethod_4038(parameterExpression2, arg_0.PropertyType);
            MethodInfo          setMethod            = arg_0.GetSetMethod(true);
            Expression          body;

            if (setMethod.IsStatic)
            {
                body = Expression.Call(setMethod, expression);
            }
            else
            {
                Expression instance = this.lmethod_4038(parameterExpression, arg_0.DeclaringType);
                body = Expression.Call(instance, setMethod, new Expression[]
                {
                    expression
                });
            }
            LambdaExpression lambdaExpression = Expression.Lambda(typeof(Action <T, object>), body, new ParameterExpression[]
            {
                parameterExpression,
                parameterExpression2
            });

            return((Action <T, object>)lambdaExpression.Compile());
        }
Exemplo n.º 10
0
        // Token: 0x0600177A RID: 6010 RVA: 0x0006F044 File Offset: 0x0006D244
        public static Type GetCollectionItemType(Type type)
        {
            Class_517.ArgumentNotNull(type, "type");
            if (type.IsArray)
            {
                return(type.GetElementType());
            }
            Type type2;

            if (Class_514.ImplementsGenericDefinition(type, typeof(IEnumerable <>), out type2))
            {
                if (type2.IsGenericTypeDefinition)
                {
                    throw new Exception("Type {0} is not a collection.".FormatWith(CultureInfo.InvariantCulture, type));
                }
                return(type2.GetGenericArguments()[0]);
            }
            else
            {
                if (typeof(IEnumerable).IsAssignableFrom(type))
                {
                    return(null);
                }
                throw new Exception("Type {0} is not a collection.".FormatWith(CultureInfo.InvariantCulture, type));
            }
        }
Exemplo n.º 11
0
        // Token: 0x0600166A RID: 5738 RVA: 0x0006A478 File Offset: 0x00068678
        public virtual Func <T, object> pmethod_4049 <T>(FieldInfo arg_0)
        {
            Class_488 <T> .NClass_4 nclass_ = new Class_488 <T> .NClass_4();

            nclass_.fieldInfo = arg_0;
            Class_517.ArgumentNotNull(nclass_.fieldInfo, "fieldInfo");
            return(new Func <T, object>(nclass_.< CreateGet > b__e));
        }
Exemplo n.º 12
0
        // Token: 0x0600166B RID: 5739 RVA: 0x0006A4B0 File Offset: 0x000686B0
        public virtual Action <T, object> smethod_4050 <T>(FieldInfo arg_0)
        {
            Class_488 <T> .NClass_5 nclass_ = new Class_488 <T> .NClass_5();

            nclass_.fieldInfo = arg_0;
            Class_517.ArgumentNotNull(nclass_.fieldInfo, "fieldInfo");
            return(new Action <T, object>(nclass_.< CreateSet > b__11));
        }
Exemplo n.º 13
0
        // Token: 0x0600178C RID: 6028 RVA: 0x0006F9A0 File Offset: 0x0006DBA0
        public static IEnumerable <FieldInfo> GetFields(Type targetType, BindingFlags bindingAttr)
        {
            Class_517.ArgumentNotNull(targetType, "targetType");
            List <MemberInfo> list = new List <MemberInfo>(targetType.GetFields(bindingAttr));

            Class_514.GetChildPrivateFields(list, targetType, bindingAttr);
            return(list.Cast <FieldInfo>());
        }
Exemplo n.º 14
0
 // Token: 0x060017B1 RID: 6065 RVA: 0x000702C7 File Offset: 0x0006E4C7
 public static void ArgumentTypeIsEnum(Type enumType, string parameterName)
 {
     Class_517.ArgumentNotNull(enumType, "enumType");
     if (!enumType.IsEnum)
     {
         throw new ArgumentException("Type {0} is not an Enum.".FormatWith(CultureInfo.InvariantCulture, enumType), parameterName);
     }
 }
Exemplo n.º 15
0
        // Token: 0x06001669 RID: 5737 RVA: 0x0006A440 File Offset: 0x00068640
        public virtual Func <T, object> lmethod_4048 <T>(PropertyInfo arg_0)
        {
            Class_488 <T> .NClass_3 nclass_ = new Class_488 <T> .NClass_3();

            nclass_.propertyInfo = arg_0;
            Class_517.ArgumentNotNull(nclass_.propertyInfo, "propertyInfo");
            return(new Func <T, object>(nclass_.< CreateGet > b__b));
        }
Exemplo n.º 16
0
        // Token: 0x0600166C RID: 5740 RVA: 0x0006A4E8 File Offset: 0x000686E8
        public virtual Action <T, object> xmethod_4051 <T>(PropertyInfo arg_0)
        {
            Class_488 <T> .NClass_6 nclass_ = new Class_488 <T> .NClass_6();

            nclass_.propertyInfo = arg_0;
            Class_517.ArgumentNotNull(nclass_.propertyInfo, "propertyInfo");
            return(new Action <T, object>(nclass_.< CreateSet > b__14));
        }
Exemplo n.º 17
0
 // Token: 0x060016C8 RID: 5832 RVA: 0x0006BD75 File Offset: 0x00069F75
 public Class_501(IList arg_0)
 {
     Class_517.ArgumentNotNull(arg_0, "list");
     if (arg_0 is ICollection <T> )
     {
         this._genericCollection = (ICollection <T>)arg_0;
         return;
     }
     this._list = arg_0;
 }
Exemplo n.º 18
0
 // Token: 0x06001778 RID: 6008 RVA: 0x0006EF98 File Offset: 0x0006D198
 public static bool InheritsGenericDefinition(Type type, Type genericClassDefinition, out Type implementingType)
 {
     Class_517.ArgumentNotNull(type, "type");
     Class_517.ArgumentNotNull(genericClassDefinition, "genericClassDefinition");
     if (!genericClassDefinition.IsClass || !genericClassDefinition.IsGenericTypeDefinition)
     {
         throw new ArgumentNullException("'{0}' is not a generic class definition.".FormatWith(CultureInfo.InvariantCulture, genericClassDefinition));
     }
     return(Class_514.InheritsGenericDefinitionInternal(type, genericClassDefinition, out implementingType));
 }
Exemplo n.º 19
0
        // Token: 0x06001768 RID: 5992 RVA: 0x0006EB5C File Offset: 0x0006CD5C
        public static bool IsVirtual(this PropertyInfo propertyInfo)
        {
            Class_517.ArgumentNotNull(propertyInfo, "propertyInfo");
            MethodInfo methodInfo = propertyInfo.GetGetMethod();

            if (methodInfo != null && methodInfo.IsVirtual)
            {
                return(true);
            }
            methodInfo = propertyInfo.GetSetMethod();
            return(methodInfo != null && methodInfo.IsVirtual);
        }
Exemplo n.º 20
0
 // Token: 0x06001788 RID: 6024 RVA: 0x0006F6E8 File Offset: 0x0006D8E8
 public static Attribute[] GetAttributes(object attributeProvider, Type attributeType, bool inherit)
 {
     Class_517.ArgumentNotNull(attributeProvider, "attributeProvider");
     if (attributeProvider is Type)
     {
         Type     type   = (Type)attributeProvider;
         object[] source = (attributeType != null) ? type.GetCustomAttributes(attributeType, inherit) : type.GetCustomAttributes(inherit);
         return(source.Cast <Attribute>().ToArray <Attribute>());
     }
     if (attributeProvider is Assembly)
     {
         Assembly element = (Assembly)attributeProvider;
         if (!(attributeType != null))
         {
             return(Attribute.GetCustomAttributes(element));
         }
         return(Attribute.GetCustomAttributes(element, attributeType));
     }
     else if (attributeProvider is MemberInfo)
     {
         MemberInfo element2 = (MemberInfo)attributeProvider;
         if (!(attributeType != null))
         {
             return(Attribute.GetCustomAttributes(element2, inherit));
         }
         return(Attribute.GetCustomAttributes(element2, attributeType, inherit));
     }
     else if (attributeProvider is Module)
     {
         Module element3 = (Module)attributeProvider;
         if (!(attributeType != null))
         {
             return(Attribute.GetCustomAttributes(element3, inherit));
         }
         return(Attribute.GetCustomAttributes(element3, attributeType, inherit));
     }
     else
     {
         if (!(attributeProvider is ParameterInfo))
         {
             ICustomAttributeProvider customAttributeProvider = (ICustomAttributeProvider)attributeProvider;
             object[] array = (attributeType != null) ? customAttributeProvider.GetCustomAttributes(attributeType, inherit) : customAttributeProvider.GetCustomAttributes(inherit);
             return((Attribute[])array);
         }
         ParameterInfo element4 = (ParameterInfo)attributeProvider;
         if (!(attributeType != null))
         {
             return(Attribute.GetCustomAttributes(element4, inherit));
         }
         return(Attribute.GetCustomAttributes(element4, attributeType, inherit));
     }
 }
Exemplo n.º 21
0
        // Token: 0x06001667 RID: 5735 RVA: 0x0006A370 File Offset: 0x00068570
        public virtual Class_489 <T, object> dmethod_4046 <T>(MethodBase arg_0)
        {
            Class_488 <T> .NClass_1 nclass_ = new Class_488 <T> .NClass_1();

            nclass_.method = arg_0;
            Class_517.ArgumentNotNull(nclass_.method, "method");
            nclass_.c = (nclass_.method as ConstructorInfo);
            if (nclass_.c != null)
            {
                return(new Class_489 <T, object>(nclass_.< CreateMethodCall > b__3));
            }
            return(new Class_489 <T, object>(nclass_.< CreateMethodCall > b__4));
        }
Exemplo n.º 22
0
        // Token: 0x06001668 RID: 5736 RVA: 0x0006A3D8 File Offset: 0x000685D8
        public virtual Func <T> kmethod_4047 <T>(Type arg_0)
        {
            Class_488 <T> .NClass_2 nclass_ = new Class_488 <T> .NClass_2();

            nclass_.type = arg_0;
            Class_517.ArgumentNotNull(nclass_.type, "type");
            if (nclass_.type.IsValueType)
            {
                return(new Func <T>(nclass_.< CreateDefaultConstructor > b__7));
            }
            nclass_.constructorInfo = Class_514.GetDefaultConstructor(nclass_.type, true);
            return(new Func <T>(nclass_.< CreateDefaultConstructor > b__8));
        }
Exemplo n.º 23
0
        // Token: 0x06001666 RID: 5734 RVA: 0x0006A314 File Offset: 0x00068514
        public virtual Class_482 <object> vmethod_4045(MethodBase arg_0)
        {
            Class_488.NClass_0 nclass_ = new Class_488.NClass_0();
            nclass_.field_4 = arg_0;
            Class_517.ArgumentNotNull(nclass_.field_4, "method");
            ConstructorInfo constructorInfo = nclass_.field_4 as ConstructorInfo;

            if (constructorInfo != null)
            {
                return(new Class_482 <object>(constructorInfo.Invoke));
            }
            return(new Class_482 <object>(nclass_.nmethod_1));
        }
Exemplo n.º 24
0
        // Token: 0x0600162B RID: 5675 RVA: 0x00069310 File Offset: 0x00067510
        public virtual Class_482 <object> smethod_4030(MethodBase arg_0)
        {
            Class_517.ArgumentNotNull(arg_0, "method");
            Type typeFromHandle = typeof(object);
            ParameterExpression parameterExpression = Expression.Parameter(typeof(object[]), "args");
            Expression          body             = this.tmethod_4032(arg_0, typeFromHandle, null, parameterExpression);
            LambdaExpression    lambdaExpression = Expression.Lambda(typeof(Class_482 <object>), body, new ParameterExpression[]
            {
                parameterExpression
            });

            return((Class_482 <object>)lambdaExpression.Compile());
        }
Exemplo n.º 25
0
        // Token: 0x06001769 RID: 5993 RVA: 0x0006EBB8 File Offset: 0x0006CDB8
        public static MethodInfo GetBaseDefinition(this PropertyInfo propertyInfo)
        {
            Class_517.ArgumentNotNull(propertyInfo, "propertyInfo");
            MethodInfo methodInfo = propertyInfo.GetGetMethod();

            if (methodInfo != null)
            {
                return(methodInfo.GetBaseDefinition());
            }
            methodInfo = propertyInfo.GetSetMethod();
            if (methodInfo != null)
            {
                return(methodInfo.GetBaseDefinition());
            }
            return(null);
        }
Exemplo n.º 26
0
        // Token: 0x06001780 RID: 6016 RVA: 0x0006F304 File Offset: 0x0006D504
        public static void SetMemberValue(MemberInfo member, object target, object value)
        {
            Class_517.ArgumentNotNull(member, "member");
            Class_517.ArgumentNotNull(target, "target");
            MemberTypes memberType = member.MemberType;

            if (memberType == MemberTypes.Field)
            {
                ((FieldInfo)member).SetValue(target, value);
                return;
            }
            if (memberType != MemberTypes.Property)
            {
                throw new ArgumentException("MemberInfo '{0}' must be of type FieldInfo or PropertyInfo".FormatWith(CultureInfo.InvariantCulture, member.Name), "member");
            }
            ((PropertyInfo)member).SetValue(target, value, null);
        }
Exemplo n.º 27
0
        // Token: 0x0600178E RID: 6030 RVA: 0x0006FA44 File Offset: 0x0006DC44
        public static IEnumerable <PropertyInfo> GetProperties(Type targetType, BindingFlags bindingAttr)
        {
            Class_517.ArgumentNotNull(targetType, "targetType");
            List <PropertyInfo> list = new List <PropertyInfo>(targetType.GetProperties(bindingAttr));

            Class_514.GetChildPrivateProperties(list, targetType, bindingAttr);
            for (int i = 0; i < list.Count; i++)
            {
                PropertyInfo propertyInfo = list[i];
                if (propertyInfo.DeclaringType != targetType)
                {
                    PropertyInfo value = (PropertyInfo)Class_514.GetMemberInfoFromType(propertyInfo.DeclaringType, propertyInfo);
                    list[i] = value;
                }
            }
            return(list);
        }
Exemplo n.º 28
0
        // Token: 0x06001630 RID: 5680 RVA: 0x000697F8 File Offset: 0x000679F8
        public virtual Func <T, object> vmethod_4035 <T>(FieldInfo arg_0)
        {
            Class_517.ArgumentNotNull(arg_0, "fieldInfo");
            ParameterExpression parameterExpression = Expression.Parameter(typeof(T), "source");
            Expression          expression;

            if (arg_0.IsStatic)
            {
                expression = Expression.Field(null, arg_0);
            }
            else
            {
                Expression expression2 = this.lmethod_4038(parameterExpression, arg_0.DeclaringType);
                expression = Expression.Field(expression2, arg_0);
            }
            expression = this.lmethod_4038(expression, typeof(object));
            return(Expression.Lambda <Func <T, object> >(expression, new ParameterExpression[]
            {
                parameterExpression
            }).Compile());
        }
Exemplo n.º 29
0
        // Token: 0x0600177F RID: 6015 RVA: 0x0006F250 File Offset: 0x0006D450
        public static object GetMemberValue(MemberInfo member, object target)
        {
            Class_517.ArgumentNotNull(member, "member");
            Class_517.ArgumentNotNull(target, "target");
            MemberTypes memberType = member.MemberType;

            if (memberType != MemberTypes.Field)
            {
                if (memberType == MemberTypes.Property)
                {
                    try
                    {
                        return(((PropertyInfo)member).GetValue(target, null));
                    }
                    catch (TargetParameterCountException innerException)
                    {
                        throw new ArgumentException("MemberInfo '{0}' has index parameters".FormatWith(CultureInfo.InvariantCulture, member.Name), innerException);
                    }
                }
                throw new ArgumentException("MemberInfo '{0}' is not of type FieldInfo or PropertyInfo".FormatWith(CultureInfo.InvariantCulture, CultureInfo.InvariantCulture, member.Name), "member");
            }
            return(((FieldInfo)member).GetValue(target));
        }
Exemplo n.º 30
0
 // Token: 0x060015BF RID: 5567 RVA: 0x00067874 File Offset: 0x00065A74
 public Class_474(TextWriter arg_0)
 {
     Class_517.ArgumentNotNull(arg_0, "writer");
     this.field_3 = arg_0;
 }