From: Michael D. <mik...@us...> - 2004-04-15 21:07:32
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Cfg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22207/Cfg Modified Files: Binder.cs Configuration.cs Log Message: Refactored the Dialect out of the StringHelper Index: Binder.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Cfg/Binder.cs,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** Binder.cs 15 Apr 2004 13:21:17 -0000 1.15 --- Binder.cs 15 Apr 2004 21:07:17 -0000 1.16 *************** *** 16,20 **** private static XmlNamespaceManager nsmgr; private static readonly string nsPrefix = "hbm"; ! private static Dialect.Dialect dialect; public static void BindClass(XmlNode node, PersistentClass model, Mappings mapping) { --- 16,20 ---- private static XmlNamespaceManager nsmgr; private static readonly string nsPrefix = "hbm"; ! internal static Dialect.Dialect dialect; public static void BindClass(XmlNode node, PersistentClass model, Mappings mapping) { *************** *** 111,117 **** } ! public static void BindRootClass(XmlNode node, RootClass model, Mappings mappings, Dialect.Dialect d) { ! ! dialect = d; BindClass(node, model, mappings); --- 111,115 ---- } ! public static void BindRootClass(XmlNode node, RootClass model, Mappings mappings) { BindClass(node, model, mappings); *************** *** 850,854 **** } ! public static void BindRoot(XmlDocument doc, Mappings model, Dialect.Dialect dialect) { XmlNode hmNode = doc.DocumentElement; --- 848,852 ---- } ! public static void BindRoot(XmlDocument doc, Mappings model) { XmlNode hmNode = doc.DocumentElement; *************** *** 870,874 **** foreach(XmlNode n in hmNode.SelectNodes(nsPrefix + ":class", nsmgr) ) { RootClass rootclass = new RootClass(); ! Binder.BindRootClass(n, rootclass, model, dialect); model.AddClass(rootclass); } --- 868,872 ---- foreach(XmlNode n in hmNode.SelectNodes(nsPrefix + ":class", nsmgr) ) { RootClass rootclass = new RootClass(); ! Binder.BindRootClass(n, rootclass, model); model.AddClass(rootclass); } Index: Configuration.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Cfg/Configuration.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Configuration.cs 15 Apr 2004 13:21:17 -0000 1.11 --- Configuration.cs 15 Apr 2004 21:07:17 -0000 1.12 *************** *** 171,180 **** /// </summary> /// <param name="doc">The validated XmlDocument that contains the Mappings.</param> ! private void Add(XmlDocument doc) { try { ! StringHelper.Dialect = Dialect.Dialect.GetDialect(properties); ! Binder.BindRoot( doc, CreateMappings(), StringHelper.Dialect); } ! catch (MappingException me) { log.Error("Could not compile the mapping document", me); throw me; --- 171,183 ---- /// </summary> /// <param name="doc">The validated XmlDocument that contains the Mappings.</param> ! private void Add(XmlDocument doc) ! { try { ! Binder.dialect = Dialect.Dialect.GetDialect(properties); ! //StringHelper.Dialect = Dialect.Dialect.GetDialect(properties); ! Binder.BindRoot( doc, CreateMappings()); } ! catch (MappingException me) ! { log.Error("Could not compile the mapping document", me); throw me; |