feat: port p-rec-annot line-number formatting foundation
This commit is contained in:
@@ -22,6 +22,34 @@ public readonly record struct Point3Dto(double X, double Y, double Z);
|
||||
public readonly record struct Vector2Dto(double X, double Y);
|
||||
public sealed record Bounds2Dto(Point2Dto Minimum, Point2Dto Maximum);
|
||||
|
||||
public sealed record LineNumberAnnotationSettings
|
||||
{
|
||||
public required string NullOrEmpty { get; init; }
|
||||
public required IReadOnlyList<LineNumberAnnotationDefinition> Annotations { get; init; }
|
||||
}
|
||||
|
||||
public sealed record LineNumberAnnotationDefinition
|
||||
{
|
||||
public required string Nickname { get; init; }
|
||||
public IReadOnlyDictionary<string, string> Variables { get; init; } = new Dictionary<string, string>();
|
||||
public required IReadOnlyList<LineNumberAnnotationTag> Tags { get; init; }
|
||||
}
|
||||
|
||||
public sealed record LineNumberAnnotationTag
|
||||
{
|
||||
public required string Field { get; init; }
|
||||
public string Divider { get; init; } = string.Empty;
|
||||
public bool SaveWhenEmpty { get; init; } = true;
|
||||
public string IgnoreValue { get; init; } = string.Empty;
|
||||
public string ProcessingXml { get; init; } = string.Empty;
|
||||
}
|
||||
|
||||
public sealed record LineNumberFormattingResult(bool Success, string Text, string? ErrorCode = null);
|
||||
public interface ILineNumberAnnotationFormatter
|
||||
{
|
||||
LineNumberFormattingResult Format(LineNumberAnnotationDefinition definition, IReadOnlyDictionary<string, string?> fields);
|
||||
}
|
||||
|
||||
public sealed record GeometrySnapshot
|
||||
{
|
||||
public Point3Dto? WorldPosition { get; init; }
|
||||
|
||||
Reference in New Issue
Block a user