Exemplo n.º 1
0
        public bool IsEnabled(string toggleName)
        {
            var feature     = _featureProvider.Get(toggleName);
            var currentUser = _userProvider.CurrentUser();

            return(feature?.IsEnabled(currentUser) ?? _defaultToggleSpecification.IsEnabled(currentUser, new Dictionary <string, string>()));
        }
Exemplo n.º 2
0
        public bool IsEnabled(string toggleName)
        {
            var currentUser = _userProvider.CurrentUser();

            foreach (var featureProvider in _featureProviders)
            {
                var feature = featureProvider.Get(toggleName);
                if (feature != null)
                {
                    return(feature.IsEnabled(currentUser));
                }
            }
            return(_defaultToggleSpecification.IsEnabled(currentUser, new Dictionary <string, string>()));
        }