/// <summary> /// Initialize a new instance of <see cref="AppBase"/> class with the given services. /// </summary> /// <param name="resourceService">The service giving access to local resources.</param> /// <param name="logger">A logging service.</param> /// <param name="dataService">The service giving access to data.</param> /// <param name="processService">The service giving access the App process.</param> /// <param name="pdfService">The service giving access to the PDF generator.</param> /// <param name="prefillService">The service giving access to prefill mechanisms.</param> /// <param name="instanceService">The service giving access to instance data</param> /// <param name="registerService">The service giving access to register data</param> /// <param name="settings">the general settings</param> /// <param name="profileService">the profile service</param> /// <param name="textService">The text service</param> /// <param name="httpContextAccessor">the httpContextAccessor</param> /// <param name="eFormidlingClient">The eFormidling client</param> /// <param name="appSettings">The appsettings</param> protected AppBase( IAppResources resourceService, ILogger <AppBase> logger, IData dataService, IProcess processService, IPDF pdfService, IPrefill prefillService, IInstance instanceService, IRegister registerService, IOptions <GeneralSettings> settings, IProfile profileService, IText textService, IHttpContextAccessor httpContextAccessor, IEFormidlingClient eFormidlingClient = null, IOptions <AppSettings> appSettings = null) { _appMetadata = resourceService.GetApplication(); _resourceService = resourceService; _logger = logger; _dataService = dataService; _processService = processService; _pdfService = pdfService; _prefillService = prefillService; _instanceService = instanceService; _registerService = registerService; _userHelper = new UserHelper(profileService, registerService, settings); _profileService = profileService; _textService = textService; _httpContextAccessor = httpContextAccessor; _appSettings = appSettings?.Value; _eFormidlingClient = eFormidlingClient; }
/// <summary> /// Initialize a new instance of the <see cref="App"/> class. /// </summary> /// <param name="appResourcesService">A service with access to local resources.</param> /// <param name="logger">A logger from the built in LoggingFactory.</param> /// <param name="dataService">A service with access to data storage.</param> /// <param name="processService">A service with access to the process.</param> /// <param name="pdfService">A service with access to the PDF generator.</param> /// <param name="profileService">A service with access to profile information.</param> /// <param name="registerService">A service with access to register information.</param> /// <param name="prefillService">A service with access to prefill mechanisms.</param> /// <param name="instanceService">A service with access to instances</param> /// <param name="settings">General settings</param> /// <param name="textService">A service with access to text</param> /// <param name="httpContextAccessor">A context accessor</param> /// <param name="efor">THe eformidling service</param> /// <param name="appsettings">the app settings</param> public App( IAppResources appResourcesService, ILogger <App> logger, IData dataService, IProcess processService, IPDF pdfService, IProfile profileService, IRegister registerService, IPrefill prefillService, IInstance instanceService, IOptions <GeneralSettings> settings, IText textService, IHttpContextAccessor httpContextAccessor, IEFormidlingClient efor, IOptions <AppSettings> appsettings) : base( appResourcesService, logger, dataService, processService, pdfService, prefillService, instanceService, registerService, settings, profileService, textService, httpContextAccessor, efor, appsettings) { _logger = logger; _validationHandler = new ValidationHandler(httpContextAccessor); _calculationHandler = new CalculationHandler(); _instantiationHandler = new InstantiationHandler(profileService, registerService); _pdfHandler = new PdfHandler(); }