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); } }
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); } }
public Task Invoke(ProjectionTrack projectionTrack) { return(projectionTrack.StoreProgress(_viewType, _page)); }
public Task Invoke(ProjectionTrack projectionTrack) { return projectionTrack.StoreProgress(_viewType, _page); }
public ProjectionTrackContext() { projection = Substitute.For<IProjection>(); projection.AsyncOptions.Returns(new AsyncOptions()); theProjectionTrack = new ProjectionTrack(theFetcher, Substitute.For<IDocumentStore>(), projection, Substitute.For<IDaemonLogger>(), new StubErrorHandler()); }
public Task Invoke(ProjectionTrack projectionTrack) { return projectionTrack.CachePage(_page); }
public Task Invoke(ProjectionTrack projectionTrack) { return(projectionTrack.CachePage(_page)); }