Example #1
0
 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);
     }
 }
Example #2
0
 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);
     }
 }
Example #3
0
 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);
     }
 }