Share via


AzureFunctionsProjectResourceExtensions.AddAzureFunctionsProject<TProject> Method

Definition

Adds an Azure Functions project to the distributed application.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureFunctionsProjectResource> AddAzureFunctionsProject<TProject> (this Aspire.Hosting.IDistributedApplicationBuilder builder, string name) where TProject : Aspire.Hosting.IProjectMetadata, new();
static member AddAzureFunctionsProject : Aspire.Hosting.IDistributedApplicationBuilder * string -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureFunctionsProjectResource> (requires 'Project :> Aspire.Hosting.IProjectMetadata and 'Project : (new : unit -> 'Project))
<Extension()>
Public Function AddAzureFunctionsProject(Of TProject As {IProjectMetadataNew}) (builder As IDistributedApplicationBuilder, name As String) As IResourceBuilder(Of AzureFunctionsProjectResource)

Type Parameters

TProject

The type of the project metadata, which must implement IProjectMetadata and have a parameterless constructor.

Parameters

builder
IDistributedApplicationBuilder

The IDistributedApplicationBuilder to which the Azure Functions project will be added.

name
String

The name to be associated with the Azure Functions project. This name will be used for service discovery when referenced in a dependency.

Returns

An IResourceBuilder<T> for the added Azure Functions project resource.

Applies to