public async Task TryAsync(Func <T, Task> method, params string[] endPointNames) { using (ILifetimeScope scope = container.BeginLifetimeScope()) { IClientEvaluator <T> evaluator = scope.Resolve <IClientEvaluator <T> >(); await evaluator.TryAsync(method, endPointNames); } }
public void Try(Action <T> method, params string[] endPointNames) { using (ILifetimeScope scope = container.BeginLifetimeScope()) { IClientEvaluator <T> evaluator = scope.Resolve <IClientEvaluator <T> >(); evaluator.Try(method, endPointNames); } }
public TResult Try <TResult>(Func <T, TResult> method, params string[] endPointNames) { using (ILifetimeScope scope = container.BeginLifetimeScope()) { IClientEvaluator <T> evaluator = scope.Resolve <IClientEvaluator <T> >(); TResult result = evaluator.Try(method, endPointNames); return(result); } }