2016-06-20 12:20:37 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2016-06-20 10:30:03 +00:00
|
|
|
|
|
2016-07-12 14:57:24 +00:00
|
|
|
|
namespace PettingZoo.Model
|
2016-06-20 10:30:03 +00:00
|
|
|
|
{
|
|
|
|
|
public class MessageInfo
|
|
|
|
|
{
|
2016-06-20 12:20:37 +00:00
|
|
|
|
public DateTime Timestamp { get; set; }
|
2016-06-20 21:22:20 +00:00
|
|
|
|
public string Exchange { get; set; }
|
2016-06-20 10:30:03 +00:00
|
|
|
|
public string RoutingKey { get; set; }
|
|
|
|
|
public byte[] Body { get; set; }
|
|
|
|
|
|
|
|
|
|
public Dictionary<string, string> Properties;
|
|
|
|
|
|
|
|
|
|
public string ContentType
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
2016-06-20 21:22:20 +00:00
|
|
|
|
return Properties != null && Properties.ContainsKey(RabbitMQProperties.ContentType)
|
|
|
|
|
? Properties[RabbitMQProperties.ContentType]
|
2016-06-20 10:30:03 +00:00
|
|
|
|
: "";
|
|
|
|
|
}
|
|
|
|
|
}
|
2016-06-20 12:20:37 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public MessageInfo()
|
|
|
|
|
{
|
|
|
|
|
Timestamp = DateTime.Now;
|
|
|
|
|
}
|
2016-06-20 10:30:03 +00:00
|
|
|
|
}
|
|
|
|
|
}
|