public override bool CanWriteType(Type type)
{
if (type == typeof (CompoundDocument))
{
return true;
}
if (type == typeof (HttpError))
{
return true;
}
if ((typeof(Exception).IsAssignableFrom(type)))
{
return true;
}
if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(MetaDataWrapper<>))
{
type = type.GenericTypeArguments[0];
}
return configuration.IsMappingRegistered(type);
}