internal static Teacher_ServiceClient TeacherServiceClient(string AccountKey, string SubscriptionKey, AppSettings appSettings) { var serviceClient = new Teacher_ServiceClient(); serviceClient.Endpoint.EndpointBehaviors.Add(NewEndpointBehavior(AccountKey, SubscriptionKey)); //Change the service endpoint address according to which Environment we running on. ChangeServiceEndpointAddress(appSettings, serviceClient); return(serviceClient); }
private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress() { return(Teacher_ServiceClient.GetEndpointAddress(EndpointConfiguration.Teacher_Service)); }
private static System.ServiceModel.Channels.Binding GetDefaultBinding() { return(Teacher_ServiceClient.GetBindingForEndpoint(EndpointConfiguration.Teacher_Service)); }
public Teacher_ServiceClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : base(Teacher_ServiceClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); }
public Teacher_ServiceClient(EndpointConfiguration endpointConfiguration) : base(Teacher_ServiceClient.GetBindingForEndpoint(endpointConfiguration), Teacher_ServiceClient.GetEndpointAddress(endpointConfiguration)) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); }
public Teacher_ServiceClient() : base(Teacher_ServiceClient.GetDefaultBinding(), Teacher_ServiceClient.GetDefaultEndpointAddress()) { this.Endpoint.Name = EndpointConfiguration.Teacher_Service.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); }