Поделиться через


ResourceBuilderExtensions.WithUrl Method

Definition

Overloads

WithUrl<T>(IResourceBuilder<T>, ReferenceExpression, String)

Adds a URL to be displayed for the resource.

WithUrl<T>(IResourceBuilder<T>, ReferenceExpression+ExpressionInterpolatedStringHandler, String)

Adds a URL to be displayed for the resource.

WithUrl<T>(IResourceBuilder<T>, String, String)

Adds a URL to be displayed for the resource.

WithUrl<T>(IResourceBuilder<T>, ReferenceExpression, String)

Source:
ResourceBuilderExtensions.cs

Adds a URL to be displayed for the resource.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<T> WithUrl<T>(this Aspire.Hosting.ApplicationModel.IResourceBuilder<T> builder, Aspire.Hosting.ApplicationModel.ReferenceExpression url, string? displayText = default) where T : Aspire.Hosting.ApplicationModel.IResource;
static member WithUrl : Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.IResource)> * Aspire.Hosting.ApplicationModel.ReferenceExpression * string -> Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.IResource)> (requires 'T :> Aspire.Hosting.ApplicationModel.IResource)
<Extension()>
Public Function WithUrl(Of T As IResource) (builder As IResourceBuilder(Of T), url As ReferenceExpression, Optional displayText As String = Nothing) As IResourceBuilder(Of T)

Type Parameters

T

The resource type.

Parameters

builder
IResourceBuilder<T>

The builder for the resource.

url
ReferenceExpression

A ReferenceExpression that will produce the URL.

displayText
String

The display text to show when the link is displayed.

Returns

The IResourceBuilder<T>.

Remarks

Use this method to add a URL to be displayed for the resource.
Note that any endpoints on the resource will automatically get a corresponding URL added for them.

Applies to

WithUrl<T>(IResourceBuilder<T>, ReferenceExpression+ExpressionInterpolatedStringHandler, String)

Source:
ResourceBuilderExtensions.cs

Adds a URL to be displayed for the resource.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<T> WithUrl<T>(this Aspire.Hosting.ApplicationModel.IResourceBuilder<T> builder, in Aspire.Hosting.ApplicationModel.ReferenceExpression.ExpressionInterpolatedStringHandler url, string? displayText = default) where T : Aspire.Hosting.ApplicationModel.IResource;
static member WithUrl : Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.IResource)> * ExpressionInterpolatedStringHandler * string -> Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.IResource)> (requires 'T :> Aspire.Hosting.ApplicationModel.IResource)
<Extension()>
Public Function WithUrl(Of T As IResource) (builder As IResourceBuilder(Of T), ByRef url As ReferenceExpression.ExpressionInterpolatedStringHandler, Optional displayText As String = Nothing) As IResourceBuilder(Of T)

Type Parameters

T

The resource type.

Parameters

builder
IResourceBuilder<T>

The builder for the resource.

url
ReferenceExpression.ExpressionInterpolatedStringHandler

The interpolated string that produces the URL.

displayText
String

The display text to show when the link is displayed.

Returns

The IResourceBuilder<T>.

Remarks

Use this method to add a URL to be displayed for the resource.
Note that any endpoints on the resource will automatically get a corresponding URL added for them.

Applies to

WithUrl<T>(IResourceBuilder<T>, String, String)

Source:
ResourceBuilderExtensions.cs

Adds a URL to be displayed for the resource.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<T> WithUrl<T>(this Aspire.Hosting.ApplicationModel.IResourceBuilder<T> builder, string url, string? displayText = default) where T : Aspire.Hosting.ApplicationModel.IResource;
static member WithUrl : Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.IResource)> * string * string -> Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.IResource)> (requires 'T :> Aspire.Hosting.ApplicationModel.IResource)
<Extension()>
Public Function WithUrl(Of T As IResource) (builder As IResourceBuilder(Of T), url As String, Optional displayText As String = Nothing) As IResourceBuilder(Of T)

Type Parameters

T

The resource type.

Parameters

builder
IResourceBuilder<T>

The builder for the resource.

url
String

The URL.

displayText
String

The display text to show when the link is displayed.

Returns

The IResourceBuilder<T>.

Remarks

Use this method to add a URL to be displayed for the resource.
Note that any endpoints on the resource will automatically get a corresponding URL added for them.

Applies to