コード例 #1
0
        public async Task <EisppServiceClient> Connect()
        {
            BasicHttpBinding myBinding = new BasicHttpBinding();

            myBinding.SendTimeout            = new TimeSpan(0, 2, 30);
            myBinding.MaxReceivedMessageSize = int.MaxValue;
            myBinding.MaxBufferSize          = int.MaxValue;
            myBinding.MaxBufferPoolSize      = int.MaxValue;
            myBinding.ReaderQuotas           = System.Xml.XmlDictionaryReaderQuotas.Max;

            EndpointAddress myEndpoint = new EndpointAddress(configuration.GetValue <string>("EISPP:Endpoint"));

            EisppServiceClient serviceClient = new EisppServiceClient(myBinding, myEndpoint);

            try
            {
                await serviceClient.OpenAsync();

                return(serviceClient);
            }
            catch (Exception ex)
            {
                logger.LogError(ex, "Error while opening EISPP proxy client");
                return(null);
            }
        }
コード例 #2
0
ファイル: Reference.cs プロジェクト: governmentbg/eiss-2020
 public EisppServiceClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) :
     base(EisppServiceClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress)
 {
     this.Endpoint.Name = endpointConfiguration.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
コード例 #3
0
ファイル: Reference.cs プロジェクト: governmentbg/eiss-2020
 public EisppServiceClient(EndpointConfiguration endpointConfiguration) :
     base(EisppServiceClient.GetBindingForEndpoint(endpointConfiguration), EisppServiceClient.GetEndpointAddress(endpointConfiguration))
 {
     this.Endpoint.Name = endpointConfiguration.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
コード例 #4
0
ファイル: Reference.cs プロジェクト: governmentbg/eiss-2020
 public EisppServiceClient() :
     base(EisppServiceClient.GetDefaultBinding(), EisppServiceClient.GetDefaultEndpointAddress())
 {
     this.Endpoint.Name = EndpointConfiguration.BasicHttpBinding_IEisppService.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
コード例 #5
0
ファイル: Reference.cs プロジェクト: governmentbg/eiss-2020
 private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress()
 {
     return(EisppServiceClient.GetEndpointAddress(EndpointConfiguration.BasicHttpBinding_IEisppService));
 }
コード例 #6
0
ファイル: Reference.cs プロジェクト: governmentbg/eiss-2020
 private static System.ServiceModel.Channels.Binding GetDefaultBinding()
 {
     return(EisppServiceClient.GetBindingForEndpoint(EndpointConfiguration.BasicHttpBinding_IEisppService));
 }