Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Syncerbell/SyncResult.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
namespace Syncerbell;

/// <summary>
/// Represents the result of a synchronization operation, including entity, status, message, and high-water mark.
/// Represents the result of a synchronization operation, including entity, status, message, high-water mark, and record count.
/// </summary>
/// <param name="Entity">The entity options associated with the sync operation.</param>
/// <param name="Success">Indicates whether the sync operation was successful.</param>
/// <param name="Message">An optional message describing the result of the sync operation.</param>
/// <param name="HighWaterMark">An optional high-water mark value for incremental sync scenarios.</param>
public record SyncResult(SyncEntityOptions Entity, bool Success, string? Message = null, string? HighWaterMark = null);
/// <param name="RecordCount">An optional count of records processed during the sync operation.</param>
public record SyncResult(SyncEntityOptions Entity, bool Success, string? Message = null, string? HighWaterMark = null, int? RecordCount = null);
Comment thread
paulirwin marked this conversation as resolved.
1 change: 1 addition & 0 deletions Syncerbell/SyncService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ private async Task UpdateLogEntry(ISyncLogEntry log, SyncStatus status, SyncResu
log.ResultMessage = syncResult.Message ?? (syncResult.Success ? SyncSuccessMessage : SyncFailedMessage);
log.FinishedAt = DateTime.UtcNow;
log.HighWaterMark = syncResult.HighWaterMark;
log.RecordCount = syncResult.RecordCount;
await syncLogPersistence.UpdateLogEntry(log, cancellationToken);
}
}