AzureFunctionsProjectResourceExtensions.WithReference<TSource> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Injects Azure Functions specific connection information into the environment variables of the Azure Functions project resource.
public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureFunctionsProjectResource> WithReference<TSource> (this Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureFunctionsProjectResource> destination, Aspire.Hosting.ApplicationModel.IResourceBuilder<TSource> source, string? connectionName = default) where TSource : Aspire.Hosting.ApplicationModel.IResourceWithConnectionString, Aspire.Hosting.Azure.IResourceWithAzureFunctionsConfig;
static member WithReference : Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureFunctionsProjectResource> * Aspire.Hosting.ApplicationModel.IResourceBuilder<'Source (requires 'Source :> Aspire.Hosting.ApplicationModel.IResourceWithConnectionString and 'Source :> Aspire.Hosting.Azure.IResourceWithAzureFunctionsConfig)> * string -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureFunctionsProjectResource> (requires 'Source :> Aspire.Hosting.ApplicationModel.IResourceWithConnectionString and 'Source :> Aspire.Hosting.Azure.IResourceWithAzureFunctionsConfig)
<Extension()>
Public Function WithReference(Of TSource As {IResourceWithConnectionString, IResourceWithAzureFunctionsConfig}) (destination As IResourceBuilder(Of AzureFunctionsProjectResource), source As IResourceBuilder(Of TSource), Optional connectionName As String = Nothing) As IResourceBuilder(Of AzureFunctionsProjectResource)
Type Parameters
- TSource
The resource that implements the IResourceWithAzureFunctionsConfig.
Parameters
- destination
- IResourceBuilder<AzureFunctionsProjectResource>
The resource where connection information will be injected.
- source
- IResourceBuilder<TSource>
The resource from which to extract the connection string.
- connectionName
- String
An override of the source resource's name for the connection name. The resulting connection name will be connectionName if this is not null.