From: Jose F. R. (JIRA) <nh...@gm...> - 2011-04-21 18:38:42
|
Extension method to generate the Xml-string version of an HbmMapping -------------------------------------------------------------------- Key: NH-2663 URL: http://216.121.112.228/browse/NH-2663 Project: NHibernate Issue Type: New Feature Components: Core Affects Versions: 3.2.0Alpha2 Reporter: Jose F. Romaniello 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(); } } } } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |