Пример #1
0
 public UserController(UserQueryService userQueryService,
                       UserCommandService userCommandService,
                       IMapper mapper)
 {
     this._userQueryService   = userQueryService;
     this._userCommandService = userCommandService;
     this._mapper             = mapper;
 }
Пример #2
0
 public void ClassLevelSetup()
 {
     _administrationUnitOfWork = new Mock <IAdministrationUnitOfWork>();
     _administrationUnitOfWork.Setup(x => x.PendingMessages).Returns(new System.Collections.Generic.List <TriTech.InformRMS.Infrastructure.Messaging.Contracts.Messages.Message>());
     Assert.IsInstanceOf(typeof(IAdministrationUnitOfWork), _administrationUnitOfWork.Object);
     _classicRmsUserRepository = new Mock <IClassicRmsUserRepository>();
     Assert.IsInstanceOf(typeof(IClassicRmsUserRepository), _classicRmsUserRepository.Object);
     SetUpIdentity();
     SetUpAgency();
     SetUpUser();
     _userCommandService = new UserCommandService(_administrationUnitOfWork.Object, _classicRmsUserRepository.Object, Mock.Of <ILog>(), Mock.Of <IServiceAuthorizationPolicy>(), _identityProvider.Object);
     Assert.IsInstanceOf(typeof(UserCommandService), _userCommandService);
 }
Пример #3
0
 public AccountController(IOptions <TokenSettings> tokenSettings,
                          AccountService accountSrevice,
                          UserQueryService userQueryService,
                          UserCommandService userCommandService,
                          UserDeviceCommandService userDeviceCommandService,
                          IMapper mapper
                          )
 {
     this.TokenSettings       = tokenSettings.Value;
     this.AccountService      = accountSrevice;
     this.UserQueryService    = userQueryService;
     this.UserCommandService  = userCommandService;
     UserDeviceCommandService = userDeviceCommandService;
     this.Mapper = mapper;
 }
Пример #4
0
 public async Task AnonymousResetPassword([FromQuery] Guid userSysId, [FromQuery] string newPasswordHash)
 {
     UserCommandService.ResetPassword(userSysId, newPasswordHash);
     await Task.FromResult(0);
 }
 public UserController(UserQueryService userQueryService, UserCommandService userCommandService)
 {
     this._userQueryService   = userQueryService;
     this._userCommandService = userCommandService;
 }