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

            domainObjectRepository = repo;
        }
示例#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;
 }