Partager via


IResourceBuilder<T>.WithAnnotation Method

Definition

Overloads

WithAnnotation<TAnnotation>(ResourceAnnotationMutationBehavior)

Adds an annotation to the resource being built.

WithAnnotation<TAnnotation>(TAnnotation, ResourceAnnotationMutationBehavior)

Adds an annotation to the resource being built.

WithAnnotation<TAnnotation>(ResourceAnnotationMutationBehavior)

Source:
IResourceBuilder.cs
Source:
IResourceBuilder.cs

Adds an annotation to the resource being built.

public virtual Aspire.Hosting.ApplicationModel.IResourceBuilder<out T> WithAnnotation<TAnnotation> (Aspire.Hosting.ApplicationModel.ResourceAnnotationMutationBehavior behavior = Aspire.Hosting.ApplicationModel.ResourceAnnotationMutationBehavior.Append) where TAnnotation : Aspire.Hosting.ApplicationModel.IResourceAnnotation, new();
abstract member WithAnnotation : Aspire.Hosting.ApplicationModel.ResourceAnnotationMutationBehavior -> Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.IResource)> (requires 'Annotation :> Aspire.Hosting.ApplicationModel.IResourceAnnotation and 'Annotation : (new : unit -> 'Annotation))
override this.WithAnnotation : Aspire.Hosting.ApplicationModel.ResourceAnnotationMutationBehavior -> Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.IResource)> (requires 'Annotation :> Aspire.Hosting.ApplicationModel.IResourceAnnotation and 'Annotation : (new : unit -> 'Annotation))
Public Overridable Function WithAnnotation(Of TAnnotation As {IResourceAnnotationNew}) (Optional behavior As ResourceAnnotationMutationBehavior = Aspire.Hosting.ApplicationModel.ResourceAnnotationMutationBehavior.Append) As IResourceBuilder(Of Out T)

Type Parameters

TAnnotation

The type of the annotation to add.

Parameters

behavior
ResourceAnnotationMutationBehavior

The behavior to use when adding the annotation.

Returns

The resource builder instance.

Applies to

WithAnnotation<TAnnotation>(TAnnotation, ResourceAnnotationMutationBehavior)

Source:
IResourceBuilder.cs
Source:
IResourceBuilder.cs

Adds an annotation to the resource being built.

public Aspire.Hosting.ApplicationModel.IResourceBuilder<out T> WithAnnotation<TAnnotation> (TAnnotation annotation, Aspire.Hosting.ApplicationModel.ResourceAnnotationMutationBehavior behavior = Aspire.Hosting.ApplicationModel.ResourceAnnotationMutationBehavior.Append) where TAnnotation : Aspire.Hosting.ApplicationModel.IResourceAnnotation;
abstract member WithAnnotation : 'Annotation * Aspire.Hosting.ApplicationModel.ResourceAnnotationMutationBehavior -> Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.IResource)> (requires 'Annotation :> Aspire.Hosting.ApplicationModel.IResourceAnnotation)
Public Function WithAnnotation(Of TAnnotation As IResourceAnnotation) (annotation As TAnnotation, Optional behavior As ResourceAnnotationMutationBehavior = Aspire.Hosting.ApplicationModel.ResourceAnnotationMutationBehavior.Append) As IResourceBuilder(Of Out T)

Type Parameters

TAnnotation

The type of the annotation to add.

Parameters

annotation
TAnnotation

The annotation to add.

behavior
ResourceAnnotationMutationBehavior

The behavior to use when adding the annotation.

Returns

The resource builder instance.

Applies to