public Task ExecutePostRegistrationStep(IDIContainer container, CancellationToken cancellationToken = default(CancellationToken)) { var config = container.Resolve <IConfiguration>(); var actorSystemName = config.GetValueOrDefault("Actor:System:Name", "NeonTetra"); var actorCore = new ActorSystemCore(container, actorSystemName); var resolver = new NeonTetraDIBridge(container, actorCore); actorCore.RootActorSystem.AddDependencyResolver(resolver); container.RegisterInstance(resolver, typeof(IDependencyResolver)); container.RegisterInstance(actorCore); container.RegisterInstance(actorCore.RootActorSystem); var _userManagerActorRef = actorCore.RootActorSystem.ActorOf(actorCore.RootActorSystem.DI().Props(typeof(IUserManagerActor)), "UserManagerActor"); container.RegisterInstance(_userManagerActorRef, "UserManagerActor"); return(Task.CompletedTask); }
public NeonTetraDIBridge(IDIContainer container, ActorSystemCore systemCore) { _container = container; _systemCore = systemCore; }