Hi,
I am using some delegates to help me perform some async processing as follows:
Action<object> executeCircuitAction = ExecuteCircuit;
this.CircuitBreaker.Execute(executeCircuitAction, o);
Then the Execute call maps to
public object Execute(Delegate operation, params object[] args)
of which the invoke bit is below
result = operation.DynamicInvoke(args);
What I want to do is remove the object and replace a generic.
I have tried this
public T Execute<T,T1>(Delegate operation, params T1[] args)
Which binds nicely to
string xmlResponse = base.CircuitBreaker.Execute<string, IWebServiceConfig>(executeCircuitAction, base.WebServiceConfig);
but I then get an error of course with
result = operation.DynamicInvoke(args);
Does anyone know how this could be coded correctly.
Thanks
I am using some delegates to help me perform some async processing as follows:
Action<object> executeCircuitAction = ExecuteCircuit;
this.CircuitBreaker.Execute(executeCircuitAction, o);
Then the Execute call maps to
public object Execute(Delegate operation, params object[] args)
of which the invoke bit is below
result = operation.DynamicInvoke(args);
What I want to do is remove the object and replace a generic.
I have tried this
public T Execute<T,T1>(Delegate operation, params T1[] args)
Which binds nicely to
string xmlResponse = base.CircuitBreaker.Execute<string, IWebServiceConfig>(executeCircuitAction, base.WebServiceConfig);
but I then get an error of course with
result = operation.DynamicInvoke(args);
Does anyone know how this could be coded correctly.
Thanks