Struct TextChangeRange
Represents the change to a span of text.
Assembly: Loretta.CodeAnalysis.dll
Syntax
public readonly struct TextChangeRange
Constructors
|
Improve this Doc
View Source
TextChangeRange(TextSpan, Int32)
Declaration
public TextChangeRange(TextSpan span, int newLength)
Parameters
Properties
|
Improve this Doc
View Source
NewLength
Width of the span after the edit. A 0 here would represent a delete
Declaration
public readonly int NewLength { get; }
Property Value
|
Improve this Doc
View Source
NoChanges
Declaration
public static readonly IReadOnlyList<TextChangeRange> NoChanges { get; }
Property Value
|
Improve this Doc
View Source
Span
The span of text before the edit which is being changed
Declaration
public readonly TextSpan Span { get; }
Property Value
Methods
|
Improve this Doc
View Source
Collapse(IEnumerable<TextChangeRange>)
Collapse a set of TextChangeRanges into a single encompassing range. If
the set of ranges provided is empty, an empty range is returned.
Declaration
public static TextChangeRange Collapse(IEnumerable<TextChangeRange> changes)
Parameters
Returns
|
Improve this Doc
View Source
Equals(TextChangeRange)
Declaration
public readonly bool Equals(TextChangeRange other)
Parameters
Returns
|
Improve this Doc
View Source
Equals(Object)
Declaration
public override readonly bool Equals(object obj)
Parameters
Type |
Name |
Description |
Object |
obj |
|
Returns
Overrides
|
Improve this Doc
View Source
GetHashCode()
Declaration
public override readonly int GetHashCode()
Returns
Overrides
|
Improve this Doc
View Source
ToString()
Converts the text change range to a string.
Declaration
public override readonly string ToString()
Returns
Overrides
Operators
|
Improve this Doc
View Source
Equality(TextChangeRange, TextChangeRange)
Declaration
public static bool operator ==(TextChangeRange left, TextChangeRange right)
Parameters
Returns
|
Improve this Doc
View Source
Inequality(TextChangeRange, TextChangeRange)
Declaration
public static bool operator !=(TextChangeRange left, TextChangeRange right)
Parameters
Returns
Implements
IEquatable<>