/// <summary>
 /// Initializes a new instance of the <see cref="GetNotificationsForUserService"/> class.
 /// </summary>
 /// <param name="marainServicesTenancy">Marain tenancy services.</param>
 /// <param name="userNotificationStoreFactory">The user notification store factory.</param>
 /// <param name="userNotificationsMapper">The user notifications mapper.</param>
 /// <param name="managementApiClient">The client for the management API.</param>
 /// <param name="exceptionsInstrumentation">The <see cref="IExceptionsInstrumentation{T}"/> for this class.</param>
 /// <param name="logger">The logger.</param>
 public GetNotificationsForUserService(
     IMarainServicesTenancy marainServicesTenancy,
     ITenantedUserNotificationStoreFactory userNotificationStoreFactory,
     UserNotificationsMapper userNotificationsMapper,
     IUserNotificationsManagementClient managementApiClient,
     IExceptionsInstrumentation <GetNotificationsForUserService> exceptionsInstrumentation,
     ILogger <GetNotificationsForUserService> logger)
 {
     this.marainServicesTenancy = marainServicesTenancy
                                  ?? throw new ArgumentNullException(nameof(marainServicesTenancy));
     this.userNotificationStoreFactory = userNotificationStoreFactory
                                         ?? throw new ArgumentNullException(nameof(userNotificationStoreFactory));
     this.userNotificationsMapper = userNotificationsMapper
                                    ?? throw new ArgumentNullException(nameof(userNotificationsMapper));
     this.managementApiClient = managementApiClient
                                ?? throw new ArgumentNullException(nameof(managementApiClient));
     this.logger = logger
                   ?? throw new ArgumentNullException(nameof(logger));
     this.exceptionsInstrumentation = exceptionsInstrumentation
                                      ?? throw new ArgumentNullException(nameof(exceptionsInstrumentation));
 }
Esempio n. 2
0
 /// <summary>
 /// Creates an instance of the <see cref="OpenApiOperationInvoker{TRequest, TResponse}"/>.
 /// </summary>
 /// <param name="operationLocator">The operation locator.</param>
 /// <param name="parameterBuilder">The parameter builder.</param>
 /// <param name="accessChecker">The access checker.</param>
 /// <param name="exceptionMapper">The exception mapper.</param>
 /// <param name="resultBuilder">The result builder.</param>
 /// <param name="configuration">The <see cref="IOpenApiConfiguration"/>.</param>
 /// <param name="auditContext">The audit context.</param>
 /// <param name="logger">The logger.</param>
 /// <param name="operationsInstrumentation">Operations instrumentation.</param>
 /// <param name="exceptionsInstrumentation">Exceptions instrumentation.</param>
 public OpenApiOperationInvoker(
     IOpenApiServiceOperationLocator operationLocator,
     IOpenApiParameterBuilder <TRequest> parameterBuilder,
     IOpenApiAccessChecker accessChecker,
     IOpenApiExceptionMapper exceptionMapper,
     IOpenApiResultBuilder <TResponse> resultBuilder,
     IOpenApiConfiguration configuration,
     IAuditContext auditContext,
     ILogger <OpenApiOperationInvoker <TRequest, TResponse> > logger,
     IOperationsInstrumentation <OpenApiOperationInvoker <TRequest, TResponse> > operationsInstrumentation,
     IExceptionsInstrumentation <OpenApiOperationInvoker <TRequest, TResponse> > exceptionsInstrumentation)
 {
     this.operationLocator          = operationLocator;
     this.parameterBuilder          = parameterBuilder;
     this.accessChecker             = accessChecker;
     this.exceptionMapper           = exceptionMapper;
     this.resultBuilder             = resultBuilder;
     this.auditContext              = auditContext;
     this.logger                    = logger;
     this.operationsInstrumentation = operationsInstrumentation;
     this.configuration             = configuration;
     this.exceptionsInstrumentation = exceptionsInstrumentation;
 }