DirectorySiloBuilderExtensions.AddGrainDirectory 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
AddGrainDirectory<T>(IServiceCollection, String, Func<IServiceProvider,String,T>) |
将 grain 目录提供程序实现添加到 silo。 如果提供程序类型实现 ILifecycleParticipant<TLifecycleObservable> ,它将自动参与 silo 生命周期。 |
AddGrainDirectory<T>(ISiloBuilder, String, Func<IServiceProvider,String,T>) |
将 grain 目录提供程序实现添加到 silo。 如果提供程序类型实现 ILifecycleParticipant<TLifecycleObservable> ,它将自动参与 silo 生命周期。 |
AddGrainDirectory<T>(IServiceCollection, String, Func<IServiceProvider,String,T>)
将 grain 目录提供程序实现添加到 silo。 如果提供程序类型实现 ILifecycleParticipant<TLifecycleObservable> ,它将自动参与 silo 生命周期。
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddGrainDirectory<T> (this Microsoft.Extensions.DependencyInjection.IServiceCollection collection, string name, Func<IServiceProvider,string,T> implementationFactory) where T : Orleans.GrainDirectory.IGrainDirectory;
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddGrainDirectory<T> (this Microsoft.Extensions.DependencyInjection.IServiceCollection collection, string name, Func<IServiceProvider,string,T> implementationFactory) where T : class, Orleans.GrainDirectory.IGrainDirectory;
static member AddGrainDirectory : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * Func<IServiceProvider, string, 'T (requires 'T :> Orleans.GrainDirectory.IGrainDirectory)> -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'T :> Orleans.GrainDirectory.IGrainDirectory)
static member AddGrainDirectory : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * Func<IServiceProvider, string, 'T (requires 'T : null and 'T :> Orleans.GrainDirectory.IGrainDirectory)> -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'T : null and 'T :> Orleans.GrainDirectory.IGrainDirectory)
<Extension()>
Public Function AddGrainDirectory(Of T As IGrainDirectory) (collection As IServiceCollection, name As String, implementationFactory As Func(Of IServiceProvider, String, T)) As IServiceCollection
<Extension()>
Public Function AddGrainDirectory(Of T As {Class, IGrainDirectory}) (collection As IServiceCollection, name As String, implementationFactory As Func(Of IServiceProvider, String, T)) As IServiceCollection
类型参数
- T
grain 目录提供程序的具体实现类型。
参数
- collection
- IServiceCollection
服务集合。
- name
- String
要添加的 grain 目录的名称。
- implementationFactory
- Func<IServiceProvider,String,T>
用于生成 grain 目录提供程序的工厂。
返回
服务集合。
适用于
AddGrainDirectory<T>(ISiloBuilder, String, Func<IServiceProvider,String,T>)
将 grain 目录提供程序实现添加到 silo。 如果提供程序类型实现 ILifecycleParticipant<TLifecycleObservable> ,它将自动参与 silo 生命周期。
public static Orleans.Hosting.ISiloBuilder AddGrainDirectory<T> (this Orleans.Hosting.ISiloBuilder builder, string name, Func<IServiceProvider,string,T> implementationFactory) where T : Orleans.GrainDirectory.IGrainDirectory;
public static Orleans.Hosting.ISiloBuilder AddGrainDirectory<T> (this Orleans.Hosting.ISiloBuilder builder, string name, Func<IServiceProvider,string,T> implementationFactory) where T : class, Orleans.GrainDirectory.IGrainDirectory;
static member AddGrainDirectory : Orleans.Hosting.ISiloBuilder * string * Func<IServiceProvider, string, 'T (requires 'T :> Orleans.GrainDirectory.IGrainDirectory)> -> Orleans.Hosting.ISiloBuilder (requires 'T :> Orleans.GrainDirectory.IGrainDirectory)
static member AddGrainDirectory : Orleans.Hosting.ISiloBuilder * string * Func<IServiceProvider, string, 'T (requires 'T : null and 'T :> Orleans.GrainDirectory.IGrainDirectory)> -> Orleans.Hosting.ISiloBuilder (requires 'T : null and 'T :> Orleans.GrainDirectory.IGrainDirectory)
<Extension()>
Public Function AddGrainDirectory(Of T As IGrainDirectory) (builder As ISiloBuilder, name As String, implementationFactory As Func(Of IServiceProvider, String, T)) As ISiloBuilder
<Extension()>
Public Function AddGrainDirectory(Of T As {Class, IGrainDirectory}) (builder As ISiloBuilder, name As String, implementationFactory As Func(Of IServiceProvider, String, T)) As ISiloBuilder
类型参数
- T
grain 目录提供程序的具体实现类型。
参数
- builder
- ISiloBuilder
silo 生成器。
- name
- String
要添加的 grain 目录的名称。
- implementationFactory
- Func<IServiceProvider,String,T>
用于生成 grain 目录提供程序的工厂。
返回
silo 生成器。