Exemple #1
0
 public void _subscribersRemoved()
 {
     if (_subscribers.Count == 0)
     {
         UnsubscribeFromMessageBus();
     }
     RoomEmpty?.Invoke(this, null);
 }
Exemple #2
0
 public ChatRoom(string password = "")
 {
     Password                = password;
     memberList.ItemAdded   += a => { Terminal.ServerPrint(InfoType.信息, "学号" + a.UserId + "加入" + GroupName + "答疑室"); };
     memberList.ItemRemoved +=
         a =>
     {
         Terminal.ServerPrint(InfoType.信息, "学号" + a.UserId + "离开" + GroupName + "答疑室");
         if (this.memberList.Count == 0)
         {
             RoomEmpty?.Invoke(this);
         }
     };
 }