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