ITagger<T>.GetTags Method
Visual Studio 2012
Gets all the tags that intersect the specified spans.
Assembly: Microsoft.VisualStudio.Text.Logic (in Microsoft.VisualStudio.Text.Logic.dll)
Parameters
- spans
- Type: Microsoft.VisualStudio.Text.NormalizedSnapshotSpanCollection
The spans to visit.
Two spans intersect if they have positions in common, or if the end of one span coincides with the start of the other span, and neither is empty.
Taggers are not required to return their tags in any specific order. The recommended way to implement this method is by using generators (yield return), which allows lazy evaluation of the entire tagging stack.
For an example of how to implement this method, see Walkthrough: Highlighting Text.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.