共用方式為


ParameterResourceBuilderExtensions.PublishAsConnectionString<T> Method

Definition

Changes the resource to be published as a connection string reference in the manifest.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<T> PublishAsConnectionString<T> (this Aspire.Hosting.ApplicationModel.IResourceBuilder<T> builder) where T : Aspire.Hosting.ApplicationModel.ContainerResource, Aspire.Hosting.ApplicationModel.IResourceWithConnectionString;
static member PublishAsConnectionString : Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.ContainerResource and 'T :> Aspire.Hosting.ApplicationModel.IResourceWithConnectionString)> -> Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.ContainerResource and 'T :> Aspire.Hosting.ApplicationModel.IResourceWithConnectionString)> (requires 'T :> Aspire.Hosting.ApplicationModel.ContainerResource and 'T :> Aspire.Hosting.ApplicationModel.IResourceWithConnectionString)
<Extension()>
Public Function PublishAsConnectionString(Of T As {ContainerResource, IResourceWithConnectionString}) (builder As IResourceBuilder(Of T)) As IResourceBuilder(Of T)

Type Parameters

T

The resource type.

Parameters

builder
IResourceBuilder<T>

The resource builder.

Returns

The configured IResourceBuilder<T>.

Applies to