Syntax
| C# |
|---|
public class DifferentDatabaseScope |
The type exposes the following members.
Public Constructors
| Name | Description | |
|---|---|---|
| DifferentDatabaseScopeDifferentDatabaseScopeNew | Overloaded. |
Public Methods
| Name | Description | |
|---|---|---|
| CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.) | |
| Dispose |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from AbstractScope.) | |
| Equals | (Inherited from Object.) | |
| FailSession |
This is called when a session has a failure
(Overrides AbstractScope..::FailSession(ISession).) | |
| Flush |
Flushes the sessions that this scope
is maintaining
(Inherited from AbstractScope.) | |
| GetHashCode | Serves as a hash function for a particular type. GetHashCode()() is suitable for use in hashing algorithms and data structures like a hash table. (Inherited from Object.) | |
| GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.) | |
| GetSession |
This method should return the session instance associated with the key.
(Overrides AbstractScope..::GetSession(Object).) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.) | |
| 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.
DifferentDatabaseScope..::RegisterSession(Object, ISession) (Overrides AbstractScope..::IsKeyKnown(Object).) | |
| OpenSession |
If the WantsToCreateTheSession returned
true then this method is invoked to allow
the scope to create a properly configured session
(Overrides AbstractScope..::OpenSession(ISessionFactory, IInterceptor).) | |
| 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
DifferentDatabaseScope..::IsKeyKnown(Object) (Overrides AbstractScope..::RegisterSession(Object, ISession).) | |
| ToString | (Inherited from Object.) |
Protected Methods
| Name | Description | |
|---|---|---|
| DiscardSessions |
Discards the sessions.
(Inherited from AbstractScope.) | |
| Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
| Initialize |
Initializes the specified session.
(Inherited from AbstractScope.) | |
| MemberwiseClone | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.) | |
| PerformDisposal | Overloaded. | |
| SetFlushMode |
Sets the flush mode.
(Inherited from AbstractScope.) |
Protected Fields
| Name | Description | |
|---|---|---|
| key2Session |
Map between a key to its session
(Inherited from AbstractScope.) |
Public Properties
| Name | Description | |
|---|---|---|
| FlushAction |
Returns the FlushAction defined
for this scope
(Inherited from AbstractScope.) | |
| ScopeType |
Returns the SessionScopeType defined
for this scope
(Inherited from AbstractScope.) | |
| WantsToCreateTheSession |
We want to be in charge of creating the session
(Overrides AbstractScope..::WantsToCreateTheSession.) |