Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Persister
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3612
Modified Files:
PersisterFactory.cs
Log Message:
fixing xml comments and letting ReSharper do reformatting
Index: PersisterFactory.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Persister/PersisterFactory.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** PersisterFactory.cs 9 Aug 2004 03:25:55 -0000 1.1
--- PersisterFactory.cs 31 Dec 2004 21:49:57 -0000 1.2
***************
*** 1,5 ****
using System;
using System.Reflection;
-
using NHibernate.Engine;
using NHibernate.Mapping;
--- 1,4 ----
***************
*** 19,23 ****
}
! private static readonly System.Type[] PersisterConstructorArgs = new System.Type[] { typeof(PersistentClass), typeof(ISessionFactoryImplementor) };
--- 18,22 ----
}
! private static readonly System.Type[ ] PersisterConstructorArgs = new System.Type[ ] {typeof( PersistentClass ), typeof( ISessionFactoryImplementor )};
***************
*** 28,46 ****
/// <param name="factory"></param>
/// <returns></returns>
! public static IClassPersister Create(PersistentClass model, ISessionFactoryImplementor factory)
{
System.Type persisterClass = model.Persister;
! if( persisterClass==null || persisterClass==typeof(EntityPersister) )
{
! return new EntityPersister(model, factory);
}
! else if ( persisterClass==typeof(NormalizedEntityPersister) )
{
! return new NormalizedEntityPersister(model, factory);
}
! else
{
! return Create(persisterClass, model, factory);
}
}
--- 27,45 ----
/// <param name="factory"></param>
/// <returns></returns>
! public static IClassPersister Create( PersistentClass model, ISessionFactoryImplementor factory )
{
System.Type persisterClass = model.Persister;
! if( persisterClass == null || persisterClass == typeof( EntityPersister ) )
{
! return new EntityPersister( model, factory );
}
! else if( persisterClass == typeof( NormalizedEntityPersister ) )
{
! return new NormalizedEntityPersister( model, factory );
}
! else
{
! return Create( persisterClass, model, factory );
}
}
***************
*** 53,76 ****
/// <param name="factory"></param>
/// <returns></returns>
! public static IClassPersister Create(System.Type persisterClass, PersistentClass model, ISessionFactoryImplementor factory )
{
ConstructorInfo pc;
! try
{
! pc = persisterClass.GetConstructor(PersisterFactory.PersisterConstructorArgs);
}
! catch(Exception e)
{
! throw new MappingException("Could not get constructor for " + persisterClass.Name, e);
}
! try
{
! return (IClassPersister) pc.Invoke( new object[] {model, factory} );
}
! //TODO: add more specialized error catches
! catch (Exception e)
{
! throw new MappingException("Could not instantiate persister " + persisterClass.Name, e);
}
--- 52,75 ----
/// <param name="factory"></param>
/// <returns></returns>
! public static IClassPersister Create( System.Type persisterClass, PersistentClass model, ISessionFactoryImplementor factory )
{
ConstructorInfo pc;
! try
{
! pc = persisterClass.GetConstructor( PersisterFactory.PersisterConstructorArgs );
}
! catch( Exception e )
{
! throw new MappingException( "Could not get constructor for " + persisterClass.Name, e );
}
! try
{
! return ( IClassPersister ) pc.Invoke( new object[ ] {model, factory} );
}
! //TODO: add more specialized error catches
! catch( Exception e )
{
! throw new MappingException( "Could not instantiate persister " + persisterClass.Name, e );
}
***************
*** 78,80 ****
}
! }
--- 77,79 ----
}
! }
\ No newline at end of file
|