diff --git a/src/Aspire.Hosting.Azure.Storage/AzureStorageExtensions.cs b/src/Aspire.Hosting.Azure.Storage/AzureStorageExtensions.cs index d2b39e6285..c7220c8a70 100644 --- a/src/Aspire.Hosting.Azure.Storage/AzureStorageExtensions.cs +++ b/src/Aspire.Hosting.Azure.Storage/AzureStorageExtensions.cs @@ -110,30 +110,6 @@ public static IResourceBuilder RunAsEmulator(this IResourc return builder; } - /// - /// Configures an Azure Storage resource to be emulated using Azurite. This resource requires an to be added to the application model. This version the package defaults to version 3.29.0 of the mcr.microsoft.com/azure-storage/azurite container image. - /// - /// The Azure storage resource builder. - /// Callback that exposes underlying container used for emulation to allow for customization. - /// A reference to the . - [Obsolete("Renamed to RunAsEmulator. Will be removed in next preview.")] - public static IResourceBuilder UseEmulator(this IResourceBuilder builder, Action>? configureContainer = null) - { - return builder.RunAsEmulator(configureContainer); - } - - /// - /// Enables persistence in the Azure Storage emulator. - /// - /// The builder for the . - /// Relative path to the AppHost where emulator storage is persisted between runs. - /// A builder for the . - [Obsolete("Use WithDataBindMount or WithDataVolume instead. Will be removed in next preview.")] - public static IResourceBuilder UsePersistence(this IResourceBuilder builder, string? path = null) - { - return builder.WithDataBindMount(path); - } - /// /// Adds a bind mount for the data folder to an Azure Storage emulator resource. /// diff --git a/src/Aspire.Hosting.Azure/AzureBicepResource.cs b/src/Aspire.Hosting.Azure/AzureBicepResource.cs index 63d7fe89d9..73fd0496fa 100644 --- a/src/Aspire.Hosting.Azure/AzureBicepResource.cs +++ b/src/Aspire.Hosting.Azure/AzureBicepResource.cs @@ -127,14 +127,6 @@ public virtual string GetBicepTemplateString() return File.ReadAllText(TemplateFile); } - /// TODO: Remove this method once AppInsights CDK is removed. - /// - /// Create a Bicep identifier safe version of the resource name. - /// - /// A string which is safe to use as a Bicep identifier. - [Obsolete("This method is obsolete and will be removed before release.")] - public string CreateBicepResourceName() => Name.ToLower(); // Insufficient but we don't care because its going to be deleted. - /// /// Writes the resource to the manifest. /// diff --git a/src/Aspire.Hosting.Oracle/OracleDatabaseBuilderExtensions.cs b/src/Aspire.Hosting.Oracle/OracleDatabaseBuilderExtensions.cs index a46150c03b..dab8b84b45 100644 --- a/src/Aspire.Hosting.Oracle/OracleDatabaseBuilderExtensions.cs +++ b/src/Aspire.Hosting.Oracle/OracleDatabaseBuilderExtensions.cs @@ -13,21 +13,6 @@ public static class OracleDatabaseBuilderExtensions { private const string PasswordEnvVarName = "ORACLE_PWD"; - /// - /// Adds a Oracle Database resource to the application model. A container is used for local development. This version the package defaults to the 23.3.0.0 tag of the container-registry.oracle.com/database/free container image - /// - /// The . - /// The name of the resource. This name will be used as the connection string name when referenced in a dependency. - /// The host port for Oracle Database. - /// The password for the Oracle Database container. Defaults to a random password. - /// A reference to the . - [Obsolete("Use AddOracle instead", error: true)] - public static IResourceBuilder AddOracleDatabase(this IDistributedApplicationBuilder builder, string name, int? port = null, string? password = null) - { - // can't simulate the old behavior with taking a string password and converting it to a Parameter - throw new NotSupportedException(); - } - /// /// Adds a Oracle Server resource to the application model. A container is used for local development. This version the package defaults to the 23.3.0.0 tag of the container-registry.oracle.com/database/free container image /// diff --git a/src/Aspire.Hosting/ApplicationModel/EnvironmentCallbackContext.cs b/src/Aspire.Hosting/ApplicationModel/EnvironmentCallbackContext.cs index 5285e5daae..12afa8e705 100644 --- a/src/Aspire.Hosting/ApplicationModel/EnvironmentCallbackContext.cs +++ b/src/Aspire.Hosting/ApplicationModel/EnvironmentCallbackContext.cs @@ -13,12 +13,6 @@ namespace Aspire.Hosting.ApplicationModel; /// A . public class EnvironmentCallbackContext(DistributedApplicationExecutionContext executionContext, Dictionary? environmentVariables = null, CancellationToken cancellationToken = default) { - /// - /// Obsolete. Use ExecutionContext instead. Will be removed in next preview. - /// - [Obsolete("Use ExecutionContext instead")] - public string PublisherName => ExecutionContext.IsPublishMode ? "manifest" : "dcp"; - /// /// Gets the environment variables associated with the callback context. /// diff --git a/src/Aspire.Hosting/ExecutableResourceBuilderExtensions.cs b/src/Aspire.Hosting/ExecutableResourceBuilderExtensions.cs index 2a21ea8030..b273a9b1b9 100644 --- a/src/Aspire.Hosting/ExecutableResourceBuilderExtensions.cs +++ b/src/Aspire.Hosting/ExecutableResourceBuilderExtensions.cs @@ -36,18 +36,6 @@ public static IResourceBuilder AddExecutable(this IDistribut }); } - /// - /// Adds annotation to to support containerization during deployment. - /// - /// Type of executable resource - /// Resource builder - /// A reference to the . - [Obsolete("Use PublishAsDockerFile instead")] - public static IResourceBuilder AsDockerfileInManifest(this IResourceBuilder builder) where T : ExecutableResource - { - return builder.PublishAsDockerFile(); - } - /// /// Adds annotation to to support containerization during deployment. /// The resulting container image is built, and when the optional are provided diff --git a/src/Aspire.Hosting/ProjectResourceBuilderExtensions.cs b/src/Aspire.Hosting/ProjectResourceBuilderExtensions.cs index 605aac5924..7e35a57c9f 100644 --- a/src/Aspire.Hosting/ProjectResourceBuilderExtensions.cs +++ b/src/Aspire.Hosting/ProjectResourceBuilderExtensions.cs @@ -200,29 +200,6 @@ public static IResourceBuilder WithReplicas(this IResourceBu return builder; } - /// - /// Configures which launch profile should be used when running the project. - /// - /// The project resource builder. - /// The name of the launch profile to use for execution. - /// A reference to the . - [Obsolete("This API is replaced by the AddProject overload that accepts a launchProfileName. Method will be removed by GA.")] - public static IResourceBuilder WithLaunchProfile(this IResourceBuilder builder, string launchProfileName) - { - throw new InvalidOperationException("This API is replaced by the AddProject overload that accepts a launchProfileName. Method will be removed by GA."); - } - - /// - /// Configures the project to exclude launch profile settings when running. - /// - /// The project resource builder. - /// A reference to the . - [Obsolete("This API is replaced by the AddProject overload that accepts a launchProfileName. Null means exclude launch profile. Method will be removed by GA.")] - public static IResourceBuilder ExcludeLaunchProfile(this IResourceBuilder builder) - { - throw new InvalidOperationException("This API is replaced by the AddProject overload that accepts a launchProfileName. Null means exclude launch profile. Method will be removed by GA."); - } - /// /// Configures the project to disable forwarded headers when being published. /// diff --git a/src/Components/Aspire.Azure.AI.OpenAI/AspireAzureOpenAIExtensions.cs b/src/Components/Aspire.Azure.AI.OpenAI/AspireAzureOpenAIExtensions.cs index de1d96fb67..583c357261 100644 --- a/src/Components/Aspire.Azure.AI.OpenAI/AspireAzureOpenAIExtensions.cs +++ b/src/Components/Aspire.Azure.AI.OpenAI/AspireAzureOpenAIExtensions.cs @@ -22,22 +22,6 @@ public static class AspireAzureOpenAIExtensions { private const string DefaultConfigSectionName = "Aspire:Azure:AI:OpenAI"; - /// - /// Registers as a singleton in the services provided by the . - /// - /// The to read config from and add services to. - /// A name used to retrieve the connection string from the ConnectionStrings configuration section. - /// An optional method that can be used for customizing the . It's invoked after the settings are read from the configuration. - /// An optional method that can be used for customizing the . - /// Reads the configuration from "Aspire.Azure.AI.OpenAI" section. - [Obsolete($"This method is obsolete and will be removed in a future version. Use {nameof(AddAzureOpenAIClient)} instead.")] - public static void AddAzureOpenAI( - this IHostApplicationBuilder builder, - string connectionName, - Action? configureSettings = null, - Action>? configureClientBuilder = null) - => AddAzureOpenAIClient(builder, connectionName, configureSettings, configureClientBuilder); - /// /// Registers as a singleton in the services provided by the . /// @@ -55,22 +39,6 @@ public static void AddAzureOpenAIClient( new OpenAIComponent().AddClient(builder, DefaultConfigSectionName, configureSettings, configureClientBuilder, connectionName, serviceKey: null); } - /// - /// Registers as a singleton for given in the services provided by the . - /// - /// The to read config from and add services to. - /// The name of the component, which is used as the of the service and also to retrieve the connection string from the ConnectionStrings configuration section. - /// An optional method that can be used for customizing the . It's invoked after the settings are read from the configuration. - /// An optional method that can be used for customizing the . - /// Reads the configuration from "Aspire.Azure.AI.OpenAI:{name}" section. - [Obsolete($"This method is obsolete and will be removed in a future version. Use {nameof(AddKeyedAzureOpenAIClient)} instead.")] - public static void AddKeyedAzureOpenAI( - this IHostApplicationBuilder builder, - string name, - Action? configureSettings = null, - Action>? configureClientBuilder = null) - => AddKeyedAzureOpenAIClient(builder, name, configureSettings, configureClientBuilder); - /// /// Registers as a singleton for given in the services provided by the . /// diff --git a/src/Components/Aspire.Azure.Data.Tables/AspireTablesExtensions.cs b/src/Components/Aspire.Azure.Data.Tables/AspireTablesExtensions.cs index 21628473eb..eb6df2ab9c 100644 --- a/src/Components/Aspire.Azure.Data.Tables/AspireTablesExtensions.cs +++ b/src/Components/Aspire.Azure.Data.Tables/AspireTablesExtensions.cs @@ -21,24 +21,6 @@ public static class AspireTablesExtensions { private const string DefaultConfigSectionName = "Aspire:Azure:Data:Tables"; - /// - /// Registers as a singleton in the services provided by the . - /// Enables retries, corresponding health check, logging and telemetry. - /// - /// The to read config from and add services to. - /// A name used to retrieve the connection string from the ConnectionStrings configuration section. - /// An optional method that can be used for customizing the . It's invoked after the settings are read from the configuration. - /// An optional method that can be used for customizing the . - /// Reads the configuration from "Aspire:Azure:Data:Tables" section. - /// Thrown when neither nor is provided. - [Obsolete($"This method is obsolete and will be removed in a future version. Use {nameof(AddAzureTableClient)} instead.")] - public static void AddAzureTableService( - this IHostApplicationBuilder builder, - string connectionName, - Action? configureSettings = null, - Action>? configureClientBuilder = null) - => AddAzureTableClient(builder, connectionName, configureSettings, configureClientBuilder); - /// /// Registers as a singleton in the services provided by the . /// Enables retries, corresponding health check, logging and telemetry. @@ -58,24 +40,6 @@ public static void AddAzureTableClient( new TableServiceComponent().AddClient(builder, DefaultConfigSectionName, configureSettings, configureClientBuilder, connectionName, serviceKey: null); } - /// - /// Registers as a singleton for given in the services provided by the . - /// Enables retries, corresponding health check, logging and telemetry. - /// - /// The to read config from and add services to. - /// The name of the component, which is used as the of the service and also to retrieve the connection string from the ConnectionStrings configuration section. - /// An optional method that can be used for customizing the . It's invoked after the settings are read from the configuration. - /// An optional method that can be used for customizing the . - /// Reads the configuration from "Aspire:Azure:Data:Tables:{name}" section. - /// Thrown when neither nor is provided. - [Obsolete($"This method is obsolete and will be removed in a future version. Use {nameof(AddKeyedAzureTableClient)} instead.")] - public static void AddKeyedAzureTableService( - this IHostApplicationBuilder builder, - string name, - Action? configureSettings = null, - Action>? configureClientBuilder = null) - => AddKeyedAzureTableClient(builder, name, configureSettings, configureClientBuilder); - /// /// Registers as a singleton for given in the services provided by the . /// Enables retries, corresponding health check, logging and telemetry. diff --git a/src/Components/Aspire.Azure.Messaging.ServiceBus/AspireServiceBusExtensions.cs b/src/Components/Aspire.Azure.Messaging.ServiceBus/AspireServiceBusExtensions.cs index 9f846d99e8..e1860e5bee 100644 --- a/src/Components/Aspire.Azure.Messaging.ServiceBus/AspireServiceBusExtensions.cs +++ b/src/Components/Aspire.Azure.Messaging.ServiceBus/AspireServiceBusExtensions.cs @@ -22,23 +22,6 @@ public static class AspireServiceBusExtensions { private const string DefaultConfigSectionName = "Aspire:Azure:Messaging:ServiceBus"; - /// - /// Registers as a singleton in the services provided by the . - /// - /// The to read config from and add services to. - /// A name used to retrieve the connection string from the ConnectionStrings configuration section. - /// An optional method that can be used for customizing the . It's invoked after the settings are read from the configuration. - /// An optional method that can be used for customizing the . - /// Reads the configuration from "Aspire:Azure:Messaging:ServiceBus" section. - /// Thrown when neither nor is provided. - [Obsolete($"This method is obsolete and will be removed in a future version. Use {nameof(AddAzureServiceBusClient)} instead.")] - public static void AddAzureServiceBus( - this IHostApplicationBuilder builder, - string connectionName, - Action? configureSettings = null, - Action>? configureClientBuilder = null) - => AddAzureServiceBusClient(builder, connectionName, configureSettings, configureClientBuilder); - /// /// Registers as a singleton in the services provided by the . /// @@ -57,23 +40,6 @@ public static void AddAzureServiceBusClient( new MessageBusComponent().AddClient(builder, DefaultConfigSectionName, configureSettings, configureClientBuilder, connectionName, serviceKey: null); } - /// - /// Registers as a singleton for given in the services provided by the . - /// - /// The to read config from and add services to. - /// The name of the component, which is used as the of the service and also to retrieve the connection string from the ConnectionStrings configuration section. - /// An optional method that can be used for customizing the . It's invoked after the settings are read from the configuration. - /// An optional method that can be used for customizing the . - /// Reads the configuration from "Aspire:Azure:Messaging:ServiceBus:{name}" section. - /// Thrown when neither nor is provided. - [Obsolete($"This method is obsolete and will be removed in a future version. Use {nameof(AddKeyedAzureServiceBusClient)} instead.")] - public static void AddKeyedAzureServiceBus( - this IHostApplicationBuilder builder, - string name, - Action? configureSettings = null, - Action>? configureClientBuilder = null) - => AddKeyedAzureServiceBusClient(builder, name, configureSettings, configureClientBuilder); - /// /// Registers as a singleton for given in the services provided by the . /// diff --git a/src/Components/Aspire.Azure.Search.Documents/AspireAzureSearchExtensions.cs b/src/Components/Aspire.Azure.Search.Documents/AspireAzureSearchExtensions.cs index 35c305c015..94cad12f11 100644 --- a/src/Components/Aspire.Azure.Search.Documents/AspireAzureSearchExtensions.cs +++ b/src/Components/Aspire.Azure.Search.Documents/AspireAzureSearchExtensions.cs @@ -23,22 +23,6 @@ public static class AspireAzureSearchExtensions { private const string DefaultConfigSectionName = "Aspire:Azure:Search:Documents"; - /// - /// Registers as a singleton in the services provided by the . - /// - /// The to read config from and add services to. - /// A name used to retrieve the connection string from the ConnectionStrings configuration section. - /// An optional method that can be used for customizing the . It's invoked after the settings are read from the configuration. - /// An optional method that can be used for customizing the . - /// Reads the configuration from "Aspire:Azure:Search:Documents" section. - [Obsolete($"This method is obsolete and will be removed in a future version. Use {nameof(AddAzureSearchClient)} instead.")] - public static void AddAzureSearch( - this IHostApplicationBuilder builder, - string connectionName, - Action? configureSettings = null, - Action>? configureClientBuilder = null) - => AddAzureSearchClient(builder, connectionName, configureSettings, configureClientBuilder); - /// /// Registers as a singleton in the services provided by the . /// @@ -56,22 +40,6 @@ public static void AddAzureSearchClient( new AzureSearchComponent().AddClient(builder, DefaultConfigSectionName, configureSettings, configureClientBuilder, connectionName, serviceKey: null); } - /// - /// Registers as a singleton for given in the services provided by the . - /// - /// The to read config from and add services to. - /// The name of the component, which is used as the of the service and also to retrieve the connection string from the ConnectionStrings configuration section. - /// An optional method that can be used for customizing the . It's invoked after the settings are read from the configuration. - /// An optional method that can be used for customizing the . - /// Reads the configuration from "Aspire:Azure:Search:Documents:{name}" section. - [Obsolete($"This method is obsolete and will be removed in a future version. Use {nameof(AddKeyedAzureSearchClient)} instead.")] - public static void AddKeyedAzureSearch( - this IHostApplicationBuilder builder, - string name, - Action? configureSettings = null, - Action>? configureClientBuilder = null) - => AddKeyedAzureSearchClient(builder, name, configureSettings, configureClientBuilder); - /// /// Registers as a singleton for given in the services provided by the . /// diff --git a/src/Components/Aspire.Azure.Security.KeyVault/AspireKeyVaultExtensions.cs b/src/Components/Aspire.Azure.Security.KeyVault/AspireKeyVaultExtensions.cs index 826b6d86ed..912cfa3615 100644 --- a/src/Components/Aspire.Azure.Security.KeyVault/AspireKeyVaultExtensions.cs +++ b/src/Components/Aspire.Azure.Security.KeyVault/AspireKeyVaultExtensions.cs @@ -23,24 +23,6 @@ public static class AspireKeyVaultExtensions { internal const string DefaultConfigSectionName = "Aspire:Azure:Security:KeyVault"; - /// - /// Registers as a singleton in the services provided by the . - /// Enables retries, corresponding health check, logging and telemetry. - /// - /// The to read config from and add services to. - /// A name used to retrieve the connection string from the ConnectionStrings configuration section. - /// An optional method that can be used for customizing the . It's invoked after the settings are read from the configuration. - /// An optional method that can be used for customizing the . - /// Reads the configuration from "Aspire:Azure:Security:KeyVault" section. - /// Thrown when mandatory is not provided. - [Obsolete($"This method is obsolete and will be removed in a future version. Use {nameof(AddAzureKeyVaultClient)} instead.")] - public static void AddAzureKeyVaultSecrets( - this IHostApplicationBuilder builder, - string connectionName, - Action? configureSettings = null, - Action>? configureClientBuilder = null) - => AddAzureKeyVaultClient(builder, connectionName, configureSettings, configureClientBuilder); - /// /// Registers as a singleton in the services provided by the . /// Enables retries, corresponding health check, logging and telemetry. @@ -60,24 +42,6 @@ public static void AddAzureKeyVaultClient( new KeyVaultComponent().AddClient(builder, DefaultConfigSectionName, configureSettings, configureClientBuilder, connectionName, serviceKey: null); } - /// - /// Registers as a singleton for given in the services provided by the . - /// Enables retries, corresponding health check, logging and telemetry. - /// - /// The to read config from and add services to. - /// The name of the component, which is used as the of the service and also to retrieve the connection information from the ConnectionStrings configuration section. - /// An optional method that can be used for customizing the . It's invoked after the settings are read from the configuration. - /// An optional method that can be used for customizing the . - /// Reads the configuration from "Aspire:Azure:Security:KeyVault:{name}" section. - /// Thrown when mandatory is not provided. - [Obsolete($"This method is obsolete and will be removed in a future version. Use {nameof(AddKeyedAzureKeyVaultClient)} instead.")] - public static void AddKeyedAzureKeyVaultSecrets( - this IHostApplicationBuilder builder, - string name, - Action? configureSettings = null, - Action>? configureClientBuilder = null) - => AddKeyedAzureKeyVaultClient(builder, name, configureSettings, configureClientBuilder); - /// /// Registers as a singleton for given in the services provided by the . /// Enables retries, corresponding health check, logging and telemetry. @@ -101,23 +65,6 @@ public static void AddKeyedAzureKeyVaultClient( new KeyVaultComponent().AddClient(builder, configurationSectionName, configureSettings, configureClientBuilder, connectionName: name, serviceKey: name); } - /// - /// Adds the Azure KeyVault secrets to be configuration values in the . - /// - /// The to add the secrets to. - /// A name used to retrieve the connection string from the ConnectionStrings configuration section. - /// An optional method that can be used for customizing the . It's invoked after the settings are read from the configuration. - /// An optional method that can be used for customizing the . - /// An optional instance to configure the behavior of the configuration provider. - [Obsolete($"This method is obsolete and will be removed in a future version. Use {nameof(AddAzureKeyVaultSecrets)} instead.")] - public static void AddKeyVaultSecrets( - this IConfigurationManager configurationManager, - string connectionName, - Action? configureSettings = null, - Action? configureClientOptions = null, - AzureKeyVaultConfigurationOptions? options = null) - => AddAzureKeyVaultSecrets(configurationManager, connectionName, configureSettings, configureClientOptions, options); - /// /// Adds the Azure KeyVault secrets to be configuration values in the . /// diff --git a/src/Components/Aspire.Azure.Storage.Blobs/AspireBlobStorageExtensions.cs b/src/Components/Aspire.Azure.Storage.Blobs/AspireBlobStorageExtensions.cs index 7fd3120e6d..ce840e7922 100644 --- a/src/Components/Aspire.Azure.Storage.Blobs/AspireBlobStorageExtensions.cs +++ b/src/Components/Aspire.Azure.Storage.Blobs/AspireBlobStorageExtensions.cs @@ -21,24 +21,6 @@ public static class AspireBlobStorageExtensions { private const string DefaultConfigSectionName = "Aspire:Azure:Storage:Blobs"; - /// - /// Registers as a singleton in the services provided by the . - /// Enables retries, corresponding health check, logging and telemetry. - /// - /// The to read config from and add services to. - /// A name used to retrieve the connection string from the ConnectionStrings configuration section. - /// An optional method that can be used for customizing the . It's invoked after the settings are read from the configuration. - /// An optional method that can be used for customizing the . - /// Reads the configuration from "Aspire:Azure:Storage:Blobs" section. - /// Thrown when neither nor is provided. - [Obsolete($"This method is obsolete and will be removed in a future version. Use {nameof(AddAzureBlobClient)} instead.")] - public static void AddAzureBlobService( - this IHostApplicationBuilder builder, - string connectionName, - Action? configureSettings = null, - Action>? configureClientBuilder = null) - => AddAzureBlobClient(builder, connectionName, configureSettings, configureClientBuilder); - /// /// Registers as a singleton in the services provided by the . /// Enables retries, corresponding health check, logging and telemetry. @@ -58,24 +40,6 @@ public static void AddAzureBlobClient( new BlobStorageComponent().AddClient(builder, DefaultConfigSectionName, configureSettings, configureClientBuilder, connectionName, serviceKey: null); } - /// - /// Registers as a singleton for given in the services provided by the . - /// Enables retries, corresponding health check, logging and telemetry. - /// - /// The to read config from and add services to. - /// The name of the component, which is used as the of the service and also to retrieve the connection string from the ConnectionStrings configuration section. - /// An optional method that can be used for customizing the . It's invoked after the settings are read from the configuration. - /// An optional method that can be used for customizing the . - /// Reads the configuration from "Aspire:Azure:Storage:Blobs:{name}" section. - /// Thrown when neither nor is provided. - [Obsolete($"This method is obsolete and will be removed in a future version. Use {nameof(AddKeyedAzureBlobClient)} instead.")] - public static void AddKeyedAzureBlobService( - this IHostApplicationBuilder builder, - string name, - Action? configureSettings = null, - Action>? configureClientBuilder = null) - => AddKeyedAzureBlobClient(builder, name, configureSettings, configureClientBuilder); - /// /// Registers as a singleton for given in the services provided by the . /// Enables retries, corresponding health check, logging and telemetry. diff --git a/src/Components/Aspire.Azure.Storage.Queues/AspireQueueStorageExtensions.cs b/src/Components/Aspire.Azure.Storage.Queues/AspireQueueStorageExtensions.cs index 869d71c65b..05b7415d5e 100644 --- a/src/Components/Aspire.Azure.Storage.Queues/AspireQueueStorageExtensions.cs +++ b/src/Components/Aspire.Azure.Storage.Queues/AspireQueueStorageExtensions.cs @@ -22,24 +22,6 @@ public static class AspireQueueStorageExtensions { private const string DefaultConfigSectionName = "Aspire:Azure:Storage:Queues"; - /// - /// Registers as a singleton in the services provided by the . - /// Enables retries, corresponding health check, logging and telemetry. - /// - /// The to read config from and add services to. - /// A name used to retrieve the connection string from the ConnectionStrings configuration section. - /// An optional method that can be used for customizing the . It's invoked after the settings are read from the configuration. - /// An optional method that can be used for customizing the . - /// Reads the configuration from "Aspire:Azure:Storage:Queues" section. - /// Thrown when neither nor is provided. - [Obsolete($"This method is obsolete and will be removed in a future version. Use {nameof(AddAzureQueueClient)} instead.")] - public static void AddAzureQueueService( - this IHostApplicationBuilder builder, - string connectionName, - Action? configureSettings = null, - Action>? configureClientBuilder = null) - => AddAzureQueueClient(builder, connectionName, configureSettings, configureClientBuilder); - /// /// Registers as a singleton in the services provided by the . /// Enables retries, corresponding health check, logging and telemetry. @@ -59,24 +41,6 @@ public static void AddAzureQueueClient( new StorageQueueComponent().AddClient(builder, DefaultConfigSectionName, configureSettings, configureClientBuilder, connectionName, serviceKey: null); } - /// - /// Registers as a singleton for given in the services provided by the . - /// Enables retries, corresponding health check, logging and telemetry. - /// - /// The to read config from and add services to. - /// The name of the component, which is used as the of the service and also to retrieve the connection string from the ConnectionStrings configuration section. - /// An optional method that can be used for customizing the . It's invoked after the settings are read from the configuration. - /// An optional method that can be used for customizing the . - /// Reads the configuration from "Aspire:Azure:Storage:Queues:{name}" section. - /// Thrown when neither nor is provided. - [Obsolete($"This method is obsolete and will be removed in a future version. Use {nameof(AddKeyedAzureQueueClient)} instead.")] - public static void AddKeyedAzureQueueService( - this IHostApplicationBuilder builder, - string name, - Action? configureSettings = null, - Action>? configureClientBuilder = null) - => AddKeyedAzureQueueClient(builder, name, configureSettings, configureClientBuilder); - /// /// Registers as a singleton for given in the services provided by the . /// Enables retries, corresponding health check, logging and telemetry. diff --git a/src/Components/Aspire.Microsoft.Azure.Cosmos/AspireAzureCosmosDBExtensions.cs b/src/Components/Aspire.Microsoft.Azure.Cosmos/AspireAzureCosmosDBExtensions.cs index 4f6faf3894..6c52f21e32 100644 --- a/src/Components/Aspire.Microsoft.Azure.Cosmos/AspireAzureCosmosDBExtensions.cs +++ b/src/Components/Aspire.Microsoft.Azure.Cosmos/AspireAzureCosmosDBExtensions.cs @@ -17,24 +17,6 @@ public static class AspireAzureCosmosDBExtensions { private const string DefaultConfigSectionName = "Aspire:Microsoft:Azure:Cosmos"; - /// - /// Registers as a singleton in the services provided by the . - /// Configures logging and telemetry for the . - /// - /// The to read config from and add services to. - /// The connection name to use to find a connection string. - /// An optional method that can be used for customizing the . It's invoked after the settings are read from the configuration. - /// An optional method that can be used for customizing the . - /// Reads the configuration from "Aspire:Microsoft:Azure:Cosmos" section. - /// If required ConnectionString is not provided in configuration section - [Obsolete($"This method is obsolete and will be removed in a future version. Use {nameof(AddAzureCosmosDBClient)} instead.")] - public static void AddAzureCosmosDB( - this IHostApplicationBuilder builder, - string connectionName, - Action? configureSettings = null, - Action? configureClientOptions = null) - => AddAzureCosmosDBClient(builder, connectionName, configureSettings, configureClientOptions); - /// /// Registers as a singleton in the services provided by the . /// Configures logging and telemetry for the . @@ -54,25 +36,6 @@ public static void AddAzureCosmosDBClient( AddAzureCosmosDB(builder, DefaultConfigSectionName, configureSettings, configureClientOptions, connectionName, serviceKey: null); } - /// - /// Registers as a singleton for given in the services provided by the . - /// Configures logging and telemetry for the . - /// - /// The to read config from and add services to. - /// The name of the component, which is used as the of the service and also to retrieve the connection string from the ConnectionStrings configuration section. - /// An optional method that can be used for customizing the . It's invoked after the settings are read from the configuration. - /// An optional method that can be used for customizing the . - /// Reads the configuration from "Aspire:Microsoft:Azure:Cosmos:{name}" section. - /// If required ConnectionString is not provided in configuration section - [Obsolete($"This method is obsolete and will be removed in a future version. Use {nameof(AddKeyedAzureCosmosDbClient)} instead.")] - public static void AddKeyedAzureCosmosDB( - this IHostApplicationBuilder builder, - string name, - Action? configureSettings = null, - Action? configureClientOptions = null) - => AddKeyedAzureCosmosDbClient(builder, name, configureSettings, configureClientOptions); - - /// /// Registers as a singleton for given in the services provided by the . /// Configures logging and telemetry for the . diff --git a/src/Components/Aspire.RabbitMQ.Client/AspireRabbitMQExtensions.cs b/src/Components/Aspire.RabbitMQ.Client/AspireRabbitMQExtensions.cs index 9190ddefdc..e03eaab668 100644 --- a/src/Components/Aspire.RabbitMQ.Client/AspireRabbitMQExtensions.cs +++ b/src/Components/Aspire.RabbitMQ.Client/AspireRabbitMQExtensions.cs @@ -26,23 +26,6 @@ public static class AspireRabbitMQExtensions private static readonly ActivitySource s_activitySource = new ActivitySource(ActivitySourceName); private const string DefaultConfigSectionName = "Aspire:RabbitMQ:Client"; - /// - /// Registers as a singleton in the services provided by the . - /// Enables retries, corresponding health check, logging, and telemetry. - /// - /// The to read config from and add services to. - /// A name used to retrieve the connection string from the ConnectionStrings configuration section. - /// An optional method that can be used for customizing the . It's invoked after the settings are read from the configuration. - /// An optional method that can be used for customizing the . It's invoked after the options are read from the configuration. - /// Reads the configuration from "Aspire:RabbitMQ:Client" section. - [Obsolete($"This method is obsolete and will be removed in a future version. Use {nameof(AddRabbitMQClient)} instead.")] - public static void AddRabbitMQ( - this IHostApplicationBuilder builder, - string connectionName, - Action? configureSettings = null, - Action? configureConnectionFactory = null) - => AddRabbitMQClient(builder, connectionName, configureSettings, configureConnectionFactory); - /// /// Registers as a singleton in the services provided by the . /// Enables retries, corresponding health check, logging, and telemetry. @@ -59,23 +42,6 @@ public static void AddRabbitMQClient( Action? configureConnectionFactory = null) => AddRabbitMQClient(builder, DefaultConfigSectionName, configureSettings, configureConnectionFactory, connectionName, serviceKey: null); - /// - /// Registers as a keyed singleton for the given in the services provided by the . - /// Enables retries, corresponding health check, logging, and telemetry. - /// - /// The to read config from and add services to. - /// The name of the component, which is used as the of the service and also to retrieve the connection string from the ConnectionStrings configuration section. - /// An optional method that can be used for customizing the . It's invoked after the settings are read from the configuration. - /// An optional method that can be used for customizing the . It's invoked after the options are read from the configuration. - /// Reads the configuration from "Aspire:RabbitMQ:Client:{name}" section. - [Obsolete($"This method is obsolete and will be removed in a future version. Use {nameof(AddKeyedRabbitMQClient)} instead.")] - public static void AddKeyedRabbitMQ( - this IHostApplicationBuilder builder, - string name, - Action? configureSettings = null, - Action? configureConnectionFactory = null) - => AddKeyedRabbitMQClient(builder, name, configureSettings, configureConnectionFactory); - /// /// Registers as a keyed singleton for the given in the services provided by the . /// Enables retries, corresponding health check, logging, and telemetry. diff --git a/src/Components/Aspire.StackExchange.Redis/AspireRedisExtensions.cs b/src/Components/Aspire.StackExchange.Redis/AspireRedisExtensions.cs index ed5a781df4..d975658bef 100644 --- a/src/Components/Aspire.StackExchange.Redis/AspireRedisExtensions.cs +++ b/src/Components/Aspire.StackExchange.Redis/AspireRedisExtensions.cs @@ -22,23 +22,6 @@ public static class AspireRedisExtensions { private const string DefaultConfigSectionName = "Aspire:StackExchange:Redis"; - /// - /// Registers as a singleton in the services provided by the . - /// Enables retries, corresponding health check, logging, and telemetry. - /// - /// The to read config from and add services to. - /// A name used to retrieve the connection string from the ConnectionStrings configuration section. - /// An optional method that can be used for customizing the . It's invoked after the settings are read from the configuration. - /// An optional method that can be used for customizing the . It's invoked after the options are read from the configuration. - /// Reads the configuration from "Aspire:StackExchange:Redis" section. - [Obsolete($"This method is obsolete and will be removed in a future version. Use {nameof(AddRedisClient)} instead.")] - public static void AddRedis( - this IHostApplicationBuilder builder, - string connectionName, - Action? configureSettings = null, - Action? configureOptions = null) - => AddRedisClient(builder, connectionName, configureSettings, configureOptions); - /// /// Registers as a singleton in the services provided by the . /// Enables retries, corresponding health check, logging, and telemetry. @@ -55,23 +38,6 @@ public static void AddRedisClient( Action? configureOptions = null) => AddRedisClient(builder, DefaultConfigSectionName, configureSettings, configureOptions, connectionName, serviceKey: null); - /// - /// Registers as a keyed singleton for the given in the services provided by the . - /// Enables retries, corresponding health check, logging, and telemetry. - /// - /// The to read config from and add services to. - /// The name of the component, which is used as the of the service and also to retrieve the connection string from the ConnectionStrings configuration section. - /// An optional method that can be used for customizing the . It's invoked after the settings are read from the configuration. - /// An optional method that can be used for customizing the . It's invoked after the options are read from the configuration. - /// Reads the configuration from "Aspire:StackExchange:Redis:{name}" section. - [Obsolete($"This method is obsolete and will be removed in a future version. Use {nameof(AddKeyedRedisClient)} instead.")] - public static void AddKeyedRedis( - this IHostApplicationBuilder builder, - string name, - Action? configureSettings = null, - Action? configureOptions = null) - => AddKeyedRedisClient(builder, name, configureSettings, configureOptions); - /// /// Registers as a keyed singleton for the given in the services provided by the . /// Enables retries, corresponding health check, logging, and telemetry. diff --git a/src/Microsoft.Extensions.ServiceDiscovery/ServiceDiscoveryHttpClientBuilderExtensions.cs b/src/Microsoft.Extensions.ServiceDiscovery/ServiceDiscoveryHttpClientBuilderExtensions.cs index bcfa59056c..b4c34ccb7c 100644 --- a/src/Microsoft.Extensions.ServiceDiscovery/ServiceDiscoveryHttpClientBuilderExtensions.cs +++ b/src/Microsoft.Extensions.ServiceDiscovery/ServiceDiscoveryHttpClientBuilderExtensions.cs @@ -14,14 +14,6 @@ namespace Microsoft.Extensions.DependencyInjection; /// public static class ServiceDiscoveryHttpClientBuilderExtensions { - /// - /// Adds service discovery to the . - /// - /// The builder. - /// The builder. - [Obsolete(error: true, message: "This method is obsolete and will be removed in a future version. The recommended alternative is to use the 'AddServiceDiscovery' method instead.")] - public static IHttpClientBuilder UseServiceDiscovery(this IHttpClientBuilder httpClientBuilder) => httpClientBuilder.AddServiceDiscovery(); - /// /// Adds service discovery to the . ///