Syntax

C#
public interface ISessionScope

The type exposes the following members.

Public Methods

  NameDescription
Public methodDispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from IDisposable.)
Public methodFailSession
This method will be called if a session action fails. The scope may then decide to use an different approach to flush/dispose it.
Public methodFlush
Flushes the sessions that this scope is maintaining
Public methodGetSession
This method should return the session instance associated with the key.
Public methodIsKeyKnown
This method is invoked when the ISessionFactoryHolder instance needs a session instance. Instead of creating one it interrogates the active scope for one. The scope implementation must check if it has a session registered for the given key. ISessionScope..::RegisterSession(Object, ISession)
Public methodOpenSession
If the WantsToCreateTheSession returned true then this method is invoked to allow the scope to create a properly configured session
Public methodRegisterSession
This method is invoked when no session was available at and the ISessionFactoryHolder just created one. So it registers the session created within this scope using a key. The scope implementation shouldn't make any assumption on what the key actually is as we reserve the right to change it ISessionScope..::IsKeyKnown(Object)

Public Properties

  NameDescription
Public propertyFlushAction
Returns the FlushAction defined for this scope
Public propertyScopeType
Returns the SessionScopeType defined for this scope
Public propertyWantsToCreateTheSession
Implementors should return true if they want that their scope implementation be in charge of creating the session

See Also