Implemented interface member:
63 references to Metadata
Aspire.Hosting (63)
Dcp\ApplicationExecutor.cs (35)
408
if (_logStreams.TryRemove(resource.
Metadata
.Name, out var logStream))
416
_logger.LogTrace("Deleting application model resource {ResourceName} with {ResourceKind} resource {ResourceName}", appModelResource.Name, resourceKind, resource.
Metadata
.Name);
423
_logger.LogTrace("Updating application model resource {ResourceName} with {ResourceKind} resource {ResourceName}", appModelResource.Name, resourceKind, resource.
Metadata
.Name);
427
await notificationService.PublishUpdateAsync(appModelResource, resource.
Metadata
.Name, s => snapshotFactory(resource, s)).ConfigureAwait(false);
432
_logInformationChannel.Writer.TryWrite(new(resource.
Metadata
.Name, LogsAvailable: true, HasSubscribers: null));
451
_logger.LogTrace("No application model resource found for {ResourceKind} resource {ResourceName}", resourceKind, resource.
Metadata
.Name);
462
_resourceAssociatedServicesMap.Remove((resourceKind, resource.
Metadata
.Name), out _);
464
else if (resource.
Metadata
.Annotations?.TryGetValue(CustomResource.ServiceProducerAnnotation, out var servicesProducedAnnotationJson) == true)
469
_resourceAssociatedServicesMap[(resourceKind, resource.
Metadata
.Name)]
493
_logStreams.GetOrAdd(resource.
Metadata
.Name, (_) =>
503
_logger.LogDebug("Starting log streaming for {ResourceName}.", resource.
Metadata
.Name);
507
var logger = loggerService.GetInternalLogger(resource.
Metadata
.Name);
529
_logger.LogDebug("Log streaming for {ResourceName} was cancelled.", resource.
Metadata
.Name);
533
_logger.LogError(ex, "Error streaming logs for {ResourceName}.", resource.
Metadata
.Name);
549
if (endpoint.
Metadata
.OwnerReferences is null)
554
foreach (var ownerReference in endpoint.
Metadata
.OwnerReferences)
567
foreach (var ((resourceKind, resourceName), _) in _resourceAssociatedServicesMap.Where(e => e.Value.Contains(service.
Metadata
.Name)))
589
await notificationService.PublishUpdateAsync(appModelResource, cr.
Metadata
.Name, s =>
630
CreationTimeStamp = container.
Metadata
.CreationTimestamp?.ToUniversalTime(),
692
CreationTimeStamp = executable.
Metadata
.CreationTimestamp?.ToUniversalTime(),
711
CreationTimeStamp = executable.
Metadata
.CreationTimestamp?.ToUniversalTime(),
720
var name = resource.
Metadata
.Name;
833
map.TryAdd(resource.
Metadata
.Name, resource);
837
map[resource.
Metadata
.Name] = resource;
841
map.Remove(resource.
Metadata
.Name, out _);
902
var srvResource = needAddressAllocated.FirstOrDefault(sr => sr.Service.Metadata.Name == updated.
Metadata
.Name);
983
throw new InvalidDataException($"Service {svc.
Metadata
.Name} should have valid address at this point");
988
throw new InvalidOperationException($"Service '{svc.
Metadata
.Name}' needs to specify a port for endpoint '{sp.EndpointAnnotation.Name}' since it isn't using a proxy.");
996
targetPortExpression: $$$"""{{- portForServing "{{{svc.
Metadata
.Name}}}" -}}""");
1229
await notificationService.PublishUpdateAsync(er.ModelResource, er.DcpResource.
Metadata
.Name, s => s with { State = "FailedToStart" }).ConfigureAwait(false);
1237
await notificationService.PublishUpdateAsync(er.ModelResource, er.DcpResource.
Metadata
.Name, s => s with { State = "FailedToStart" }).ConfigureAwait(false);
1891
if (resource is Executable exe && exe.
Metadata
.Annotations.TryGetValue(CustomResource.ResourceReplicaCount, out var value) && int.TryParse(value, CultureInfo.InvariantCulture, out var replicas) && replicas > 1)
2091
var resourceName = resource.
Metadata
.Name;
2132
await kubernetesService.GetAsync<T>(resource.
Metadata
.Name, cancellationToken: attemptCancellationToken).ConfigureAwait(false);
2133
throw new DistributedApplicationException($"Failed to delete '{resource.
Metadata
.Name}' successfully before restart.");
Dcp\KubernetesService.cs (4)
149
obj.
Metadata
.Name,
157
obj.
Metadata
.Name,
291
obj.
Metadata
.Name,
293
obj.
Metadata
.Namespace(),
Dcp\Model\Container.cs (2)
370
c.
Metadata
.Name = name;
371
c.
Metadata
.NamespaceProperty = string.Empty;
Dcp\Model\ContainerExec.cs (2)
132
containerExec.
Metadata
.Name = name;
133
containerExec.
Metadata
.NamespaceProperty = string.Empty;
Dcp\Model\Endpoint.cs (2)
48
e.
Metadata
.Name = name;
49
e.
Metadata
.NamespaceProperty = string.Empty;
Dcp\Model\Executable.cs (2)
198
exe.
Metadata
.Name = name;
199
exe.
Metadata
.NamespaceProperty = string.Empty;
Dcp\Model\ExecutableReplicaSet.cs (2)
107
ers.
Metadata
.Name = name;
108
ers.
Metadata
.NamespaceProperty = string.Empty;
Dcp\Model\ModelCommon.cs (9)
31
public string? AppModelResourceName =>
Metadata
.Annotations?.TryGetValue(ResourceNameAnnotation, out var value) is true ? value : null;
33
public string? AppModelInitialState =>
Metadata
.Annotations?.TryGetValue(ResourceStateAnnotation, out var value) is true ? value : null;
40
if (
Metadata
.Annotations is null)
42
Metadata
.Annotations = new Dictionary<string, string>();
45
Metadata
.Annotations[annotationName] = value;
50
if (
Metadata
.Annotations is null)
52
Metadata
.Annotations = new Dictionary<string, string>();
55
AnnotateAsObjectList<TValue>(
Metadata
.Annotations, annotationName, value);
60
return TryGetAnnotationAsObjectList<TValue>(
Metadata
.Annotations, annotationName, out list);
Dcp\Model\Network.cs (2)
91
c.
Metadata
.Name = name;
92
c.
Metadata
.NamespaceProperty = string.Empty;
Dcp\Model\Service.cs (3)
81
s.
Metadata
.Name = name;
82
s.
Metadata
.NamespaceProperty = string.Empty;
91
public string? EndpointName =>
Metadata
.Annotations?.TryGetValue(EndpointNameAnnotation, out var value) is true ? value : null;