public UserProjection( IEventRepository eventRepository, IEventListener eventListener, IQueryModelRepository queryModelRepository, IProjectionMetadataRepository projectionMetadataRepository) : base(ProjectionId, eventRepository, eventListener, queryModelRepository, projectionMetadataRepository) { projectionMetadataRepository.InitializeProjection(ProjectionId, this.GetType().Name); }
protected Projection( Guid projectionId, IEventRepository eventRepository, IEventListener eventListener, IQueryModelRepository queryModelRepository, IProjectionMetadataRepository projectionMetadataRepository) { _projectionId = projectionId; _eventRepository = eventRepository ?? throw new ArgumentNullException(nameof(eventRepository)); _eventListener = eventListener ?? throw new ArgumentNullException(nameof(eventListener)); QueryModelRepository = queryModelRepository ?? throw new ArgumentNullException(nameof(queryModelRepository)); _projectionMetadataRepository = projectionMetadataRepository ?? throw new ArgumentNullException(nameof(projectionMetadataRepository)); _eventHandlers = new Dictionary <Type, Func <object, QueryModelStore, Task> >(); }
public QueryModelStore( IQueryModelRepository queryModelRepository, IProjectionMetadataRepository projectionMetadataRepository, long eventOffset, Guid projectionId) { if (queryModelRepository == null) { throw new ArgumentNullException(nameof(queryModelRepository)); } if (projectionMetadataRepository == null) { throw new ArgumentNullException(nameof(projectionMetadataRepository)); } _queryModelRepository = queryModelRepository; _projectionMetadataRepository = projectionMetadataRepository; _eventOffset = eventOffset; _projectionId = projectionId; }