Skip to content

DirectorySiloBuilderExtensions.AddGrainDirectory(IServiceCollection, string, Func<IServiceProvider, string, T>)

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

staticextension
View source
public static IServiceCollection AddGrainDirectory<T>(this IServiceCollection collection, string name, Func<IServiceProvider, string, T> implementationFactory)
Add a grain directory 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 grain directory to add.
implementationFactoryFunc<IServiceProvider, string, T>
Factory to build the grain directory provider.

Returns

The service collection.