File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,8 +11,34 @@ public interface ILogLine : ITextValue
1111 #endregion
1212}
1313
14+ /// <summary>
15+ /// Represents a single log line, including its full text and line number.
16+ /// </summary>
17+ /// <remarks>
18+ /// <para>
19+ /// <b>Purpose:</b> <br/>
20+ /// The <c>LogLine</c> struct encapsulates the content and line number of a log entry. It is used throughout the
21+ /// columnizer and log processing infrastructure to provide a strongly-typed, immutable representation of a log line.
22+ /// </para>
23+ /// <para>
24+ /// <b>Usage:</b> <br/>
25+ /// This struct implements the <see cref="ILogLine"/> interface, allowing it to be used wherever an <c>ILogLine</c>
26+ /// is expected. It provides value semantics and is intended to be lightweight and efficiently passed by value.
27+ /// </para>
28+ /// <para>
29+ /// <b>Relationship to ILogLine:</b> <br/>
30+ /// <c>LogLine</c> is a concrete, immutable implementation of the <see cref="ILogLine"/> interface, providing
31+ /// properties for the full line text and its line number.
32+ /// </para>
33+ /// <para>
34+ /// <b>Why struct instead of record:</b> <br/>
35+ /// A <c>struct</c> is preferred over a <c>record</c> here to avoid heap allocations and to provide value-type
36+ /// semantics, which are beneficial for performance when processing large numbers of log lines. The struct is
37+ /// immutable (readonly), ensuring thread safety and predictability. The previous <c>record</c> implementation
38+ /// was replaced to better align with these performance and semantic requirements.
39+ /// </para>
40+ /// </remarks>
1441public readonly struct LogLine ( string fullLine , int lineNumber ) : ILogLine
15- {
1642 public string FullLine { get ; } = fullLine ;
1743
1844 public int LineNumber { get ; } = lineNumber;
You can’t perform that action at this time.
0 commit comments