public async Task <AggregateRootCheckpointResult> AppendAsync(AggregateRootCheckpoint <TPayload> checkpoint, CancellationToken token = default) { _checkpoints.Add(checkpoint); var result = AggregateRootCheckpointResult.StorageSucceed(checkpoint.AggregateRootId); _logger.LogInformation($"Checkpointed to memory state backend, {checkpoint}."); return(await Task.FromResult(result)); }
public static bool HandleSucceed(this AggregateRootCheckpointResult result) => result.Lifetime == AggregateRootCheckpointLifetime.Handled && result.Status == AggregateRootCheckpointStatus.Succeed;
public static bool StorageTimeOuted(this AggregateRootCheckpointResult result) => result.Lifetime == AggregateRootCheckpointLifetime.Storing && result.Status == AggregateRootCheckpointStatus.TimeOuted;