Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused ConnectionName property #6302

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ public class ConnectionStringReference(IResourceWithConnectionString resource, b
/// </summary>
public bool Optional { get; } = optional;

/// <summary>
/// The name of the connection key.
/// </summary>
public string? ConnectionName { get; set; }

string IManifestExpressionProvider.ValueExpression => Resource.ValueExpression;

IEnumerable<object> IValueWithReferences.References => [Resource];
Expand Down
2 changes: 0 additions & 2 deletions src/Aspire.Hosting/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down
7 changes: 2 additions & 5 deletions src/Aspire.Hosting/ResourceBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,7 @@ public static IResourceBuilder<TDestination> WithReference<TDestination>(this IR
{
var connectionStringName = resource.ConnectionStringEnvironmentVariable ?? $"{ConnectionStringEnvironmentName}{connectionName}";

context.EnvironmentVariables[connectionStringName] = new ConnectionStringReference(resource, optional)
{
ConnectionName = connectionName
};
context.EnvironmentVariables[connectionStringName] = new ConnectionStringReference(resource, optional);
});
}

Expand Down Expand Up @@ -682,7 +679,7 @@ public static IResourceBuilder<T> WaitForCompletion<T>(this IResourceBuilder<T>
/// var builder = DistributedApplication.CreateBuilder(args);
///
/// var startAfter = DateTime.Now.AddSeconds(30);
///
///
/// builder.Services.AddHealthChecks().AddCheck(mycheck", () =>
/// {
/// return DateTime.Now > startAfter ? HealthCheckResult.Healthy() : HealthCheckResult.Unhealthy();
Expand Down