コード例 #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));
        }
コード例 #2
0
        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));
        }
コード例 #3
0
 public ConstantFeatureFlagStateEvaluator(string key, FeatureFlagState state)
 {
     Key   = key;
     State = state;
 }
コード例 #4
0
 public StaticFeatureFlag(string name, FeatureFlagState state)
 {
     Name  = name;
     State = state;
 }
コード例 #5
0
 public ConstantFeatureFlagStateEvaluator(FeatureFlagState state)
 {
     State = state;
 }