public object Provide(object context) { InvokeMethod invoke = InvokeMethodInstance == null ? new InvokeMethod() : InvokeMethodInstance; if (TargetProvider != null) { invoke.TargetObject = TargetProvider.Provide(context); } if (MethodNameProvider != null) { invoke.MethodName = MethodNameProvider.Provide(context); } if (ArgumentProviders != null) { object[] args = new object[ArgumentProviders.Length]; for (int i = 0; i < ArgumentProviders.Length; i++) { args[i] = ArgumentProviders[i].Provide(context); } invoke.Arguments = args; } return(invoke.Provide(context)); }
public DynamicInvokeMethod(InvokeMethod invokeMethodInstance) { InvokeMethodInstance = invokeMethodInstance; }