From: Kevin W. <kev...@us...> - 2004-12-31 19:54:40
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13198 Modified Files: SessionFactoryObjectFactory.cs Log Message: fixing xml comments and letting ReSharper do reformatting Index: SessionFactoryObjectFactory.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl/SessionFactoryObjectFactory.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SessionFactoryObjectFactory.cs 21 Sep 2004 09:58:24 -0000 1.2 --- SessionFactoryObjectFactory.cs 31 Dec 2004 19:54:30 -0000 1.3 *************** *** 1,4 **** - using System; using System.Collections; namespace NHibernate.Impl --- 1,4 ---- using System.Collections; + using log4net; namespace NHibernate.Impl *************** *** 25,36 **** // to stop this class from being unloaded - this is a comment // from h2.0.3 - is this applicable to .net also??? ! private static readonly SessionFactoryObjectFactory Instance; ! private static readonly log4net.ILog log; ! static SessionFactoryObjectFactory() { ! log = log4net.LogManager.GetLogger( typeof(SessionFactoryObjectFactory) ); Instance = new SessionFactoryObjectFactory(); ! log.Debug("initializing class SessionFactoryObjectFactory"); } --- 25,37 ---- // to stop this class from being unloaded - this is a comment // from h2.0.3 - is this applicable to .net also??? ! private static readonly SessionFactoryObjectFactory Instance; // not used !?! ! private static readonly ILog log; ! /// <summary></summary> ! static SessionFactoryObjectFactory() { ! log = LogManager.GetLogger( typeof( SessionFactoryObjectFactory ) ); Instance = new SessionFactoryObjectFactory(); ! log.Debug( "initializing class SessionFactoryObjectFactory" ); } *************** *** 47,72 **** /// <param name="instance">The ISessionFactory.</param> /// <param name="properties">The configured properties for the ISessionFactory.</param> ! public static void AddInstance(string uid, string name, ISessionFactory instance, IDictionary properties) { ! if(log.IsDebugEnabled) { ! string nameMsg = "unnamed"; ! if(name!=null && name.Length > 0) ! { ! nameMsg = name; ! } ! log.Debug( "registered: " + uid + "(" + name + ")" ); } ! Instances[uid] = instance; ! if(name!=null && name.Length > 0) { ! log.Info("Factory name:" + name); ! NamedInstances[name] = instance; } ! else { ! log.Info("no name configured"); } --- 48,69 ---- /// <param name="instance">The ISessionFactory.</param> /// <param name="properties">The configured properties for the ISessionFactory.</param> ! public static void AddInstance( string uid, string name, ISessionFactory instance, IDictionary properties ) { ! if( log.IsDebugEnabled ) { ! string nameMsg = ( ( name != null && name.Length > 0 ) ? name : "unnamed" ); ! log.Debug( "registered: " + uid + "(" + nameMsg + ")" ); } ! Instances[ uid ] = instance; ! if( name != null && name.Length > 0 ) { ! log.Info( "Factory name:" + name ); ! NamedInstances[ name ] = instance; } ! else { ! log.Info( "no name configured" ); } *************** *** 79,92 **** /// <param name="name">The name of the ISessionFactory.</param> /// <param name="properties">The configured properties for the ISessionFactory.</param> ! public static void RemoveInstance(string uid, string name, IDictionary properties) { ! if(name!=null && name.Length > 0) { ! log.Info("unbinding factory: " + name); ! NamedInstances.Remove(name); } ! Instances.Remove(uid); } --- 76,89 ---- /// <param name="name">The name of the ISessionFactory.</param> /// <param name="properties">The configured properties for the ISessionFactory.</param> ! public static void RemoveInstance( string uid, string name, IDictionary properties ) { ! if( name != null && name.Length > 0 ) { ! log.Info( "unbinding factory: " + name ); ! NamedInstances.Remove( name ); } ! Instances.Remove( uid ); } *************** *** 96,104 **** /// <param name="name">The name of the ISessionFactory.</param> /// <returns>An instantiated ISessionFactory.</returns> ! public static ISessionFactory GetNamedInstance(string name) { ! log.Debug( "lookup: name=" + name); ! ISessionFactory factory = NamedInstances[name] as ISessionFactory; ! if(factory==null) { log.Warn( "Not found: " + name ); --- 93,101 ---- /// <param name="name">The name of the ISessionFactory.</param> /// <returns>An instantiated ISessionFactory.</returns> ! public static ISessionFactory GetNamedInstance( string name ) { ! log.Debug( "lookup: name=" + name ); ! ISessionFactory factory = NamedInstances[ name ] as ISessionFactory; ! if( factory == null ) { log.Warn( "Not found: " + name ); *************** *** 112,120 **** /// <param name="uid">The identifier of the ISessionFactory.</param> /// <returns>An instantiated ISessionFactory.</returns> ! public static ISessionFactory GetInstance(string uid) { log.Debug( "lookup: uid=" + uid ); ! ISessionFactory factory = Instances[uid] as ISessionFactory; ! if(factory==null) { log.Warn( "Not found: " + uid ); --- 109,117 ---- /// <param name="uid">The identifier of the ISessionFactory.</param> /// <returns>An instantiated ISessionFactory.</returns> ! public static ISessionFactory GetInstance( string uid ) { log.Debug( "lookup: uid=" + uid ); ! ISessionFactory factory = Instances[ uid ] as ISessionFactory; ! if( factory == null ) { log.Warn( "Not found: " + uid ); *************** *** 123,125 **** } } ! } --- 120,122 ---- } } ! } \ No newline at end of file |