Пример #1
0
        ServiceReference1.SquareOptServiceClient getClient()
        {
            var timeSpan = new TimeSpan(0, 30, 0);

            var binding = new BasicHttpBinding();

            binding.Name           = "BasicHttpBinding_IService";
            binding.ReceiveTimeout = timeSpan;
            binding.SendTimeout    = timeSpan;
            binding.ReaderQuotas.MaxArrayLength = Int32.MaxValue;
            binding.MaxReceivedMessageSize      = Int32.MaxValue;

            /*
             * binding.MaxBufferSize = 2147483600;
             * binding.MaxBufferPoolSize = 2147483600;
             * binding.MaxReceivedMessageSize = 2147483600;
             * binding.ReaderQuotas.MaxBytesPerRead = 2147483600;
             * binding.ReaderQuotas.MaxDepth = 2147483600;
             * binding.ReaderQuotas.MaxNameTableCharCount = 2147483600;
             * binding.ReaderQuotas.MaxStringContentLength = 2147483600;
             */
            var address = new EndpointAddress(uri);

            var client = new ServiceReference1.SquareOptServiceClient(binding, address);

            return(client);
        }
Пример #2
0
        void refresh(ServiceReference1.SquareOptServiceClient client)
        {
            var docs = client.GetHeaders(companyCode, new DateTime(2017, 01, 01), DateTime.Now);

            bindingSource.DataSource = docs;
        }