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