示例#1
0
        public IncludeExpressionVisitor(
            [NotNull] ISelectExpressionFactory selectExpressionFactory,
            [NotNull] IMaterializerFactory materializerFactory,
            [NotNull] ICommandBuilderFactory commandBuilderFactory,
            [NotNull] IRelationalAnnotationProvider relationalAnnotationProvider,
            [NotNull] ISqlQueryGeneratorFactory sqlQueryGeneratorFactory,
            [NotNull] IQuerySource querySource,
            [NotNull] IReadOnlyList <INavigation> navigationPath,
            [NotNull] RelationalQueryCompilationContext queryCompilationContext,
            [NotNull] IReadOnlyList <int> queryIndexes,
            bool querySourceRequiresTracking)
        {
            Check.NotNull(selectExpressionFactory, nameof(selectExpressionFactory));
            Check.NotNull(materializerFactory, nameof(materializerFactory));
            Check.NotNull(commandBuilderFactory, nameof(commandBuilderFactory));
            Check.NotNull(relationalAnnotationProvider, nameof(relationalAnnotationProvider));
            Check.NotNull(sqlQueryGeneratorFactory, nameof(sqlQueryGeneratorFactory));
            Check.NotNull(querySource, nameof(querySource));
            Check.NotNull(navigationPath, nameof(navigationPath));
            Check.NotNull(queryCompilationContext, nameof(queryCompilationContext));
            Check.NotNull(queryIndexes, nameof(queryIndexes));

            _selectExpressionFactory      = selectExpressionFactory;
            _materializerFactory          = materializerFactory;
            _commandBuilderFactory        = commandBuilderFactory;
            _relationalAnnotationProvider = relationalAnnotationProvider;
            _sqlQueryGeneratorFactory     = sqlQueryGeneratorFactory;
            _querySource                 = querySource;
            _navigationPath              = navigationPath;
            _queryCompilationContext     = queryCompilationContext;
            _queryIndexes                = queryIndexes;
            _querySourceRequiresTracking = querySourceRequiresTracking;
        }
        public IncludeExpressionVisitor(
            [NotNull] ISelectExpressionFactory selectExpressionFactory,
            [NotNull] IMaterializerFactory materializerFactory,
            [NotNull] ICommandBuilderFactory commandBuilderFactory,
            [NotNull] IRelationalAnnotationProvider relationalAnnotationProvider,
            [NotNull] ISqlQueryGeneratorFactory sqlQueryGeneratorFactory,
            [NotNull] IQuerySource querySource,
            [NotNull] IReadOnlyList<INavigation> navigationPath,
            [NotNull] RelationalQueryCompilationContext queryCompilationContext,
            [NotNull] IReadOnlyList<int> queryIndexes,
            bool querySourceRequiresTracking)
        {
            Check.NotNull(selectExpressionFactory, nameof(selectExpressionFactory));
            Check.NotNull(materializerFactory, nameof(materializerFactory));
            Check.NotNull(commandBuilderFactory, nameof(commandBuilderFactory));
            Check.NotNull(relationalAnnotationProvider, nameof(relationalAnnotationProvider));
            Check.NotNull(sqlQueryGeneratorFactory, nameof(sqlQueryGeneratorFactory));
            Check.NotNull(querySource, nameof(querySource));
            Check.NotNull(navigationPath, nameof(navigationPath));
            Check.NotNull(queryCompilationContext, nameof(queryCompilationContext));
            Check.NotNull(queryIndexes, nameof(queryIndexes));

            _selectExpressionFactory = selectExpressionFactory;
            _materializerFactory = materializerFactory;
            _commandBuilderFactory = commandBuilderFactory;
            _relationalAnnotationProvider = relationalAnnotationProvider;
            _sqlQueryGeneratorFactory = sqlQueryGeneratorFactory;
            _querySource = querySource;
            _navigationPath = navigationPath;
            _queryCompilationContext = queryCompilationContext;
            _queryIndexes = queryIndexes;
            _querySourceRequiresTracking = querySourceRequiresTracking;
        }
示例#3
0
        public RelationalEntityQueryableExpressionVisitor(
            [NotNull] IModel model,
            [NotNull] IKeyValueFactorySource keyValueFactorySource,
            [NotNull] ISelectExpressionFactory selectExpressionFactory,
            [NotNull] IMaterializerFactory materializerFactory,
            [NotNull] ICommandBuilderFactory commandBuilderFactory,
            [NotNull] IRelationalAnnotationProvider relationalAnnotationProvider,
            [NotNull] RelationalQueryModelVisitor queryModelVisitor,
            [CanBeNull] IQuerySource querySource)
            : base(Check.NotNull(queryModelVisitor, nameof(queryModelVisitor)))
        {
            Check.NotNull(model, nameof(model));
            Check.NotNull(keyValueFactorySource, nameof(keyValueFactorySource));
            Check.NotNull(selectExpressionFactory, nameof(selectExpressionFactory));
            Check.NotNull(materializerFactory, nameof(materializerFactory));
            Check.NotNull(commandBuilderFactory, nameof(commandBuilderFactory));
            Check.NotNull(relationalAnnotationProvider, nameof(relationalAnnotationProvider));

            _model = model;
            _keyValueFactorySource        = keyValueFactorySource;
            _selectExpressionFactory      = selectExpressionFactory;
            _materializerFactory          = materializerFactory;
            _commandBuilderFactory        = commandBuilderFactory;
            _relationalAnnotationProvider = relationalAnnotationProvider;
            _querySource = querySource;
        }
 public GherkinFileGitPollingSynchronizerFactory(IGherkinFileRepository gherkinFileRepository, ICommandBuilderFactory commandBuilderFactory, IBoundaryFactory boundaryFactory, IBoundary boundary, ILogger logger, ITimeService timeService)
 {
     this.gherkinFileRepository = gherkinFileRepository;
     this.commandBuilderFactory = commandBuilderFactory;
     this.boundaryFactory = boundaryFactory;
     this.boundary = boundary;
     this.logger = logger;
     this.timeService = timeService;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="CommandBuilderManager"/> class.
        /// </summary>
        /// <param name="serviceProvider">A reference to the currently scoped service provider.</param>
        /// <param name="connector">A reference to the current database connection.</param>
        /// <param name="descriptor">A table type descriptor.</param>
        /// <exception cref="System.Exception">Couldn't create a Command Builder Factory.</exception>
        public CommandBuilderManager(IServiceProvider serviceProvider, IDatabaseConnector connector, ITableTypeDescriptor descriptor)
        {
            this.Factory = serviceProvider.GetServiceIfAvailable(connector.GetCommandBuilderFactory) ?? throw new Exception("Couldn't create a Command Builder Factory.");

            this._selectOneCommandBuilder    = new Lazy <ISelectOneCommandBuilder>(() => this.Factory.CreateSelectOneCommandBuilder(descriptor), true);
            this._selectCommandBuilder       = new Lazy <ISelectCommandBuilder>(() => this.Factory.CreateSelectCommandBuilder(descriptor), true);
            this._insertCommandBuilder       = new Lazy <IInsertCommandBuilder>(() => this.Factory.CreateInsertCommandBuilder(descriptor), true);
            this._updateCommandBuilder       = new Lazy <IUpdateCommandBuilder>(() => this.Factory.CreateUpdateCommandBuilder(descriptor), true);
            this._deleteCommandBuilder       = new Lazy <IDeleteCommandBuilder>(() => this.Factory.CreateDeleteCommandBuilder(descriptor), true);
            this._lastInsertIdCommandBuilder = new Lazy <ILastInsertIdCommandBuilder>(() => this.Factory.CreateLastInsertIdCommandBuilder(), true);
        }
        public IncludeExpressionVisitorFactory(
            [NotNull] ISelectExpressionFactory selectExpressionFactory,
            [NotNull] IMaterializerFactory materializerFactory,
            [NotNull] ICommandBuilderFactory commandBuilderFactory,
            [NotNull] IRelationalAnnotationProvider relationalAnnotationProvider,
            [NotNull] ISqlQueryGeneratorFactory sqlQueryGeneratorFactory)
        {
            Check.NotNull(selectExpressionFactory, nameof(selectExpressionFactory));
            Check.NotNull(materializerFactory, nameof(materializerFactory));
            Check.NotNull(commandBuilderFactory, nameof(commandBuilderFactory));
            Check.NotNull(relationalAnnotationProvider, nameof(relationalAnnotationProvider));
            Check.NotNull(sqlQueryGeneratorFactory, nameof(sqlQueryGeneratorFactory));

            _selectExpressionFactory = selectExpressionFactory;
            _materializerFactory = materializerFactory;
            _commandBuilderFactory = commandBuilderFactory;
            _relationalAnnotationProvider = relationalAnnotationProvider;
            _sqlQueryGeneratorFactory = sqlQueryGeneratorFactory;
        }
示例#7
0
        public IncludeExpressionVisitorFactory(
            [NotNull] ISelectExpressionFactory selectExpressionFactory,
            [NotNull] IMaterializerFactory materializerFactory,
            [NotNull] ICommandBuilderFactory commandBuilderFactory,
            [NotNull] IRelationalAnnotationProvider relationalAnnotationProvider,
            [NotNull] ISqlQueryGeneratorFactory sqlQueryGeneratorFactory)
        {
            Check.NotNull(selectExpressionFactory, nameof(selectExpressionFactory));
            Check.NotNull(materializerFactory, nameof(materializerFactory));
            Check.NotNull(commandBuilderFactory, nameof(commandBuilderFactory));
            Check.NotNull(relationalAnnotationProvider, nameof(relationalAnnotationProvider));
            Check.NotNull(sqlQueryGeneratorFactory, nameof(sqlQueryGeneratorFactory));

            _selectExpressionFactory      = selectExpressionFactory;
            _materializerFactory          = materializerFactory;
            _commandBuilderFactory        = commandBuilderFactory;
            _relationalAnnotationProvider = relationalAnnotationProvider;
            _sqlQueryGeneratorFactory     = sqlQueryGeneratorFactory;
        }
        public RelationalEntityQueryableExpressionVisitorFactory(
            [NotNull] IModel model,
            [NotNull] IKeyValueFactorySource keyValueFactorySource,
            [NotNull] ISelectExpressionFactory selectExpressionFactory,
            [NotNull] IMaterializerFactory materializerFactory,
            [NotNull] ICommandBuilderFactory commandBuilderFactory,
            [NotNull] IRelationalAnnotationProvider relationalAnnotationProvider)
        {
            Check.NotNull(model, nameof(model));
            Check.NotNull(keyValueFactorySource, nameof(keyValueFactorySource));
            Check.NotNull(selectExpressionFactory, nameof(selectExpressionFactory));
            Check.NotNull(materializerFactory, nameof(materializerFactory));
            Check.NotNull(commandBuilderFactory, nameof(commandBuilderFactory));
            Check.NotNull(relationalAnnotationProvider, nameof(relationalAnnotationProvider));

            _model = model;
            _keyValueFactorySource = keyValueFactorySource;
            _selectExpressionFactory = selectExpressionFactory;
            _materializerFactory = materializerFactory;
            _commandBuilderFactory = commandBuilderFactory;
            _relationalAnnotationProvider = relationalAnnotationProvider;
        }
示例#9
0
        public RelationalEntityQueryableExpressionVisitorFactory(
            [NotNull] IModel model,
            [NotNull] IEntityKeyFactorySource entityKeyFactorySource,
            [NotNull] ISelectExpressionFactory selectExpressionFactory,
            [NotNull] IMaterializerFactory materializerFactory,
            [NotNull] ICommandBuilderFactory commandBuilderFactory,
            [NotNull] IRelationalAnnotationProvider relationalAnnotationProvider)
        {
            Check.NotNull(model, nameof(model));
            Check.NotNull(entityKeyFactorySource, nameof(entityKeyFactorySource));
            Check.NotNull(selectExpressionFactory, nameof(selectExpressionFactory));
            Check.NotNull(materializerFactory, nameof(materializerFactory));
            Check.NotNull(commandBuilderFactory, nameof(commandBuilderFactory));
            Check.NotNull(relationalAnnotationProvider, nameof(relationalAnnotationProvider));

            _model = model;
            _entityKeyFactorySource       = entityKeyFactorySource;
            _selectExpressionFactory      = selectExpressionFactory;
            _materializerFactory          = materializerFactory;
            _commandBuilderFactory        = commandBuilderFactory;
            _relationalAnnotationProvider = relationalAnnotationProvider;
        }