상속: IProjectionTrack
예제 #1
0
        public Daemon(DocumentStore store, ITenant tenant, DaemonSettings settings, IDaemonLogger logger, IEnumerable <IProjection> projections)
        {
            _store  = store;
            _tenant = tenant;
            Logger  = logger;

            _errorHandler = new DaemonErrorHandler(this, logger, settings.ExceptionHandling);

            foreach (var projection in projections)
            {
                if (projection == null)
                {
                    throw new ArgumentOutOfRangeException(nameof(projection), $"No projection is configured");
                }

                var fetcher = new Fetcher(store, settings, projection, logger, _errorHandler);
                var track   = new ProjectionTrack(fetcher, store, projection, logger, _errorHandler, tenant);

                _tracks.Add(projection.ProjectedType(), track);
            }
        }
예제 #2
0
        public Daemon(IDocumentStore store, DaemonSettings settings, IDaemonLogger logger, IEnumerable <IProjection> projections)
        {
            _store = store;
            Logger = logger;

            _errorHandler = new DaemonErrorHandler(this, logger, settings.ExceptionHandling);

            foreach (var projection in projections)
            {
                if (projection == null)
                {
                    throw new ArgumentOutOfRangeException(nameof(projection),
                                                          $"No projection is configured for view type {projection.Produces.FullName}");
                }

                var fetcher = new Fetcher(store, settings, projection, logger, _errorHandler);
                var track   = new ProjectionTrack(fetcher, store, projection, logger, _errorHandler);

                _tracks.Add(projection.Produces, track);
            }
        }
예제 #3
0
 public Task Invoke(ProjectionTrack projectionTrack)
 {
     return(projectionTrack.StoreProgress(_viewType, _page));
 }
예제 #4
0
 public Task Invoke(ProjectionTrack projectionTrack)
 {
     return projectionTrack.StoreProgress(_viewType, _page);
 }
예제 #5
0
        public ProjectionTrackContext()
        {
            projection = Substitute.For<IProjection>();

            projection.AsyncOptions.Returns(new AsyncOptions());

            theProjectionTrack = new ProjectionTrack(theFetcher, Substitute.For<IDocumentStore>(), projection, Substitute.For<IDaemonLogger>(), new StubErrorHandler());



        }
예제 #6
0
 public Task Invoke(ProjectionTrack projectionTrack)
 {
     return projectionTrack.CachePage(_page);
 }
예제 #7
0
 public Task Invoke(ProjectionTrack projectionTrack)
 {
     return(projectionTrack.CachePage(_page));
 }