60 references to TextSpan
Microsoft.AspNetCore.App.Analyzers.Test (3)
RouteEmbeddedLanguage\RoutePatternClassifierTests.cs (3)
32var actualOrdered = actual.OrderBy(t1 => t1.TextSpan.Start).ToList(); 33var actualFormatted = actualOrdered.Select(a => new FormattedClassification(rewrittenCode.Substring(a.TextSpan.Start, a.TextSpan.Length), a.ClassificationType)).ToArray();
Microsoft.CodeAnalysis.CSharp.Features (3)
EmbeddedLanguages\CSharpTestEmbeddedLanguageClassifier.cs (3)
236if (classifiedSpan.TextSpan.IsEmpty) 245var startIndexInclusive = classifiedSpan.TextSpan.Start; 246var endIndexExclusive = classifiedSpan.TextSpan.End;
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Classification\ClassificationHelpers.cs (1)
527var span = classifiedSpan.TextSpan;
Microsoft.CodeAnalysis.EditorFeatures (3)
Classification\Semantic\ClassificationUtilities.cs (1)
17classifiedSpan.TextSpan.ToSnapshotSpan(snapshot),
Classification\Syntactic\SyntacticClassificationTaggerProvider.TagComputer.cs (1)
554var lastSnapshotSpan = lastClassifiedSpan.TextSpan.ToSnapshotSpan(lastProcessedSnapshot);
Preview\PreviewStaticClassificationTaggerProvider.cs (1)
81if (classifiedSpan.TextSpan.IntersectsWith(requestSpan))
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (7)
Classification\AbstractClassifierTests.cs (2)
298classificationsSpans.AddRange(allClassifications.Select(t => t.TextSpan)); 303where !classificationsSpans.Contains(t.TextSpan)
Classification\ClassificationTestHelper.cs (5)
22=> $"({tuple.TextSpan}, {tuple.ClassificationType})"; 37actualClassificationList.Sort((t1, t2) => t1.TextSpan.Start - t2.TextSpan.Start); 54var text = actualText.Substring(actual.TextSpan.Start, actual.TextSpan.Length);
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (2)
Classification\ClassificationTests.vb (2)
240Dim subText = text.ToString(span.TextSpan) 242subText)}', {span.TextSpan})"
Microsoft.CodeAnalysis.Features (5)
QuickInfo\IndentationHelper.cs (4)
46var span = classifiedSpan.TextSpan; 92var startLineNumber = lines.GetLineFromPosition(span.TextSpan.Start).LineNumber; 93var endLineNumber = lines.GetLineFromPosition(span.TextSpan.End).LineNumber; 110if (startLineFirstNonWhitespace is int value && value < span.TextSpan.Start)
QuickInfo\Presentation\QuickInfoContentBuilder.cs (1)
158text.ToString(span.TextSpan),
Microsoft.CodeAnalysis.LanguageServer.Protocol (4)
Handler\References\FindUsagesLSPContext.cs (2)
339if (span.TextSpan == documentSpan.SourceSpan) 359span.ClassificationType, docText.ToString(span.TextSpan), ClassifiedTextRunStyle.Plain, markerTagType));
Handler\SemanticTokens\SemanticTokensHelpers.cs (2)
360public int Compare(ClassifiedSpan x, ClassifiedSpan y) => x.TextSpan.CompareTo(y.TextSpan);
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Services\SemanticClassification\RemoteSemanticClassificationService.Caching.cs (1)
97if (textSpanIntervalTree.HasIntervalThatIntersectsWith(span.TextSpan))
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
Classification\SyntaxClassification\NameSyntaxClassifier.vb (1)
92TryClassifyStaticSymbol(symbol, classifiedSpan.TextSpan, result)
Microsoft.CodeAnalysis.Workspaces (29)
Classification\ClassifiedSpan.cs (3)
22=> Hash.Combine(this.ClassificationType, this.TextSpan.GetHashCode()); 28=> this.ClassificationType == other.ClassificationType && this.TextSpan == other.TextSpan;
Classification\ClassifiedSpanIntervalIntrospector.cs (1)
17=> value.TextSpan;
Classification\Classifier.cs (11)
40/// <see cref="ClassifiedSpan"/>s may have the same <see cref="ClassifiedSpan.TextSpan"/>. This occurs when there are multiple 43/// <see cref="ClassifiedSpan"/>s may also have overlapping <see cref="ClassifiedSpan.TextSpan"/>s. This occurs when there are 103var allClassifications = new List<ClassifiedSpan>(semanticClassifications.Where(s => s.TextSpan.OverlapsWith(textSpan))); 104var semanticSet = semanticClassifications.Select(s => s.TextSpan).ToSet(); 107s => s.TextSpan.OverlapsWith(textSpan) && !semanticSet.Contains(s.TextSpan))); 108allClassifications.Sort((s1, s2) => s1.TextSpan.Start - s2.TextSpan.Start); 131if (startPosition < span.TextSpan.Start) 139parts.Add(new SymbolDisplayPart(kind.Value, null, sourceText.ToString(span.TextSpan))); 141startPosition = span.TextSpan.End;
Classification\ClassifierHelper.cs (12)
145private static readonly Comparison<ClassifiedSpan> s_spanComparison = static (s1, s2) => s1.TextSpan.Start - s2.TextSpan.Start; 164var intersection = span.TextSpan.Intersection(widenedSpan); 170var isAdditiveClassification = previousSpan.TextSpan == span.TextSpan && 174if (!isAdditiveClassification && previousSpan.TextSpan.End > intersection.Value.Start) 192Debug.Assert(!span.TextSpan.IsEmpty); 196if (span.TextSpan.Length == 0) 200if (startPosition < span.TextSpan.Start) 204startPosition, span.TextSpan.Start))); 208startPosition = span.TextSpan.End; 224static span => span.TextSpan,
Classification\IRemoteSemanticClassificationService.cs (1)
88var textSpan = classifiedSpan.TextSpan;
Classification\SyntaxClassification\AbstractSyntaxClassificationService.Worker.cs (1)
147AddClassification(classification.TextSpan, classification.ClassificationType);
Microsoft.VisualStudio.LanguageServices (1)
ValueTracking\TreeItemViewModel.cs (1)
115var spanStartPosition = TextSpan.Start - ClassifiedSpans[0].TextSpan.Start;