Ejemplo n.º 1
0
        /// <summary>
        /// Gets the proxy
        /// </summary>
        /// <param name="exchangeCode"></param>
        /// <returns></returns>
        public static TwitterProxy GetProxy()
        {
            if (_proxy == null)
            {
                var p = SecureStorage.GetEncryptedData<TwitterAPIParams>(SecuredDataKeys.TwitterAPI);
                NameValueCollection section = (NameValueCollection)ConfigurationManager.GetSection("CoinTNet");
                string baseUrl = string.Empty;
                if (section != null && section.Count > 0)
                {
                    baseUrl = section["twitter.APIBaseUrl"];
                }

                _proxy = new TwitterProxy(p.ConsumerKey, p.SecretKey, baseUrl);

            }
            return _proxy;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Notifies the factory that api key/secret have changed so that the proxy instance is reset
 /// </summary>
 public static void NotifySettingsChanged()
 {
     _proxy = null;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Notifies the factory that api key/secret have changed so that the proxy instance is reset
 /// </summary>
 public static void NotifySettingsChanged()
 {
     _proxy = null;
 }