public InstanceMethodCallExpressionSlim3(ExpressionSlim @object, MethodInfoSlim method, ExpressionSlim arg0, ExpressionSlim arg1, ExpressionSlim arg2) : base(@object, method) { _arg0 = arg0; _arg1 = arg1; _arg2 = arg2; }
public StaticMethodCallExpressionSlim3(MethodInfoSlim method, ExpressionSlim arg0, ExpressionSlim arg1, ExpressionSlim arg2) : base(method) { _arg0 = arg0; _arg1 = arg1; _arg2 = arg2; }
protected MethodDef(TypeRef declaringType, MethodInfoSlim method, TypeRef returnType, params TypeRef[] parameters) : base(declaringType) { Method = method; ReturnType = returnType; Parameters = parameters; }
internal FullBinaryExpressionSlim(ExpressionType nodeType, ExpressionSlim left, ExpressionSlim right, bool liftToNull, MethodInfoSlim method, LambdaExpressionSlim conversion) : base(nodeType, left, right) { IsLiftedToNull = liftToNull; Method = method; Conversion = conversion; }
public static MethodCallExpressionSlim Call(MethodInfoSlim method, ExpressionSlim arg0) { Require(method, nameof(method)); Require(arg0, nameof(arg0)); return(new StaticMethodCallExpressionSlim1(method, arg0)); }
internal SwitchExpressionSlim(TypeSlim type, ExpressionSlim switchValue, ExpressionSlim defaultBody, MethodInfoSlim comparison, ReadOnlyCollection <SwitchCaseSlim> cases) { Type = type; SwitchValue = switchValue; DefaultBody = defaultBody; Comparison = comparison; Cases = cases; }
public static ReadOnlyCollection <TypeSlim> GetGenericArguments(this MethodInfoSlim method) { return(method switch { GenericMethodInfoSlim gen => gen.GenericArguments, GenericDefinitionMethodInfoSlim def => def.GenericParameterTypes, _ => throw new InvalidOperationException(), });
public StaticMethodCallExpressionSlim5(MethodInfoSlim method, ExpressionSlim arg0, ExpressionSlim arg1, ExpressionSlim arg2, ExpressionSlim arg3, ExpressionSlim arg4) : base(method) { _arg0 = arg0; _arg1 = arg1; _arg2 = arg2; _arg3 = arg3; _arg4 = arg4; }
private MemberDef AddMethod(TypeRef declaringTypeRef, MethodInfoSlim method) { return(method.Kind switch { MethodInfoSlimKind.Simple => AddSimpleMethod(declaringTypeRef, (SimpleMethodInfoSlim)method), MethodInfoSlimKind.GenericDefinition => AddGenericDefinitionMethod(declaringTypeRef, (GenericDefinitionMethodInfoSlim)method), MethodInfoSlimKind.Generic => AddGenericMethod((GenericMethodInfoSlim)method), _ => throw new NotImplementedException(), });
public InstanceMethodCallExpressionSlim5(ExpressionSlim @object, MethodInfoSlim method, ExpressionSlim arg0, ExpressionSlim arg1, ExpressionSlim arg2, ExpressionSlim arg3, ExpressionSlim arg4) : base(@object, method) { _arg0 = arg0; _arg1 = arg1; _arg2 = arg2; _arg3 = arg3; _arg4 = arg4; }
public static MethodCallExpressionSlim Call(MethodInfoSlim method, ExpressionSlim arg0, ExpressionSlim arg1, ExpressionSlim arg2, ExpressionSlim arg3) { Require(method, nameof(method)); Require(arg0, nameof(arg0)); Require(arg1, nameof(arg1)); Require(arg2, nameof(arg2)); Require(arg3, nameof(arg3)); return(new StaticMethodCallExpressionSlim4(method, arg0, arg1, arg2, arg3)); }
public static MethodCallExpressionSlim Call(ExpressionSlim instance, MethodInfoSlim method, ExpressionSlim arg0, ExpressionSlim arg1, ExpressionSlim arg2, ExpressionSlim arg3, ExpressionSlim arg4) { if (instance == null) { return(new StaticMethodCallExpressionSlim5(method, arg0, arg1, arg2, arg3, arg4)); } else { return(new InstanceMethodCallExpressionSlim5(instance, method, arg0, arg1, arg2, arg3, arg4)); } }
public static MethodCallExpressionSlim Call(ExpressionSlim instance, MethodInfoSlim method, ExpressionSlim arg0) { if (instance == null) { return(new StaticMethodCallExpressionSlim1(method, arg0)); } else { return(new InstanceMethodCallExpressionSlim1(instance, method, arg0)); } }
public static MethodCallExpressionSlim Call(ExpressionSlim instance, MethodInfoSlim method) { Require(method, nameof(method)); if (instance == null) { return(new StaticMethodCallExpressionSlim0(method)); } else { return(new InstanceMethodCallExpressionSlim0(instance, method)); } }
public static MethodCallExpressionSlim Call(ExpressionSlim instance, MethodInfoSlim method, ExpressionSlim arg0, ExpressionSlim arg1) { Require(method, nameof(method)); Require(arg0, nameof(arg0)); Require(arg1, nameof(arg1)); if (instance == null) { return(new StaticMethodCallExpressionSlim2(method, arg0, arg1)); } else { return(new InstanceMethodCallExpressionSlim2(instance, method, arg0, arg1)); } }
private static void AssertAreSameMethod(MethodInfo methodInfo, MethodInfoSlim methodInfoSlim) { Assert.IsTrue(TypeSlimExtensions.Equals(methodInfo.ReturnType.ToTypeSlim(), methodInfoSlim.ReturnType)); Assert.IsTrue(methodInfoSlim.ParameterTypes.SequenceEqual(methodInfo.GetParameters().Select(p => p.ParameterType.ToTypeSlim()))); switch (methodInfoSlim.Kind) { case MethodInfoSlimKind.Simple: AssertAreSameSimpleMethod(methodInfo, (SimpleMethodInfoSlim)methodInfoSlim); return; case MethodInfoSlimKind.GenericDefinition: Assert.IsTrue(methodInfo.IsGenericMethodDefinition); AssertAreSameGenericDefinitionMethod(methodInfo, (GenericDefinitionMethodInfoSlim)methodInfoSlim); return; case MethodInfoSlimKind.Generic: AssertAreSameGenericMethod(methodInfo, (GenericMethodInfoSlim)methodInfoSlim); return; } Fail(methodInfo, methodInfoSlim); }
internal MethodBasedNonLiftedBinaryExpressionSlim(ExpressionType nodeType, ExpressionSlim left, ExpressionSlim right, MethodInfoSlim method) : base(nodeType, left, right) { Method = method; }
public InstanceMethodCallExpressionSlim1(ExpressionSlim @object, MethodInfoSlim method, ExpressionSlim arg0) : base(@object, method) { _arg0 = arg0; }
internal MethodBasedTypedUnaryExpressionSlim(ExpressionType nodeType, ExpressionSlim operand, TypeSlim type, MethodInfoSlim method) : base(nodeType, operand, type) { Method = method; }
public static MethodCallExpressionSlim Call(MethodInfoSlim method, ExpressionSlim arg0, ExpressionSlim arg1, ExpressionSlim arg2, ExpressionSlim arg3, ExpressionSlim arg4) { return(new StaticMethodCallExpressionSlim5(method, arg0, arg1, arg2, arg3, arg4)); }
#pragma warning restore CA1062 #pragma warning restore IDE0079 internal static BinaryExpressionSlim Make(ExpressionType nodeType, ExpressionSlim left, ExpressionSlim right, bool liftToNull, MethodInfoSlim method, LambdaExpressionSlim conversion) { if (conversion == null) { if (liftToNull) { if (method == null) { return(new LiftedBinaryExpressionSlim(nodeType, left, right)); } else { return(new MethodBasedLiftedBinaryExpressionSlim(nodeType, left, right, method)); } } else { if (method == null) { return(new NonLiftedBinaryExpressionSlim(nodeType, left, right)); } else { return(new MethodBasedNonLiftedBinaryExpressionSlim(nodeType, left, right, method)); } } } return(new FullBinaryExpressionSlim(nodeType, left, right, liftToNull, method, conversion)); }
internal ElementInitSlim(MethodInfoSlim addMethod, ReadOnlyCollection <ExpressionSlim> arguments) { AddMethod = addMethod; Arguments = arguments; }
public StaticMethodCallExpressionSlim2(MethodInfoSlim method, ExpressionSlim arg0, ExpressionSlim arg1) : base(method) { _arg0 = arg0; _arg1 = arg1; }
public static MethodCallExpressionSlim Call(MethodInfoSlim method) { return(new StaticMethodCallExpressionSlim0(method)); }
public static MethodCallExpressionSlim Call(MethodInfoSlim method, ExpressionSlim arg0, ExpressionSlim arg1) { return(new StaticMethodCallExpressionSlim2(method, arg0, arg1)); }
public StaticMethodCallExpressionSlim1(MethodInfoSlim method, ExpressionSlim arg0) : base(method) { _arg0 = arg0; }
#pragma warning restore CA1062 #pragma warning restore IDE0079 internal static UnaryExpressionSlim Make(ExpressionType nodeType, ExpressionSlim operand, MethodInfoSlim method, TypeSlim type) { if (type == s_typeMissing) { if (method == null) { return(new UntypedUnaryExpressionSlim(nodeType, operand)); } else { return(new MethodBasedUntypedUnaryExpressionSlim(nodeType, operand, method)); } } else { if (method == null) { return(new TypedUnaryExpressionSlim(nodeType, operand, type)); } else { return(new MethodBasedTypedUnaryExpressionSlim(nodeType, operand, type, method)); } } }
public static MethodCallExpressionSlim Call(MethodInfoSlim method) { Require(method, nameof(method)); return(new StaticMethodCallExpressionSlim0(method)); }
#pragma warning disable IDE0079 // Remove unnecessary suppression. internal MethodCallExpressionSlim(MethodInfoSlim method) { Method = method; }
public static ReadOnlyCollection <TypeSlim> GetGenericArguments(this MethodInfoSlim m) { var g = (GenericMethodInfoSlim)m; return(g.GenericArguments); }