Esempio n. 1
0
        public DataSourceAuthorityProvider(
            [NotNull] IDataSourceAuthorityNameBuilder dataSourceAuthorityNameBuilder,
            [NotNull] ITableRepository tableRepository)
        {
            if (dataSourceAuthorityNameBuilder == null)
            {
                throw new ArgumentNullException(nameof(dataSourceAuthorityNameBuilder));
            }
            if (tableRepository == null)
            {
                throw new ArgumentNullException(nameof(tableRepository));
            }

            _dataSourceAuthorityNameBuilder = dataSourceAuthorityNameBuilder;
            _tableRepository = tableRepository;
        }
        public DataSourceAccessValidator(
            [NotNull] IDataSourceAuthorityNameBuilder dataSourceAuthorityNameBuilder,
            [NotNull] ITableRepository tableRepository,
            [NotNull] IUserAuthorityValidator userAuthorityValidator)
        {
            if (dataSourceAuthorityNameBuilder == null)
            {
                throw new ArgumentNullException(nameof(dataSourceAuthorityNameBuilder));
            }
            if (tableRepository == null)
            {
                throw new ArgumentNullException(nameof(tableRepository));
            }
            if (userAuthorityValidator == null)
            {
                throw new ArgumentNullException(nameof(userAuthorityValidator));
            }

            _dataSourceAuthorityNameBuilder = dataSourceAuthorityNameBuilder;
            _tableRepository        = tableRepository;
            _userAuthorityValidator = userAuthorityValidator;
        }