Пример #1
0
 private static bool ConnectToLicenseServer(ref string license, string product, string productversion, string productbuild, string productSerial, string ipAddress, string macAddress, string allMacAddress, string hdSerial, string osVersion)
 {
     // send request to License server
     try
     {
         var eltService = new EltekLicenseServiceClient();
         // license = eltService.GetLicense(product, productversion, productbuild, CUSTOMER, productSerial, Environment.UserName, Environment.MachineName, ipAddress, macAddress, hdSerial, osVersion);
         license = eltService.GetLicenseVer2Async(product, productversion, productbuild, CUSTOMER, productSerial, Environment.UserName, Environment.MachineName, ipAddress, macAddress, allMacAddress, hdSerial, osVersion).Result;
         return(true);
     }
     catch (Exception)
     {
         license = string.Empty;
         return(false);
     }
 }
Пример #2
0
 public EltekLicenseServiceClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) :
     base(EltekLicenseServiceClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress)
 {
     this.Endpoint.Name = endpointConfiguration.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
Пример #3
0
 public EltekLicenseServiceClient(EndpointConfiguration endpointConfiguration) :
     base(EltekLicenseServiceClient.GetBindingForEndpoint(endpointConfiguration), EltekLicenseServiceClient.GetEndpointAddress(endpointConfiguration))
 {
     this.Endpoint.Name = endpointConfiguration.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
Пример #4
0
 public EltekLicenseServiceClient() :
     base(EltekLicenseServiceClient.GetDefaultBinding(), EltekLicenseServiceClient.GetDefaultEndpointAddress())
 {
     this.Endpoint.Name = EndpointConfiguration.BasicHttpBinding_IEltekLicenseService.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
Пример #5
0
 private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress()
 {
     return(EltekLicenseServiceClient.GetEndpointAddress(EndpointConfiguration.BasicHttpBinding_IEltekLicenseService));
 }
Пример #6
0
 private static System.ServiceModel.Channels.Binding GetDefaultBinding()
 {
     return(EltekLicenseServiceClient.GetBindingForEndpoint(EndpointConfiguration.BasicHttpBinding_IEltekLicenseService));
 }