using System; using System.Collections.Generic; using System.Text; using Com.Piwigo.Lib.DTO; using Com.Piwigo.Lib.Proxy; using Com.Piwigo.Lib.Proxy.Response; using Com.Piwigo.Lib.DTO.Helper; using Com.Piwigo.Lib.IService; namespace Com.Piwigo.Lib.Service { internal sealed class PwgSetupService : IPwgSetupService { /// /// Setting up proxy parameters /// /// /// /// /// public void Setup(String PwgUserAgent, Int16? PwgTimeOutInSecond, Uri serverURI) { try { if (PwgUserAgent != null) { PwgConfigProxy.PwgUserAgent = PwgUserAgent; } if (PwgTimeOutInSecond.HasValue) { PwgConfigProxy.PwgTimeOutInSecond = PwgTimeOutInSecond.Value; } if (serverURI != null) { PwgConfigProxy.PwgServeurUri = serverURI; } } catch (PwgProxyException ex) { throw new PwgServiceException("Setup : a error is raised whn setting up PwgConfigProxy.", ex); } } } }