/// <summary> /// Initializes a new instance of the <see cref="UserProfileService"/> class. /// </summary> /// <param name="logger">Injected Logger Provider.</param> /// <param name="userProfileDelegate">The profile delegate to interact with the DB.</param> /// <param name="userPreferenceDelegate">The preference delegate to interact with the DB.</param> /// <param name="emailDelegate">The email delegate to interact with the DB.</param> /// <param name="emailInviteDelegate">The email invite delegate to interact with the DB.</param> /// <param name="configuration">The configuration service.</param> /// <param name="emailQueueService">The email service to queue emails.</param> /// <param name="legalAgreementDelegate">The terms of service delegate.</param> /// <param name="cryptoDelegate">Injected Crypto delegate.</param> /// <param name="notificationSettingsService">Notification settings delegate.</param> /// <param name="messageVerificationDelegate">The message verification delegate to interact with the DB.</param> /// <param name="patientService">The patient service.</param> public UserProfileService( ILogger <UserProfileService> logger, IUserProfileDelegate userProfileDelegate, IUserPreferenceDelegate userPreferenceDelegate, IEmailDelegate emailDelegate, IMessagingVerificationDelegate emailInviteDelegate, IConfigurationService configuration, IEmailQueueService emailQueueService, ILegalAgreementDelegate legalAgreementDelegate, ICryptoDelegate cryptoDelegate, INotificationSettingsService notificationSettingsService, IMessagingVerificationDelegate messageVerificationDelegate, IPatientService patientService) { this.logger = logger; this.userProfileDelegate = userProfileDelegate; this.userPreferenceDelegate = userPreferenceDelegate; this.emailDelegate = emailDelegate; this.emailInviteDelegate = emailInviteDelegate; this.configurationService = configuration; this.emailQueueService = emailQueueService; this.legalAgreementDelegate = legalAgreementDelegate; this.cryptoDelegate = cryptoDelegate; this.notificationSettingsService = notificationSettingsService; this.messageVerificationDelegate = messageVerificationDelegate; this.patientService = patientService; }
/// <summary> /// Initializes a new instance of the <see cref="UserProfileService"/> class. /// </summary> /// <param name="logger">Injected Logger Provider.</param> /// <param name="patientService">The patient service.</param> /// <param name="userEmailService">The User Email service.</param> /// <param name="userSMSService">The User SMS service.</param> /// <param name="configurationService">The configuration service.</param> /// <param name="emailQueueService">The email service to queue emails.</param> /// <param name="notificationSettingsService">The Notifications Settings service.</param> /// <param name="userProfileDelegate">The profile delegate to interact with the DB.</param> /// <param name="userPreferenceDelegate">The preference delegate to interact with the DB.</param> /// <param name="legalAgreementDelegate">The terms of service delegate.</param> /// <param name="messageVerificationDelegate">The message verification delegate.</param> /// <param name="cryptoDelegate">Injected Crypto delegate.</param> /// <param name="httpContextAccessor">The injected http context accessor provider.</param> public UserProfileService( ILogger <UserProfileService> logger, IPatientService patientService, IUserEmailService userEmailService, IUserSMSService userSMSService, IConfigurationService configurationService, IEmailQueueService emailQueueService, INotificationSettingsService notificationSettingsService, IUserProfileDelegate userProfileDelegate, IUserPreferenceDelegate userPreferenceDelegate, ILegalAgreementDelegate legalAgreementDelegate, IMessagingVerificationDelegate messageVerificationDelegate, ICryptoDelegate cryptoDelegate, IHttpContextAccessor httpContextAccessor) { this.logger = logger; this.patientService = patientService; this.userEmailService = userEmailService; this.userSMSService = userSMSService; this.configurationService = configurationService; this.emailQueueService = emailQueueService; this.notificationSettingsService = notificationSettingsService; this.userProfileDelegate = userProfileDelegate; this.userPreferenceDelegate = userPreferenceDelegate; this.legalAgreementDelegate = legalAgreementDelegate; this.messageVerificationDelegate = messageVerificationDelegate; this.cryptoDelegate = cryptoDelegate; this.httpContextAccessor = httpContextAccessor; }
/// <summary> /// Initializes a new instance of the <see cref="CommentService"/> class. /// </summary> /// <param name="logger">Injected Logger Provider.</param> /// <param name="commentDelegate">Injected Comment delegate.</param> /// <param name="profileDelegate">Injected Profile delegate.</param> /// <param name="cryptoDelegate">Injected Crypto delegate.</param> public CommentService(ILogger <CommentService> logger, ICommentDelegate commentDelegate, IUserProfileDelegate profileDelegate, ICryptoDelegate cryptoDelegate) { this.logger = logger; this.commentDelegate = commentDelegate; this.profileDelegate = profileDelegate; this.cryptoDelegate = cryptoDelegate; }
/// <summary> /// Initializes a new instance of the <see cref="NoteService"/> class. /// </summary> /// <param name="logger">Injected Logger Provider.</param> /// <param name="noteDelegate">Injected Note delegate.</param> /// <param name="profileDelegate">Injected Profile delegate.</param> /// <param name="cryptoDelegate">Injected Crypto delegate.</param> public NoteService(ILogger <NoteService> logger, INoteDelegate noteDelegate, IUserProfileDelegate profileDelegate, ICryptoDelegate cryptoDelegate) { this.logger = logger; this.noteDelegate = noteDelegate; this.profileDelegate = profileDelegate; this.cryptoDelegate = cryptoDelegate; }
/// <summary> /// Initializes a new instance of the <see cref="CloseAccountJob"/> class. /// </summary> /// <param name="configuration">The configuration to use.</param> /// <param name="logger">The logger to use.</param> /// <param name="profileDelegate">The profile delegate.</param> /// <param name="emailService">The email service.</param> /// <param name="authDelegate">The OAuth2 authentication service.</param> /// <param name="userAdminDelegate">The AccessManagement userAdmin delegate.</param> /// <param name="dbContext">The db context to use.</param> public CloseAccountJob( IConfiguration configuration, ILogger <CloseAccountJob> logger, IUserProfileDelegate profileDelegate, IEmailQueueService emailService, IAuthenticationDelegate authDelegate, IUserAdminDelegate userAdminDelegate, GatewayDbContext dbContext) { this.configuration = configuration; this.logger = logger; this.profileDelegate = profileDelegate; this.emailService = emailService; this.authDelegate = authDelegate; this.userAdminDelegate = userAdminDelegate; this.dbContext = dbContext; this.profilesPageSize = this.configuration.GetValue <int>($"{JobKey}:{ProfilesPageSizeKey}"); this.hoursBeforeDeletion = this.configuration.GetValue <int>($"{JobKey}:{HoursDeletionKey}") * -1; this.emailTemplate = this.configuration.GetValue <string>($"{JobKey}:{EmailTemplateKey}"); IConfigurationSection?configSection = configuration?.GetSection(AuthConfigSectionName); this.tokenUri = configSection.GetValue <Uri>(@"AuthTokenUri"); this.tokenRequest = new ClientCredentialsTokenRequest(); configSection.Bind(this.tokenRequest); }
/// <summary> /// Initializes a new instance of the <see cref="CsvExportService"/> class. /// </summary> /// <param name="noteDelegate">The note delegate to interact with the DB.</param> /// <param name="userProfileDelegate">The user profile delegate to interact with the DB.</param> /// <param name="commentDelegate">The beta request delegate to interact with the DB.</param> public CsvExportService( INoteDelegate noteDelegate, IUserProfileDelegate userProfileDelegate, ICommentDelegate commentDelegate) { this.noteDelegate = noteDelegate; this.userProfileDelegate = userProfileDelegate; this.commentDelegate = commentDelegate; }
/// <summary> /// Initializes a new instance of the <see cref="UserSMSService"/> class. /// </summary> /// <param name="logger">Injected Logger Provider.</param> /// <param name="messageVerificationDelegate">The message verification delegate to interact with the DB.</param> /// <param name="profileDelegate">The profile delegate to interact with the DB.</param> /// <param name="notificationSettingsService">Notification settings delegate.</param> public UserSMSService( ILogger <UserSMSService> logger, IMessagingVerificationDelegate messageVerificationDelegate, IUserProfileDelegate profileDelegate, INotificationSettingsService notificationSettingsService) { this.logger = logger; this.messageVerificationDelegate = messageVerificationDelegate; this.profileDelegate = profileDelegate; this.notificationSettingsService = notificationSettingsService; }
/// <summary> /// Initializes a new instance of the <see cref="DashboardService"/> class. /// </summary> /// <param name="noteDelegate">The note delegate to interact with the DB.</param> /// <param name="dependentDelegate">The dependent delegate to interact with the DB.</param> /// <param name="userProfileDelegate">The user profile delegate to interact with the DB.</param> /// <param name="config">The configuration provider.</param> public DashboardService( INoteDelegate noteDelegate, IResourceDelegateDelegate dependentDelegate, IUserProfileDelegate userProfileDelegate, IConfiguration config) { this.noteDelegate = noteDelegate; this.dependentDelegate = dependentDelegate; this.userProfileDelegate = userProfileDelegate; this.configuration = config; this.adminConfiguration = new AdminConfiguration(); this.configuration.GetSection("Admin").Bind(this.adminConfiguration); }
/// <summary> /// Initializes a new instance of the <see cref="DependentService"/> class. /// </summary> /// <param name="logger">Injected Logger Provider.</param> /// <param name="userProfileDelegate">The profile delegate to interact with the DB.</param> /// <param name="patientService">The injected patient registry provider.</param> /// <param name="notificationSettingsService">Notification settings service.</param> /// <param name="userDelegateDelegate">The User Delegate delegate to interact with the DB.</param> public DependentService( ILogger <DependentService> logger, IUserProfileDelegate userProfileDelegate, IPatientService patientService, INotificationSettingsService notificationSettingsService, IUserDelegateDelegate userDelegateDelegate) { this.logger = logger; this.patientService = patientService; this.userDelegateDelegate = userDelegateDelegate; this.notificationSettingsService = notificationSettingsService; this.userProfileDelegate = userProfileDelegate; }
/// <summary> /// Initializes a new instance of the <see cref="DashboardService"/> class. /// </summary> /// <param name="noteDelegate">The note delegate to interact with the DB.</param> /// <param name="userProfileDelegate">The user profile delegate to interact with the DB.</param> /// <param name="betaRequestDelegate">The beta request delegate to interact with the DB.</param> /// <param name="config">The configuration provider.</param> public DashboardService( INoteDelegate noteDelegate, IUserProfileDelegate userProfileDelegate, IBetaRequestDelegate betaRequestDelegate, IConfiguration config) { this.noteDelegate = noteDelegate; this.userProfileDelegate = userProfileDelegate; this.betaRequestDelegate = betaRequestDelegate; this.configuration = config; this.adminConfiguration = new AdminConfiguration(); this.configuration.GetSection("Admin").Bind(this.adminConfiguration); }
/// <summary> /// Initializes a new instance of the <see cref="DependentService"/> class. /// </summary> /// <param name="logger">Injected Logger Provider.</param> /// <param name="userProfileDelegate">The profile delegate to interact with the DB.</param> /// <param name="patientService">The injected patient registry provider.</param> /// <param name="notificationSettingsService">Notification settings service.</param> /// <param name="resourceDelegateDelegate">The ResourceDelegate delegate to interact with the DB.</param> /// <param name="configuration">The configuration service.</param> public DependentService( ILogger <DependentService> logger, IUserProfileDelegate userProfileDelegate, IPatientService patientService, INotificationSettingsService notificationSettingsService, IResourceDelegateDelegate resourceDelegateDelegate, IConfigurationService configuration) { this.logger = logger; this.patientService = patientService; this.resourceDelegateDelegate = resourceDelegateDelegate; this.notificationSettingsService = notificationSettingsService; this.userProfileDelegate = userProfileDelegate; this.configurationService = configuration; }
/// <summary> /// Initializes a new instance of the <see cref="UserEmailService"/> class. /// </summary> /// <param name="logger">Injected Logger Provider.</param> /// <param name="messageVerificationDelegate">The message verification delegate to interact with the DB.</param> /// <param name="profileDelegate">The profile delegate to interact with the DB.</param> /// <param name="emailQueueService">The email service to queue emails.</param> /// <param name="notificationSettingsService">Notification settings delegate.</param> /// <param name="configuration">Configuration settings.</param> /// <param name="httpContextAccessor">The injected http context accessor provider.</param> public UserEmailService( ILogger <UserEmailService> logger, IMessagingVerificationDelegate messageVerificationDelegate, IUserProfileDelegate profileDelegate, IEmailQueueService emailQueueService, INotificationSettingsService notificationSettingsService, IConfiguration configuration, IHttpContextAccessor httpContextAccessor) { this.logger = logger; this.messageVerificationDelegate = messageVerificationDelegate; this.profileDelegate = profileDelegate; this.emailQueueService = emailQueueService; this.notificationSettingsService = notificationSettingsService; this.emailVerificationExpirySeconds = configuration.GetSection(this.webClientConfigSection).GetValue <int>(this.emailConfigExpirySecondsKey, 5); this.httpContextAccessor = httpContextAccessor; }
/// <summary> /// Initializes a new instance of the <see cref="NotifyUpdatedLegalAgreementsJob"/> class. /// </summary> /// <param name="configuration">The configuration to use.</param> /// <param name="logger">The logger to use.</param> /// <param name="applicationSettingsDelegate">The application settings delegate.</param> /// <param name="legalAgreementDelegate">The legal agreement delegate.</param> /// <param name="profileDelegate">The profile delegate.</param> /// <param name="emailService">The email service.</param> /// <param name="dbContext">The db context to use.</param> public NotifyUpdatedLegalAgreementsJob( IConfiguration configuration, ILogger <NotifyUpdatedLegalAgreementsJob> logger, IApplicationSettingsDelegate applicationSettingsDelegate, ILegalAgreementDelegate legalAgreementDelegate, IUserProfileDelegate profileDelegate, IEmailQueueService emailService, GatewayDbContext dbContext) { this.configuration = configuration; this.logger = logger; this.applicationSettingsDelegate = applicationSettingsDelegate; this.legalAgreementDelegate = legalAgreementDelegate; this.profileDelegate = profileDelegate; this.emailService = emailService; this.dbContext = dbContext; this.profilesPageSize = this.configuration.GetValue <int>($"{JobKey}:{ProfilesPageSizeKey}"); this.host = this.configuration.GetValue <string>($"{HostKey}"); }
/// <summary> /// Initializes a new instance of the <see cref="CloseAccountJob"/> class. /// </summary> /// <param name="configuration">The configuration to use.</param> /// <param name="logger">The logger to use.</param> /// <param name="profileDelegate">The profile delegate.</param> /// <param name="emailService">The email service.</param> /// <param name="authDelegate">The OAuth2 authentication service.</param> /// <param name="userAdminDelegate">The AccessManagement userAdmin delegate.</param> /// <param name="dbContext">The db context to use.</param> public CloseAccountJob( IConfiguration configuration, ILogger <CloseAccountJob> logger, IUserProfileDelegate profileDelegate, IEmailQueueService emailService, IAuthenticationDelegate authDelegate, IUserAdminDelegate userAdminDelegate, GatewayDbContext dbContext) { this.configuration = configuration; this.logger = logger; this.profileDelegate = profileDelegate; this.emailService = emailService; this.authDelegate = authDelegate; this.userAdminDelegate = userAdminDelegate; this.dbContext = dbContext; this.profilesPageSize = this.configuration.GetValue <int>($"{JobKey}:{ProfilesPageSizeKey}"); this.host = this.configuration.GetValue <string>($"{HostKey}"); this.hoursBeforeDeletion = this.configuration.GetValue <int>($"{JobKey}:{HoursDeletionKey}") * -1; this.emailTemplate = this.configuration.GetValue <string>($"{JobKey}:{EmailTemplateKey}"); }