2 writes to Resource
Aspire.Hosting (2)
ApplicationModel\EndpointReference.cs (2)
123
Resource
= owner;
138
Resource
= owner;
19 references to Resource
Aspire.Hosting (8)
ApplicationModel\EndpointReference.cs (5)
18
internal EndpointAnnotation EndpointAnnotation => GetEndpointAnnotation() ?? throw new InvalidOperationException($"The endpoint `{EndpointName}` is not defined for the resource `{
Resource
.Name}`.");
25
IEnumerable<object> IValueWithReferences.References => [
Resource
];
61
return $"{{{
Resource
.Name}.bindings.{EndpointName}.{prop}}}";
106
?? throw new InvalidOperationException($"The endpoint `{EndpointName}` is not allocated for the resource `{
Resource
.Name}`.");
109
_endpointAnnotation ??=
Resource
.Annotations.OfType<EndpointAnnotation>().SingleOrDefault(a => StringComparers.EndpointAnnotationName.Equals(a.Name, EndpointName));
ApplicationModel\ExpressionResolver.cs (2)
19
static string EndpointUniqueName(EndpointReference endpointReference) => $"{endpointReference.
Resource
.Name}/{endpointReference.EndpointName}";
57
var target = endpointReference.
Resource
.GetRootResource();
ResourceBuilderExtensions.cs (1)
424
ApplyEndpoints(builder, endpointReference.
Resource
, endpointReference.EndpointName);
Aspire.Hosting.Azure.AppContainers (4)
AzureContainerAppsInfrastructure.cs (4)
625
var context = ep.
Resource
== resource
627
: await _containerAppEnvironmentContext.ProcessResourceAsync(ep.
Resource
, executionContext, cancellationToken).ConfigureAwait(false);
670
var context = epExpr.Endpoint.
Resource
== resource
672
: await _containerAppEnvironmentContext.ProcessResourceAsync(epExpr.Endpoint.
Resource
, executionContext, cancellationToken).ConfigureAwait(false);
Aspire.Hosting.Azure.EventHubs (2)
AzureEventHubsExtensions.cs (2)
157
context.EnvironmentVariables.Add("BLOB_SERVER", $"{blobEndpoint.
Resource
.Name}:{blobEndpoint.TargetPort}");
158
context.EnvironmentVariables.Add("METADATA_SERVER", $"{tableEndpoint.
Resource
.Name}:{tableEndpoint.TargetPort}");
Aspire.Hosting.Kafka (2)
KafkaBuilderExtensions.cs (2)
143
? ReferenceExpression.Create($"{endpoint.
Resource
.Name}:{endpoint.Property(EndpointProperty.TargetPort)}")
146
context.EnvironmentVariables.Add($"KAFKA_CLUSTERS_{index}_NAME", endpoint.
Resource
.Name);
Aspire.Hosting.MySql (2)
MySqlBuilderExtensions.cs (2)
135
context.EnvironmentVariables.Add("PMA_HOST", $"{endpoint.
Resource
.Name}:{endpoint.TargetPort}");
158
writer.WriteLine($"$cfg['Servers'][$i]['host'] = '{endpoint.
Resource
.Name}:{endpoint.TargetPort}';");
Aspire.Hosting.PostgreSQL (1)
PostgresBuilderExtensions.cs (1)
189
writer.WriteString("Host", endpoint.
Resource
.Name);