VirtualMachineCommitResult

Observable outcome of a COMMIT. The Operations list is the proof of stop → change → restart.

Note
A commit and a DELETION EXECUTION are different events and carry different results - see VirtualMachineDeletionResult. One record serving both meant four of its fields were structurally zero on every deletion run, and a result whose reader must know which half of it is meaningful is two results wearing one name.
public sealed record VirtualMachineCommitResult : IEquatable<VirtualMachineCommitResult>

1. Constructors

1.1. VirtualMachineCommitResult(IReadOnlyList<VirtualMachineOperationRecord>, int, int, int, int, int, IReadOnlyList<VirtualMachineCommitFailure>)

Observable outcome of a COMMIT. The Operations list is the proof of stop → change → restart.

public VirtualMachineCommitResult(IReadOnlyList<VirtualMachineOperationRecord> Operations, int Inserted, int Updated, int SoftDeleted, int Deleted, int NotFound, IReadOnlyList<VirtualMachineCommitFailure> Failed)
Table 1. Parameters
Name Type Description

Operations

IReadOnlyList<VirtualMachineOperationRecord>

Every operation performed, in order.

Inserted

int

Number of inserted records.

Updated

int

Number of updated records.

SoftDeleted

int

Number of records MARKED as deleted - stopped and renamed.

Deleted

int

Number of records destroyed outright. Non-zero only where the environment cannot mark (IVirtualMachineOperations.CanSoftDelete false) and a delete is therefore irreversible - which is exactly the case worth being able to tell apart afterwards.

NotFound

int

Number of updates whose machine the environment did not report at all. Distinct from an idempotent no-op, and surfaced here rather than only in a log line so a caller - and a test - can tell a MISSED match from "nothing to do".

Failed

IReadOnlyList<VirtualMachineCommitFailure>

Records whose operations threw, with their cause.

2. Properties

2.1. Deleted

Number of records destroyed outright. Non-zero only where the environment cannot mark (IVirtualMachineOperations.CanSoftDelete false) and a delete is therefore irreversible - which is exactly the case worth being able to tell apart afterwards.

public int Deleted { get; init; }

2.2. Empty

An empty result, returned by a commit that had nothing to do.

public static VirtualMachineCommitResult Empty { get; }

2.3. Failed

Records whose operations threw, with their cause.

public IReadOnlyList<VirtualMachineCommitFailure> Failed { get; init; }

2.4. Inserted

Number of inserted records.

public int Inserted { get; init; }

2.5. NotFound

Number of updates whose machine the environment did not report at all. Distinct from an idempotent no-op, and surfaced here rather than only in a log line so a caller - and a test - can tell a MISSED match from "nothing to do".

public int NotFound { get; init; }

2.6. Operations

Every operation performed, in order.

public IReadOnlyList<VirtualMachineOperationRecord> Operations { get; init; }

2.7. SoftDeleted

Number of records MARKED as deleted - stopped and renamed.

public int SoftDeleted { get; init; }

2.8. Updated

Number of updated records.

public int Updated { get; init; }

3. Operators

3.1. operator !=(VirtualMachineCommitResult, VirtualMachineCommitResult)

public static bool operator !=(VirtualMachineCommitResult left, VirtualMachineCommitResult right)
Table 2. Parameters
Name Type Description

left

VirtualMachineCommitResult

right

VirtualMachineCommitResult

Returns: bool

3.2. operator ==(VirtualMachineCommitResult, VirtualMachineCommitResult)

public static bool operator ==(VirtualMachineCommitResult left, VirtualMachineCommitResult right)
Table 3. Parameters
Name Type Description

left

VirtualMachineCommitResult

right

VirtualMachineCommitResult

Returns: bool