public void Register <T>(Action <T> action) where T : class
        {
            IActor            anonActor   = new AnonActor <T>(action);
            ILocalSwitchboard switchBoard = new LocalSwitchboard(LocalConcurrencyType.OneActorPerThread);

            switchBoard.Operator = this.Operator;
            _actorToSwitchBoard.TryAdd(anonActor.GetType(), switchBoard);

            switchBoard.Register(action);
            foreach (var t in _exceptionTypeToHandler)
            {
                switchBoard.Register(t.Key, t.Value);
            }
            // for each T we create a new LocalSwitchboard that only operates on that type T
        }
        public void Register <T, K>(Expression <Func <K> > factory) where K : IActor
        {
            Type typeOfActor = typeof(K);

            if (_actorToSwitchBoard.ContainsKey(typeOfActor))
            {
                throw new ActorHasAlreadyBeenRegisteredException();
            }
            ILocalSwitchboard switchBoard = new LocalSwitchboard(LocalConcurrencyType.OneActorPerThread);

            switchBoard.Operator = this.Operator;
            _actorToSwitchBoard.TryAdd(typeOfActor, switchBoard);
            switchBoard.Register <T, K>(factory);
            foreach (var t in _exceptionTypeToHandler)
            {
                switchBoard.Register(t.Key, t.Value);
            }
        }