Beispiel #1
0
        public FeatureFlagState OrRule(FeatureFlagState p1, FeatureFlagState p2)
        {
            var or = new OrRule {
                Rules = new Rule[] { new ConstantRule {
                                         Value = p1
                                     }, new ConstantRule {
                                         Value = p2
                                     } }
            };

            return(or.Evaluate(null));
        }
        public FeatureFlagState Override(bool?a1, FeatureFlagState a2)
        {
            var p = new DynamicFeatureFlagStateEvaluator(null, new FeatureRulesDefinition()
            {
                OverrideValue = a1, ContextualRules = new [] { new ConstantRule()
                                                               {
                                                                   Value = a2
                                                               } }
            });

            return(p.Evaluate(null));
        }
Beispiel #3
0
 public ConstantFeatureFlagStateEvaluator(string key, FeatureFlagState state)
 {
     Key   = key;
     State = state;
 }
Beispiel #4
0
 public StaticFeatureFlag(string name, FeatureFlagState state)
 {
     Name  = name;
     State = state;
 }
Beispiel #5
0
 public ConstantFeatureFlagStateEvaluator(FeatureFlagState state)
 {
     State = state;
 }