Syntax

C#
public abstract class AbstractScope

The type exposes the following members.

Public Constructors

  NameDescription
Public methodAbstractScopeAbstractScopeNew
Initializes a new instance of the AbstractScope class.

Public Methods

  NameDescription
Public methodCreateObjRef
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject.)
Public methodDispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodFailSession
Marks the session as failed
Public methodFlush
Flushes the sessions that this scope is maintaining
Public methodGetHashCode
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.)
Public methodGetLifetimeService
Retrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Public methodGetSession
This method should return the session instance associated with the key.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInitializeLifetimeService
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
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. AbstractScope..::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 AbstractScope..::IsKeyKnown(Object)
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)

Protected Methods

  NameDescription
Protected methodDiscardSessions
Discards the sessions.
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Protected methodInitialize
Initializes the specified session.
Protected methodMemberwiseClone
Creates a shallow copy of the current MarshalByRefObject object.
(Inherited from MarshalByRefObject.)
Protected methodPerformDisposalOverloaded.
Protected methodSetFlushMode
Sets the flush mode.

Protected Fields

  NameDescription
Protected fieldkey2Session
Map between a key to its session

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