Exemple #1
0
 public override void ReadConfiguration()
 {
     foreach (var featureSwitch in featureDictionary)
     {
         FeatureSwitches.Add(featureSwitch.Key, new Feature()
         {
             Name = featureSwitch.Key, State = featureSwitch.Value
         });
     }
 }
        public static bool Enabled(FeatureSwitches featureSwitchToCheck, ICustomPrincipal customPrincipal)
        {
            if (IsOverrideFeatureSwitchSettingsUser(customPrincipal)) 
                return true;

            if (ConfigurationManager.AppSettings[featureSwitchToCheck.ToString()] == null)
                return true;

            if (ConfigurationManager.AppSettings[featureSwitchToCheck.ToString()] == "true")
                return true;

            if (ConfigurationManager.AppSettings[featureSwitchToCheck.ToString()] == "false")
                return false;

            return false;
        }
 public virtual bool FeatureSwitchEnabled(FeatureSwitches featureSwitch, ICustomPrincipal customPrincipal)
 {
     return FeatureSwitchChecker.Enabled(featureSwitch, customPrincipal);
 }