Skip to content

Commit

Permalink
Remove unused ConnectionName property
Browse files Browse the repository at this point in the history
  • Loading branch information
captainsafia committed Oct 14, 2024
1 parent 4e7e0de commit 8785154
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
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

0 comments on commit 8785154

Please sign in to comment.