SourceSpan Struct
A span of text.
public struct SourceSpan : IEquatable<SourceSpan>- Implements
Constructors
| Name | Description |
|---|---|
| SourceSpan(int, int) | Initializes a new instance of the SourceSpan struct. |
SourceSpan(int, int)
SourceSpan.csInitializes a new instance of the SourceSpan struct.
Properties
| Name | Description |
|---|---|
| End | Gets or sets the ending character position from the original text source. Note that for inline elements, this is only valid if MarkdownExtensions.UsePreciseSourceLocation is setup on the pipeline. |
| IsEmpty | Gets or sets the is empty. |
| Length | Gets the character length of this element within the original source code. |
| Start | Gets or sets the starting character position from the original text source. Note that for inline elements, this is only valid if MarkdownExtensions.UsePreciseSourceLocation is setup on the pipeline. |
Gets or sets the ending character position from the original text source. Note that for inline elements, this is only valid if MarkdownExtensions.UsePreciseSourceLocation is setup on the pipeline.
public int End { readonly get; set; }Property value
IsEmpty
SourceSpan.csLength
SourceSpan.csStart
SourceSpan.csGets or sets the starting character position from the original text source. Note that for inline elements, this is only valid if MarkdownExtensions.UsePreciseSourceLocation is setup on the pipeline.
public int Start { readonly get; set; }Property value
Methods
| Name | Description |
|---|---|
| Equals(SourceSpan) | Performs the equals operation. |
| Equals(object?) | Performs the equals operation. |
| GetHashCode() | Gets hash code. |
| MoveForward(int) | Performs the move forward operation. |
| ToString() | Performs the to string operation. |
Equals overloads
Equals(SourceSpan)
SourceSpan.csPerforms the equals operation.
public readonly bool Equals(SourceSpan other)Equals(object?)
SourceSpan.csGetHashCode()
SourceSpan.csMoveForward(int)
SourceSpan.csPerforms the move forward operation.
public SourceSpan MoveForward(int count)ToString()
SourceSpan.csOperators
| Name | Description |
|---|---|
| operator ==(SourceSpan, SourceSpan) | Performs the operation. |
| operator !=(SourceSpan, SourceSpan) | Performs the operation. |
operator ==(SourceSpan, SourceSpan)
SourceSpan.csPerforms the operation.
public static bool operator ==(SourceSpan left, SourceSpan right)operator !=(SourceSpan, SourceSpan)
SourceSpan.csPerforms the operation.
public static bool operator !=(SourceSpan left, SourceSpan right)Fields
| Name | Description |
|---|---|
| Empty | Gets or sets the empty. |
Empty
Gets or sets the empty.
public static readonly SourceSpan Empty