protected internal virtual string GetMessageBody(Message message)
{
string body = null;
if (message.IsSetBody())
{
body = message.Body;
}
if (String.IsNullOrWhiteSpace(body))
{
if (message.IsSetMessageId())
{
throw new Exception(
String.Format("The body of the message with MessageId '{0}' was unexpectedly blank.",
message.MessageId));
}
else
{
throw new Exception("This message has no body and no message ID.");
}
}
return body;
}