次の方法で共有


ResourceExtensions.HasAnnotationOfType<T>(IResource) Method

Definition

Gets whether resource has an annotation of type T

public static bool HasAnnotationOfType<T>(this Aspire.Hosting.ApplicationModel.IResource resource) where T : Aspire.Hosting.ApplicationModel.IResourceAnnotation;
static member HasAnnotationOfType : Aspire.Hosting.ApplicationModel.IResource -> bool (requires 'T :> Aspire.Hosting.ApplicationModel.IResourceAnnotation)
<Extension()>
Public Function HasAnnotationOfType(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