Example #1
0
        public SubFeatureToggle GetSubFeature(string subFeatureName, IJsonTogglerSection jsonTogglerSection)
        {
            var subFeature = this.SubFeatureToggles.FirstOrDefault(w => w.Name == subFeatureName || w.Name == subFeatureName.Replace("_", " ") || w.Name == subFeatureName.Replace("_", " ").SplitCamelCase(" "));

            if (subFeature == null)
            {
                throw new NoNullAllowedException(string.Format("SubFeature is null for '{0}'", subFeatureName));
            }

            if (jsonTogglerSection != null)
            {
                var updatedSubFeature = new SubFeatureToggle(jsonTogglerSection);
                updatedSubFeature.Name                 = subFeature.Name;
                updatedSubFeature.Environment          = subFeature.Environment;
                updatedSubFeature.Platform             = subFeature.Platform;
                updatedSubFeature.Command              = subFeature.Command;
                updatedSubFeature.CommandType          = subFeature.CommandType;
                updatedSubFeature.ConnectionStringName = subFeature.ConnectionStringName;
                updatedSubFeature.FilterValues         = subFeature.FilterValues;
                updatedSubFeature.SpecificEntities     = subFeature.SpecificEntities;

                subFeature = updatedSubFeature;
            }

            return(subFeature);
        }
Example #2
0
 public SubFeatureToggle SubFeature_3(IJsonTogglerSection jsonTogglerSection)
 {
     return(GetSubFeature(jsonTogglerSection));
 }
Example #3
0
 public BasicFeature(IJsonTogglerSection jsonTogglerSection) : base(jsonTogglerSection)
 {
 }
 public DateTime_Feature(IJsonTogglerSection jsonTogglerSection)
     : base(jsonTogglerSection)
 {
 }
Example #5
0
 public SQL_Feature(IJsonTogglerSection jsonTogglerSection)
     : base(jsonTogglerSection)
 {
 }
Example #6
0
 public SubFeatureToggle(IJsonTogglerSection jsonTogglerSection)
     : this(jsonTogglerSection.Platform, jsonTogglerSection.Environment, jsonTogglerSection.IsTestMode, jsonTogglerSection.Applications.ToSplitList())
 {
 }
Example #7
0
 public SubFeatureToggle  SubFeature_3(IJsonTogglerSection jsonTogglerSection)
 {
     return(base.GetSubFeature("SubFeature 3", jsonTogglerSection));
 }
Example #8
0
 public ApplicationAllFeature(IJsonTogglerSection jsonTogglerSection) : base(jsonTogglerSection)
 {
 }
Example #9
0
 public FilterFeature(IJsonTogglerSection jsonTogglerSection) : base(jsonTogglerSection)
 {
 }
Example #10
0
 public EntitySpecificFeature(IJsonTogglerSection jsonTogglerSection) : base(jsonTogglerSection)
 {
 }
Example #11
0
        public SubFeatureToggle GetSubFeature(IJsonTogglerSection jsonTogglerSection = null)
        {
            var methodName = new System.Diagnostics.StackFrame(1).GetMethod().Name;

            return(this.GetSubFeature(methodName, jsonTogglerSection));
        }