Click or drag to resize

TransactedPropertyTGetValue Method

Gets the value of this transacted property in the context of the given transaction, guaranteeing snapshot isolation. See the Remarks section for more information.

Namespace:  AGI.Foundation.Infrastructure.Threading
Assembly:  AGI.Foundation.Tracking (in AGI.Foundation.Tracking.dll) Version: 24.1.418.0 (24.1.418.0)
Syntax
public T GetValue(
	Transaction transaction
)

Parameters

transaction
Type: AGI.FoundationTransaction
The transaction in which to obtain the value of the property.

Return Value

Type: T
The value.
Remarks

This method guarantees snapshot isolation. This means that it will return either the last value that was passed to SetValue(Transaction, T) within the same transaction, or the value of this transacted property that was in place when the transaction started. This is true even if other transactions have committed a change to this transacted property since this transaction started.

If you need to ensure that the value returned by this method is the latest one, call EnsureValue(Transaction). When a transaction is committed, a TransactionConflictException will be raised if an ensured value was changed by a previously committed transaction.

See Also