/// <summary> /// Constructor with basic parameters for dependency injection. /// </summary> /// <param name="logger">The logger for capturing logs.</param> /// <param name="options">Options for the store</param> /// <param name="connectionFactory">The connection factory used to generate connections for the applciation.</param> /// <param name="personIdentificationStore">Can be used to map between emplid, hanford Id and Network id.</param> public SqlProcessStore(ILogger <SqlProcessStore> logger, IOptions <SqlProcessStoreOptions> options, ISqlConnectionFactory connectionFactory, IPersonIdentificationStore personIdentificationStore) { _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _options = options ?? throw new ArgumentNullException(nameof(options)); _connectionFactory = connectionFactory ?? throw new ArgumentNullException(nameof(connectionFactory)); _personIdentificationStore = personIdentificationStore ?? throw new ArgumentNullException(nameof(personIdentificationStore)); }
/// <summary> /// Constructor with basic parameters for dependency injection. /// </summary> /// <param name="logger">The logger for capturing logs.</param> /// <param name="options">Options for the store</param> /// <param name="clients">The client factory used to generate connections for the applciation.</param> /// <param name="personIdentificationStore">The data store we can use to map ids.</param> public HttpApprovalsLegacyStore(IPersonIdentificationStore personIdentificationStore, ILogger <HttpApprovalsLegacyStore> logger, IHttpClientFactory clients, IOptions <HttpRouteItemStoreOptions> options) { _personIdentificationStore = personIdentificationStore ?? throw new ArgumentNullException(nameof(personIdentificationStore)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _options = options ?? throw new ArgumentNullException(nameof(options)); _client = clients.CreateClient(_options.Value.Client); }
/// <summary> /// Describes an object capable of managing <see cref="Activity"/> and <see cref="ActorAction"/> resources. /// </summary> public ActivityFacade(ILogger <ActivityFacade> logger, IActivityStore activityStore, IProcessStore processStore, IApprovalsLegacyStore approvalsLegacyStore, IPersonIdentificationStore personIdentificationStore, ISecurityStore securityStore) { _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _processStore = processStore ?? throw new ArgumentNullException(nameof(processStore)); _activityStore = activityStore ?? throw new ArgumentNullException(nameof(activityStore)); _approvalsLegacyStore = approvalsLegacyStore ?? throw new ArgumentNullException(nameof(approvalsLegacyStore)); _personIdentificationStore = personIdentificationStore ?? throw new ArgumentNullException(nameof(personIdentificationStore)); _securityStore = securityStore ?? throw new ArgumentNullException(nameof(securityStore)); }
/// <summary> /// Initializes a new instance of the <see cref="PersonIdentificationController"/> class. /// </summary> /// <param name="logger">The logger used to write diagnostic information.</param> /// <param name="processStore">The store to retrieve the user from.</param> /// <exception cref="ArgumentNullException">The <paramref name="logger"/> is <see langword="null"/>.</exception> /// <exception cref="ArgumentNullException">The data <paramref name="processStore"/> is <see langword="null"/>.</exception> public PersonIdentificationController(IPersonIdentificationStore processStore, ILogger <PersonIdentificationController> logger) { _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _personIdtore = processStore ?? throw new ArgumentNullException(nameof(processStore)); }