コード例 #1
0
        public FunctionalityToggler(IPermissionRepository permissionRepository, 
            IBackgroundTaskRegistrar backgroundTaskRegistrar, IApplicationRepository applicationRepository)
        {
            if (permissionRepository == null) throw new ArgumentNullException(nameof(permissionRepository));
            if (backgroundTaskRegistrar == null) throw new ArgumentNullException(nameof(backgroundTaskRegistrar));
            if (applicationRepository == null) throw new ArgumentNullException(nameof(applicationRepository));

            _permissionRepository = permissionRepository;
            _backgroundTaskRegistrar = backgroundTaskRegistrar;
            _applicationRepository = applicationRepository;
        }
コード例 #2
0
        public FunctionalityToggler(IPermissionRepository permissionRepository,
                                    IBackgroundTaskRegistrar backgroundTaskRegistrar, IApplicationRepository applicationRepository)
        {
            if (permissionRepository == null)
            {
                throw new ArgumentNullException(nameof(permissionRepository));
            }
            if (backgroundTaskRegistrar == null)
            {
                throw new ArgumentNullException(nameof(backgroundTaskRegistrar));
            }
            if (applicationRepository == null)
            {
                throw new ArgumentNullException(nameof(applicationRepository));
            }

            _permissionRepository    = permissionRepository;
            _backgroundTaskRegistrar = backgroundTaskRegistrar;
            _applicationRepository   = applicationRepository;
        }