Syntax
| C# |
|---|
public abstract class AbstractScope |
The type exposes the following members.
Public Constructors
| Name | Description | |
|---|---|---|
| AbstractScopeAbstractScopeNew |
Initializes a new instance of the AbstractScope class.
|
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.
| |
| Equals | (Inherited from Object.) | |
| FailSession |
Marks the session as failed
| |
| Flush |
Flushes the sessions that this scope
is maintaining
| |
| 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.
| |
| 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.
AbstractScope..::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
AbstractScope..::IsKeyKnown(Object) | |
| ToString | (Inherited from Object.) |
Protected Methods
| Name | Description | |
|---|---|---|
| DiscardSessions |
Discards the sessions.
| |
| 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.
| |
| MemberwiseClone | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.) | |
| PerformDisposal | Overloaded. | |
| SetFlushMode |
Sets the flush mode.
|
Protected Fields
| Name | Description | |
|---|---|---|
| key2Session |
Map between a key to its session
|
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
|