示例#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;
        }
 /// <summary>
 /// Notifies the factory that api key/secret have changed so that the proxy instance is reset
 /// </summary>
 public static void NotifySettingsChanged()
 {
     _proxy = null;
 }
示例#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;
 }