internal ActorRuntime(ActorRuntimeOptions options, ILoggerFactory loggerFactory) { this.actorSettings = new ActorSettings(); this.logger = loggerFactory.CreateLogger(this.GetType()); // Create ActorManagers, override existing entry if registered again. foreach (var actorServiceFunc in options.actorServicesFunc) { var actorServiceFactory = actorServiceFunc.Value ?? ((type) => new ActorService(type, loggerFactory)); var actorService = actorServiceFactory.Invoke(actorServiceFunc.Key); this.actorManagers[actorServiceFunc.Key.ActorTypeName] = new ActorManager(actorService, loggerFactory); } }
/// <remarks> /// WARNING: This type is expected to be accessed via the <see cref="Instance" /> singleton instance. /// This constructor is exposed only for unit testing purposes. /// </remarks> internal ActorRuntime() { this.actorSettings = new ActorSettings(); }