예제 #1
0
 /// <summary>
 /// The dispose.
 /// </summary>
 public void Dispose()
 {
     this.AdminList.Clear();
     this.ModeratorList.Clear();
     this.OwnerList.Clear();
     this.Users.Clear();
     this.VoiceList.Clear();
     this.GroupUser = null;
     if (OnMessageReceived != null)
     {
         foreach (var d in OnMessageReceived.GetInvocationList())
         {
             OnMessageReceived -= (DMessageReceived)d;
         }
     }
     if (OnUserListChange != null)
     {
         foreach (var d in OnUserListChange.GetInvocationList())
         {
             OnUserListChange -= (DUserListChange)d;
         }
     }
     if (OnStateChanged != null)
     {
         foreach (var d in OnStateChanged.GetInvocationList())
         {
             OnStateChanged -= (DRoomStateChange)d;
         }
     }
     stateTimer.Dispose();
 }