Skip to content

StorageProviderExtensions Methods

Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.

AddGrainStorage(IServiceCollection, string, Func<IServiceProvider, string, T>)

staticextension
View source
public static IServiceCollection AddGrainStorage<T>(this IServiceCollection collection, string name, Func<IServiceProvider, string, T> implementationFactory)
Add a grain storage provider implementation to the silo. If the provider type implements Orleans.ILifecycleParticipant it will automatically participate to the silo lifecycle.

Parameters

collectionIServiceCollection
The service collection.
namestring
The name of the storage to add.
implementationFactoryFunc<IServiceProvider, string, T>
Factory to build the storage provider.

Returns

The service provider.