You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Class to represent range in text. Range is represented as a pair of positions, [Start, End).
8
+
/// </summary>
7
9
publicclassRange
8
10
{
9
-
publicPositionStart{get;}
10
-
publicPositionEnd{get;}
11
+
/// <summary>
12
+
/// Constructs a Range object to represent a range of text.
13
+
/// </summary>
14
+
/// <param name="start">The start position of the text.</param>
15
+
/// <param name="end">The end position of the text, such that range is [start, end).</param>
11
16
publicRange(Positionstart,Positionend)
12
17
{
13
-
if(start>end)
14
-
{
15
-
thrownewArgumentException(String.Format(
16
-
CultureInfo.CurrentCulture,
17
-
Strings.RangeStartPosGreaterThanEndPos));
18
-
}
19
-
20
18
Start=newPosition(start);
21
19
End=newPosition(end);
20
+
ValidatePositions();
22
21
}
23
22
23
+
/// <summary>
24
+
/// Constructs a Range object to represent a range of text.
25
+
/// </summary>
26
+
/// <param name="startLineNumber">1-based line number on which the text starts.</param>
27
+
/// <param name="startColumnNumber">1-based offset on start line at which the text starts. This includes the first character of the text.</param>
28
+
/// <param name="endLineNumber">1-based line number on which the text ends.</param>
29
+
/// <param name="endColumnNumber">1-based offset on end line at which the text ends. This offset value is 1 more than the offset of the last character of the text. </param>
0 commit comments