Table of Contents

Class CancellationReason

Namespace
DynaSharp
Assembly
DynaSharp.dll

Why one action of a cancelled transaction did not take effect, reported by CancellationReasons.

public sealed record CancellationReason : IEquatable<CancellationReason>
Inheritance
CancellationReason
Implements
Inherited Members

Remarks

An action that caused no problem has the code None. A transaction is cancelled because of at least one other action then, and the actions with the code None did not take effect either.

Constructors

CancellationReason()

public CancellationReason()

Properties

Code

Gets the code DynamoDB gives the reason, as a string because the service adds codes. The documented ones are None, ConditionalCheckFailed, ItemCollectionSizeLimitExceeded, TransactionConflict, ProvisionedThroughputExceeded, ThrottlingError and ValidationError. null only if DynamoDB leaves the code out.

public string? Code { get; init; }

Property Value

string

Item

Gets the item the condition was evaluated against, when the action set AllOld, its condition failed and an item existed; otherwise null.

public IReadOnlyDictionary<string, AttributeValue>? Item { get; init; }

Property Value

IReadOnlyDictionary<string, AttributeValue>

Message

Gets the message that belongs to the code, or null when DynamoDB sends none, as for None.

public string? Message { get; init; }

Property Value

string

Methods

Equals(CancellationReason?)

public bool Equals(CancellationReason? other)

Parameters

other CancellationReason

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(CancellationReason?, CancellationReason?)

public static bool operator ==(CancellationReason? left, CancellationReason? right)

Parameters

left CancellationReason
right CancellationReason

Returns

bool

operator !=(CancellationReason?, CancellationReason?)

public static bool operator !=(CancellationReason? left, CancellationReason? right)

Parameters

left CancellationReason
right CancellationReason

Returns

bool