示例#1
0
        public void ApplyConfig(EventSourceConfiguration configuration, EventsourceDIContext diContext,
                                IStateEventMapping eventMapping, IDomainObjectRepository repo)
        {
            stateRuntime = new DomainObjectStateRuntime(this, diContext, eventMapping, configuration);

            domainObjectRepository = repo;
        }
        protected EventSourcedControllerBase(ICommandBus bus, IDomainObjectRepository domainObjectRepository)
        {
            Precondition.For(() => bus).NotNull();

            CommandBus             = bus;
            DomainObjectRepository = domainObjectRepository;
        }
示例#3
0
 protected ProcessBase(ICommandBus commandBus, IDomainObjectRepository repository, ILoggerFactory factory)
 {
     processName = this.GetType().Name;
     logger      = factory.CreateLogger <ProcessBase <TCommand> >();
     CommandBus  = commandBus;
     Repository  = repository;
 }
 public PaymentRepository()
 {
     _domainObjectRepository = new DomainObjectRepository();
     _beneficiaryRepository  = new BeneficiaryRepository();
     _patientRepository      = new PatientRepository();
     _companionRepository    = new CompanionRepository();
     _payRateRepository      = new PayRateRepository();
 }
示例#5
0
        public ConventionCommandInvoker(IDomainObjectRepository repository, ILoggerFactory loggerFactory)
        {
            Precondition.For(() => repository).NotNull("Repository has to be set!");
            Precondition.For(() => loggerFactory).NotNull("loggerFactory has to be set!");

            logger          = loggerFactory.CreateLogger <ConventionCommandInvoker>();
            this.repository = repository;
        }
示例#6
0
        public AggregateHandler(
            IDomainObjectFactory domainObjectFactory,
            IDomainObjectRepository domainObjectRepository)
        {
            Guard.NotNull(domainObjectFactory, nameof(domainObjectFactory));
            Guard.NotNull(domainObjectRepository, nameof(domainObjectRepository));

            this.domainObjectFactory    = domainObjectFactory;
            this.domainObjectRepository = domainObjectRepository;
        }
示例#7
0
        public static InMemoryCommandBus CreateConventionCommandBus(IDomainObjectRepository repository,
                                                                    params Assembly[] domainObjectAssemblies)
        {
            Precondition.For(repository, nameof(repository)).NotNull();

            var invoker = new ConventionCommandInvoker(repository);
            var handler = new ConventionCommandPipeline(invoker, new DomainObjectLocator(), domainObjectAssemblies);
            var bus     = new InMemoryCommandBus(handler);

            return(bus);
        }
示例#8
0
        public static InMemoryCommandBus CreateConventionCommandBus(IDomainObjectRepository repository,
                                                                    ILoggerFactory loggerFactory,
                                                                    EventSourceConfiguration configuration)
        {
            Precondition.For(repository, nameof(repository)).NotNull();
            Precondition.For(loggerFactory, nameof(loggerFactory)).NotNull();
            Precondition.For(configuration, nameof(configuration)).NotNull();

            var logger = loggerFactory.CreateLogger <InMemoryCommandBus>();

            logger.LogInformation("Building InMemory CommandBus with convention based pipeline");

            var invoker = new ConventionCommandInvoker(repository, loggerFactory);
            var handler = new ConventionCommandPipeline(invoker, new DomainObjectLocator(), loggerFactory,
                                                        configuration.DomainObjectAssemblies);

            var bus = new InMemoryCommandBus(handler, loggerFactory);

            return(bus);
        }
示例#9
0
 private ConventionCommandPipeline GetSut(IDomainObjectRepository repo)
 {
     return(ConventionCommandPipeline.CreateDefault(repo, typeof(SampleDomainObject).GetTypeInfo().Assembly));
 }
示例#10
0
 public HospitalRepository()
 {
     _domainObjectRepository = new DomainObjectRepository();
 }
示例#11
0
 public CompanionHistoryRepository()
 {
     _domainObjectRepository = new DomainObjectRepository();
 }
示例#12
0
 public CustomersController(ICommandBus bus, IDomainObjectRepository repository, IMongoDatabase database)
 {
     this.bus        = bus;
     this.repository = repository;
     this.database   = database;
 }
 public BankRepository()
 {
     _domainObjectRepository = new DomainObjectRepository();
 }
        protected ConventionCommandInvoker GetSut(IDomainObjectRepository repo)
        {
            var sut = new ConventionCommandInvoker(repo, new NoopLoggerFactory());

            return(sut);
        }
示例#15
0
 public DoctorRepository()
 {
     _domainObjectRepository = new DomainObjectRepository();
 }
示例#16
0
 public ProjectionRebuilder(IDomainObjectRepository repo, IEventHandler eventHandler)
 {
     this.repo         = repo;
     this.eventHandler = eventHandler;
 }
示例#17
0
 public PatientHistoryRepository()
 {
     _domainObjectRepository = new DomainObjectRepository();
 }
 public ExceptionLoggerRepository()
 {
     _domainObjectRepository = new  DomainObjectRepository();
 }
示例#19
0
 public AgencyRepository()
 {
     _domainObjectRepository = new DomainObjectRepository();
 }
 public PayRateRepository()
 {
     _domainObjectRepository = new DomainObjectRepository();
 }
示例#21
0
 public BeneficiaryRepository()
 {
     _domainObjectRepository = new DomainObjectRepository();
 }
示例#22
0
 public BenutzerAnmeldungService(IDomainObjectRepository domainObjectRepository)
 {
     _domainObjectRepository = domainObjectRepository;
 }
 public UserManagmentRepository()
 {
     _domainObjectRepository = new DomainObjectRepository();
 }
示例#24
0
 public CompanionTypeRepository()
 {
     _domainObjectRepository = new DomainObjectRepository();
 }
示例#25
0
 protected ProcessBase(ICommandBus commandBus, IDomainObjectRepository repository)
 {
     CommandBus = commandBus;
     Repository = repository;
 }
 public CompanionManagmentRepository()
 {
     _domainObjectRepository = new DomainObjectRepository();
 }
示例#27
0
 public SpecialityRepository()
 {
     _domainObjectRepository = new DomainObjectRepository();
 }
示例#28
0
 public static ConventionCommandPipeline CreateDefault(IDomainObjectRepository repo,
                                                       ILoggerFactory loggerFactory, params Assembly[] asm)
 {
     return(new ConventionCommandPipeline(new ConventionCommandInvoker(repo, loggerFactory), new DomainObjectLocator(),
                                          loggerFactory, asm));
 }
示例#29
0
 public CustomersController(ICommandBus bus, IDomainObjectRepository repository)
 {
     this.bus        = bus;
     this.repository = repository;
 }
 public ConventionCommandInvoker(IDomainObjectRepository repository)
 {
     Precondition.For(() => repository).NotNull("Repository has to be set!");
     this.repository = repository;
 }