Closed richcorless closed 8 years ago
Orleans uses Microsoft.Framework.DependencyInjection
When building your cluster configuration, you can set the type that will handle your registration:
clusterConfig.Defaults.StartupTypeName = typeof(ServiceRegistration).AssemblyQualifiedName;
In that class, just make sure to have a method with the following signature:
public IServiceProvider ConfigureServices(IServiceCollection services)
From there you can register what you need using your container of choice.
Full example/test can be found here.
Hi Kwal,
Thank you, that's exactly what I needed. Have it working with SimpleInjector now.
Rich
Hi,
There are a number of mentions of using DI to inject services into grains and being able to use your preferred container, just not how. Could someone point me in the direction of some sample code, tutorial, or hints of where to begin please?
Thanks, Rich