View difference between Paste ID: 8jii24JV and
SHOW:
|
|
- or go back to the newest paste.
1 | public static class WSGateway | |
2 | { | |
3 | private static WSHttpBinding binding; | |
4 | private static EndpointAddress endpointAddress; | |
5 | ||
6 | static WSGateway() | |
7 | { | |
8 | var readerQuotas = new XmlDictionaryReaderQuotas() | |
9 | { | |
10 | MaxDepth = 6000000, | |
11 | MaxStringContentLength = 6000000, | |
12 | MaxArrayLength = 6000000, | |
13 | MaxBytesPerRead = 6000000, | |
14 | MaxNameTableCharCount = 6000000 | |
15 | }; | |
16 | binding = new WSHttpBinding(SecurityMode.None) {MaxReceivedMessageSize = 6000000, ReaderQuotas = readerQuotas}; | |
17 | ||
18 | endpointAddress = new EndpointAddress("http://machine:28666/DBInteractionGateway.svc"); | |
19 | } | |
20 | public static DBInteractionGatewayClient MR_WebService | |
21 | { | |
22 | get | |
23 | { | |
24 | return new DBInteractionGatewayClient(binding, endpointAddress); | |
25 | } | |
26 | } | |
27 | public static void ExecuteCommand(Action<DBInteractionGatewayClient> command) | |
28 | { | |
29 | var ws = MR_WebService; | |
30 | command.Invoke(ws); | |
31 | ws.Close(); | |
32 | } | |
33 | } | |
34 | ||
35 |