Пример #1
0
 public static void UpdateConfig(oAuthConfigBase config)
 {
     PortalController.UpdatePortalSetting(config.PortalID, config.Service + "_APIKey", config.APIKey);
     PortalController.UpdatePortalSetting(config.PortalID, config.Service + "_APISecret", config.APISecret);
     PortalController.UpdatePortalSetting(config.PortalID, config.Service + "_Enabled", config.Enabled.ToString(CultureInfo.InvariantCulture));
     PortalController.UpdatePortalSetting(config.PortalID, config.Service + "_SiteURL", config.SiteURL);
     ClearConfig(config.Service, config.PortalID);
 }
Пример #2
0
 public static void UpdateConfig(oAuthConfigBase config)
 {
     PortalController.UpdatePortalSetting(config.PortalID, config.Service + "_APIKey", config.APIKey);
     PortalController.UpdatePortalSetting(config.PortalID, config.Service + "_APISecret", config.APISecret);
     PortalController.UpdatePortalSetting(config.PortalID, config.Service + "_Enabled", config.Enabled.ToString(CultureInfo.InvariantCulture));
     PortalController.UpdatePortalSetting(config.PortalID, config.Service + "_SiteURL", config.SiteURL);
     ClearConfig(config.Service, config.PortalID);
 }
Пример #3
0
 public static oAuthConfigBase GetConfig(string service, int portalId)
 {
     string key = GetCacheKey(service, portalId);
     var config = (oAuthConfigBase)DataCache.GetCache(key);
     if (config == null)
     {
         config = new oAuthConfigBase(service, portalId);
         DataCache.SetCache(key, config);
     }
     return config;
 }
Пример #4
0
        public static oAuthConfigBase GetConfig(string service, int portalId)
        {
            string key    = GetCacheKey(service, portalId);
            var    config = (oAuthConfigBase)DataCache.GetCache(key);

            if (config == null)
            {
                config = new oAuthConfigBase(service, portalId);
                DataCache.SetCache(key, config);
            }
            return(config);
        }