public CallFormula(Formula instance, MethodInfo mi, Formula[] arguments) : base() { Instance = instance; Method = mi.ToMethodDecl(); arguments.AddRangeTo(Arguments); }
public static IMethodCallFormulaRef Call(MethodInfo method, params IFormulaRef[] arguments) { if (!method.IsStatic) throw new ArgumentException("The parameter must be static method.", TypeSavable.GetName(() => method)); Required.NotDefault(method, () => method); Required.NotDefault(arguments, () => arguments); return Call(default(IFormulaRef), method.ToMethodDecl(), new Collection<IFormulaRef>(arguments), method.ReturnType.ToTypeDecl(), null); }
public static IMethodCallFormulaRef Call(IFormulaRef instance, MethodInfo method, params IFormulaRef[] arguments) { if (instance == null) { return Call(method, arguments); } else { Required.NotDefault(method, () => method); Required.NotDefault(arguments, () => arguments); return Call(instance, method.ToMethodDecl(), new Collection<IFormulaRef>(arguments), method.ReturnType.ToTypeDecl(), null); } }
public static MethodCallFormula Call(Formula instance, MethodInfo method, IEnumerable<Formula> arguments) { return Call(instance, method.ToMethodDecl(), new ReadOnlyCollection<Formula>(arguments.ToArray())); }
public static MethodCallFormula Call(Formula instance, MethodInfo method, ReadOnlyCollection<Formula> arguments) { return Call(instance, method.ToMethodDecl(), arguments); }