public RequestTogglOnContextMiddleware(RequestDelegate next, ILogger <RequestTogglOnContextMiddleware> logger, ITogglOnClient client, ITogglOnContextAccessor togglOnContextAccessor)
        {
            _next   = next;
            _logger = logger;
            _client = client;
            _togglOnContextAccessor = togglOnContextAccessor;

            _namespace      = _togglOnContextAccessor.TogglOnContext?.Namespace;
            _environment    = _togglOnContextAccessor.TogglOnContext?.Environment;
            _featureGroups  = _togglOnContextAccessor.TogglOnContext?.FeatureGroups;
            _featureToggles = _togglOnContextAccessor.TogglOnContext?.FeatureToggles;
        }
 public FeatureToggleEvaluator(ITogglOnClient client, ITogglOnContextAccessor togglOnContextAccessor, IHttpContextAccessor httpContextAccessor)
 {
     _client = client;
     _togglOnContextAccessor = togglOnContextAccessor;
     _httpContextAccessor    = httpContextAccessor;
 }
Ejemplo n.º 3
0
 public TogglOnInitializer(ITogglOnClient client, ITogglOnContextAccessor togglOnContextAccessor)
 {
     _client = client ?? throw new ArgumentNullException(nameof(client));
     _togglOnContextAccessor = togglOnContextAccessor ?? throw new ArgumentNullException(nameof(togglOnContextAccessor));
 }