public async Task <DelayResult> DelayService(int duration) { SlowServiceClient client = new SlowServiceClient(); var result = await client.DelayAsync(duration); return(new DelayResult { Result = result }); }
public SlowServiceClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : base(SlowServiceClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); }
public SlowServiceClient(EndpointConfiguration endpointConfiguration) : base(SlowServiceClient.GetBindingForEndpoint(endpointConfiguration), SlowServiceClient.GetEndpointAddress(endpointConfiguration)) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); }
public SlowServiceClient() : base(SlowServiceClient.GetDefaultBinding(), SlowServiceClient.GetDefaultEndpointAddress()) { this.Endpoint.Name = EndpointConfiguration.BasicHttpBinding_ISlowService.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); }
private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress() { return(SlowServiceClient.GetEndpointAddress(EndpointConfiguration.BasicHttpBinding_ISlowService)); }
private static System.ServiceModel.Channels.Binding GetDefaultBinding() { return(SlowServiceClient.GetBindingForEndpoint(EndpointConfiguration.BasicHttpBinding_ISlowService)); }