AspireTablesExtensions Methods
Class Methods 4 members
Provides extension methods for registering
Tables.TableServiceClient as a singleton in the services provided by the Hosting.IHostApplicationBuilder. AddAzureTableClient(IHostApplicationBuilder, string, Action<AzureDataTablesSettings>, Action<IAzureClientBuilder<TableServiceClient, TableClientOptions>>) Section titled AddAzureTableClient(IHostApplicationBuilder, string, Action<AzureDataTablesSettings>, Action<IAzureClientBuilder<TableServiceClient, TableClientOptions>>) extension Registers
Tables.TableServiceClient as a singleton in the services provided by the builder. Enables retries, corresponding health check, logging and telemetry. public static class AspireTablesExtensions{ public static void AddAzureTableClient( this IHostApplicationBuilder builder, string connectionName, Action<AzureDataTablesSettings>? configureSettings = null, Action<IAzureClientBuilder<TableServiceClient, TableClientOptions>>? 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<AzureDataTablesSettings> optional An optional method that can be used for customizing the AzureDataTablesSettings. It's invoked after the settings are read from the configuration. configureClientBuilder Action<IAzureClientBuilder<TableServiceClient, TableClientOptions>> optional An optional method that can be used for customizing the Extensions.IAzureClientBuilder`2. Exceptions
InvalidOperationException Thrown when neither AzureDataTablesSettings.ConnectionString nor AzureDataTablesSettings.ServiceUri is provided. Remarks
Reads the configuration from "Aspire:Azure:Data:Tables" section.
AddAzureTableServiceClient(IHostApplicationBuilder, string, Action<AzureDataTablesSettings>, Action<IAzureClientBuilder<TableServiceClient, TableClientOptions>>) Section titled AddAzureTableServiceClient(IHostApplicationBuilder, string, Action<AzureDataTablesSettings>, Action<IAzureClientBuilder<TableServiceClient, TableClientOptions>>) extension Registers
Tables.TableServiceClient as a singleton in the services provided by the builder. Enables retries, corresponding health check, logging and telemetry. public static class AspireTablesExtensions{ public static void AddAzureTableServiceClient( this IHostApplicationBuilder builder, string connectionName, Action<AzureDataTablesSettings>? configureSettings = null, Action<IAzureClientBuilder<TableServiceClient, TableClientOptions>>? 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<AzureDataTablesSettings> optional An optional method that can be used for customizing the AzureDataTablesSettings. It's invoked after the settings are read from the configuration. configureClientBuilder Action<IAzureClientBuilder<TableServiceClient, TableClientOptions>> optional An optional method that can be used for customizing the Extensions.IAzureClientBuilder`2. Exceptions
InvalidOperationException Thrown when neither AzureDataTablesSettings.ConnectionString nor AzureDataTablesSettings.ServiceUri is provided. Remarks
Reads the configuration from "Aspire:Azure:Data:Tables" section.
AddKeyedAzureTableClient(IHostApplicationBuilder, string, Action<AzureDataTablesSettings>, Action<IAzureClientBuilder<TableServiceClient, TableClientOptions>>) Section titled AddKeyedAzureTableClient(IHostApplicationBuilder, string, Action<AzureDataTablesSettings>, Action<IAzureClientBuilder<TableServiceClient, TableClientOptions>>) extension Registers
Tables.TableServiceClient as a singleton in the services provided by the builder. Enables retries, corresponding health check, logging and telemetry. public static class AspireTablesExtensions{ public static void AddKeyedAzureTableClient( this IHostApplicationBuilder builder, string name, Action<AzureDataTablesSettings>? configureSettings = null, Action<IAzureClientBuilder<TableServiceClient, TableClientOptions>>? configureClientBuilder = null) { // ... }}Parameters
builder IHostApplicationBuilder The Hosting.IHostApplicationBuilder to read config from and add services to. name string configureSettings Action<AzureDataTablesSettings> optional An optional method that can be used for customizing the AzureDataTablesSettings. It's invoked after the settings are read from the configuration. configureClientBuilder Action<IAzureClientBuilder<TableServiceClient, TableClientOptions>> optional An optional method that can be used for customizing the Extensions.IAzureClientBuilder`2. Exceptions
InvalidOperationException Thrown when neither AzureDataTablesSettings.ConnectionString nor AzureDataTablesSettings.ServiceUri is provided. Remarks
Reads the configuration from "Aspire:Azure:Data:Tables" section.
AddKeyedAzureTableServiceClient(IHostApplicationBuilder, string, Action<AzureDataTablesSettings>, Action<IAzureClientBuilder<TableServiceClient, TableClientOptions>>) Section titled AddKeyedAzureTableServiceClient(IHostApplicationBuilder, string, Action<AzureDataTablesSettings>, Action<IAzureClientBuilder<TableServiceClient, TableClientOptions>>) extension Registers
Tables.TableServiceClient as a singleton for given name in the services provided by the builder. Enables retries, corresponding health check, logging and telemetry. public static class AspireTablesExtensions{ public static void AddKeyedAzureTableServiceClient( this IHostApplicationBuilder builder, string name, Action<AzureDataTablesSettings>? configureSettings = null, Action<IAzureClientBuilder<TableServiceClient, TableClientOptions>>? 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<AzureDataTablesSettings> optional An optional method that can be used for customizing the AzureDataTablesSettings. It's invoked after the settings are read from the configuration. configureClientBuilder Action<IAzureClientBuilder<TableServiceClient, TableClientOptions>> optional An optional method that can be used for customizing the Extensions.IAzureClientBuilder`2. Exceptions
InvalidOperationException Thrown when neither AzureDataTablesSettings.ConnectionString nor AzureDataTablesSettings.ServiceUri is provided. Remarks
Reads the configuration from "Aspire:Azure:Data:Tables:{name}" section.