OrleansClientGenericHostExtensions.AddOrleansClient Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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. |
Configures the service collection to host an Orleans client.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddOrleansClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Orleans.Hosting.IClientBuilder> configureDelegate);
static member AddOrleansClient : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Orleans.Hosting.IClientBuilder> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddOrleansClient (services As IServiceCollection, configureDelegate As Action(Of IClientBuilder)) As IServiceCollection
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 |
Configures the service collection to host an Orleans client.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddOrleansClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.Configuration.IConfiguration configuration, Action<Orleans.Hosting.IClientBuilder> configureDelegate);
static member AddOrleansClient : Microsoft.Extensions.DependencyInjection.IServiceCollection * Microsoft.Extensions.Configuration.IConfiguration * Action<Orleans.Hosting.IClientBuilder> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddOrleansClient (services As IServiceCollection, configuration As IConfiguration, configureDelegate As Action(Of IClientBuilder)) As IServiceCollection
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 |