protected override void OnActive(ISession session) { AppendLine($"{session} 用户上线"); _session = session; ClientCommand.RaiseCanExecuteChanged(); base.OnActive(session); }
protected override void OnInActive(ISession session) { AppendLine($"{session} 用户下线"); if (_session == session) { _session = null; ClientCommand.RaiseCanExecuteChanged(); } base.OnInActive(session); }