public FormatBlockValueAccessEvaluator([NotNull] IDataSourceAccessValidator dataSourceAccessValidator, [NotNull] IDataSourceFieldInfoProvider dataSourceFieldInfoProvider, [NotNull] IQueryEntityNamePropertyTypeNameResolver queryEntityNamePropertyTypeNameResolver, [NotNull] IQueryVariableNameBuilder queryVariableNameBuilder) { if (dataSourceAccessValidator == null) { throw new ArgumentNullException(nameof(dataSourceAccessValidator)); } if (dataSourceFieldInfoProvider == null) { throw new ArgumentNullException(nameof(dataSourceFieldInfoProvider)); } if (queryEntityNamePropertyTypeNameResolver == null) { throw new ArgumentNullException(nameof(queryEntityNamePropertyTypeNameResolver)); } if (queryVariableNameBuilder == null) { throw new ArgumentNullException(nameof(queryVariableNameBuilder)); } _dataSourceAccessValidator = dataSourceAccessValidator; _dataSourceFieldInfoProvider = dataSourceFieldInfoProvider; _queryEntityNamePropertyTypeNameResolver = queryEntityNamePropertyTypeNameResolver; _queryVariableNameBuilder = queryVariableNameBuilder; }
public void SetUp() { _dataSourceFieldAccessValidator = new Mock <IDataSourceFieldAccessValidator>(); _tableColumnsRepository = new Mock <ITableColumnsRepository>(); _target = new DataSourceFieldInfoProvider( _dataSourceFieldAccessValidator.Object, _tableColumnsRepository.Object); }
public GetDataSourceFieldsQueryHandler([NotNull] IDataSourceFieldInfoProvider dataSourceFieldInfoProvider, [NotNull] IUserPrincipal userPrincipal) { if (dataSourceFieldInfoProvider == null) { throw new ArgumentNullException(nameof(dataSourceFieldInfoProvider)); } if (userPrincipal == null) { throw new ArgumentNullException(nameof(userPrincipal)); } _dataSourceFieldInfoProvider = dataSourceFieldInfoProvider; _userPrincipal = userPrincipal; }
public DslDataQueryEvaluator([NotNull] IDataSourceFieldInfoProvider dataSourceFieldInfoProvider, [NotNull] IDataSourceInfoProvider dataSourceInfoProvider, [NotNull] IQueryEntityNameTranslator queryEntityNameTranslator, [NotNull] IQueryProjectRestrictor queryProjectRestrictor, [NotNull] IQueryVariableNameBuilder queryVariableNameBuilder, [NotNull] IFormatBlockValueAccessEvaluator formatBlockValueAccessEvaluator) { if (dataSourceFieldInfoProvider == null) { throw new ArgumentNullException(nameof(dataSourceFieldInfoProvider)); } if (dataSourceInfoProvider == null) { throw new ArgumentNullException(nameof(dataSourceInfoProvider)); } if (queryEntityNameTranslator == null) { throw new ArgumentNullException(nameof(queryEntityNameTranslator)); } if (queryProjectRestrictor == null) { throw new ArgumentNullException(nameof(queryProjectRestrictor)); } if (queryVariableNameBuilder == null) { throw new ArgumentNullException(nameof(queryVariableNameBuilder)); } if (formatBlockValueAccessEvaluator == null) { throw new ArgumentNullException(nameof(formatBlockValueAccessEvaluator)); } _dataSourceFieldInfoProvider = dataSourceFieldInfoProvider; _dataSourceInfoProvider = dataSourceInfoProvider; _queryEntityNameTranslator = queryEntityNameTranslator; _queryProjectRestrictor = queryProjectRestrictor; _queryVariableNameBuilder = queryVariableNameBuilder; _formatBlockValueAccessEvaluator = formatBlockValueAccessEvaluator; }