Beispiel #1
0
 public DomainObjectStateRuntime(IDomainObject domainObject, EventsourceDIContext diContext,
                                 IStateEventMapping mapper, EventSourceConfiguration config)
 {
     this.domainObject  = domainObject;
     this.diContext     = diContext;
     stateToEventMapper = mapper;
 }
Beispiel #2
0
        public void ApplyConfig(EventSourceConfiguration configuration, EventsourceDIContext diContext,
                                IStateEventMapping eventMapping, IDomainObjectRepository repo)
        {
            stateRuntime = new DomainObjectStateRuntime(this, diContext, eventMapping, configuration);

            domainObjectRepository = repo;
        }
Beispiel #3
0
        protected DomainObjectRepositoryBase(EventSourceConfiguration configuration,
                                             IImmediateConventionDenormalizerPipeline denormalizerPipeline, EventsourceDIContext diContext,
                                             IStateEventMapping eventMapping, ILoggerFactory loggerFactory)
        {
            Precondition.For(configuration, nameof(configuration))
            .NotNull("Configuration for domainobject repository must not be null!");
            this.denormalizerPipeline = denormalizerPipeline;
            this.configuration        = configuration;
            this.eventMapping         = eventMapping;
            this.diContext            = diContext;

            if (loggerFactory != null)
            {
                logger = loggerFactory.CreateLogger(GetType());
            }
            else
            {
                logger = new NoopLogger();
            }
        }
 public DomainObjectStateRuntime(IDomainObject domainObject, EventSourceConfiguration config)
 {
     this.domainObject  = domainObject;
     activator          = config.StateActivator;
     stateToEventMapper = config.StateToEventMapper;
 }