AspireQueueStorageExtensions Methods
Class Methods 6 members
Provides extension methods for registering
Queues.QueueServiceClient as a singleton in the services provided by the Hosting.IHostApplicationBuilder. Enables retries, corresponding health check, logging and telemetry. AddAzureQueue(IHostApplicationBuilder, string, Action<AzureStorageQueueSettings>, Action<IAzureClientBuilder<QueueClient, QueueClientOptions>>) Section titled AddAzureQueue(IHostApplicationBuilder, string, Action<AzureStorageQueueSettings>, Action<IAzureClientBuilder<QueueClient, QueueClientOptions>>) extension Registers
Queues.QueueClient as a singleton in the services provided by the builder. Enables retries, corresponding health check, logging and telemetry. public static class AspireQueueStorageExtensions{ public static void AddAzureQueue( this IHostApplicationBuilder builder, string connectionName, Action<AzureStorageQueueSettings>? configureSettings = null, Action<IAzureClientBuilder<QueueClient, QueueClientOptions>>? configureClientBuilder = null) { // ... }}Parameters
builder IHostApplicationBuilder The Hosting.IHostApplicationBuilder to read config from and add services to. connectionName string A name used to retrieve the connection string from the ConnectionStrings configuration section. configureSettings Action<AzureStorageQueueSettings> optional An optional method that can be used for customizing the AzureStorageQueueSettings. It's invoked after the settings are read from the configuration. configureClientBuilder Action<IAzureClientBuilder<QueueClient, QueueClientOptions>> optional An optional method that can be used for customizing the Extensions.IAzureClientBuilder`2. Exceptions
InvalidOperationException Neither AzureStorageQueuesSettings.ConnectionString nor AzureStorageQueuesSettings.ServiceUri is provided. - or - AzureStorageQueueSettings.QueueName is not provided in the configuration section. Remarks
Reads the configuration from "Aspire:Azure:Storage:Queues:{name}" section.
AddAzureQueueClient(IHostApplicationBuilder, string, Action<AzureStorageQueuesSettings>, Action<IAzureClientBuilder<QueueServiceClient, QueueClientOptions>>) Section titled AddAzureQueueClient(IHostApplicationBuilder, string, Action<AzureStorageQueuesSettings>, Action<IAzureClientBuilder<QueueServiceClient, QueueClientOptions>>) extension Registers
Queues.QueueServiceClient as a singleton in the services provided by the builder. Enables retries, corresponding health check, logging and telemetry. public static class AspireQueueStorageExtensions{ public static void AddAzureQueueClient( this IHostApplicationBuilder builder, string connectionName, Action<AzureStorageQueuesSettings>? configureSettings = null, Action<IAzureClientBuilder<QueueServiceClient, QueueClientOptions>>? configureClientBuilder = null) { // ... }}Parameters
builder IHostApplicationBuilder The Hosting.IHostApplicationBuilder to read config from and add services to. connectionName string A name used to retrieve the connection string from the ConnectionStrings configuration section. configureSettings Action<AzureStorageQueuesSettings> optional An optional method that can be used for customizing the AzureStorageQueuesSettings. It's invoked after the settings are read from the configuration. configureClientBuilder Action<IAzureClientBuilder<QueueServiceClient, QueueClientOptions>> optional An optional method that can be used for customizing the Extensions.IAzureClientBuilder`2. Exceptions
InvalidOperationException Thrown when neither AzureStorageQueuesSettings.ConnectionString nor AzureStorageQueuesSettings.ServiceUri is provided. Remarks
Reads the configuration from "Aspire:Azure:Storage:Queues" section.
AddAzureQueueServiceClient(IHostApplicationBuilder, string, Action<AzureStorageQueuesSettings>, Action<IAzureClientBuilder<QueueServiceClient, QueueClientOptions>>) Section titled AddAzureQueueServiceClient(IHostApplicationBuilder, string, Action<AzureStorageQueuesSettings>, Action<IAzureClientBuilder<QueueServiceClient, QueueClientOptions>>) extension Registers
Queues.QueueServiceClient as a singleton in the services provided by the builder. Enables retries, corresponding health check, logging and telemetry. public static class AspireQueueStorageExtensions{ public static void AddAzureQueueServiceClient( this IHostApplicationBuilder builder, string connectionName, Action<AzureStorageQueuesSettings>? configureSettings = null, Action<IAzureClientBuilder<QueueServiceClient, QueueClientOptions>>? configureClientBuilder = null) { // ... }}Parameters
builder IHostApplicationBuilder The Hosting.IHostApplicationBuilder to read config from and add services to. connectionName string A name used to retrieve the connection string from the ConnectionStrings configuration section. configureSettings Action<AzureStorageQueuesSettings> optional An optional method that can be used for customizing the AzureStorageQueuesSettings. It's invoked after the settings are read from the configuration. configureClientBuilder Action<IAzureClientBuilder<QueueServiceClient, QueueClientOptions>> optional An optional method that can be used for customizing the Extensions.IAzureClientBuilder`2. Exceptions
InvalidOperationException Thrown when neither AzureStorageQueuesSettings.ConnectionString nor AzureStorageQueuesSettings.ServiceUri is provided. Remarks
Reads the configuration from "Aspire:Azure:Storage:Queues" section.
AddKeyedAzureQueue(IHostApplicationBuilder, string, Action<AzureStorageQueueSettings>, Action<IAzureClientBuilder<QueueClient, QueueClientOptions>>) Section titled AddKeyedAzureQueue(IHostApplicationBuilder, string, Action<AzureStorageQueueSettings>, Action<IAzureClientBuilder<QueueClient, QueueClientOptions>>) extension Registers
Queues.QueueClient as a singleton in the services provided by the builder. Enables retries, corresponding health check, logging and telemetry. public static class AspireQueueStorageExtensions{ public static void AddKeyedAzureQueue( this IHostApplicationBuilder builder, string name, Action<AzureStorageQueueSettings>? configureSettings = null, Action<IAzureClientBuilder<QueueClient, QueueClientOptions>>? configureClientBuilder = null) { // ... }}Parameters
builder IHostApplicationBuilder The Hosting.IHostApplicationBuilder to read config from and add services to. name string The name of the component, which is used as the ServiceDescriptor.ServiceKey of the service and also to retrieve the connection string from the ConnectionStrings configuration section. configureSettings Action<AzureStorageQueueSettings> optional An optional method that can be used for customizing the AzureStorageQueueSettings. It's invoked after the settings are read from the configuration. configureClientBuilder Action<IAzureClientBuilder<QueueClient, QueueClientOptions>> optional An optional method that can be used for customizing the Extensions.IAzureClientBuilder`2. Exceptions
InvalidOperationException Neither AzureStorageQueuesSettings.ConnectionString nor AzureStorageQueuesSettings.ServiceUri is provided. - or - AzureStorageQueueSettings.QueueName is not provided in the configuration section. Remarks
Reads the configuration from "Aspire:Azure:Storage:Queues:{name}" section.
AddKeyedAzureQueueClient(IHostApplicationBuilder, string, Action<AzureStorageQueuesSettings>, Action<IAzureClientBuilder<QueueServiceClient, QueueClientOptions>>) Section titled AddKeyedAzureQueueClient(IHostApplicationBuilder, string, Action<AzureStorageQueuesSettings>, Action<IAzureClientBuilder<QueueServiceClient, QueueClientOptions>>) extension Registers
Queues.QueueServiceClient as a singleton for given name in the services provided by the builder. Enables retries, corresponding health check, logging and telemetry. public static class AspireQueueStorageExtensions{ public static void AddKeyedAzureQueueClient( this IHostApplicationBuilder builder, string name, Action<AzureStorageQueuesSettings>? configureSettings = null, Action<IAzureClientBuilder<QueueServiceClient, QueueClientOptions>>? configureClientBuilder = null) { // ... }}Parameters
builder IHostApplicationBuilder The Hosting.IHostApplicationBuilder to read config from and add services to. name string The name of the component, which is used as the ServiceDescriptor.ServiceKey of the service and also to retrieve the connection string from the ConnectionStrings configuration section. configureSettings Action<AzureStorageQueuesSettings> optional An optional method that can be used for customizing the AzureStorageQueuesSettings. It's invoked after the settings are read from the configuration. configureClientBuilder Action<IAzureClientBuilder<QueueServiceClient, QueueClientOptions>> optional An optional method that can be used for customizing the Extensions.IAzureClientBuilder`2. Exceptions
InvalidOperationException Thrown when neither AzureStorageQueuesSettings.ConnectionString nor AzureStorageQueuesSettings.ServiceUri is provided. Remarks
Reads the configuration from "Aspire:Azure:Storage:Queues:{name}" section.
AddKeyedAzureQueueServiceClient(IHostApplicationBuilder, string, Action<AzureStorageQueuesSettings>, Action<IAzureClientBuilder<QueueServiceClient, QueueClientOptions>>) Section titled AddKeyedAzureQueueServiceClient(IHostApplicationBuilder, string, Action<AzureStorageQueuesSettings>, Action<IAzureClientBuilder<QueueServiceClient, QueueClientOptions>>) extension Registers
Queues.QueueServiceClient as a singleton for given name in the services provided by the builder. Enables retries, corresponding health check, logging and telemetry. public static class AspireQueueStorageExtensions{ public static void AddKeyedAzureQueueServiceClient( this IHostApplicationBuilder builder, string name, Action<AzureStorageQueuesSettings>? configureSettings = null, Action<IAzureClientBuilder<QueueServiceClient, QueueClientOptions>>? configureClientBuilder = null) { // ... }}Parameters
builder IHostApplicationBuilder The Hosting.IHostApplicationBuilder to read config from and add services to. name string The name of the component, which is used as the ServiceDescriptor.ServiceKey of the service and also to retrieve the connection string from the ConnectionStrings configuration section. configureSettings Action<AzureStorageQueuesSettings> optional An optional method that can be used for customizing the AzureStorageQueuesSettings. It's invoked after the settings are read from the configuration. configureClientBuilder Action<IAzureClientBuilder<QueueServiceClient, QueueClientOptions>> optional An optional method that can be used for customizing the Extensions.IAzureClientBuilder`2. Exceptions
InvalidOperationException Thrown when neither AzureStorageQueuesSettings.ConnectionString nor AzureStorageQueuesSettings.ServiceUri is provided. Remarks
Reads the configuration from "Aspire:Azure:Storage:Queues:{name}" section.