Logo Search packages:      
Sourcecode: f-spot version File versions  Download package

FlickrNet::Flickr::Flickr (  )  [inline]

Constructor loads configuration settings from app.config or web.config file if they exist.

Definition at line 211 of file Flickr.cs.

References FlickrNet::FlickrConfigurationSettings::ApiKey, ApiKey, ApiSecret, FlickrNet::FlickrConfigurationSettings::ApiToken, ApiToken, FlickrNet::FlickrConfigurationSettings::CacheSize, CacheSizeLimit, CacheTimeout, FlickrNet::FlickrConfigurationSettings::CacheTimeout, FlickrNet::FlickrConfigurationSettings::IsProxyDefined, Proxy, FlickrNet::FlickrConfigurationSettings::ProxyDomain, FlickrNet::FlickrConfigurationSettings::ProxyIPAddress, FlickrNet::FlickrConfigurationSettings::ProxyPassword, FlickrNet::FlickrConfigurationSettings::ProxyPort, FlickrNet::FlickrConfigurationSettings::ProxyUsername, and FlickrNet::FlickrConfigurationSettings::SharedSecret.

            {
                  FlickrConfigurationSettings settings = FlickrConfigurationManager.Settings;
                  if( settings == null ) return;

                  if( settings.CacheSize != 0 ) CacheSizeLimit = settings.CacheSize;
                  if( settings.CacheTimeout != TimeSpan.MinValue ) CacheTimeout = settings.CacheTimeout;
                  ApiKey = settings.ApiKey;
                  ApiToken = settings.ApiToken;
                  ApiSecret = settings.SharedSecret;

                  if( settings.IsProxyDefined )
                  {
                        Proxy.Address = new Uri("http://" + settings.ProxyIPAddress + ":" + settings.ProxyPort);
                        if( settings.ProxyUsername != null && settings.ProxyUsername.Length > 0 )
                        {
                              NetworkCredential creds = new NetworkCredential();
                              creds.UserName = settings.ProxyUsername;
                              creds.Password = settings.ProxyPassword;
                              creds.Domain = settings.ProxyDomain;
                              Proxy.Credentials = creds;
                        }
                  }
            }


Generated by  Doxygen 1.6.0   Back to index