2 writes to EndpointName
Aspire.Hosting (2)
ApplicationModel\EndpointReference.cs (2)
125
EndpointName
= endpoint.Name;
140
EndpointName
= endpointName;
45 references to EndpointName
Aspire.Hosting (22)
ApplicationModel\EndpointReference.cs (7)
18
internal EndpointAnnotation EndpointAnnotation => GetEndpointAnnotation() ?? throw new InvalidOperationException($"The endpoint `{
EndpointName
}` is not defined for the resource `{Resource.Name}`.");
59
_ => throw new InvalidOperationException($"The property '{property}' is not supported for the endpoint '{
EndpointName
}'.")
62
string Binding(string prop) => $"{{{Resource.Name}.bindings.{
EndpointName
}.{prop}}}";
93
public string ContainerHost => AllocatedEndpoint.ContainerHostAddress ?? throw new InvalidOperationException($"The endpoint \"{
EndpointName
}\" has no associated container host name.");
107
?? throw new InvalidOperationException($"The endpoint `{
EndpointName
}` is not allocated for the resource `{Resource.Name}`.");
110
_endpointAnnotation ??= Resource.Annotations.OfType<EndpointAnnotation>().SingleOrDefault(a => StringComparers.EndpointAnnotationName.Equals(a.Name,
EndpointName
));
182
_ => throw new InvalidOperationException($"The property '{Property}' is not supported for the endpoint '{Endpoint.
EndpointName
}'.")
ApplicationModel\ExpressionResolver.cs (1)
19
static string EndpointUniqueName(EndpointReference endpointReference) => $"{endpointReference.Resource.Name}/{endpointReference.
EndpointName
}";
Dcp\ResourceSnapshotBuilder.cs (2)
211
var urlsForEndpoint = endpointUrls.Where(u => string.Equals(endpointName, u.Endpoint?.
EndpointName
, StringComparisons.EndpointAnnotationName)).ToList();
218
urls.Add(new(Name: endpointUrl.Endpoint!.
EndpointName
, Url: endpointUrl.Url, IsInternal: endpointUrl.IsInternal) { IsInactive = isInactive, DisplayProperties = new(endpointUrl.DisplayText ?? "", endpointUrl.DisplayOrder ?? 0) });
Orchestrator\ApplicationOrchestrator.cs (1)
122
urls = resourceUrls.Select(url => new UrlSnapshot(Name: url.Endpoint?.
EndpointName
, Url: url.Url, IsInternal: url.DisplayLocation == UrlDisplayLocation.DetailsOnly)
ProjectResourceBuilderExtensions.cs (1)
473
var url = context.Urls.FirstOrDefault(u => string.Equals(u.Endpoint?.
EndpointName
, endpoint.Name, StringComparisons.EndpointAnnotationName));
ResourceBuilderExtensions.cs (10)
344
var endpointName = endpoint.
EndpointName
;
456
ApplyEndpoints(builder, endpointReference.Resource, endpointReference.
EndpointName
);
914
var urlForEndpoint = context.Urls.FirstOrDefault(u => u.Endpoint?.
EndpointName
== endpointName);
1307
throw new DistributedApplicationException($"Could not create HTTP health check for resource '{builder.Resource.Name}' as the endpoint with name '{endpoint.
EndpointName
}' and scheme '{endpoint.Scheme}' is not an HTTP endpoint.");
1313
var endpointName = endpoint.
EndpointName
;
1659
throw new DistributedApplicationException($"Could not create HTTP command for resource '{builder.Resource.Name}' as the endpoint with name '{endpoint.
EndpointName
}' and scheme '{endpoint.Scheme}' is not an HTTP endpoint.");
1667
commandName ??= $"{endpoint.Resource.Name}-{endpoint.
EndpointName
}-http-{commandOptions.Method.Method.ToLowerInvariant()}-{path}";
1762
matchingEndpoint = endpoints.FirstOrDefault(e => string.Equals(e.
EndpointName
, name, StringComparisons.EndpointAnnotationName));
1767
throw new DistributedApplicationException($"Could not create {errorDisplayNoun} for resource '{builder.Resource.Name}' as the endpoint with name '{matchingEndpoint.
EndpointName
}' and scheme '{matchingEndpoint.Scheme}' is not an HTTP endpoint.");
1788
matchingEndpoint = endpoints.FirstOrDefault(e => string.Equals(e.
EndpointName
, scheme, StringComparisons.EndpointAnnotationUriScheme));
Aspire.Hosting.Azure.AppContainers (2)
ContainerAppContext.cs (2)
496
var mapping = context._endpointMapping[ep.
EndpointName
];
548
var mapping = context._endpointMapping[epExpr.Endpoint.
EndpointName
];
Aspire.Hosting.Azure.AppService (2)
AzureAppServiceWebsiteContext.cs (2)
118
return (GetValue(context._endpointMapping[ep.
EndpointName
], EndpointProperty.Url), secretType);
155
var mapping = context._endpointMapping[epExpr.Endpoint.
EndpointName
];
Aspire.Hosting.Azure.CosmosDB (1)
AzureCosmosDBExtensions.cs (1)
350
var url = context.Urls.FirstOrDefault(u => u.Endpoint?.
EndpointName
== KnownUrls.DataExplorer.EndpointName);
Aspire.Hosting.Docker (2)
DockerComposeServiceResourceExtensions.cs (2)
24
var mapping = referencedResource.EndpointMappings[ep.
EndpointName
];
52
var mapping = referencedResource.EndpointMappings[epExpr.Endpoint.
EndpointName
];
Aspire.Hosting.Kubernetes (2)
KubernetesServiceResourceExtensions.cs (2)
28
var mapping = referencedResource.EndpointMappings[ep.
EndpointName
];
58
var mapping = referencedResource.EndpointMappings[epExpr.Endpoint.
EndpointName
];
Aspire.Hosting.Qdrant.Tests (2)
QdrantFunctionalTests.cs (2)
242
Assert.Single(urls, u => u.Endpoint?.
EndpointName
== "grpc" && u.DisplayText == "Qdrant (GRPC)" && u.DisplayLocation == UrlDisplayLocation.DetailsOnly);
243
Assert.Single(urls, u => u.Endpoint?.
EndpointName
== "http" && u.DisplayText == "Qdrant (HTTP)");
Aspire.Hosting.Tests (11)
WithUrlsTests.cs (11)
234
Assert.Single(urls, u => u.Url.StartsWith("http://localhost") && u.Endpoint?.
EndpointName
== "test");
258
Assert.Single(urls, u => u.Url.EndsWith("/sub-path") && u.Endpoint?.
EndpointName
== "http");
282
Assert.Single(urls, u => u.Url == "http://custom.localhost:23456/home" && u.Endpoint?.
EndpointName
== "http");
316
&& u.Endpoint?.
EndpointName
== "test"
355
Assert.Single(initialUrlSnapshot, s => s.Name == httpEndpoint.
EndpointName
&& s.IsInactive && s.Url == "https://example.com");
392
s => Assert.True(s.Name == httpEndpoint.
EndpointName
&& s.DisplayProperties.DisplayName == ""), // <-- this is the default URL added for the endpoint
393
s => Assert.True(s.Name == httpEndpoint.
EndpointName
&& s.Url.EndsWith("/one") && s.DisplayProperties.DisplayName == "Example 1"),
394
s => Assert.True(s.Name == httpEndpoint.
EndpointName
&& s.Url.EndsWith("/two") && s.DisplayProperties.DisplayName == "Example 2")
576
var endpointUrl = projectA.Resource.Annotations.OfType<ResourceUrlAnnotation>().FirstOrDefault(u => u.Endpoint?.
EndpointName
== "test");
607
var endpointUrl = projectA.Resource.Annotations.OfType<ResourceUrlAnnotation>().FirstOrDefault(u => u.Endpoint?.
EndpointName
== "test" && u.Url.EndsWith("/sub-path"));
638
var endpointUrl = projectA.Resource.Annotations.OfType<ResourceUrlAnnotation>().FirstOrDefault(u => u.Endpoint?.
EndpointName
== "test" && u.Url.EndsWith("/sub-path"));
TestShop.AppHost (1)
Program.cs (1)
70
.WithUrls(c => c.Urls.ForEach(u => u.DisplayText = $"Online store ({u.Endpoint?.
EndpointName
})"))