예제 #1
0
 public EventDispatcher(
     MessageBus messageBus,
     IDomainLogger domainLogger)
 {
     _domainLogger = domainLogger;
     _messageBus   = messageBus;
 }
예제 #2
0
 public UserController(
     Database database,
     MessageBus messageBus,
     IDomainLogger domainLogger)
 {
     _database        = database;
     _eventDispatcher = new EventDispatcher(
         messageBus, domainLogger);
 }
예제 #3
0
 public UserController(
     Transaction transaction,
     MessageBus messageBus,
     IDomainLogger domainLogger)
 {
     _transaction       = transaction;
     _userRepository    = new UserRepository(transaction);
     _companyRepository = new CompanyRepository(transaction);
     _eventDispatcher   = new EventDispatcher(
         messageBus, domainLogger);
 }
예제 #4
0
 public UserController(
     CrmContext context,
     MessageBus messageBus,
     IDomainLogger domainLogger)
 {
     _context           = context;
     _userRepository    = new UserRepository(context);
     _companyRepository = new CompanyRepository(context);
     _eventDispatcher   = new EventDispatcher(
         messageBus, domainLogger);
 }
예제 #5
0
 public LogInterceptor(IDomainLogger logger)
 {
     _logger = logger;
 }
예제 #6
0
 public CommandBus(IDomainLogger domainLogger)
 {
     this.domainLogger = domainLogger;
 }
예제 #7
0
 private string Execute(Func <UserController, string> func, MessageBus messageBus, IDomainLogger logger)
 {
     using (var context = new CrmContext(ConnectionString))
     {
         var controller = new UserController(context, messageBus, logger);
         return(func(controller));
     }
 }
예제 #8
0
 public StandaloneTester()
 {
     _domainLogger = new DomainLogger(Environment.TickCount, Guid.NewGuid());
 }