public static void Run <T>(CachedChannelFactory <T> factory, TimeSpan?timeout, Action <T> methodToCall) { WcfUtils.Run <T, int>(factory, timeout, delegate(T service) { methodToCall(service); return(0); }); }
public TReturnType Execute <TReturnType>(CachedChannelFactory <TService> factory, TimeSpan?timeout, Func <TService, TReturnType> action) { TReturnType result; try { result = WcfUtils.Run <TService, TReturnType>(factory, timeout, action); } catch (Exception ex) { Exception ex2 = WcfExceptionTranslator <TService> .TranslateException(ex, new Func <Exception, Exception>(this.GenerateTransientException), new Func <Exception, Exception>(this.GeneratePermanentException)); if (ex2 != null) { throw ex2; } throw; } return(result); }