Line | |
---|
1 | using System; |
---|
2 | using System.Collections.Generic; |
---|
3 | using System.Text; |
---|
4 | |
---|
5 | using Com.Piwigo.Lib.DTO; |
---|
6 | using Com.Piwigo.Lib.Proxy; |
---|
7 | using Com.Piwigo.Lib.Proxy.Response; |
---|
8 | using Com.Piwigo.Lib.DTO.Helper; |
---|
9 | using Com.Piwigo.Lib.IService; |
---|
10 | |
---|
11 | namespace Com.Piwigo.Lib.Service |
---|
12 | { |
---|
13 | |
---|
14 | internal sealed class PwgSetupService : IPwgSetupService |
---|
15 | { |
---|
16 | /// <summary> |
---|
17 | /// Setting up proxy parameters |
---|
18 | /// </summary> |
---|
19 | /// <param name="PwgUserAgent"></param> |
---|
20 | /// <param name="PwgTimeOutInSecond"></param> |
---|
21 | /// <param name="serverURI"></param> |
---|
22 | /// <returns></returns> |
---|
23 | public void Setup(String PwgUserAgent, Int16? PwgTimeOutInSecond, Uri serverURI) |
---|
24 | { |
---|
25 | try |
---|
26 | { |
---|
27 | if (PwgUserAgent != null) |
---|
28 | { |
---|
29 | PwgConfigProxy.PwgUserAgent = PwgUserAgent; |
---|
30 | } |
---|
31 | |
---|
32 | if (PwgTimeOutInSecond.HasValue) |
---|
33 | { |
---|
34 | PwgConfigProxy.PwgTimeOutInSecond = PwgTimeOutInSecond.Value; |
---|
35 | } |
---|
36 | if (serverURI != null) |
---|
37 | { |
---|
38 | PwgConfigProxy.PwgServeurUri = serverURI; |
---|
39 | } |
---|
40 | } |
---|
41 | catch (PwgProxyException ex) |
---|
42 | { |
---|
43 | throw new PwgServiceException("Setup : a error is raised whn setting up PwgConfigProxy.", ex); |
---|
44 | } |
---|
45 | } |
---|
46 | } |
---|
47 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.