internal ActorManager( ActorRegistration registration, ActorActivator activator, JsonSerializerOptions jsonSerializerOptions, ILoggerFactory loggerFactory, IActorProxyFactory proxyFactory, IDaprInteractor daprInteractor) { this.registration = registration; this.activator = activator; this.jsonSerializerOptions = jsonSerializerOptions; this.loggerFactory = loggerFactory; this.proxyFactory = proxyFactory; this.daprInteractor = daprInteractor; this.timerManager = new DefaultActorTimerManager(this.daprInteractor); // map for remoting calls. this.methodDispatcherMap = new ActorMethodDispatcherMap(this.registration.Type.InterfaceTypes); // map for non-remoting calls. this.actorMethodInfoMap = new ActorMethodInfoMap(this.registration.Type.InterfaceTypes); this.activeActors = new ConcurrentDictionary <ActorId, ActorActivatorState>(); this.reminderMethodContext = ActorMethodContext.CreateForReminder(ReceiveReminderMethodName); this.timerMethodContext = ActorMethodContext.CreateForTimer(TimerMethodName); this.serializersManager = IntializeSerializationManager(null); this.messageBodyFactory = new WrappedRequestMessageFactory(); this.logger = loggerFactory.CreateLogger(this.GetType()); }
internal ActorManager(ActorService actorService) { this.actorService = actorService; // map for remoting calls. this.methodDispatcherMap = new ActorMethodDispatcherMap(this.actorService.ActorTypeInfo.InterfaceTypes); // map for non-remoting calls. this.actorMethodInfoMap = new ActorMethodInfoMap(this.actorService.ActorTypeInfo.InterfaceTypes); this.activeActors = new ConcurrentDictionary <ActorId, Actor>(); this.reminderMethodContext = ActorMethodContext.CreateForReminder(ReceiveReminderMethodName); this.timerMethodContext = ActorMethodContext.CreateForReminder(TimerMethodName); this.serializersManager = IntializeSerializationManager(null); this.messageBodyFactory = new WrappedRequestMessageFactory(); }