ResourceExtensions.HasAnnotationOfType<T>(IResource) Method

Definition

Gets whether resource has an annotation of type T

C#
public static bool HasAnnotationOfType<T>(this Aspire.Hosting.ApplicationModel.IResource resource) where T : Aspire.Hosting.ApplicationModel.IResourceAnnotation;

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

Product Versions
.NET Aspire 9.1.0