Revision 422c9598 trunk/Pithos.Core/PithosMonitor.cs

b/trunk/Pithos.Core/PithosMonitor.cs
171 171
            
172 172

  
173 173
            CloudClient=new CloudFilesClient(UserName,ApiKey);
174
            var proxy = ProxyFromSettings();            
174
            var proxy = ProxyFromSettings(Settings);            
175 175
            CloudClient.Proxy = proxy;
176 176
            CloudClient.UsePithos = true;
177 177
            CloudClient.AuthenticationUrl = this.AuthenticationUrl;            
......
227 227

  
228 228
        public string AuthenticationUrl { get; set; }
229 229

  
230
        private WebProxy ProxyFromSettings()
230
        //TODO: Move this method somewhere else
231
        public static WebProxy ProxyFromSettings(IPithosSettings pithosSettings)
231 232
        {            
232
            if (Settings.UseManualProxy)
233
            if (pithosSettings.UseManualProxy)
233 234
            {
234
                var proxy = new WebProxy(Settings.ProxyServer, Settings.ProxyPort);
235
                var proxy = new WebProxy(pithosSettings.ProxyServer, pithosSettings.ProxyPort);
235 236
                //If the proxy requires specific authentication settings, use them
236
                if (Settings.ProxyAuthentication)
237
                if (pithosSettings.ProxyAuthentication)
237 238
                {
238
                    proxy.Credentials=new NetworkCredential(Settings.ProxyUsername,Settings.ProxyPassword,Settings.ProxyDomain);
239
                    proxy.Credentials=new NetworkCredential(pithosSettings.ProxyUsername,pithosSettings.ProxyPassword,pithosSettings.ProxyDomain);
239 240
                }
240 241
                    //Otherwise, if there are generic authentication settings, use them
241 242
                if (!String.IsNullOrWhiteSpace(CredentialCache.DefaultNetworkCredentials.UserName))

Also available in: Unified diff