Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ValidateAccessor()

static void System.Linq.Expressions.Expression< TDelegate >.ValidateAccessor ( Expression< TDelegate > instance,
MethodInfo method,
ParameterInfo[] indexes,
ref ReadOnlyCollection< Expression< TDelegate > > arguments,
string paramName )
inlinestaticprivateinherited

Definition at line 3020 of file Expression.cs.

3021 {
3023 ValidateMethodInfo(method, "method");
3024 if ((method.CallingConvention & CallingConventions.VarArgs) != 0)
3025 {
3026 throw Error.AccessorsCannotHaveVarArgs(paramName);
3027 }
3028 if (method.IsStatic)
3029 {
3030 if (instance != null)
3031 {
3032 throw Error.OnlyStaticPropertiesHaveNullInstance("instance");
3033 }
3034 }
3035 else
3036 {
3037 if (instance == null)
3038 {
3039 throw Error.OnlyStaticPropertiesHaveNullInstance("instance");
3040 }
3041 ExpressionUtils.RequiresCanRead(instance, "instance");
3042 ValidateCallInstanceType(instance.Type, method);
3043 }
3045 }
static void RequiresNotNull(object value, string paramName)
static void RequiresCanRead(Expression expression, string paramName)
static void ValidateCallInstanceType(Type instanceType, MethodInfo method)
static void ValidateMethodInfo(MethodInfo method, string paramName)
static void ValidateAccessorArgumentTypes(MethodInfo method, ParameterInfo[] indexes, ref ReadOnlyCollection< Expression > arguments, string paramName)

References System.Linq.Expressions.Error.AccessorsCannotHaveVarArgs(), System.Linq.Expressions.Error.OnlyStaticPropertiesHaveNullInstance(), System.Dynamic.Utils.ExpressionUtils.RequiresCanRead(), System.Dynamic.Utils.ContractUtils.RequiresNotNull(), System.Linq.Expressions.Expression< TDelegate >.ValidateAccessorArgumentTypes(), System.Linq.Expressions.Expression< TDelegate >.ValidateCallInstanceType(), and System.Linq.Expressions.Expression< TDelegate >.ValidateMethodInfo().

Referenced by System.Linq.Expressions.Expression< TDelegate >.ValidateIndexedProperty().