Partilhar via


OrleansServiceClientExtensions.WithReference<T> Method

Definition

Adds an Orleans client to the resource.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<T> WithReference<T> (this Aspire.Hosting.ApplicationModel.IResourceBuilder<T> builder, Aspire.Hosting.Orleans.OrleansServiceClient orleansServiceClient) where T : Aspire.Hosting.ApplicationModel.IResourceWithEnvironment, Aspire.Hosting.ApplicationModel.IResourceWithEndpoints;
static member WithReference : Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.IResourceWithEnvironment and 'T :> Aspire.Hosting.ApplicationModel.IResourceWithEndpoints)> * Aspire.Hosting.Orleans.OrleansServiceClient -> Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.IResourceWithEnvironment and 'T :> Aspire.Hosting.ApplicationModel.IResourceWithEndpoints)> (requires 'T :> Aspire.Hosting.ApplicationModel.IResourceWithEnvironment and 'T :> Aspire.Hosting.ApplicationModel.IResourceWithEndpoints)
<Extension()>
Public Function WithReference(Of T As {IResourceWithEnvironment, IResourceWithEndpoints}) (builder As IResourceBuilder(Of T), orleansServiceClient As OrleansServiceClient) As IResourceBuilder(Of T)

Type Parameters

T

Parameters

builder
IResourceBuilder<T>

The builder on which add the Orleans service builder.

orleansServiceClient
OrleansServiceClient

The Orleans service client, containing clustering, etc.

Returns

The resource builder.

Exceptions

Clustering has not been configured.

Applies to