Exemple #1
0
        public CodeFeatureStateCodeSwitch(ICodeFeatureStateCache cache)
        {
            _cache = cache;

            _evaluated = new CodeSwitchEvaluatedObservable <TFeature>();
            _enabled   = new Lazy <bool>(Evaluate);
        }
Exemple #2
0
        public ContextFeatureStateCodeSwitch(ICodeFeatureStateCache cache,
                                             IContextFeatureStateCache <TContext> contextCache, TContext context)
        {
            _cache        = cache;
            _contextCache = contextCache;
            _context      = context;

            _evaluated = new CodeSwitchEvaluatedObservable <TFeature>();
            _enabled   = new Lazy <bool>(Evaluate);
        }
Exemple #3
0
 public DateRangeCodeSwitch(bool switchEnabled, DateTime?enabledFrom, DateTime?enabledTo,
                            CurrentTimeProvider currentTimeProvider)
 {
     _switchEnabled       = switchEnabled;
     _enabledFrom         = enabledFrom;
     _enabledTo           = enabledTo;
     _currentTimeProvider = currentTimeProvider;
     _evaluated           = new CodeSwitchEvaluatedObservable <TFeature>();
     _enabled             = new Lazy <bool>(Evaluate);
 }
 public EnabledCodeSwitch()
 {
     _evaluated = new CodeSwitchEvaluatedObservable <TFeature>();
 }
Exemple #5
0
 public EnabledForAuthenticatedIdentityCodeSwitch()
 {
     _evaluated = new CodeSwitchEvaluatedObservable <TFeature>();
     _enabled   = new Lazy <bool>(Evaluate);
 }
 public EnabledForThreadPrincipalInRoleCodeSwitch(string role)
 {
     _role      = role;
     _evaluated = new CodeSwitchEvaluatedObservable <TFeature>();
     _enabled   = new Lazy <bool>(Evaluate);
 }
 public ToggleCodeSwitch(IToggleSwitchState <TFeature> toggleSwitchState)
 {
     _toggleSwitchState = toggleSwitchState;
     _evaluated         = new CodeSwitchEvaluatedObservable <TFeature>();
     _enabled           = new Lazy <bool>(Evaluate);
 }