Struct TextChange
Describes a single change when a particular span is replaced with a new text.
Assembly: Loretta.CodeAnalysis.dll
Syntax
[DataContract]
public readonly struct TextChange
Constructors
|
Improve this Doc
View Source
TextChange(TextSpan, String)
Declaration
public TextChange(TextSpan span, string newText)
Parameters
Type |
Name |
Description |
TextSpan |
span |
The original span of the changed text.
|
String |
newText |
The new text.
|
Properties
|
Improve this Doc
View Source
NewText
Declaration
[DataMember(Order = 1)]
public readonly string NewText { get; }
Property Value
|
Improve this Doc
View Source
NoChanges
Declaration
public static readonly IReadOnlyList<TextChange> NoChanges { get; }
Property Value
|
Improve this Doc
View Source
Span
The original span of the changed text.
Declaration
[DataMember(Order = 0)]
public readonly TextSpan Span { get; }
Property Value
Methods
|
Improve this Doc
View Source
Equals(TextChange)
Declaration
public readonly bool Equals(TextChange 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()
Declaration
public override readonly string ToString()
Returns
Overrides
Operators
|
Improve this Doc
View Source
Equality(TextChange, TextChange)
Checks whether two text changes are equal.
Declaration
public static bool operator ==(TextChange left, TextChange right)
Parameters
Returns
|
Improve this Doc
View Source
Implicit(TextChange to TextChangeRange)
Declaration
public static implicit operator TextChangeRange(TextChange change)
Parameters
Returns
|
Improve this Doc
View Source
Inequality(TextChange, TextChange)
Checks whether two text changes are not equal.
Declaration
public static bool operator !=(TextChange left, TextChange right)
Parameters
Returns
Implements
IEquatable<>