コード例 #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();
                }
            }
        }
コード例 #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();
                }
            }
        }