Exemplo n.º 1
0
 public BacklogItemListQueryService(IAsyncDocumentSession dbSession,
                                    ICustomFieldQueryService customFieldService,
                                    ICurrentUserResolver userResolver) : base(dbSession)
 {
     _customFieldService = customFieldService;
     _userResolver       = userResolver;
 }
Exemplo n.º 2
0
        protected override void ConfigureIocContainer(IServiceCollection services)
        {
            base.ConfigureIocContainer(services);

            _currentUserResolver = Substitute.For <ICurrentUserResolver>();
            _currentUserResolver.GetCurrentUserId().Returns(c => _currentUserId);
            services.AddScoped(x => _currentUserResolver);
        }
Exemplo n.º 3
0
 public DeleteUserCommandValidator(IUserManager userManager,
                                   IUserRepository userRepository,
                                   ICurrentUserResolver currentUserRolver)
 {
     this.userManager       = userManager;
     this.userRepository    = userRepository;
     this.currentUserRolver = currentUserRolver;
 }
Exemplo n.º 4
0
        public async Task <ActionResult <CurrentUserResponse> > GetCurrentUser([FromServices] IUserQueryService service,
                                                                               [FromServices] ICurrentUserResolver userResolver)
        {
            var currentId  = userResolver.GetCurrentUserId();
            var userResult = await service.GetById(currentId);

            return(!userResult.IsSuccess
                                ? userResult.To <CurrentUserResponse>().ToActionResultOfT()
                                : new CurrentUserResponse(userResult.Value, currentId));
        }
 public AspNetIdentityAuthenticationService(IValidationService validationService,
                                            IAspNetIdentityUserManager userManager,
                                            ISignInManager signinManager,
                                            IUserRepository userRepository,
                                            ICurrentUserResolver currentUserResolver)
 {
     this.validationService   = validationService;
     this.userManager         = userManager;
     this.signinManager       = signinManager;
     this.userRepository      = userRepository;
     this.currentUserResolver = currentUserResolver;
 }
 public TimeEntryService(IValidationService validationService,
                         IAuthorizationService authorizationService,
                         IQueryParser queryParser,
                         ITimeEntryRepository timeEntryRepository,
                         ICurrentUserResolver currentUserResolver)
 {
     this.validationService    = validationService;
     this.authorizationService = authorizationService;
     this.queryParser          = queryParser;
     this.timeEntryRepository  = timeEntryRepository;
     this.currentUserResolver  = currentUserResolver;
 }
Exemplo n.º 7
0
 public UserService(IValidationService validationService,
                    IAuthorizationService authorizationService,
                    IUserRepository userRepository,
                    IUserManager userManager,
                    ICurrentUserResolver currentUserResolver,
                    IQueryParser queryParser)
 {
     this.validationService    = validationService;
     this.authorizationService = authorizationService;
     this.userRepository       = userRepository;
     this.userManager          = userManager;
     this.currentUserResolver  = currentUserResolver;
     this.queryParser          = queryParser;
 }
Exemplo n.º 8
0
 public UserNameResolver(ICurrentUserResolver currentUserFactory)
 {
     _currentUserFactory = currentUserFactory;
 }
Exemplo n.º 9
0
 public BeerService(IBeerRepository repo, ICurrentUserResolver currentUserResolver)
 {
     _repo = repo;
     _currentUserResolver = currentUserResolver;
 }
 public CurrentUserMiddleware(RequestDelegate next, ICurrentUserResolver currentUser)
 {
     _next        = next;
     _currentUser = currentUser;
 }
Exemplo n.º 11
0
 public UserReferenceResolver(IAsyncDocumentSession dbSession, ICurrentUserResolver currentUserResolver) : base(dbSession)
 {
     _currentUserResolver = currentUserResolver;
 }