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