OrleansClientGenericHostExtensions.AddOrleansClient Method

Definition

Overloads

AddOrleansClient(IServiceCollection, Action<IClientBuilder>)

Configures the service collection to host an Orleans client.

AddOrleansClient(IServiceCollection, IConfiguration, Action<IClientBuilder>)

Configures the service collection to host an Orleans client.

AddOrleansClient(IServiceCollection, Action<IClientBuilder>)

Configures the service collection to host an Orleans client.

C#
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddOrleansClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Orleans.Hosting.IClientBuilder> configureDelegate);

Parameters

services
IServiceCollection

The service collection.

configureDelegate
Action<IClientBuilder>

The delegate used to configure the client.

Returns

The service collection.

Exceptions

services was null or configureDelegate was null.

Remarks

Calling this method multiple times on the same IClientBuilder instance will result in one client being configured. However, the effects of configureDelegate will be applied once for each call. Note that this method should not be used in conjunction with UseOrleans, since UseOrleans includes a client automatically.

Applies to

.NET Orleans 9.0.0 and other versions
Product Versions
.NET Orleans 7.0.0, 8.0.0, 8.1.0, 8.2.0, 9.0.0

AddOrleansClient(IServiceCollection, IConfiguration, Action<IClientBuilder>)

Configures the service collection to host an Orleans client.

C#
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddOrleansClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.Configuration.IConfiguration configuration, Action<Orleans.Hosting.IClientBuilder> configureDelegate);

Parameters

services
IServiceCollection

The service collection.

configuration
IConfiguration

The configuration.

configureDelegate
Action<IClientBuilder>

The delegate used to configure the client.

Returns

The service collection.

Exceptions

services was null or configureDelegate was null.

Remarks

Calling this method multiple times on the same IClientBuilder instance will result in one client being configured. However, the effects of configureDelegate will be applied once for each call. Note that this method should not be used in conjunction with UseOrleans, since UseOrleans includes a client automatically.

Applies to

.NET Orleans 9.0.0 and other versions
Product Versions
.NET Orleans 8.1.0, 8.2.0, 9.0.0