public override FeatureFlagState Evaluate(FeatureContext context)
 {
     return(Rules.ContextualRules.All(x => x.Evaluate(context) == FeatureFlagState.Active)
         ? FeatureFlagState.Active
         : FeatureFlagState.Inactive);
 }
Exemplo n.º 2
0
 public static bool IsActive(string featureKey, FeatureContext featureContext)
 {
     return(FeatureStore.GetFeature(featureKey).IsActive(featureContext));
 }
Exemplo n.º 3
0
 public void SetContext(FeatureContext context)
 {
     AsyncLocalFeatureContext.Value = context;
 }
Exemplo n.º 4
0
        public FeatureFlagState GetFeatureState(string featureKey, FeatureContext featureContext)
        {
            var v = Collection.Get(Prefix + featureKey);

            return(FeatureFlagEvaluatorUtils.Parse(v).Evaluate(featureContext));
        }