DistributedApplicationBuilder.AddResource<T>(T) Method

Definition

Adds a resource of type T to the distributed application.

public Aspire.Hosting.ApplicationModel.IResourceBuilder<T> AddResource<T> (T resource) where T : Aspire.Hosting.ApplicationModel.IResource;
abstract member AddResource : 'T -> Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.IResource)> (requires 'T :> Aspire.Hosting.ApplicationModel.IResource)
override this.AddResource : 'T -> Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.IResource)> (requires 'T :> Aspire.Hosting.ApplicationModel.IResource)
Public Function AddResource(Of T As IResource) (resource As T) As IResourceBuilder(Of T)

Type Parameters

T

The type of resource to add.

Parameters

resource
T

The resource to add.

Returns

A builder for configuring the added resource.

Implements

Applies to