Edit

Share via


StorageProviderExtensions.AddGrainStorage<T> Method

Definition

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.

Applies to