public TestStepsIndexing(IEntityIndexer entityIndexer, Func <ITestStepIndexingSagaData> data,
                          IEntityTypeProvider entityTypesProvider, Action <ITestStepIndexingSagaData> onComplete,
                          Action <TestStepQuery> sendQuery, IActivityLogger logger, Action <TestStepDTO, IEntityIndexer> indexMethod)
     : base(entityIndexer, data, entityTypesProvider, onComplete, sendQuery, logger, "testStep")
 {
     _indexMethod = indexMethod;
 }
            public SqlCommandGenerateContext Build()
            {
                var parser = new DefaultCommandParser();

                this.context.QueryAttributes = this.context.Method.GetCustomAttributes <SqlAttribute>();

                this.context.HasAnyQueryAttribute = this.context.QueryAttributes != null && this.context.QueryAttributes.Any();

                if (!this.context.HasAnyQueryAttribute)
                {
                    this.context.CommandInfo = parser.Parse(this.context.Method.Name);
                }

                this.context.IDaoType = this.context.Method.DeclaringType;

                IEntityTypeProvider entityTypeProvider = NpiServicesCollection.GetService <IEntityTypeProvider>();

                this.context.EntityType = entityTypeProvider.Provide(this.context.Method);

                ITableNameProvider tableNameProvider = NpiServicesCollection.GetService <ITableNameProvider>();

                this.context.TableName = tableNameProvider.Provide(this.context.EntityType);

                this.context.Properties = this.context.EntityType.GetProperties();


                return(this.context);
            }
        public ContextQueryPlanBuilder(IDocumentIndexProvider documentIndexProvider, IDocumentIdFactory documentIdFactory, AccountName accountName, IProfileReadonly profile, IEntityTypeProvider entityTypeProvider)
		{
			_documentIndexProvider = documentIndexProvider;
			_documentIdFactory = documentIdFactory;
            _accountName = accountName;
			_profile = profile;
			_entityTypeProvider = entityTypeProvider;
		}
Пример #4
0
 public ContextQueryPlanBuilder(IDocumentIndexProvider documentIndexProvider, IDocumentIdFactory documentIdFactory, AccountName accountName, IProfileReadonly profile, IEntityTypeProvider entityTypeProvider)
 {
     _documentIndexProvider = documentIndexProvider;
     _documentIdFactory     = documentIdFactory;
     _accountName           = accountName;
     _profile            = profile;
     _entityTypeProvider = entityTypeProvider;
 }
Пример #5
0
 public PlaylistContext(DbContextOptions <PlaylistContext> options,
                        ITenantProvider tenantProvider,
                        IEntityTypeProvider entityTypeProvider)
     : base(options)
 {
     _tenantId           = tenantProvider.GetTenantId();
     _entityTypeProvider = entityTypeProvider;
 }
 public ContextQueryPlanBuilder(IDocumentIndexProvider documentIndexProvider, IIndexDataFactory indexDataFactory, IPluginContext pluginContext, IProfileReadonly profile, IEntityTypeProvider entityTypeProvider, IEnumerable <IContextQueryPlanBuilder> planBuilders)
 {
     _documentIndexProvider = documentIndexProvider;
     _indexDataFactory      = indexDataFactory;
     _pluginContext         = pluginContext;
     _profile            = profile;
     _entityTypeProvider = entityTypeProvider;
     _planBuilders       = planBuilders;
 }
 public SearcherPluginUpdatedProfileInitializationSaga(IEntityTypeProvider entityTypeProvider, IPluginContext pluginContext, ISagaPersister sagaPersister, IProfileReadonly profile, IDocumentIndexProvider documentIndexProvider, IActivityLogger log)
 {
     _entityTypeProvider    = entityTypeProvider;
     _pluginContext         = pluginContext;
     _sagaPersister         = sagaPersister;
     _profile               = profile;
     _documentIndexProvider = documentIndexProvider;
     _log = log;
 }
		public QueryPlanBuilder(IPluginContext pluginContext, IProfileReadonly profile, IDocumentIndexProvider documentIndexProvider, IEntityTypeProvider entityTypeProvider, IDocumentIdFactory documentIdFactory)
		{
			_accountName = pluginContext.AccountName;
			_profile = profile;
			_documentIndexProvider = documentIndexProvider;
			_entityTypeProvider = entityTypeProvider;
			_documentIdFactory = documentIdFactory;
			_contextQueryPlanBuilder = new ContextQueryPlanBuilder(_documentIndexProvider, _documentIdFactory, pluginContext.AccountName, _profile, _entityTypeProvider);
		}
		public ContextQueryPlanBuilder(IDocumentIndexProvider documentIndexProvider, IIndexDataFactory indexDataFactory, IPluginContext pluginContext, IProfileReadonly profile, IEntityTypeProvider entityTypeProvider, IEnumerable<IContextQueryPlanBuilder> planBuilders)
		{
			_documentIndexProvider = documentIndexProvider;
			_indexDataFactory = indexDataFactory;
			_pluginContext = pluginContext;
			_profile = profile;
			_entityTypeProvider = entityTypeProvider;
			_planBuilders = planBuilders;
		}
 public QueryPlanBuilder(IPluginContext pluginContext, IProfileReadonly profile, IDocumentIndexProvider documentIndexProvider, IEntityTypeProvider entityTypeProvider, IIndexDataFactory indexDataFactory, ContextQueryPlanBuilder contextQueryPlanBuilder)
 {
     _pluginContext = pluginContext;
     _profile = profile;
     _documentIndexProvider = documentIndexProvider;
     _entityTypeProvider = entityTypeProvider;
     _indexDataFactory = indexDataFactory;
     _contextQueryPlanBuilder = contextQueryPlanBuilder;
 }
Пример #11
0
 public ApplicationDbContext(
     DbContextOptions <ApplicationDbContext> options,
     ITenantProvider tenantProvider,
     IEntityTypeProvider entityTypeProvider)
     : base(options)
 {
     _teanantId          = tenantProvider.GetTenantId();
     _entityTypeProvider = entityTypeProvider;
 }
 public QueryPlanBuilder(IPluginContext pluginContext, IProfileReadonly profile, IDocumentIndexProvider documentIndexProvider, IEntityTypeProvider entityTypeProvider, IIndexDataFactory indexDataFactory, ContextQueryPlanBuilder contextQueryPlanBuilder)
 {
     _pluginContext           = pluginContext;
     _profile                 = profile;
     _documentIndexProvider   = documentIndexProvider;
     _entityTypeProvider      = entityTypeProvider;
     _indexDataFactory        = indexDataFactory;
     _contextQueryPlanBuilder = contextQueryPlanBuilder;
 }
 public QueryPlanBuilder(IPluginContext pluginContext, IProfileReadonly profile, IDocumentIndexProvider documentIndexProvider, IEntityTypeProvider entityTypeProvider, IDocumentIdFactory documentIdFactory)
 {
     _accountName             = pluginContext.AccountName;
     _profile                 = profile;
     _documentIndexProvider   = documentIndexProvider;
     _entityTypeProvider      = entityTypeProvider;
     _documentIdFactory       = documentIdFactory;
     _contextQueryPlanBuilder = new ContextQueryPlanBuilder(_documentIndexProvider, _documentIdFactory, pluginContext.AccountName, _profile, _entityTypeProvider);
 }
 public IndexExistingEntitiesSaga(IEntityIndexer entityIndexer, ISagaPersister sagaPersister, IEntityTypeProvider entityTypesProvider, IDocumentIndexProvider documentIndexProvider, IPluginContext pluginContext, IActivityLogger logger)
 {
     _entityIndexer         = entityIndexer;
     _sagaPersister         = sagaPersister;
     _entityTypesProvider   = entityTypesProvider;
     _documentIndexProvider = documentIndexProvider;
     _pluginContext         = pluginContext;
     _logger = logger;
 }
Пример #15
0
 protected IndexAlgorithm(IEntityIndexer entityIndexer, Func <TSagaData> data, IEntityTypeProvider entityTypesProvider, Action <TSagaData> onComplete, Action <TQuery> sendQuery, IActivityLogger logger, string entityName)
 {
     _entityIndexer       = entityIndexer;
     _data                = data;
     _entityTypesProvider = entityTypesProvider;
     _onComplete          = onComplete;
     _sendQuery           = sendQuery;
     _logger              = logger;
     _entityName          = entityName;
 }
Пример #16
0
 public ProjectProcessChangedSaga(IEntityIndexer entityIndexer, IEntityTypeProvider entityTypesProvider, IActivityLogger logger)
 {
     _logger = logger;
     _assignablesIndexing = new AssignablesIndexing(entityIndexer, () => Data, entityTypesProvider, d => MarkAsComplete(), q
                                                    =>
     {
         q.ProjectId = Data.ProjectId;
         Send(q);
     }, _logger);
 }
Пример #17
0
 public EntityIndexer(DocumentFactory documentFactory, ILocalBus localBus, IProfileReadonly profile, IPluginContext pluginContext, IDocumentIdFactory documentIdFactory, IDocumentIndexProvider documentIndexProvider, IEntityTypeProvider entityTypeProvider, IActivityLogger log)
 {
     _documentFactory       = documentFactory;
     _localBus              = localBus;
     _profile               = profile;
     _pluginContext         = pluginContext;
     _documentIdFactory     = documentIdFactory;
     _documentIndexProvider = documentIndexProvider;
     _entityTypeProvider    = entityTypeProvider;
     _log            = log;
     _textOperations = new TextOperations();
 }
 public GeneralProjectChangedSaga(IEntityIndexer entityIndexer, IEntityTypeProvider entityTypesProvider, IActivityLogger logger)
 {
     _entityIndexer       = entityIndexer;
     _entityTypesProvider = entityTypesProvider;
     _logger           = logger;
     _commentsIndexing = new CommentsIndexing(_entityIndexer, () => Data, _entityTypesProvider, d => MarkAsComplete(),
                                              q =>
     {
         q.GeneralId = Data.GeneralId;
         Send(q);
     }
                                              , _logger, (dto, indexer) => indexer.UpdateCommentIndex(dto, new List <CommentField>(), Maybe.Return(Data.ProjectId), Maybe.Nothing, DocumentIndexOptimizeSetup.NoOptimize));
 }
Пример #19
0
        public AppDbContext(IServiceProvider serviceProvider)
        {
            _shellSettings       = serviceProvider.GetRequiredService <ShellSettings>();
            _entityManager       = serviceProvider.GetRequiredService <IEntityTypeProvider>();
            _dbMigrator          = serviceProvider.GetRequiredService <AppDbMigrator>();
            _appDbContextOptions = serviceProvider.GetRequiredService <AppDbContextOptions>();

            if (_shellSettings.Name == "Default")
            {
                if (_shellSettings.TablePrefix == null && _shellSettings.ConnectionString == null && _shellSettings.DatabaseProvider == null)
                {
                    _shellSettings.TablePrefix      = _appDbContextOptions?.TablePrefix;
                    _shellSettings.ConnectionString = _appDbContextOptions?.ConnectionString;
                    _shellSettings.DatabaseProvider = _appDbContextOptions?.DatabaseProvider;
                }
            }
        }
Пример #20
0
 public IndexExistingEntitiesSaga(IEntityIndexer entityIndexer, IEntityTypeProvider entityTypesProvider, IDocumentIndexProvider documentIndexProvider, IPluginContext pluginContext, IActivityLogger logger, SagaServices sagaServices)
 {
     _documentIndexProvider = documentIndexProvider;
     _pluginContext         = pluginContext;
     _logger                 = logger;
     _sagaServices           = sagaServices;
     _generalsIndexing       = new GeneralsIndexing(entityIndexer, () => Data, entityTypesProvider, d => _assignablesIndexing.Start(), q => Send(q), _logger);
     _assignablesIndexing    = new AssignablesIndexing(entityIndexer, () => Data, entityTypesProvider, d => _testStepsIndexing.Start(), q => Send(q), _logger);
     _testStepsIndexing      = new TestStepsIndexing(entityIndexer, () => Data, entityTypesProvider, d => _impedimentsIndexing.Start(), q => Send(q), _logger, (dto, indexer) => indexer.AddTestStepIndex(dto, DocumentIndexOptimizeSetup.NoOptimize));
     _impedimentsIndexing    = new ImpedimentsIndexing(entityIndexer, () => Data, entityTypesProvider, d => _releaseProjectIndexing.Start(), q => Send(q), _logger);
     _releaseProjectIndexing = new ReleaseProjectIndexing(entityIndexer, () => Data, entityTypesProvider, d => _commentsIndexing.Start(), q => Send(q), _logger);
     _commentsIndexing       = new CommentsIndexing(entityIndexer, () => Data, entityTypesProvider, d =>
     {
         SendLocal(new IndexExistingEntitiesDoneLocalMessage {
             SagaId = Data.OuterSagaId
         });
         MarkAsComplete();
     }, q => Send(q), _logger, (dto, indexer) => indexer.AddCommentIndex(dto, DocumentIndexOptimizeSetup.NoOptimize));
 }
 public SearcherPluginProfileInitializationSaga(IEntityTypeProvider entityTypeProvider, IProfileReadonly profileReadonly, IActivityLogger log)
 {
     _entityTypeProvider = entityTypeProvider;
     _profileReadonly    = profileReadonly;
     _log = log;
 }
Пример #22
0
 public TestCasesIndexing(IEntityIndexer entityIndexer, Func <IndexExistingEntitiesSagaData> data, IEntityTypeProvider entityTypesProvider, Action <IndexExistingEntitiesSagaData> onComplete, Action <QueryBase> sendQuery, IActivityLogger logger)
     : base(entityIndexer, data, entityTypesProvider, onComplete, sendQuery, logger, "testCase")
 {
 }
Пример #23
0
 public AssignablesIndexing(IEntityIndexer entityIndexer, Func <IAssignableIndexingSagaData> data, IEntityTypeProvider entityTypesProvider, Action <IAssignableIndexingSagaData> onComplete, Action <AssignableQuery> sendQuery, IActivityLogger logger)
     : base(entityIndexer, data, entityTypesProvider, onComplete, sendQuery, logger, "assignable")
 {
 }
 public CommentsIndexing(IEntityIndexer entityIndexer, Func <ICommentIndexingSagaData> data, IEntityTypeProvider entityTypesProvider, Action <ICommentIndexingSagaData> onComplete, Action <CommentQuery> sendQuery, IActivityLogger logger, Action <CommentDTO, IEntityIndexer> indexMethod)
     : base(entityIndexer, data, entityTypesProvider, onComplete, sendQuery, logger, "comment")
 {
     _indexMethod = indexMethod;
 }