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));
        }
Example #2
0
 public static bool HandleSucceed(this AggregateRootCheckpointResult result)
 => result.Lifetime == AggregateRootCheckpointLifetime.Handled &&
 result.Status == AggregateRootCheckpointStatus.Succeed;
Example #3
0
 public static bool StorageTimeOuted(this AggregateRootCheckpointResult result)
 => result.Lifetime == AggregateRootCheckpointLifetime.Storing &&
 result.Status == AggregateRootCheckpointStatus.TimeOuted;