Struct LinePositionSpan
Immutable span represented by a pair of line number and index within the line.
Implements
IEquatable<LinePositionSpan >
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Loretta.CodeAnalysis.Text
Assembly: Loretta.CodeAnalysis.dll
Syntax
[DataContract]
public readonly struct LinePositionSpan
Constructors
| Improve this Doc View SourceLinePositionSpan(LinePosition, LinePosition)
Creates Line
Declaration
public LinePositionSpan(LinePosition start, LinePosition end)
Parameters
Type | Name | Description |
---|---|---|
Line |
start | Start position. |
Line |
end | End position. |
Properties
| Improve this Doc View SourceEnd
Gets the end position of the span.
Declaration
public readonly LinePosition End { get; }
Property Value
Type | Description |
---|---|
Line |
Start
Gets the start position of the span.
Declaration
public readonly LinePosition Start { get; }
Property Value
Type | Description |
---|---|
Line |
Methods
| Improve this Doc View SourceEquals(LinePositionSpan)
Declaration
public readonly bool Equals(LinePositionSpan other)
Parameters
Type | Name | Description |
---|---|---|
Line |
other |
Returns
Type | Description |
---|---|
System. |
Equals(Object)
Declaration
public override readonly bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System. |
obj |
Returns
Type | Description |
---|---|
System. |
Overrides
System.ValueType.Equals(System.Object)
|
Improve this Doc
View Source
GetHashCode()
Declaration
public override readonly int GetHashCode()
Returns
Type | Description |
---|---|
System. |
Overrides
System.ValueType.GetHashCode()
|
Improve this Doc
View Source
ToString()
Provides a string representation for Line
Declaration
public override readonly string ToString()
Returns
Type | Description |
---|---|
System. |
Overrides
System.ValueType.ToString()
Examples
(0,0)-(5,6)
Operators
| Improve this Doc View SourceEquality(LinePositionSpan, LinePositionSpan)
Checks whether two line position spans are equal.
Declaration
public static bool operator ==(LinePositionSpan left, LinePositionSpan right)
Parameters
Type | Name | Description |
---|---|---|
Line |
left | |
Line |
right |
Returns
Type | Description |
---|---|
System. |
Inequality(LinePositionSpan, LinePositionSpan)
Checks whether two line position spans are not equal.
Declaration
public static bool operator !=(LinePositionSpan left, LinePositionSpan right)
Parameters
Type | Name | Description |
---|---|---|
Line |
left | |
Line |
right |
Returns
Type | Description |
---|---|
System. |
Implements
IEquatable<>