Struct Span
Represents a document span.
Inherited Members
Namespace: Telerik.Windows.SyntaxEditor.Core.Text
Assembly: Telerik.Windows.SyntaxEditor.Core.dll
Syntax
public struct Span
Constructors
Span(Int32, Int32)
Initializes a new instance of the Span struct.
Declaration
public Span(int start, int length)
Parameters
System.Int32
start
|
System.Int32
length
|
Fields
Empty
Properties
End
Gets the end of the span.
Declaration
public int End { get; }
Property Value
System.Int32
|
IsEmpty
Gets a value indicating whether the span is empty.
Declaration
public bool IsEmpty { get; }
Property Value
System.Boolean
|
Length
Gets the length of this span.
Declaration
public int Length { get; }
Property Value
System.Int32
|
Start
Gets the start of the span.
Declaration
public int Start { get; }
Property Value
System.Int32
|
Methods
Contains(Int32)
Checks if the given position in contained in the span.
Declaration
public bool Contains(int position)
Parameters
System.Int32
position
|
Returns
System.Boolean
|
Contains(Span)
Checks if the given span in contained in this span instance.
Declaration
public bool Contains(Span span)
Parameters
Span
span
|
Returns
System.Boolean
|
Equals(Object)
Equals implementation.
Declaration
public override bool Equals(object obj)
Parameters
System.Object
obj
|
Returns
System.Boolean
|
Overrides
FromBounds(Int32, Int32)
Initializes a new instance of the Span struct from start and end.
Declaration
public static Span FromBounds(int start, int end)
Parameters
System.Int32
start
|
System.Int32
end
|
Returns
Span
|
GetHashCode()
Declaration
public override int GetHashCode()
Returns
System.Int32
|
Overrides
Intersection(Span)
Gets the Span that is result from the intersection of the given span parameter instance and this span instance.
Declaration
public Span? Intersection(Span span)
Parameters
Span
span
|
Returns
System.Nullable<Span>
|
IntersectsWith(Span)
Checks if the given span intersects with this span instance.
Declaration
public bool IntersectsWith(Span span)
Parameters
Span
span
|
Returns
System.Boolean
|
Overlap(Span)
Gets the Span which is a result from the overlap of the given span parameter instance and this span instance.
Declaration
public Span? Overlap(Span span)
Parameters
Span
span
|
Returns
System.Nullable<Span>
|
OverlapsWith(Span)
Checks if the given span overlaps with this span instance.
Declaration
public bool OverlapsWith(Span span)
Parameters
Span
span
|
Returns
System.Boolean
|
ToString()
Declaration
public override string ToString()
Returns
System.String
|
Overrides
Operators
Equality(Span, Span)
Implementation of == operator.
Declaration
public static bool operator ==(Span left, Span right)
Parameters
Span
left
|
Span
right
|
Returns
System.Boolean
|
Inequality(Span, Span)
Implementation of != operator.
Declaration
public static bool operator !=(Span left, Span right)
Parameters
Span
left
|
Span
right
|
Returns
System.Boolean
|