StorageProviderExtensions.AddGrainStorage<T> Method
Definition
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.
Add a grain storage provider implementation to the silo. If the provider type implements ILifecycleParticipant<TLifecycleObservable> it will automatically participate to the silo lifecycle.
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
Type Parameters
- T
The concrete implementation type of the grain storage provider.
Parameters
- collection
- IServiceCollection
The service collection.
- name
- String
The name of the storage to add.
- implementationFactory
- Func<IServiceProvider,String,T>
Factory to build the storage provider.
Returns
The service provider.