/// <inheritdoc />
        public async Task <bool?> GetAsync(string featureName)
        {
            if (_featureEnumParser.TryParse(featureName, true, out TFeature feature))
            {
                return(await _sessionManager.GetAsync(feature).ConfigureAwait(false));
            }

            return(null);
        }
예제 #2
0
        /// <inheritdoc cref="EvaluateAsync(FeatureFilterEvaluationContext{TFeature}, TContext)" />
        public async Task <bool> EvaluateAsync(FeatureFilterEvaluationContext context, TContext appContext)
        {
            if (_featureEnumParser.TryParse(context.FeatureName, true, out TFeature feature))
            {
                return(await EvaluateAsync(new FeatureFilterEvaluationContext <TFeature>
                {
                    Feature = feature,
                    Parameters = context.Parameters
                }, appContext).ConfigureAwait(false));
            }

            return(false);
        }