Implemented interface member:
66 references to Metadata
Aspire.Hosting (66)
Dcp\ApplicationExecutor.cs (38)
409
if (_logStreams.TryRemove(resource.
Metadata
.Name, out var logStream))
417
_logger.LogTrace("Deleting application model resource {ResourceName} with {ResourceKind} resource {ResourceName}", appModelResource.Name, resourceKind, resource.
Metadata
.Name);
424
_logger.LogTrace("Updating application model resource {ResourceName} with {ResourceKind} resource {ResourceName}", appModelResource.Name, resourceKind, resource.
Metadata
.Name);
428
await notificationService.PublishUpdateAsync(appModelResource, resource.
Metadata
.Name, s => snapshotFactory(resource, s)).ConfigureAwait(false);
433
_logInformationChannel.Writer.TryWrite(new(resource.
Metadata
.Name, LogsAvailable: true, HasSubscribers: null));
442
resource.
Metadata
.Name,
453
_logger.LogTrace("No application model resource found for {ResourceKind} resource {ResourceName}", resourceKind, resource.
Metadata
.Name);
464
_resourceAssociatedServicesMap.Remove((resourceKind, resource.
Metadata
.Name), out _);
466
else if (resource.
Metadata
.Annotations?.TryGetValue(CustomResource.ServiceProducerAnnotation, out var servicesProducedAnnotationJson) == true)
471
_resourceAssociatedServicesMap[(resourceKind, resource.
Metadata
.Name)]
495
_logStreams.GetOrAdd(resource.
Metadata
.Name, (_) =>
505
_logger.LogDebug("Starting log streaming for {ResourceName}.", resource.
Metadata
.Name);
509
var logger = loggerService.GetInternalLogger(resource.
Metadata
.Name);
531
_logger.LogDebug("Log streaming for {ResourceName} was cancelled.", resource.
Metadata
.Name);
535
_logger.LogError(ex, "Error streaming logs for {ResourceName}.", resource.
Metadata
.Name);
551
if (endpoint.
Metadata
.OwnerReferences is null)
556
foreach (var ownerReference in endpoint.
Metadata
.OwnerReferences)
569
foreach (var ((resourceKind, resourceName), _) in _resourceAssociatedServicesMap.Where(e => e.Value.Contains(service.
Metadata
.Name)))
591
await notificationService.PublishUpdateAsync(appModelResource, cr.
Metadata
.Name, s =>
639
CreationTimeStamp = container.
Metadata
.CreationTimestamp?.ToUniversalTime(),
709
CreationTimeStamp = executable.
Metadata
.CreationTimestamp?.ToUniversalTime(),
729
CreationTimeStamp = executable.
Metadata
.CreationTimestamp?.ToUniversalTime(),
739
var name = resource.
Metadata
.Name;
852
map.TryAdd(resource.
Metadata
.Name, resource);
856
map[resource.
Metadata
.Name] = resource;
860
map.Remove(resource.
Metadata
.Name, out _);
921
var srvResource = needAddressAllocated.FirstOrDefault(sr => sr.Service.Metadata.Name == updated.
Metadata
.Name);
1002
throw new InvalidDataException($"Service {svc.
Metadata
.Name} should have valid address at this point");
1007
throw new InvalidOperationException($"Service '{svc.
Metadata
.Name}' needs to specify a port for endpoint '{sp.EndpointAnnotation.Name}' since it isn't using a proxy.");
1015
targetPortExpression: $$$"""{{- portForServing "{{{svc.
Metadata
.Name}}}" -}}""");
1248
await notificationService.PublishUpdateAsync(er.ModelResource, er.DcpResource.
Metadata
.Name, s => s with { State = "FailedToStart" }).ConfigureAwait(false);
1256
await notificationService.PublishUpdateAsync(er.ModelResource, er.DcpResource.
Metadata
.Name, s => s with { State = "FailedToStart" }).ConfigureAwait(false);
1555
await SetChildResourceAsync(cr.ModelResource, cr.DcpResource.
Metadata
.Name, state: "Starting", startTimeStamp: null, stopTimeStamp: null).ConfigureAwait(false);
1574
await SetChildResourceAsync(cr.ModelResource, cr.DcpResource.
Metadata
.Name, state: "FailedToStart", startTimeStamp: null, stopTimeStamp: null).ConfigureAwait(false);
1910
if (resource is Executable exe && exe.
Metadata
.Annotations.TryGetValue(CustomResource.ResourceReplicaCount, out var value) && int.TryParse(value, CultureInfo.InvariantCulture, out var replicas) && replicas > 1)
2110
var resourceName = resource.
Metadata
.Name;
2152
await kubernetesService.GetAsync<T>(resource.
Metadata
.Name, cancellationToken: attemptCancellationToken).ConfigureAwait(false);
2153
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;