Table of Contents

Class ServiceCollectionExtensions

Namespace
NuvTools.Notification.Messaging.Configuration
Assembly
NuvTools.Notification.Messaging.dll

Provides extension methods for configuring messaging-related services in the dependency injection container.

public static class ServiceCollectionExtensions
Inheritance
ServiceCollectionExtensions
Inherited Members

Methods

AddMessagingQueueConfiguration<T>(IServiceCollection, IConfiguration, string)

Registers and configures a messaging section for options-based dependency injection.

public static IServiceCollection AddMessagingQueueConfiguration<T>(this IServiceCollection services, IConfiguration configuration, string sectionName = "Messaging") where T : MessagingSection

Parameters

services IServiceCollection

The IServiceCollection to which the configuration will be added.

configuration IConfiguration

The application IConfiguration instance containing the messaging section.

sectionName string

The configuration section name to bind. Defaults to "Messaging".

Returns

IServiceCollection

The updated IServiceCollection instance, enabling method chaining.

Type Parameters

T

The type of the messaging section configuration class. Must inherit from MessagingSection.

Remarks

This method binds the specified configuration section to the T options class, allowing it to be injected via IOptions<T> throughout the application.