private T CallRunCreationService <T>(Func <IRunCreationService, T> call) { RunCreationServiceClient client = ClientFactory.CreateClient <RunCreationServiceClient, IRunCreationService>(); try { return(call(client)); } finally { try { client.Close(); } catch (Exception) { client.Abort(); } } }
private void CallRunCreationService(Action <IRunCreationService> call) { RunCreationServiceClient client = ClientFactory.CreateClient <RunCreationServiceClient, IRunCreationService>(); try { call(client); } finally { try { client.Close(); } catch (Exception) { client.Abort(); } } }