예제 #1
0
        private void PlaySong(PlaySongMessage message)
        {
            CurrentSong = message;
            Console.WriteLine($"{CurrentSong.User} is currently listening to '{CurrentSong.Song}'");

            Become(PlayingBehavior);
        }
예제 #2
0
 private void StopPlaying()
 {
     Console.WriteLine($"{CurrentSong.User}'s player is currently stopped.");
     CurrentSong = null;
     Become(StoppedBehavior);
 }
예제 #3
0
        private void PlaySong(PlaySongMessage message)
        {
            var musicPlayerActor = EnsureMusicPlayerActorExists(message.User);

            musicPlayerActor.Tell(message);
        }