TechTalk Genome v4.2

Context Members

Context overview

Public Static Properties

Current Gets the active Context in the calling thread.
IsContextStackBinderInitialized Gets a value that indicates if the context stack binder is already initialised.
IsStackEmpty Gets a value that indicates if the context stack is empty.

Public Static Methods

CommitCurrent Commits all uncommitted changes made in the transaction context of the active Context in the calling thread.
DeleteCurrent Destroys obj by removing its state from the DataDomain where it is stored. The operation is executed in the transaction context of the active Context in the calling thread.
GetContextStackBinder Gets the context stack binder.
GetEffectiveContext Returns the actual Context Genome uses to perform the data access operations on obj.
Pop Unloads the active Context in the calling thread and sets the previously active context (that is on the top of the thread's context stack) to be the active context.
PushOverloaded. Sets the active Context in the calling thread, pushing the previously active (if any) context down in the context stack.
PushIfNotCurrent Sets the active Context in the calling thread. The previously active context if not the same as specified, is pushed down in the context stack.
RollbackCurrent Performs a rollback to all uncommitted changes made in the transaction context of the active Context in the calling thread.
Set Sets the active Context in the calling thread, discarding the previous context stack.
SetContextStackBinderOverloaded. Sets the context set binder.
Unpin<T>Overloaded. Creates a context independent proxy to obj.

Public Instance Properties

BaseContext This member supports the Genome infrastructure and is not intended to be used directly from your code.
ContextType
IsCommitted Gets a value indicating whether there are any persistent objects created, modified or deleted in this Context that are still uncommitted.
IsEnlistedInDistributedTransaction Gets a value indicating whether the context is enlisted in a distributed transaction.
SessionGets the general purpose state bag attached to this Context.

Public Instance Methods

Attach Attaches this Context to a Context hierarchy under the specified Context.
ChangeOverloaded. This member supports the Genome infrastructure and is not intended to be used directly from your code. Notifies the Data Access Layer that an object is going to be modified in this Context.
CommitOverloaded. Saves all pending persistent objects into their DataDomains that have been modified in this Context since the last call to Context.Commit or Context.Rollback using the commitArgs specified.
Delete Destroys obj in the transaction context of this Context by removing its state from the DataDomain where it is stored.
Detach Detaches this from its Context.BaseContext.
Dispose Releases all resources held by this Context.
Equals (inherited from Object)
Flush Updates all pending persistent objects into their DataDomains that have been modified in this Context without committing the changes.
Get This member supports the Genome infrastructure and is not intended to be used directly from your code.
GetHashCode (inherited from Object)
GetType (inherited from Object)
HasLockedOverloaded. Returns if the given object is locked.
Invalidate Clears obj from any caches that the Context possesses thus assuring a fresh copy is obtained from the DataDomain the next time the object is accessed. Ineffective if obj is in the Transactional State Buffer of this Context.
InvalidateAllOverloaded. Invalidates all entries in the cache.
IsDeleted Returns if the obj parameter is marked as deleted in this context.
IsNewObject Returns if the obj parameter is not persisted in the database yet.
IsPropertyLoaded Returns if the specified property has already been loaded into this Context.
LockOverloaded. Locks or attempts to lock a persistent object in this Context.
MemoryLockOverloaded. Ensures that obj is loaded into the Transactional State Buffer of this Context.
MemoryUnlock Unloads obj from the Transactional State Buffer of this Context.
Pin<T>Overloaded. Creates proxy to obj that is bound to this Context.
PropertyChange This member supports the Genome infrastructure and is not intended to be used directly from your code. Notifies the Data Access Layer that the StateField specified by stateField on obj is going to be modified in this Context by setting the propertyName.
ReferOverloaded. This member supports the Genome infrastructure and is not intended to be used directly from your code.
RenewLocksOverloaded. Tries to renew the leases on all the locks currently held by the context, with the given timeout.
RenewLocksWithCheckOverloaded. Tries to renew the leases on all locks currently held by the context, with the default lease timeout of the context. Provides information about the locks that have been overtaken since the last access.
RollbackOverloaded. Undoes all changes made to pending persistent objects that have been modified in this Context since the last call to Context.Commit or Context.Rollback. Should any persistent objects be saved in the DataDomain those changes will be undone.
ToString
TryLockOverloaded. Attempts to lock a persistent object in this Context.
UnloadProperty Unloads the state of the given property for the given obj.
UnlockOverloaded. Releases the lock held on obj by this Context using the locking semantics configured for the type of the object.

Public Instance Events

AfterCommit Occurs after changes in this Context have been committed and before any Context.AfterCommitObject events are fired.
AfterCommitDeferred Occurs after changes in this Context have been committed and after all Context.AfterCommitObject events have been fired.
AfterCommitDomain Occurs after changes in this Context are updated in a particular DataDomain during commit.
AfterCommitObject Raised as last step of an (successful or failed) Context.Commit operation for any persistent object that was involved in the operation.
AfterOpenConnection Occurs after a database connection has been opened from this Context.
AfterRollback Occurs after changes in this Context have been rolled back and before any Context.AfterRollbackObject events are fired.
AfterRollbackDeferred Occurs after changes in this Context have been rolled back and after all Context.AfterRollbackObject events have been fired.
AfterRollbackObject Raised as last step of a Context.Rollback operation for any persistent object that was involved in the operation.
AfterUpdate Occurs after changes in this Context have been persisted into the DataDomain and before any Context.AfterUpdateObjectevents for the DataDomain are fired.
AfterUpdateDeferred Occurs after changes in this Context have been persisted into the DataDomain and after all Context.BeforeUpdateObject events for the DataDomain have been fired.
AfterUpdateObject Raised for all persistent object that have been saved in the DataDomain in this Context as a last step the of the update roundtrip.
BeforeCommit Occurs before changes in this Context are committed and before any Context.BeforeCommitObject events are fired.
BeforeCommitDeferred Occurs before changes in this Context are committed and after all Context.BeforeCommitObject events have been fired.
BeforeCommitDomain Occurs before changes in this Context are updated in a particular DataDomain during commit.
BeforeCommitObject Raised for persistent objects being committed but before any other persistent object is committed into the DataDomain as a result of calling Context.Commit on this Context.
BeforeRollback Occurs before changes in this Context are rolled back and before any Context.BeforeRollbackObject events are fired.
BeforeRollbackDeferred Occurs before changes in this Context are rolled back and after all Context.BeforeRollbackObject events have been fired.
BeforeRollbackObject Raised for persistent objects being rolled back but before its state is discarded in this Context.
BeforeUpdate Occurs before changes in this Context are persisted into the DataDomain and before any Context.BeforeUpdateObject events for the DataDomain are fired.
BeforeUpdateDeferred Occurs before changes in this Context are persisted into the DataDomain and after all Context.BeforeUpdateObject events for the DataDomain have been fired.
BeforeUpdateObject Raised for all persistent objects that are saved in the DataDomain in this Context but before any other persistent object is saved in the same update roundtrip.
ChangeObject Raised before the first change is made to a persistent object in this Context.
ConnectionStateChange Occurs before and after the state has been changed for a database connection or transaction that is managed by Genome in this Context.
DeleteObject Raised before a persistent object is deleted in this Context using Context.Delete method.
LoadObject Raised when any persistent object is populated into this Context while being activated from a DataDomain.

Protected Instance Methods

Finalize Releases all resources held by this Context.
MemberwiseClone (inherited from Object)

Private Instance Properties

TechTalk.Genome.IContext.BaseContext

Explicit Interface Implementations

IContext.get_BaseContext

See Also

Context Class | TechTalk.Genome Namespace | LocalContext | ShortRunningTransactionContext | ReadOnlyContext | CtxMgmtGuide.Foreword