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