Skip to content
DocsTry Aspire
DocsTry

AspireQueueStorageExtensions Methods

ClassMethods6 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)
{
// ...
}
}
builderIHostApplicationBuilderThe Hosting.IHostApplicationBuilder to read config from and add services to.
connectionNamestringA name used to retrieve the connection string from the ConnectionStrings configuration section.
configureSettingsAction<AzureStorageQueueSettings>optional An optional method that can be used for customizing the AzureStorageQueueSettings. It's invoked after the settings are read from the configuration.
configureClientBuilderAction<IAzureClientBuilder<QueueClient, QueueClientOptions>>optional An optional method that can be used for customizing the Extensions.IAzureClientBuilder`2.
InvalidOperationException Neither AzureStorageQueuesSettings.ConnectionString nor AzureStorageQueuesSettings.ServiceUri is provided. - or - AzureStorageQueueSettings.QueueName is not provided in the configuration section.
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)
{
// ...
}
}
builderIHostApplicationBuilderThe Hosting.IHostApplicationBuilder to read config from and add services to.
connectionNamestringA name used to retrieve the connection string from the ConnectionStrings configuration section.
configureSettingsAction<AzureStorageQueuesSettings>optionalAn optional method that can be used for customizing the AzureStorageQueuesSettings. It's invoked after the settings are read from the configuration.
configureClientBuilderAction<IAzureClientBuilder<QueueServiceClient, QueueClientOptions>>optionalAn optional method that can be used for customizing the Extensions.IAzureClientBuilder`2.
InvalidOperationExceptionThrown when neither AzureStorageQueuesSettings.ConnectionString nor AzureStorageQueuesSettings.ServiceUri is provided.
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)
{
// ...
}
}
builderIHostApplicationBuilderThe Hosting.IHostApplicationBuilder to read config from and add services to.
connectionNamestringA name used to retrieve the connection string from the ConnectionStrings configuration section.
configureSettingsAction<AzureStorageQueuesSettings>optionalAn optional method that can be used for customizing the AzureStorageQueuesSettings. It's invoked after the settings are read from the configuration.
configureClientBuilderAction<IAzureClientBuilder<QueueServiceClient, QueueClientOptions>>optionalAn optional method that can be used for customizing the Extensions.IAzureClientBuilder`2.
InvalidOperationExceptionThrown when neither AzureStorageQueuesSettings.ConnectionString nor AzureStorageQueuesSettings.ServiceUri is provided.
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)
{
// ...
}
}
builderIHostApplicationBuilderThe Hosting.IHostApplicationBuilder to read config from and add services to.
namestring 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.
configureSettingsAction<AzureStorageQueueSettings>optional An optional method that can be used for customizing the AzureStorageQueueSettings. It's invoked after the settings are read from the configuration.
configureClientBuilderAction<IAzureClientBuilder<QueueClient, QueueClientOptions>>optional An optional method that can be used for customizing the Extensions.IAzureClientBuilder`2.
InvalidOperationException Neither AzureStorageQueuesSettings.ConnectionString nor AzureStorageQueuesSettings.ServiceUri is provided. - or - AzureStorageQueueSettings.QueueName is not provided in the configuration section.
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)
{
// ...
}
}
builderIHostApplicationBuilderThe Hosting.IHostApplicationBuilder to read config from and add services to.
namestringThe 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.
configureSettingsAction<AzureStorageQueuesSettings>optionalAn optional method that can be used for customizing the AzureStorageQueuesSettings. It's invoked after the settings are read from the configuration.
configureClientBuilderAction<IAzureClientBuilder<QueueServiceClient, QueueClientOptions>>optionalAn optional method that can be used for customizing the Extensions.IAzureClientBuilder`2.
InvalidOperationExceptionThrown when neither AzureStorageQueuesSettings.ConnectionString nor AzureStorageQueuesSettings.ServiceUri is provided.
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)
{
// ...
}
}
builderIHostApplicationBuilderThe Hosting.IHostApplicationBuilder to read config from and add services to.
namestringThe 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.
configureSettingsAction<AzureStorageQueuesSettings>optionalAn optional method that can be used for customizing the AzureStorageQueuesSettings. It's invoked after the settings are read from the configuration.
configureClientBuilderAction<IAzureClientBuilder<QueueServiceClient, QueueClientOptions>>optionalAn optional method that can be used for customizing the Extensions.IAzureClientBuilder`2.
InvalidOperationExceptionThrown when neither AzureStorageQueuesSettings.ConnectionString nor AzureStorageQueuesSettings.ServiceUri is provided.
Reads the configuration from "Aspire:Azure:Storage:Queues:{name}" section.