namespace JdeScoping.ConfigManager.Services;
///
/// Represents a line in a diff output.
///
public class DiffLine
{
public required int? OldLineNumber { get; init; }
public required int? NewLineNumber { get; init; }
public required string Text { get; init; }
public required DiffLineType Type { get; init; }
}
public enum DiffLineType
{
Unchanged,
Added,
Removed
}
///
/// Result of a diff operation.
///
public class DiffResult
{
public bool HasChanges { get; init; }
public List Lines { get; init; } = [];
public int Insertions { get; init; }
public int Deletions { get; init; }
}
///
/// Service for generating diffs between text content.
///
public interface IDiffService
{
DiffResult GenerateDiff(string original, string modified);
}