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));
 }
Пример #2
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));
 }