Share via


OrleansServiceExtensions.WithReference<T> Method

Definition

Adds Orleans to the resource.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<T> WithReference<T> (this Aspire.Hosting.ApplicationModel.IResourceBuilder<T> builder, Aspire.Hosting.Orleans.OrleansService orleansService) 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.OrleansService -> 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), orleansService As OrleansService) As IResourceBuilder(Of T)

Type Parameters

T

Parameters

builder
IResourceBuilder<T>

The builder on which add the Orleans service builder.

orleansService
OrleansService

The Orleans service, containing clustering, etc.

Returns

The resource builder.

Exceptions

Clustering has not been configured.

Applies to