public override bool Evaluate(NodeElement conditionNode) { var featureName = conditionNode.GetAttribute("name"); if (String.IsNullOrEmpty(featureName)) { return(true); } return(FeatureSwitchService.IsFeatureEnabled(featureName) ?? true); }
public override bool Evaluate(NodeElement conditionNode) { var featureName = conditionNode.GetAttribute("name"); if (String.IsNullOrEmpty(featureName)) { return(true); } bool enabledByDefault = true; if (bool.TryParse(conditionNode.GetAttribute("optIn"), out bool optIn)) { enabledByDefault = !optIn; } return(FeatureSwitchService.IsFeatureEnabled(featureName) ?? enabledByDefault); }