Exemplo n.º 1
0
 public void Enqueue(Message message)
 {
     lock (_innerQueue)
       {
     _innerQueue.Enqueue(message);
     while (_innerQueue.Count > _queueSize) _innerQueue.Dequeue();
       }
 }
Exemplo n.º 2
0
        public void Send(Message message)
        {
            foreach (var contact in _messenger.ContactList.WindowsLive)
              {
            if (Log.IsDebugEnabled)
            {
              Log.Debug("Checking contact " + contact.Name + " for sending message");
            }

            //if (contact.Online)
            {
              if (Log.IsDebugEnabled)
              {
            Log.Debug("Sending message to " + contact.Name);
              }

              //var textMessage = new TextMessage(message.Text);
              //_messenger.MessageManager.SendTextMessage(contact, textMessage);
              _messenger.SendTextMessage(contact, message.Text);
            }
              }
        }
Exemplo n.º 3
0
        public Message Create(string line)
        {
            var message = new Message(line);

              return message;
        }