Пример #1
0
 public BaseRequest(string apptoken, string appkey, TReqModel reqModel)
 {
     req          = new BaseRequestModel();
     ecClient     = new EcClient();
     req.appKey   = appkey;
     req.appToken = apptoken;
     try
     {
         req.paramsJson = JsonConvert.SerializeObject(reqModel);;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Пример #2
0
 private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress()
 {
     return(EcClient.GetEndpointAddress(EndpointConfiguration.EcSOAP));
 }
Пример #3
0
 private static System.ServiceModel.Channels.Binding GetDefaultBinding()
 {
     return(EcClient.GetBindingForEndpoint(EndpointConfiguration.EcSOAP));
 }
Пример #4
0
 public EcClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) :
     base(EcClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress)
 {
     this.Endpoint.Name = endpointConfiguration.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
Пример #5
0
 public EcClient(EndpointConfiguration endpointConfiguration) :
     base(EcClient.GetBindingForEndpoint(endpointConfiguration), EcClient.GetEndpointAddress(endpointConfiguration))
 {
     this.Endpoint.Name = endpointConfiguration.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
Пример #6
0
 public EcClient() :
     base(EcClient.GetDefaultBinding(), EcClient.GetDefaultEndpointAddress())
 {
     this.Endpoint.Name = EndpointConfiguration.EcSOAP.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }