Exemplo n.º 1
0
 private void PlaySong(PlaySongMessage message)
 {
     CurrentSong = message;
     Console.WriteLine($"{CurrentSong.User} is currently listening to'{CurrentSong.Song}'");
     DisplayInformation();
     Become(PlayingBehavior);
 }
Exemplo n.º 2
0
 private void StopPlaying()
 {
     Console.WriteLine($"{CurrentSong.User}'s player is currently stopped.");
     CurrentSong = null;
     Become(StoppedBehavior);
 }
        private void PlaySong(PlaySongMessage message)
        {
            var musicPlayerActor = EnsureMusicPlayerActorExists(message.User);

            musicPlayerActor.Tell(message);
        }