Example #1
0
        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);
        }
Example #2
0
 private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress()
 {
     return(Teacher_ServiceClient.GetEndpointAddress(EndpointConfiguration.Teacher_Service));
 }
Example #3
0
 private static System.ServiceModel.Channels.Binding GetDefaultBinding()
 {
     return(Teacher_ServiceClient.GetBindingForEndpoint(EndpointConfiguration.Teacher_Service));
 }
Example #4
0
 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);
 }
Example #5
0
 public Teacher_ServiceClient(EndpointConfiguration endpointConfiguration) :
     base(Teacher_ServiceClient.GetBindingForEndpoint(endpointConfiguration), Teacher_ServiceClient.GetEndpointAddress(endpointConfiguration))
 {
     this.Endpoint.Name = endpointConfiguration.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
Example #6
0
 public Teacher_ServiceClient() :
     base(Teacher_ServiceClient.GetDefaultBinding(), Teacher_ServiceClient.GetDefaultEndpointAddress())
 {
     this.Endpoint.Name = EndpointConfiguration.Teacher_Service.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }