Ejemplo n.º 1
0
        public CodeFeatureStateCodeSwitch(ICodeFeatureStateCache cache)
        {
            _cache = cache;

            _evaluated = new CodeSwitchEvaluatedObservable <TFeature>();
            _enabled   = new Lazy <bool>(Evaluate);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
 }
Ejemplo n.º 4
0
 public EnabledCodeSwitch()
 {
     _evaluated = new CodeSwitchEvaluatedObservable <TFeature>();
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 7
0
 public ToggleCodeSwitch(IToggleSwitchState <TFeature> toggleSwitchState)
 {
     _toggleSwitchState = toggleSwitchState;
     _evaluated         = new CodeSwitchEvaluatedObservable <TFeature>();
     _enabled           = new Lazy <bool>(Evaluate);
 }