public IMessageSerializer Find(string contentType)
{
Guard.NotNull(contentType, "contentType");
IMessageSerializer serializer;
if (!serializersByContentType.TryGetValue(contentType, out serializer))
{
var message = string.Format(
"There is no serializer registered with the content type '{0}', " +
"you need to register it with the DepotSettings when creating the bus.",
contentType);
throw new NotSupportedException(message);
}
return serializer;
}
}