Property | Type | Description | |
---|---|---|---|
key2Session | ISession>.IDictionary |
Method | Description | |
---|---|---|
AbstractScope ( FlushAction flushAction, SessionScopeType type ) : System |
Initializes a new instance of the AbstractScope class.
|
|
Dispose ( ) : void |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
|
|
FailSession ( ISession session ) : void |
Marks the session as failed
|
|
Flush ( ) : void |
Flushes the sessions that this scope is maintaining
|
|
GetSession ( object key ) : ISession |
This method should return the session instance associated with the key.
|
|
IsKeyKnown ( object key ) : bool |
This method is invoked when the Castle.ActiveRecord.Framework.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. RegisterSession
|
|
OpenSession ( ISessionFactory sessionFactory, IInterceptor interceptor ) : ISession |
If the WantsToCreateTheSession returned
|
|
RegisterSession ( object key, ISession session ) : void |
This method is invoked when no session was available at and the Castle.ActiveRecord.Framework.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 IsKeyKnown
|
Method | Description | |
---|---|---|
DiscardSessions ( ICollection |
Discards the sessions.
|
|
Initialize ( ISession session ) : void |
Initializes the specified session.
|
|
PerformDisposal ( ICollection |
Performs the disposal.
|
|
PerformDisposal ( ICollection |
Performs the disposal.
|
|
SetFlushMode ( ISession session ) : void |
Sets the flush mode.
|
Method | Description | |
---|---|---|
GetSessions ( ) : ICollection |
Gets the sessions.
|
|
RemoveSession ( ISession session ) : void |
Removes the session.
|
public AbstractScope ( FlushAction flushAction, SessionScopeType type ) : System | ||
flushAction | FlushAction | The flush action. |
type | SessionScopeType | The type. |
return | System |
protected DiscardSessions ( ICollection |
||
sessions | ICollection |
The sessions. |
return | void |
public abstract FailSession ( ISession session ) : void | ||
session | ISession | The session |
return | void |
public GetSession ( object key ) : ISession | ||
key | object | an object instance |
return | ISession |
protected Initialize ( ISession session ) : void | ||
session | ISession | The session. |
return | void |
public IsKeyKnown ( object key ) : bool | ||
key | object | an object instance |
return | bool |
public OpenSession ( ISessionFactory sessionFactory, IInterceptor interceptor ) : ISession | ||
sessionFactory | ISessionFactory | From where to open the session |
interceptor | IInterceptor | the NHibernate interceptor |
return | ISession |
protected PerformDisposal ( ICollection |
||
sessions | ICollection |
The sessions. |
return | void |
protected PerformDisposal ( ICollection |
||
sessions | ICollection |
The sessions. |
flush | bool | if set to |
close | bool | if set to |
return | void |
public RegisterSession ( object key, ISession session ) : void | ||
key | object | an object instance |
session | ISession | An instance of |
return | void |
protected SetFlushMode ( ISession session ) : void | ||
session | ISession | The session. |
return | void |