Beispiel #1
0
        private void Stopped()
        {
            Receive <PlayMovieMessage>(message => StartPlayingMovie(message.MovieTitle));

            Receive <StopMovieMessage>(
                message => ColorConsole.WriteLineRed("UserActor {0} Error: cannot stop if nothing is playing", _userId));

            ColorConsole.WriteLineYellow("UserActor {0} has now become Stopped", _userId);
        }
Beispiel #2
0
        private void Playing()
        {
            Receive <PlayMovieMessage>(
                message => ColorConsole.WriteLineRed(
                    "UserActor {0} Error: cannot start playing another movie before stopping existing one", _userId));

            Receive <StopMovieMessage>(message => StopPlayingCurrentMovie());

            ColorConsole.WriteLineYellow("UserActor {0} has now become Playing", _userId);
        }