public TripService(IApplicationDbContext dbContext, ICurrentUserService currentUserService, IDistanceCalculatorService distanceCalculatorService) {
     _dbContext = dbContext;
     if (currentUserService != null && currentUserService.UserId != null) {
         _applicationUser = _dbContext.Users.SingleOrDefault(u => u.Id == currentUserService.UserId);
     }
     _distanceCalculatorService = distanceCalculatorService;
 }
Exemplo n.º 2
0
        public MenuViewModel(ICurrentUserService usvc, IMvxMessenger messenger) : base(messenger)
        {
            _userSvc = usvc;

			_subscriptionToken = _messenger.Subscribe<LoggedUserInfoChangedMessage>(UpdateLoggedUserInfo);

            MenuItems = new ObservableCollection<MenuItem>();
            ItemSelectedCommand = new MvxCommand<MenuItem>(OnSelectItem);

            MenuItems.Add(new MenuItem
            {
                Title = "Home",
                ViewModelType = typeof(HomeViewModel),
                Option = MenuOption.Home,
                IsSelected = true
            });

            MenuItems.Add(new MenuItem
            {
                Title = "Appointments",
                ViewModelType = typeof(AppointmentsViewModel),
                Option = MenuOption.Appointment
            });

            MenuItems.Add(new MenuItem
            {
                Title = "Treatments",
                ViewModelType = typeof(TreatmentViewModel),
                Option = MenuOption.Treatment
            });

            MenuItems.Add(new MenuItem
            {
                Title = "User",
                ViewModelType = typeof(UserViewModel),
                Option = MenuOption.User
            });

            MenuItems.Add(new MenuItem
            {
                Title = "Settings",
                ViewModelType = typeof(SettingsViewModel),
                Option = MenuOption.Settings
            });
        }
 public UpdateVermittlerCommandHandler(IInsuranceDbContext insuranceDbContext,
                                       ICurrentUserService currentUserService)
 {
     _insuranceDbContext = insuranceDbContext;
     _currentUserService = currentUserService;
 }
Exemplo n.º 4
0
 public ManagementJobsController(IMediator mediator, ICurrentUserService currentUserService)
 {
     _Mediator           = mediator;
     _CurrentUserService = currentUserService;
 }
Exemplo n.º 5
0
 public GetMyRequestedDuelsQueryHandler(IApplicationDbContext context, IMapper mapper, ICurrentUserService currentUserService)
 {
     _context            = context;
     _mapper             = mapper;
     _currentUserService = currentUserService;
 }
Exemplo n.º 6
0
 public UserController(IUserService userService, ICurrentUserService currentUserService)
 {
     _userService        = userService;
     _currentUserService = currentUserService;
 }
Exemplo n.º 7
0
 public DeletePersonResumeCommandHandler(AppDbContext context, ICurrentUserService userService)
     : base(context, userService)
 {
 }
Exemplo n.º 8
0
 public AddressQueriesApiControllerBuilder WithCurrentUserService(ICurrentUserService currentUserService)
 {
     _currentUserService = currentUserService;
     return(this);
 }
Exemplo n.º 9
0
 public LoggingBehaviour(ILogger <TRequest> logger, ICurrentUserService currentUserService, IUserService userService)
 {
     this.logger             = logger;
     this.currentUserService = currentUserService;
     this.userService        = userService;
 }
Exemplo n.º 10
0
 public RegisterUserHandler(UserManager <User> userManager, IUnitOfWork unitOfWork, IMediator mediator, IMapper mapper, ICurrentUserService currentUserService) : base(unitOfWork, mediator, mapper, currentUserService)
 {
     _userManager = userManager;
 }
Exemplo n.º 11
0
 public FollowCommandHandler(IApplicationDbContext dbContext, ICurrentUserService currentUserService)
 {
     _dbContext          = dbContext;
     _currentUserService = currentUserService;
 }
 public GetAccountDetailsQueryHandler(IShowcaseDbContext context, IMapper mapper, ICurrentUserService currentUserService, IUserManager userManager)
 {
     _context            = context;
     _mapper             = mapper;
     _currentUserService = currentUserService;
     _userManager        = userManager;
 }
 public DeleteVehicleLocationHandler(IVehicleLocationService vehicleLocationService, ICurrentUserService currentUserService, IDateTime dateTime)
 {
     _vehicleLocationService = vehicleLocationService ?? throw new ArgumentNullException(nameof(_vehicleLocationService));
 }
Exemplo n.º 14
0
 public ApplicationDbContext(DbContextOptions options, ICurrentUserService currentUserService) : base(options)
 {
     _currentUserService = currentUserService;
 }
 public EmailTemplatesController(IRepository repository, ICurrentUserService currentUser)
     : base(repository, currentUser)
 {
 }
Exemplo n.º 16
0
 public AccountController(IRepository repository, ICurrentUserService currentUser, IFormsAuthenticationService formsAuthenticationService, IMembershipService membershipService)
     : base(repository, currentUser)
 {
     _formsService = formsAuthenticationService;
     _membershipService = membershipService;
 }
 public TrainingSessionsController(ITrainingSessionsService trainingSessionsService, ICurrentUserService currentUserService)
 {
     this.trainingSessionsService = trainingSessionsService;
     this.currentUserService      = currentUserService;
 }
Exemplo n.º 18
0
 public HomeController(IRepository repository, ICurrentUserService currentUser, ITwitterService twitterService)
     : base(repository, currentUser)
 {
     _twitterService = twitterService;
 }
Exemplo n.º 19
0
 public UserService(ISpmsContext context, ICurrentUserService currentUser)
 {
     _context     = context;
     _currentUser = currentUser;
 }
Exemplo n.º 20
0
 public AdminController(ICurrentUserService currentUserService, ILogger <AdminController> logger, IWebHostEnvironment webHostEnvironment)
 {
     _currentUserService = currentUserService;
     _logger             = logger;
     _webHostEnvironment = webHostEnvironment;
 }
Exemplo n.º 21
0
 public UpdateReceiptCommandHandler(IApplicationDbContext context, ICurrentUserService currentUserService)
 {
     _context        = context;
     _context.UserId = currentUserService.UserId;
 }
 protected BaseApiController(IMediator mediator, ICurrentUserService currentUserService)
 {
     this.Mediator    = mediator ?? this.HttpContext.RequestServices.GetService <IMediator>();
     this.CurrentUser = currentUserService ?? this.HttpContext.RequestServices.GetService <ICurrentUserService>();
 }
Exemplo n.º 23
0
 public UpdateNotificationsCommandHandler(IDieteticSNSDbContext context, IMapper mapper, ICurrentUserService userService)
 {
     _context     = context;
     _mapper      = mapper;
     _userService = userService;
 }
 public PostModel(ICurrentUserService currentUserService, IPostService postService,
                  ICategoryService categoryService) : base(currentUserService, postService, categoryService)
 {
 }
 public DeleteEmployeeCommandHandler(ISchoolDbContext context, IUserManager userManager, ICurrentUserService currentUser)
 {
     _context     = context;
     _userManager = userManager;
     _currentUser = currentUser;
 }
Exemplo n.º 26
0
 public CreateOrderCommandHandler(IPisheyarContext context, ICurrentUserService currentUserService, ISmsService smsService)
 {
     _context     = context;
     _currentUser = currentUserService;
     _sms         = smsService;
 }
Exemplo n.º 27
0
 public CatsController(ICatService service, ICurrentUserService currentUser)
 {
     this.service     = service;
     this.currentUser = currentUser;
 }
Exemplo n.º 28
0
 public LoggingBehaviour(ILogger <TRequest> logger, ICurrentUserService currentUserService)
 {
     _logger             = logger;
     _currentUserService = currentUserService;
 }
 public DeleteExpenseHandler(IExpenseService expenseService, ICurrentUserService currentUserService, IDateTime dateTime)
 {
     _expenseService     = expenseService ?? throw new ArgumentNullException(nameof(_expenseService));
     _currentUserService = currentUserService ?? throw new ArgumentNullException(nameof(_currentUserService));
     _dateTime           = dateTime ?? throw new ArgumentNullException(nameof(_dateTime));
 }
Exemplo n.º 30
0
 public AdminController(IRepository repository, ICurrentUserService currentUser, IMembershipService membershipService)
     : base(repository, currentUser)
 {
     _membershipService = membershipService;
 }
Exemplo n.º 31
0
 public ApplicationDbContext(ICurrentUserService currentUserService)
 {
     _currentUserService = currentUserService;
 }
Exemplo n.º 32
0
 public AccountController(ICurrentUserService currentUserService)
 {
     _currentUserService = currentUserService;
     _repo = new AuthRepository();
     _authenticationTicketCreator = new AuthenticationTicketCreator();
 }
Exemplo n.º 33
0
 public BlogInformationModel(ICurrentUserService currentUserService, IPostService postService,
                             ICategoryService categoryService) : base(currentUserService, postService, categoryService)
 {
 }
Exemplo n.º 34
0
 public SponsorsController(IRepository repository, ICurrentUserService currentUser)
     : base(repository, currentUser)
 {
 }
 public CheckOrderResultMiddleware(IDbContext dbContext, ICurrentUserService currentUserService)
 {
     _dbContext          = dbContext;
     _currentUserService = currentUserService;
 }
 public DeletePersonExperienceDutyCommandHandler(AppDbContext context, ICurrentUserService userService)
     : base(context, userService)
 {
 }
 public ReservationHandler(IReservationRepository reservation, ICurrentUserService currentUser)
 {
     _reservation = reservation ?? throw new ArgumentNullException(nameof(reservation));
     _currentUser = currentUser ?? throw new ArgumentNullException(nameof(currentUser));
 }
 public CarService(IApplicationDbContext dbContext, ICurrentUserService currentUserService) {
     _dbContext = dbContext;
     if (currentUserService != null && currentUserService.UserId != null) {
         _applicationUser = _dbContext.Users.SingleOrDefault(u => u.Id == currentUserService.UserId);
     }
 }
Exemplo n.º 39
0
 public AddressQueriesApiControllerBuilder()
 {
     _addressBookQueries   = new Mock <IAddressBookQueries>().Object;
     _authorizationService = new Mock <IAuthorizationService>().Object;
     _currentUserService   = new Mock <ICurrentUserService>().Object;
 }