Beispiel #1
0
        public void SessionStateChangedArgs_Sets_Session_State_Expired()
        {
            var mockAudioSession          = new Mock <IAudioSession>();
            const AudioSessionState state = AudioSessionState.Expired;

            var args = new SessionStateChangedArgs(mockAudioSession.Object, state);

            Assert.NotNull(args);
            Assert.NotNull(args.Session);
            Assert.Equal(mockAudioSession.Object, args.Session);

            Assert.Equal(state, args.State);
        }
 public void OnNext(SessionStateChangedArgs value)
 {
     if (value.State == AudioSessionState.Active)
     {
         AnsiConsole.MarkupLine($":call_me_hand: [grey]Session ([/][grey69]{GetProcessName(value.Session)}[/][grey]):[/] [lightslategrey]Started[/]");
         SetMuteState(value.Session.IsMuted);
     }
     else
     {
         AnsiConsole.MarkupLine($":waving_hand: [grey]Session ([/][grey69]{GetProcessName(value.Session)}[/][grey]):[/] [lightslategrey]Ended[/]");
         _hueConnector.SetColor(_notInSession, _lights);
     }
 }
 private void ManagedSessionOnStateChanged(SessionStateChangedArgs changedArgs)
 {
 }