/// <summary>
 /// Initializes a new instance of the <see cref="MedicationController"/> class.
 /// </summary>
 /// <param name="medicationService">The injected medication data service.</param>
 /// <param name="httpAccessor">The injected http context accessor provider.</param>
 /// <param name="authZService">The injected authService authorization provider.</param>
 /// <param name="patientService">The injected patientService patient registry provider.true</param>
 public MedicationController(IMedicationService medicationService, IHttpContextAccessor httpAccessor, ICustomAuthorizationService authZService, IPatientService patientService)
 {
     this.medicationService    = medicationService;
     this.httpContextAccessor  = httpAccessor;
     this.authorizationService = authZService;
     this.patientService       = patientService;
 }
예제 #2
0
        public VehiclesController(
            ICarService carService,
            ILogger <VehiclesController> logger,
            IUriService uriService,
            ICustomMapper customMapper,
            IWebHostEnvironment appEnvironment,
            IVehicleImageRetriever vehicleImageRetriever,
            ICustomAuthorizationService authorizationService
            )
        {
            _carService            = carService;
            _logger                = logger;
            _uriService            = uriService;
            _customMapper          = customMapper;
            _appEnvironment        = appEnvironment;
            _vehicleImageRetriever = vehicleImageRetriever;

            _customAuthorizationService = authorizationService;

            // var directory = Directory.GetCurrentDirectory();
            var directory = _appEnvironment.WebRootPath;

            _logger.LogInformation($"current directory {directory}");

            var imgDirectory = $@"{directory}/{ApiRoutes.imgsPath}";

            _imgDirectory = imgDirectory;

            _logger.LogInformation($"VehiclesController _imgDirectory \n {_imgDirectory}");
        }
예제 #3
0
 public CommentController(
     ICustomAuthorizationService authorizationService,
     ICustomUserManager userManager,
     ILogger <DI_BaseController> logger,
     ICommentsRepository repository) : base(authorizationService, userManager, logger)
 {
     _repository = repository;
 }
예제 #4
0
 public DI_BaseController(
     ICustomAuthorizationService authorizationService,
     ICustomUserManager userManager,
     ILogger <DI_BaseController> logger) : base()
 {
     _userManager          = userManager;
     _authorizationService = authorizationService;
     _logger = logger;
 }
예제 #5
0
 public PenaltyController(
     IPenaltyRepository penaltyRepository,
     ILogger <PenaltyController> logger,
     ICustomAuthorizationService customAuthorizationService,
     ICustomMapper customMapper,
     ICarService carService
     )
 {
     _penaltyRepository          = penaltyRepository;
     _logger                     = logger;
     _customAuthorizationService = customAuthorizationService;
     _customMapper               = customMapper;
     _carService                 = carService;
 }