Beispiel #1
0
 public StatefulActor(WorkerQueue worker = null, System.Threading.ThreadPriority?priority = null)
     : base(worker, priority)
 {
     _states = InitializeStates();
     _states.UnhandledError   = HandleException;
     _states.UnhandledTrigger = HandleFailedTrigger;
     _states.StateChanged    += HandleStateChanged;
     _commands = InitializeCommands().ToDictionary(e => e.Key, e => e.Value);
 }
Beispiel #2
0
 public ActorBase(WorkerQueue worker = null, System.Threading.ThreadPriority?priority = null)
 {
     _actor  = ProxyBuilder.Create <TActor>(this.Invoke);
     _worker = worker ?? new WorkerQueue(priority == null ? System.Threading.ThreadPriority.Normal : priority.Value);
 }