Compartilhar via


ResourceExtensions.HasAnnotationIncludingAncestorsOfType<T> Method

Definition

Gets whether resource or its ancestors have an annotation of type T

public static bool HasAnnotationIncludingAncestorsOfType<T>(this Aspire.Hosting.ApplicationModel.IResource resource) where T : Aspire.Hosting.ApplicationModel.IResourceAnnotation;
static member HasAnnotationIncludingAncestorsOfType : Aspire.Hosting.ApplicationModel.IResource -> bool (requires 'T :> Aspire.Hosting.ApplicationModel.IResourceAnnotation)
<Extension()>
Public Function HasAnnotationIncludingAncestorsOfType(Of T As IResourceAnnotation) (resource As IResource) As Boolean

Type Parameters

T

The type of annotation to retrieve.

Parameters

resource
IResource

The resource to retrieve annotations from.

Returns

true if an annotation of the specified type was found; otherwise, false.

Applies to