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