26 references to TextSpan
Microsoft.CodeAnalysis.EditorFeatures (7)
Structure\AbstractStructureTaggerProvider.cs (5)
217context.AddTag(new TagSpan<IContainerStructureTag>(span.TextSpan.ToSnapshotSpan(snapshot), tag)); 261if (region.TextSpan.Length > 0) 267var regionSpan = region.TextSpan.ToSpan(); 285var startLine = snapshot.GetLineNumberFromPosition(region.TextSpan.Start); 286var endLine = snapshot.GetLineNumberFromPosition(region.TextSpan.End);
Structure\StructureTag.cs (2)
35public Span OutliningSpan { get; } = blockSpan.TextSpan.ToSpan(); 36public Span HeaderSpan { get; } = DetermineHeaderSpan(blockSpan.TextSpan, blockSpan.HintSpan, snapshot);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (4)
Structure\AbstractSyntaxStructureProviderTests.cs (4)
106Assert.Equal(expected.TextSpan.Start, actual.TextSpan.Start); 107Assert.Equal(expected.TextSpan.End, actual.TextSpan.End);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
Structure\BlockSpanTests.cs (1)
27Assert.Equal(span, outliningRegion.TextSpan);
Structure\BlockStructureServiceTests.cs (1)
112Assert.Equal(27, spans[0].TextSpan.Start);
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (1)
Structure\OmniSharpBlockStructureService.cs (1)
20return new OmniSharpBlockStructure(blockStructure.Spans.SelectAsArray(x => new OmniSharpBlockSpan(x.Type, x.IsCollapsible, x.TextSpan, x.HintSpan, x.BannerText, x.AutoCollapse, x.IsDefaultCollapsed)));
Microsoft.CodeAnalysis.Features (11)
Structure\BlockSpan.cs (9)
50/// The primary span representing "else" statement block would be the same as the <see cref="TextSpan"/> of 84return TextSpan != HintSpan 85? $"{{Span={TextSpan}, HintSpan={HintSpan}, BannerText=\"{BannerText}\", AutoCollapse={AutoCollapse}, IsDefaultCollapsed={IsDefaultCollapsed}}}" 86: $"{{Span={TextSpan}, BannerText=\"{BannerText}\", AutoCollapse={AutoCollapse}, IsDefaultCollapsed={IsDefaultCollapsed}}}"; 106var newTextSpan = textSpan.HasValue ? textSpan.Value : TextSpan; 134var startLine = lines.GetLinePosition(this.TextSpan.Start).Line; 135var otherStartLine = lines.GetLinePosition(other.Value.TextSpan.Start).Line; 139var endLine = lines.GetLinePosition(this.TextSpan.End).Line; 140var otherEndLine = lines.GetLinePosition(other.Value.TextSpan.End).Line;
Structure\Syntax\AbstractBlockStructureProvider.cs (2)
19private static readonly IComparer<BlockSpan> s_blockSpanComparer = Comparer<BlockSpan>.Create(static (x, y) => y.TextSpan.Start.CompareTo(x.TextSpan.Start));
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Handler\FoldingRanges\FoldingRangesHandler.cs (1)
98var linePositionSpan = text.Lines.GetLinePositionSpan(span.TextSpan);