Ejemplo n.º 1
0
        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();
                }
            }
        }
Ejemplo n.º 2
0
        private void CallRunCreationService(Action <IRunCreationService> call)
        {
            RunCreationServiceClient client = ClientFactory.CreateClient <RunCreationServiceClient, IRunCreationService>();

            try {
                call(client);
            } finally {
                try {
                    client.Close();
                } catch (Exception) {
                    client.Abort();
                }
            }
        }