public CriminalFilesService(IConfiguration configuration, FileServicesClient filesClient, IMapper mapper, LookupService lookupService, LocationService locationService, IAppCache cache,
                             ClaimsPrincipal user)
 {
     _filesClient = filesClient;
     _filesClient.JsonSerializerSettings.ContractResolver = new SafeContractResolver {
         NamingStrategy = new CamelCaseNamingStrategy()
     };
     _lookupService             = lookupService;
     _locationService           = locationService;
     _mapper                    = mapper;
     _applicationCode           = user.ApplicationCode();
     _requestAgencyIdentifierId = user.AgencyCode();
     _requestPartId             = user.ParticipantId();
     _cache = cache;
 }
Ejemplo n.º 2
0
        public CourtListService(IConfiguration configuration, ILogger <CourtListService> logger, FileServicesClient filesClient, IMapper mapper, LookupService lookupService, LocationService locationService, IAppCache cache, ClaimsPrincipal user)
        {
            _logger      = logger;
            _filesClient = filesClient;
            _filesClient.JsonSerializerSettings.ContractResolver = new SafeContractResolver {
                NamingStrategy = new CamelCaseNamingStrategy()
            };
            _cache = cache;
            _cache.DefaultCachePolicy.DefaultCacheDurationSeconds = int.Parse(configuration.GetNonEmptyValue("Caching:FileExpiryMinutes")) * 60;
            _mapper = mapper;

            _lookupService             = lookupService;
            _locationService           = locationService;
            _applicationCode           = user.ApplicationCode();
            _requestAgencyIdentifierId = user.AgencyCode();
            _requestPartId             = user.ParticipantId();
        }
Ejemplo n.º 3
0
        public FilesService(IConfiguration configuration,
                            FileServicesClient filesClient,
                            IMapper mapper,
                            LookupService lookupService,
                            LocationService locationService,
                            IAppCache cache,
                            ClaimsPrincipal claimsPrincipal)
        {
            _filesClient = filesClient;
            _filesClient.JsonSerializerSettings.ContractResolver = new SafeContractResolver {
                NamingStrategy = new CamelCaseNamingStrategy()
            };
            _cache = cache;
            _cache.DefaultCachePolicy.DefaultCacheDurationSeconds = int.Parse(configuration.GetNonEmptyValue("Caching:FileExpiryMinutes")) * 60;
            Civil    = new CivilFilesService(configuration, filesClient, mapper, lookupService, locationService, _cache, claimsPrincipal);
            Criminal = new CriminalFilesService(configuration, filesClient, mapper, lookupService, locationService, _cache, claimsPrincipal);

            _applicationCode           = claimsPrincipal.ApplicationCode();
            _requestAgencyIdentifierId = claimsPrincipal.AgencyCode();
            _requestPartId             = claimsPrincipal.ParticipantId();
        }