Skip to main content

Definition

Assembly: Microsoft.Extensions.Hosting.Abstractions.dll Namespace: Microsoft.Extensions.Hosting

Syntax

Summary

This type is defined in Microsoft.Extensions.Hosting.Abstractions.

Remarks

See Microsoft documentation for more information about the rest of the API.

Methods

UseAmazonSQSMessagePublisher Extension

Extension method from Microsoft.Extensions.Hosting.SimpleMessageBus_Publish_Amazon_IHostBuilderExtensions
Configures SimpleMessageBus to use Amazon SQS as the backing queue and registers the AmazonSQSMessagePublisher with the DI container.

Syntax

Parameters

Returns

Type: Microsoft.Extensions.Hosting.IHostBuilder The IHostBuilder instance being configured, for fluent interaction.

UseAmazonSQSMessagePublisher Extension

Extension method from Microsoft.Extensions.Hosting.SimpleMessageBus_Publish_Amazon_IHostBuilderExtensions
Configures SimpleMessageBus to use Amazon SQS as the backing queue and registers the AmazonSQSMessagePublisher with the DI container.

Syntax

Parameters

Returns

Type: Microsoft.Extensions.Hosting.IHostBuilder The IHostBuilder instance being configured, for fluent interaction.

UseAmazonSQSProcessor Extension

Extension method from Microsoft.Extensions.Hosting.DispatchAmazon_IHostBuilderExtensions
Configures SimpleMessageBus to use Amazon SQS as the backing queue and registers the AmazonSQSProcessor with the DI container.

Syntax

Parameters

Returns

Type: Microsoft.Extensions.Hosting.IHostBuilder The IHostBuilder instance being configured, for fluent interaction.

UseAmazonSQSProcessor Extension

Extension method from Microsoft.Extensions.Hosting.DispatchAmazon_IHostBuilderExtensions
Configures SimpleMessageBus to use Amazon SQS as the backing queue and registers the AmazonSQSProcessor with the DI container.

Syntax

Parameters

Returns

Type: Microsoft.Extensions.Hosting.IHostBuilder The IHostBuilder instance being configured, for fluent interaction.

UseAzureStorageQueueMessagePublisher Extension

Extension method from Microsoft.Extensions.Hosting.SimpleMessageBus_Publish_IHostBuilderExtensions

Syntax

Parameters

Returns

Type: Microsoft.Extensions.Hosting.IHostBuilder The IHostBuilder instance being configured, for fluent interaction.

UseAzureStorageQueueMessagePublisher Extension

Extension method from Microsoft.Extensions.Hosting.SimpleMessageBus_Publish_IHostBuilderExtensions

Syntax

Parameters

Returns

Type: Microsoft.Extensions.Hosting.IHostBuilder The IHostBuilder instance being configured, for fluent interaction.

UseAzureStorageQueueProcessor Extension

Extension method from Microsoft.Extensions.Hosting.IHostBuilderExtensions
Configures SimpleMessageBus to use Azure Storage Queues as the backing queue and registers the AzureStorageQueueProcessor with the DI container.

Syntax

Parameters

Returns

Type: Microsoft.Extensions.Hosting.IHostBuilder The IHostBuilder instance being configured, for fluent interaction.

UseAzureStorageQueueProcessor Extension

Extension method from Microsoft.Extensions.Hosting.IHostBuilderExtensions
Configures SimpleMessageBus to use Azure Storage Queues as the backing queue and registers the AzureStorageQueueProcessor with the DI container.

Syntax

Parameters

Returns

Type: Microsoft.Extensions.Hosting.IHostBuilder The IHostBuilder instance being configured, for fluent interaction.

UseFileSystemMessagePublisher Extension

Extension method from Microsoft.Extensions.Hosting.SimpleMessageBus_Publish_IHostBuilderExtensions

Syntax

Parameters

Returns

Type: Microsoft.Extensions.Hosting.IHostBuilder The IHostBuilder instance being configured, for fluent interaction.

UseFileSystemMessagePublisher Extension

Extension method from Microsoft.Extensions.Hosting.SimpleMessageBus_Publish_IHostBuilderExtensions

Syntax

Parameters

Returns

Type: Microsoft.Extensions.Hosting.IHostBuilder The IHostBuilder instance being configured, for fluent interaction.

UseFileSystemQueueProcessor Extension

Extension method from Microsoft.Extensions.Hosting.FileSystem_IHostBuilderExtensions
Configures SimpleMessageBus to use the local file system as the backing queue and registers the FileSystemQueueProcessor with the DI container.

Syntax

Parameters

Returns

Type: Microsoft.Extensions.Hosting.IHostBuilder The IHostBuilder instance being configured, for fluent interaction.

UseFileSystemQueueProcessor Extension

Extension method from Microsoft.Extensions.Hosting.FileSystem_IHostBuilderExtensions
Configures SimpleMessageBus to use the local file system as the backing queue and registers the FileSystemQueueProcessor with the DI container.

Syntax

Parameters

Returns

Type: Microsoft.Extensions.Hosting.IHostBuilder The IHostBuilder instance being configured, for fluent interaction.

UseIndexedDbMessagePublisher Extension

Extension method from Microsoft.Extensions.Hosting.SimpleMessageBus_Publish_IndexedDb_IHostBuilderExtensions

Syntax

Parameters

Returns

Type: Microsoft.Extensions.Hosting.IHostBuilder The IHostBuilder instance being configured, for fluent configuration.

UseKafkaMessagePublisher Extension

Extension method from Microsoft.Extensions.Hosting.SimpleMessageBus_Publish_Kafka_IHostBuilderExtensions
Configures SimpleMessageBus to publish messages to Apache Kafka. Reads configuration from the “KafkaOptions” section of IConfiguration.

Syntax

Parameters

Returns

Type: Microsoft.Extensions.Hosting.IHostBuilder The IHostBuilder instance being configured, for fluent interaction.

Exceptions

Examples

UseKafkaMessagePublisher Extension

Extension method from Microsoft.Extensions.Hosting.SimpleMessageBus_Publish_Kafka_IHostBuilderExtensions
Configures SimpleMessageBus to publish messages to Apache Kafka.

Syntax

Parameters

Returns

Type: Microsoft.Extensions.Hosting.IHostBuilder The IHostBuilder instance being configured, for fluent interaction.

Exceptions

Examples

UseKafkaProcessor Extension

Extension method from Microsoft.Extensions.Hosting.SimpleMessageBus_Dispatch_Kafka_IHostBuilderExtensions
Configures SimpleMessageBus to process messages from Apache Kafka and registers the KafkaProcessor with the DI container. Reads configuration from the “KafkaOptions” section of IConfiguration.

Syntax

Parameters

Returns

Type: Microsoft.Extensions.Hosting.IHostBuilder The IHostBuilder instance being configured, for fluent interaction.

Exceptions

Examples

UseKafkaProcessor Extension

Extension method from Microsoft.Extensions.Hosting.SimpleMessageBus_Dispatch_Kafka_IHostBuilderExtensions
Configures SimpleMessageBus to process messages from Apache Kafka and registers the KafkaProcessor with the DI container.

Syntax

Parameters

Returns

Type: Microsoft.Extensions.Hosting.IHostBuilder The IHostBuilder instance being configured, for fluent interaction.

Exceptions

Examples

UseOrderedMessageDispatcher Extension

Extension method from Microsoft.Extensions.Hosting.IHostBuilderExtensions
Configures SimpleMessageBus to use the OrderedMessageDispatcher, which processes registered IMessageHandlerIMessageHandlers</see> in series based on the order they were registered in the DI container.

Syntax

Parameters

Returns

Type: Microsoft.Extensions.Hosting.IHostBuilder The IHostBuilder instance being configured, for fluent interaction.

UseParallelMessageDispatcher Extension

Extension method from Microsoft.Extensions.Hosting.IHostBuilderExtensions
Configures SimpleMessageBus to use the ParallelMessageDispatcher, which processes registered IMessageHandlerIMessageHandlers</see> in parallel regardless of the order the order they were registered in the DI container.

Syntax

Parameters

Returns

Type: Microsoft.Extensions.Hosting.IHostBuilder The IHostBuilder instance being configured, for fluent interaction.

UseSimpleMessageBusLifetime Extension

Extension method from Microsoft.Extensions.Hosting.SimpleMessageBus_Hosting_IHostBuilderExtensions
Configures SimpleMessageBus to use either the WindowsServiceLifetime or the ConsoleLifetime depending on the currently-running context.

Syntax

Parameters

Returns

Type: Microsoft.Extensions.Hosting.IHostBuilder The IHostBuilder instance being configured, for fluent interaction.

Remarks

This method automatically detects whether the application is running as a Windows Service and configures the appropriate lifetime management. This enables the same application to run seamlessly in both development (console) and production (service) environments.