Пример #1
0
        public GetTogglesListCommand(IServiceToggleRepository serviceToggleRepository, IGlobalToggleRepository globalToggleRepository, IHierarchyRuleEvaluator ruleEvaluator, IMapper mapper, IHttpContextAccessor httpContextAccessor)
        {
            if (httpContextAccessor is null)
            {
                throw new ArgumentNullException(nameof(httpContextAccessor));
            }

            if (serviceToggleRepository is null)
            {
                throw new ArgumentNullException(nameof(serviceToggleRepository));
            }

            if (globalToggleRepository is null)
            {
                throw new ArgumentNullException(nameof(globalToggleRepository));
            }

            if (ruleEvaluator is null)
            {
                throw new ArgumentNullException(nameof(ruleEvaluator));
            }

            if (mapper is null)
            {
                throw new ArgumentNullException(nameof(mapper));
            }

            _serviceToggleRepository = serviceToggleRepository;
            _globalToggleRepository  = globalToggleRepository;
            _ruleEvaluator           = ruleEvaluator;
            _mapper = mapper;
            _httpContextAccessor = httpContextAccessor;
        }
Пример #2
0
        public DeleteServiceToggleCommand(IServiceToggleRepository serviceToggleRepository)
        {
            if (serviceToggleRepository is null)
            {
                throw new ArgumentNullException(nameof(serviceToggleRepository));
            }

            _serviceToggleRepository = serviceToggleRepository;
        }
Пример #3
0
        public PutServiceToggleCommand(IServiceToggleRepository serviceToggleRepository, IMapper mapper)
        {
            if (serviceToggleRepository is null)
            {
                throw new ArgumentNullException(nameof(serviceToggleRepository));
            }

            if (mapper is null)
            {
                throw new ArgumentNullException(nameof(mapper));
            }

            _serviceToggleRepository = serviceToggleRepository;
            _mapper = mapper;
        }
Пример #4
0
        public GetServiceToggleCommand(IActionContextAccessor actionContextAccessor, IServiceToggleRepository serviceToggleRepository, IMapper mapper)
        {
            if (actionContextAccessor is null)
            {
                throw new ArgumentNullException(nameof(actionContextAccessor));
            }

            if (serviceToggleRepository is null)
            {
                throw new ArgumentNullException(nameof(serviceToggleRepository));
            }

            if (mapper is null)
            {
                throw new ArgumentNullException(nameof(mapper));
            }

            _actionContextAccessor   = actionContextAccessor;
            _serviceToggleRepository = serviceToggleRepository;
            _mapper = mapper;
        }
Пример #5
0
        public GetServiceTogglesListByToggleIdCommand(IServiceToggleRepository serviceToggleRepository, IMapper mapper, IHttpContextAccessor httpContextAccessor)
        {
            if (httpContextAccessor is null)
            {
                throw new ArgumentNullException(nameof(httpContextAccessor));
            }

            if (serviceToggleRepository is null)
            {
                throw new ArgumentNullException(nameof(serviceToggleRepository));
            }

            if (mapper is null)
            {
                throw new ArgumentNullException(nameof(mapper));
            }

            _serviceToggleRepository = serviceToggleRepository;
            _mapper = mapper;
            _httpContextAccessor = httpContextAccessor;
        }