Example #1
0
 private void Persist(IEventStoreAggregateId eventStoreAggregateId, IUserAggregate aggregate, IUserState state)
 {
     EventStore.AppendEvents(eventStoreAggregateId, ((IUserStateProperties)state).Version, aggregate.Changes, () => { StateRepository.Save(state); });
     if (AggregateEventListener != null)
     {
         AggregateEventListener.EventAppended(new AggregateEvent <IUserAggregate, IUserState>(aggregate, state, aggregate.Changes));
     }
 }
Example #2
0
 public WebMailController(IEmailAccountService emailAccountService,
                          IUserService userService,
                          IEmailMessageService emailMessageService,
                          ISendedEmailMessageService sendedEmailMessageService,
                          IUserAggregate userAggregate)
 {
     _emailAccountService       = emailAccountService;
     _userService               = userService;
     _emailMessageService       = emailMessageService;
     _sendedEmailMessageService = sendedEmailMessageService;
     _userAggregate             = userAggregate;
 }
Example #3
0
 public UserService(
     IPasswordService passwordService,
     IUserRepository userRepository,
     ILogger <UserService> logger,
     IUserAggregate userAggregate,
     ITokenService tokenService,
     IRefreshTokenRepository refreshTokenRepository,
     ICurrentUserService currentUserService)
 {
     _passwordService        = passwordService;
     _userRepository         = userRepository;
     _logger                 = logger;
     _userAggregate          = userAggregate;
     _tokenService           = tokenService;
     _refreshTokenRepository = refreshTokenRepository;
     _currentUserService     = currentUserService;
 }