Exemple #1
0
 protected ApplicationClient(DomainSchema domainSchema, ProjectionSchema projectionSchema, ICommandQueue commandQueue, IViewStore viewStore, ApplicationState homeState)
 {
     Domain        = domainSchema ?? throw new ArgumentNullException(nameof(domainSchema));
     Projection    = projectionSchema ?? throw new ArgumentNullException(nameof(projectionSchema));
     _commandQueue = commandQueue ?? throw new ArgumentNullException(nameof(commandQueue));
     _viewStore    = viewStore ?? throw new ArgumentNullException(nameof(viewStore));
     _currentState = homeState ?? throw new ArgumentNullException(nameof(homeState));
     _currentState.AttachToApplication(this, commandQueue, viewStore);
 }
Exemple #2
0
 public InMemoryEventBus(DomainSchema domainSchema, ILogger?logger = null)
 {
     _domainSchema = domainSchema ?? throw new ArgumentNullException(nameof(domainSchema));
     _logger       = logger;
 }
Exemple #3
0
 public InMemoryEventStore(DomainSchema domainSchema, ILogger <InMemoryEventStore>?logger = null)
 {
     _domainSchema = domainSchema ?? throw new ArgumentNullException(nameof(domainSchema));
     _logger       = logger;
     _bus          = new InMemoryEventBus(domainSchema, logger);
 }