-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Description
- Akka version: 1.4.18
- Akka.DependencyInjection version: 1.4.18
- Platform: Windows 10
- Steps to reproduce:
Create a simple delegate:
public delegate IActorRef BatchManagerActorProvider();
Add the delegate as a Singleton:
services.AddSingleton<BatchManagerActorProvider>(provider => { IActorRef batchManagerActor = actorSystem.ActorOf(BatchManagerActor.CreateProps(), "batchManager"); return () => batchManagerActor; });
Attempt to retrieve the delegate via the Service Provider:
var Actor = ServiceProvider.For(Context.System).Provider.GetService(typeof(BatchManagerActorProvider));
Retrieving the delegate within an MVC controller works perfectly, so the delegate is registered successfully. Retrieving a standard class from the Service Provider in an Actor works perfectly too.