/// <summary> /// Sends a message to the queue /// </summary> /// <param name="header">A MSMQHeader compatible header</param> /// <param name="body">The contents of the message</param> public void Send(MSMQHeader header, string body) { lock (_queue) { _queue.Send(body, header.ToString()); } }
/// <summary> /// Sends a message to the queue /// </summary> /// <param name="header">A MSMQHeader compatible header</param> /// <param name="body">The contents of the message</param> /// <param name="pm">A Property manager</param> public void Send(MSMQHeader header, string body, IPropertyManager pm) { lock (_queue) { Message msg = new Message(body); msg.Label = header.ToString(); msg.TimeToBeReceived = pm.Caducity; msg.Priority = pm.Priority; _queue.Send(msg); } }