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 LinePositionSpan.
Declaration
public LinePositionSpan(LinePosition start, LinePosition end)
Parameters
Type | Name | Description |
---|---|---|
LinePosition | start | Start position. |
LinePosition | 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 |
---|---|
LinePosition |
Start
Gets the start position of the span.
Declaration
public readonly LinePosition Start { get; }
Property Value
Type | Description |
---|---|
LinePosition |
Methods
| Improve this Doc View SourceEquals(LinePositionSpan)
Declaration
public readonly bool Equals(LinePositionSpan other)
Parameters
Type | Name | Description |
---|---|---|
LinePositionSpan | other |
Returns
Type | Description |
---|---|
System.Boolean |
Equals(Object)
Declaration
public override readonly bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
System.ValueType.Equals(System.Object)
|
Improve this Doc
View Source
GetHashCode()
Declaration
public override readonly int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
System.ValueType.GetHashCode()
|
Improve this Doc
View Source
ToString()
Provides a string representation for LinePositionSpan.
Declaration
public override readonly string ToString()
Returns
Type | Description |
---|---|
System.String |
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 |
---|---|---|
LinePositionSpan | left | |
LinePositionSpan | right |
Returns
Type | Description |
---|---|
System.Boolean |
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 |
---|---|---|
LinePositionSpan | left | |
LinePositionSpan | right |
Returns
Type | Description |
---|---|
System.Boolean |
Implements
IEquatable<>