Click or drag to resize

TransactedPropertyT Class

A property that participates in the software transactional memory (STM) system. The property's value must be read and modified in the context of a Transaction, which guarantees snapshot isolation for all properties in a TransactionContext.
Inheritance Hierarchy
SystemObject
  AGI.Foundation.Infrastructure.ThreadingTransactedObject
    AGI.Foundation.Infrastructure.ThreadingTransactedPropertyT

Namespace:  AGI.Foundation.Infrastructure.Threading
Assembly:  AGI.Foundation.Tracking (in AGI.Foundation.Tracking.dll) Version: 24.3.420.0 (24.3.420.0)
Syntax
public class TransactedProperty<T> : TransactedObject

Type Parameters

T
The type of the property. This type must be immutable (meaning it cannot be changed after it is constructed) or it must be treated as such.

The TransactedPropertyT type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyContext
Gets the transaction context in which this object can be modified.
(Inherited from TransactedObject.)
Public propertyOwner
Gets the object that owns this transacted object, or if this object does not have an owner.
(Inherited from TransactedObject.)
Top
Methods
  NameDescription
Protected methodAbort
Aborts the specified modification.
(Overrides TransactedObjectAbort(Transaction, Object).)
Protected methodCheckTransaction
Verifies that a specified transaction is in the same context as this transacted object and throws an ArgumentException if it is not.
(Inherited from TransactedObject.)
Protected methodCleanup
Cleans up modifications that are no longer visible to any transaction.
(Overrides TransactedObjectCleanup(Object).)
Protected methodCommit
Commits the specified modification.
(Overrides TransactedObjectCommit(Transaction, Object).)
Public methodEnsureValue
At Commit time, ensures that the value of this property, as seen by a given Transaction, has not changed. If another transaction commits a change to this property after the specified transaction starts, the specified transaction will throw TransactionConflictException when it is committed.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetValue
Gets the value of this transacted property in the context of the given transaction, guaranteeing snapshot isolation. See the Remarks section for more information.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodNotify
Notifies interested parties of changes to this transacted object.
(Overrides TransactedObjectNotify(Object, Transaction).)
Public methodSetValue
Sets the value of this property in the context of the specified transaction. The changed value will not be visible to other transactions until Commit is called. Calling this method may cause a TransactionConflictException to be raised at Commit time. See the Remarks section for more information.
Public methodToString
Get a String that represents the value of this transacted property.
(Overrides ObjectToString.)
Protected methodValidateModification
Verifies a modification to ensure that it is still valid after other transactions have potentially committed modifications to this object.
(Overrides TransactedObjectValidateModification(Transaction, Object).)
Top
Events
  NameDescription
Public eventChanged
Raised when a transaction that changes this property is Committed. See the Remarks section for more information.
Top
See Also