StorageProviderExtensions.AddGrainStorage<T> 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將粒度儲存提供者實作新增至接收器。 如果提供者類型實作 ILifecycleParticipant<TLifecycleObservable> ,它會自動參與接收器生命週期。
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
粒度儲存提供者的具體實作類型。
參數
- collection
- IServiceCollection
服務集合。
- name
- String
要加入的記憶體名稱。
- implementationFactory
- Func<IServiceProvider,String,T>
建置記憶體提供者的 Factory。
傳回
服務提供者。