ClientBuilder.ConfigureServices 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
ConfigureServices(Action<IServiceCollection>) |
将服务配置委托添加到配置管道。 |
ConfigureServices(Action<HostBuilderContext,IServiceCollection>) |
向容器添加服务。 可多次进行调用,并累加结果。 |
ConfigureServices(Action<IServiceCollection>)
将服务配置委托添加到配置管道。
public Orleans.IClientBuilder ConfigureServices (Action<Microsoft.Extensions.DependencyInjection.IServiceCollection> configureServices);
abstract member ConfigureServices : Action<Microsoft.Extensions.DependencyInjection.IServiceCollection> -> Orleans.IClientBuilder
override this.ConfigureServices : Action<Microsoft.Extensions.DependencyInjection.IServiceCollection> -> Orleans.IClientBuilder
Public Function ConfigureServices (configureServices As Action(Of IServiceCollection)) As IClientBuilder
参数
- configureServices
- Action<IServiceCollection>
服务配置委托。
返回
生成器。
实现
适用于
ConfigureServices(Action<HostBuilderContext,IServiceCollection>)
- Source:
- ClientBuilder.cs
向容器添加服务。 可多次进行调用,并累加结果。
public Orleans.IClientBuilder ConfigureServices (Action<Orleans.Hosting.HostBuilderContext,Microsoft.Extensions.DependencyInjection.IServiceCollection> configureDelegate);
abstract member ConfigureServices : Action<Orleans.Hosting.HostBuilderContext, Microsoft.Extensions.DependencyInjection.IServiceCollection> -> Orleans.IClientBuilder
override this.ConfigureServices : Action<Orleans.Hosting.HostBuilderContext, Microsoft.Extensions.DependencyInjection.IServiceCollection> -> Orleans.IClientBuilder
Public Function ConfigureServices (configureDelegate As Action(Of HostBuilderContext, IServiceCollection)) As IClientBuilder
参数
- configureDelegate
- Action<HostBuilderContext,IServiceCollection>
配置将用于构造 IServiceProvider 的 IServiceCollection 的委托。
返回
用于链接的主机生成器的同一实例。