TextSpanHelper Class

 

A utility class that provides methods for manipulating and comparing instances of the TextSpan class, and also for validating positions.

Namespace:   Microsoft.VisualStudio.Package
Assembly:  Microsoft.VisualStudio.Package.LanguageService.14.0 (in Microsoft.VisualStudio.Package.LanguageService.14.0.dll)

System.Object
  Microsoft.VisualStudio.Package.TextSpanHelper

[CLSCompliantAttribute(false)]
public sealed class TextSpanHelper

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticClear(TextSpan)

Sets the members of the specified span to an empty state.

System_CAPS_pubmethodSystem_CAPS_staticContainsExclusive(TextSpan, Int32, Int32)

Determines whether the given position is contained in the given span, not including the start and end points.

System_CAPS_pubmethodSystem_CAPS_staticContainsInclusive(TextSpan, Int32, Int32)

Determines whether the given position is in the span, including the start and end points.

System_CAPS_pubmethodSystem_CAPS_staticEndsAfterEndOf(TextSpan, TextSpan)

Determines whether the first span ends after the end of the second span.

System_CAPS_pubmethodSystem_CAPS_staticEndsAfterStartOf(TextSpan, TextSpan)

Determines whether the first span ends after the start of the second span.

System_CAPS_pubmethodSystem_CAPS_staticEndsBeforeEndOf(TextSpan, TextSpan)

Determines whether the first span ends before the end of the second span.

System_CAPS_pubmethodSystem_CAPS_staticEndsBeforeStartOf(TextSpan, TextSpan)

Determines whether the first span ends before the start of the second span.

System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticIntersects(TextSpan, TextSpan)

Determines whether the first span intersects the second span.

System_CAPS_pubmethodSystem_CAPS_staticIsAfterEndOf(TextSpan, Int32, Int32)

Determines whether the given position occurs after the end of the given span.

System_CAPS_pubmethodSystem_CAPS_staticIsBeforeStartOf(TextSpan, Int32, Int32)

Determines whether the given position occurs before the start of the given span.

System_CAPS_pubmethodSystem_CAPS_staticIsEmbedded(TextSpan, TextSpan)

Determines whether the first span is wholly contained in the second span.

System_CAPS_pubmethodSystem_CAPS_staticIsEmpty(TextSpan)

Determines whether the given span is empty.

System_CAPS_pubmethodSystem_CAPS_staticIsPositive(TextSpan)

Determines whether the start of the given span occurs before the end of the span.

System_CAPS_pubmethodSystem_CAPS_staticIsSameSpan(TextSpan, TextSpan)

Determines whether two spans are the same.

System_CAPS_pubmethodSystem_CAPS_staticMakePositive(TextSpan)

Makes the given span positive.

System_CAPS_pubmethodSystem_CAPS_staticMerge(TextSpan, TextSpan)

Merges the two given spans to create a new span.

System_CAPS_pubmethodSystem_CAPS_staticNormalize(TextSpan, IVsTextLines)

Pins the ends of the given span to the actual line lengths in the given text buffer.

System_CAPS_pubmethodSystem_CAPS_staticStartsAfterEndOf(TextSpan, TextSpan)

Determines whether the first span starts after the end of the second span.

System_CAPS_pubmethodSystem_CAPS_staticStartsAfterStartOf(TextSpan, TextSpan)

Determines whether the first span starts after the start of the second span.

System_CAPS_pubmethodSystem_CAPS_staticStartsBeforeEndOf(TextSpan, TextSpan)

Determines whether the first span starts before the end of the second span.

System_CAPS_pubmethodSystem_CAPS_staticStartsBeforeStartOf(TextSpan, TextSpan)

Determines whether the first span starts before the start of the second span.

System_CAPS_pubmethodToString()

(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticValidCoord(Source, Int32, Int32)

Determines whether the given position is valid for the given source buffer.

System_CAPS_pubmethodSystem_CAPS_staticValidSpan(Source, TextSpan)

Determines whether the given span lies within the given source buffer.

Manipulation includes clearing, normalizing, merging, and converting to and from a T:Microsoft.VisualStudio.TextManager.Interop.TextSpan2 class. Comparisons include determining the relationship of a point to a span and the relationship of two spans. Validation is done for a position or a span in a source buffer.

Notes to Implementers:

All methods in this class are static and there is nothing from which to inherit.

Notes to Callers:

All methods in this class are static and can be called at any time.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: