Example #1
0
        /// <summary>
        /// Can be overrided in a derived class to control how this is implemented. By default, will retrieve a feature and run a foreach with all the activation strategies
        /// </summary>
        /// <param name="featureId">Required id of the feature</param>
        /// <param name="context">Optional context</param>
        /// <returns>Boolean indicating if the feature is considered enabled</returns>
        protected virtual bool IsFeatureEnabledCore(string featureId, IFeatureContext context)
        {
            if (string.IsNullOrWhiteSpace(featureId))
            {
                throw new ArgumentNullException(featureId);
            }

            var feature = _featureStore.GetFeatureById(featureId);

            return(IsFeatureEnabledCore(feature, context));
        }