diff --git a/src/Aspire.Hosting/ApplicationModel/ConnectionStringReference.cs b/src/Aspire.Hosting/ApplicationModel/ConnectionStringReference.cs index 7bd9472fa8..e1f1ba6d39 100644 --- a/src/Aspire.Hosting/ApplicationModel/ConnectionStringReference.cs +++ b/src/Aspire.Hosting/ApplicationModel/ConnectionStringReference.cs @@ -17,11 +17,6 @@ public class ConnectionStringReference(IResourceWithConnectionString resource, b /// public bool Optional { get; } = optional; - /// - /// The name of the connection key. - /// - public string? ConnectionName { get; set; } - string IManifestExpressionProvider.ValueExpression => Resource.ValueExpression; IEnumerable IValueWithReferences.References => [Resource]; diff --git a/src/Aspire.Hosting/PublicAPI.Unshipped.txt b/src/Aspire.Hosting/PublicAPI.Unshipped.txt index c27a4aceb8..7d6ab253ff 100644 --- a/src/Aspire.Hosting/PublicAPI.Unshipped.txt +++ b/src/Aspire.Hosting/PublicAPI.Unshipped.txt @@ -40,8 +40,6 @@ Aspire.Hosting.ApplicationModel.ContainerLifetimeAnnotation.Lifetime.get -> Aspi Aspire.Hosting.ApplicationModel.ContainerLifetimeAnnotation.Lifetime.set -> void Aspire.Hosting.ApplicationModel.ContainerLifetime Aspire.Hosting.ApplicationModel.ContainerLifetime.Persistent = 1 -> Aspire.Hosting.ApplicationModel.ContainerLifetime -Aspire.Hosting.ApplicationModel.ConnectionStringReference.ConnectionName.get -> string? -Aspire.Hosting.ApplicationModel.ConnectionStringReference.ConnectionName.set -> void Aspire.Hosting.ApplicationModel.ContainerNameAnnotation Aspire.Hosting.ApplicationModel.ContainerNameAnnotation.ContainerNameAnnotation() -> void Aspire.Hosting.ApplicationModel.ContainerNameAnnotation.Name.get -> string! diff --git a/src/Aspire.Hosting/ResourceBuilderExtensions.cs b/src/Aspire.Hosting/ResourceBuilderExtensions.cs index abde19c1aa..ea0b5cb9ee 100644 --- a/src/Aspire.Hosting/ResourceBuilderExtensions.cs +++ b/src/Aspire.Hosting/ResourceBuilderExtensions.cs @@ -297,10 +297,7 @@ public static IResourceBuilder WithReference(this IR { var connectionStringName = resource.ConnectionStringEnvironmentVariable ?? $"{ConnectionStringEnvironmentName}{connectionName}"; - context.EnvironmentVariables[connectionStringName] = new ConnectionStringReference(resource, optional) - { - ConnectionName = connectionName - }; + context.EnvironmentVariables[connectionStringName] = new ConnectionStringReference(resource, optional); }); } @@ -682,7 +679,7 @@ public static IResourceBuilder WaitForCompletion(this IResourceBuilder /// var builder = DistributedApplication.CreateBuilder(args); /// /// var startAfter = DateTime.Now.AddSeconds(30); - /// + /// /// builder.Services.AddHealthChecks().AddCheck(mycheck", () => /// { /// return DateTime.Now > startAfter ? HealthCheckResult.Healthy() : HealthCheckResult.Unhealthy();