Exemple #1
0
 public WeatherServiceClient(EndpointConfiguration endpointConfiguration) :
     base(WeatherServiceClient.GetBindingForEndpoint(endpointConfiguration), WeatherServiceClient.GetEndpointAddress(endpointConfiguration))
 {
     this.Endpoint.Name = endpointConfiguration.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
 public IEnumerable<WeatherData> RelativeHumidity(GeoLocation location, DateTime start, DateTime end)
 {
     var client = new WeatherServiceClient();
     return GetEnumerableWeatherDataFromService(client.GetRelativeHumidity(location.Latitude, location.Longitude, start, end), temperatureItem.RelativeHumidity);
 }
Exemple #3
0
 public WeatherServiceClient() :
     base(WeatherServiceClient.GetDefaultBinding(), WeatherServiceClient.GetDefaultEndpointAddress())
 {
     this.Endpoint.Name = EndpointConfiguration.BasicHttpBinding_IWeatherService.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
Exemple #4
0
 private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress()
 {
     return(WeatherServiceClient.GetEndpointAddress(EndpointConfiguration.BasicHttpBinding_IWeatherService));
 }
Exemple #5
0
 private static System.ServiceModel.Channels.Binding GetDefaultBinding()
 {
     return(WeatherServiceClient.GetBindingForEndpoint(EndpointConfiguration.BasicHttpBinding_IWeatherService));
 }
Exemple #6
0
 public WeatherServiceClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) :
     base(WeatherServiceClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress)
 {
     this.Endpoint.Name = endpointConfiguration.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
Exemple #7
0
        public IEnumerable <WeatherData> RelativeHumidity(GeoLocation location, DateTime start, DateTime end)
        {
            var client = new WeatherServiceClient();

            return(GetEnumerableWeatherDataFromService(client.GetRelativeHumidity(location.Latitude, location.Longitude, start, end), temperatureItem.RelativeHumidity));
        }