Пример #1
0
 public void Enqueue(LogMessage msg)
 {
     if (lastMessage != null && msg.CanCombineWith(lastMessage))
     {
         lastMessage.repeats++;
         return;
     }
     lastMessage = msg;
     messages.Enqueue(msg);
     if (messages.Count > maxMessages)
     {
         EditWindow_Log.Notify_MessageDequeued(messages.Dequeue());
     }
 }
Пример #2
0
 public void Enqueue(LogMessage msg)
 {
     if (this.lastMessage != null && msg.CanCombineWith(this.lastMessage))
     {
         this.lastMessage.repeats++;
         return;
     }
     this.lastMessage = msg;
     this.messages.Enqueue(msg);
     if (this.messages.Count > this.maxMessages)
     {
         LogMessage oldMessage = this.messages.Dequeue();
         EditWindow_Log.Notify_MessageDequeued(oldMessage);
     }
 }
Пример #3
0
 public void Enqueue(LogMessage msg)
 {
     if (lastMessage != null && msg.CanCombineWith(lastMessage))
     {
         lastMessage.repeats++;
     }
     else
     {
         lastMessage = msg;
         messages.Enqueue(msg);
         if (messages.Count > maxMessages)
         {
             LogMessage oldMessage = messages.Dequeue();
             EditWindow_Log.Notify_MessageDequeued(oldMessage);
         }
     }
 }