Class TransactGetResult
- Namespace
- DynaSharp
- Assembly
- DynaSharp.dll
What a TransactGetCommand returns: one snapshot of all its items, each read on demand with Read<T>(TransactSlot<T>).
public sealed class TransactGetResult
- Inheritance
-
TransactGetResult
- Inherited Members
Remarks
An item is parsed when Read<T>(TransactSlot<T>) asks for it, so a type that does not fit fails only where it is read. The result stays valid for as long as it is held, also after the client is disposed, and it can be read from several threads and more than once; each read makes a new item. Holding the result holds the whole response, up to 4 MB, so keep the items, not the result, if they live long.
Properties
ConsumedCapacity
Gets the capacity the transaction consumed, if ReturnCapacity asked for it: an entry per table. Empty otherwise. A read in a transaction costs twice a strongly consistent read.
public IReadOnlyList<ConsumedCapacity> ConsumedCapacity { get; }
Property Value
Methods
Read<T>(TransactSlot<T>)
Reads the item of one get.
public GetResult<T> Read<T>(TransactSlot<T> slot) where T : IDynamoDbDocument<T>
Parameters
slotTransactSlot<T>The slot of the get.
Returns
- GetResult<T>
The item, or Found false if there is none under the key. ConsumedCapacity stays empty: the capacity is on this result.
Type Parameters
THow the item is read, which the slot knows.
Exceptions
- ArgumentException
The slot is a default value, or it comes from another transaction with more gets.
- DynamoDbMappingException
The item cannot be read as
T.