Not an Issue
Details
Details
Assignee
Unassigned
UnassignedReporter
Jose F. Romaniello
Jose F. RomanielloComponents
Affects versions
Priority
Who's Looking?
Open Who's Looking?
Created April 21, 2011 at 11:36 AM
Updated April 22, 2011 at 12:04 PM
Resolved April 22, 2011 at 12:04 PM
I think it will be a good idea to add an extension method (or a method) in HbmMapping to generate the XmlVersion of the mappings;
Otherwise i have write this code lot of times.. for testing-debugging purposes:
public static class HbmMappingsExtensions
{
public static string ToXmlString(this HbmMapping mappings)
{
using (var ms = new MemoryStream())
{
var serializer = new XmlSerializer(typeof(HbmMapping));
serializer.Serialize(ms, mappings);
ms.Position = 0;
using (var streamReader = new StreamReader(ms))
{
return streamReader.ReadToEnd();
}
}
}
}