Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data.NHibernate/Data/NHibernate/Support
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv26568/Spring.Data.NHibernate/Data/NHibernate/Support
Modified Files:
OpenSessionInViewModule.cs SessionScope.cs
Log Message:
SPRNET-845
Index: OpenSessionInViewModule.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data.NHibernate/Data/NHibernate/Support/OpenSessionInViewModule.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** OpenSessionInViewModule.cs 29 Sep 2007 21:29:23 -0000 1.6
--- OpenSessionInViewModule.cs 21 Jan 2008 06:39:12 -0000 1.7
***************
*** 43,47 ****
/// but does not yet associate a session with a thread, that is lef to the lifecycle of the request.
/// </summary>
! public OpenSessionInViewModule() : base("appSettings", false)
{
--- 43,47 ----
/// but does not yet associate a session with a thread, that is lef to the lifecycle of the request.
/// </summary>
! public OpenSessionInViewModule() : base("appSettings", typeof(OpenSessionInViewModule), false)
{
Index: SessionScope.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data.NHibernate/Data/NHibernate/Support/SessionScope.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** SessionScope.cs 22 Aug 2007 20:16:36 -0000 1.2
--- SessionScope.cs 21 Jan 2008 06:39:12 -0000 1.3
***************
*** 120,128 ****
/// </param>
public SessionScope(string sectionName, bool open)
! : this( new ConfigSectionSessionScopeSettings(new StackFrame(1).GetMethod().DeclaringType, sectionName), open)
{
// noop
}
/// <summary>
/// Initializes a new instance of the <see cref="SessionScope"/> class.
--- 120,148 ----
/// </param>
public SessionScope(string sectionName, bool open)
! : this( sectionName, typeof(SessionScope), open)
{
// noop
}
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="SessionScope"/> class.
+ /// </summary>
+ /// <param name="sectionName">
+ /// The name of the configuration section to read configuration settings from.
+ /// See <see cref="ConfigSectionSessionScopeSettings"/> for more info.
+ /// </param>
+ /// <param name="namespaceType">The type, who's full name is used for prefixing appSetting keys</param>
+ /// <param name="open">
+ /// If set to <c>true</c> associate a session with the thread. If false, another
+ /// collaborating class will associate the session with the thread, potentially by calling
+ /// the Open method on this class.
+ /// </param>
+ public SessionScope(string sectionName, Type namespaceType, bool open)
+ : this(new ConfigSectionSessionScopeSettings(namespaceType, sectionName), open)
+ {
+ // noop
+ }
+
/// <summary>
/// Initializes a new instance of the <see cref="SessionScope"/> class.
|