Syntax
| C# |
|---|
public interface ISessionScope |
The type exposes the following members.
Public Methods
| Name | Description | |
|---|---|---|
| Dispose | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (Inherited from IDisposable.) | |
| FailSession |
This method will be called if a session action fails.
The scope may then decide to use an different approach to flush/dispose it.
| |
| Flush |
Flushes the sessions that this scope
is maintaining
| |
| GetSession |
This method should return the session instance associated with the key.
| |
| IsKeyKnown |
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) | |
| OpenSession |
If the WantsToCreateTheSession returned
true then this method is invoked to allow
the scope to create a properly configured session
| |
| RegisterSession |
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
| Name | Description | |
|---|---|---|
| FlushAction |
Returns the FlushAction defined
for this scope
| |
| ScopeType |
Returns the SessionScopeType defined
for this scope
| |
| WantsToCreateTheSession |
Implementors should return true if they
want that their scope implementation
be in charge of creating the session
|
See Also
Castle.ActiveRecord Namespace