public DataSourcesQueryHandler([NotNull] IDataSourceInfoProvider dataSourceInfoProvider,
                                       [NotNull] IUserPrincipal userPrincipal)
        {
            if (dataSourceInfoProvider == null)
            {
                throw new ArgumentNullException(nameof(dataSourceInfoProvider));
            }
            if (userPrincipal == null)
            {
                throw new ArgumentNullException(nameof(userPrincipal));
            }

            _dataSourceInfoProvider = dataSourceInfoProvider;
            _userPrincipal          = userPrincipal;
        }
Ejemplo n.º 2
0
        public QueryModelAccessValidator([NotNull] IDataSourceInfoProvider dataSourceInfoProvider,
                                         [NotNull] IDataSourceAccessValidator dataSourceAccessValidator,
                                         [NotNull] IUserPrincipal userPrincipal)
        {
            if (dataSourceInfoProvider == null)
            {
                throw new ArgumentNullException(nameof(dataSourceInfoProvider));
            }
            if (dataSourceAccessValidator == null)
            {
                throw new ArgumentNullException(nameof(dataSourceAccessValidator));
            }
            if (userPrincipal == null)
            {
                throw new ArgumentNullException(nameof(userPrincipal));
            }

            _dataSourceInfoProvider    = dataSourceInfoProvider;
            _dataSourceAccessValidator = dataSourceAccessValidator;
            _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;
        }
Ejemplo n.º 4
0
 public TagDataSourceProvider(IDataSourceInfoProvider dataSourceInfoProvider, IUserPrincipal userPrincipal)
 {
     _dataSourceInfoProvider = dataSourceInfoProvider;
     _userPrincipal          = userPrincipal;
 }