15 instantiations of SourceFileSpan
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (1)
326new SourceFileSpan(newDocument.FilePath, oldStatementSpan),
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
EditAndContinue\ActiveStatementsDescription.cs (1)
69newMappedSpans[oldStatement.Statement.Ordinal] = new SourceFileSpan(oldStatement.Statement.FilePath, default);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (7)
EditAndContinue\ActiveStatementsMapTests.cs (1)
236=> new("a.cs", new(new(startLine, startColumn), new(endLine, endColumn)));
EditAndContinue\EditSessionActiveStatementsTests.cs (6)
495var spanPreRemap2 = new SourceFileSpan(filePath, activeStatementsPreRemap[2].SourceSpan.ToLinePositionSpan()); 496var erPreRemap20 = new SourceFileSpan(filePath, sourceTextV1.Lines.GetLinePositionSpan(exceptionSpans[2][0])); 497var erPreRemap21 = new SourceFileSpan(filePath, sourceTextV1.Lines.GetLinePositionSpan(exceptionSpans[2][1])); 498var spanPreRemap3 = new SourceFileSpan(filePath, activeStatementsPreRemap[3].SourceSpan.ToLinePositionSpan()); 499var erPreRemap30 = new SourceFileSpan(filePath, sourceTextV1.Lines.GetLinePositionSpan(exceptionSpans[3][0])); 500var erPreRemap31 = new SourceFileSpan(filePath, sourceTextV1.Lines.GetLinePositionSpan(exceptionSpans[3][1]));
Microsoft.CodeAnalysis.Features (5)
EditAndContinue\ActiveStatementsMap.cs (1)
85documentInfos.Add((debugInfo, new SourceFileSpan(documentName, baseSpan), ordinal++));
EditAndContinue\Extensions.cs (1)
19=> new(span.Path, span.Span.AddLineDelta(lineDelta));
EditAndContinue\SourceFileSpan.cs (3)
47=> new(Path, span); 50=> new(path, Span); 83=> new(span.Path, span.Span);
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures.UnitTests (1)
EditAndContinue\VisualBasicEditAndContinueAnalyzerTests.vb (1)
496New SourceFileSpan(newDocument.FilePath, oldStatementSpan),
79 references to SourceFileSpan
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (15)
EditAndContinue\ActiveStatementsDescription.cs (11)
27public readonly ImmutableArray<SourceFileSpan> NewMappedSpans; 28public readonly ImmutableArray<ImmutableArray<SourceFileSpan>> NewMappedRegions; 34NewMappedSpans = ImmutableArray<SourceFileSpan>.Empty; 36NewMappedRegions = ImmutableArray<ImmutableArray<SourceFileSpan>>.Empty; 59var newMappedSpans = new ArrayBuilder<SourceFileSpan>(); 60var newMappedRegions = new ArrayBuilder<ImmutableArray<SourceFileSpan>>(); 70newMappedRegions[oldStatement.Statement.Ordinal] = ImmutableArray<SourceFileSpan>.Empty; 78? newExceptionRegionMarkers[ordinal].SelectAsArray(span => (SourceFileSpan)newTree.GetMappedLineSpan(span)) 79: ImmutableArray<SourceFileSpan>.Empty; 114? exceptionRegionMarkers[ordinal].SelectAsArray(unmappedRegionSpan => (SourceFileSpan)tree.GetMappedLineSpan(unmappedRegionSpan)) 115: ImmutableArray<SourceFileSpan>.Empty;
EditAndContinue\EditAndContinueTestHelpers.cs (4)
56ImmutableArray<ImmutableArray<SourceFileSpan>> actualNewExceptionRegions) 416private static void AssertSpansEqual(IEnumerable<SourceFileSpan> expected, IEnumerable<SourceFileSpan> actual, SyntaxTree newTree) 425private static string DisplaySpan(SyntaxTree tree, SourceFileSpan span)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (9)
EditAndContinue\ActiveStatementsMapTests.cs (3)
232void CreateRegion(int ordinal, SourceFileSpan oldSpan, SourceFileSpan newSpan) 235SourceFileSpan Span(int startLine, int startColumn, int endLine, int endColumn)
EditAndContinue\EditSessionActiveStatementsTests.cs (6)
495var spanPreRemap2 = new SourceFileSpan(filePath, activeStatementsPreRemap[2].SourceSpan.ToLinePositionSpan()); 496var erPreRemap20 = new SourceFileSpan(filePath, sourceTextV1.Lines.GetLinePositionSpan(exceptionSpans[2][0])); 497var erPreRemap21 = new SourceFileSpan(filePath, sourceTextV1.Lines.GetLinePositionSpan(exceptionSpans[2][1])); 498var spanPreRemap3 = new SourceFileSpan(filePath, activeStatementsPreRemap[3].SourceSpan.ToLinePositionSpan()); 499var erPreRemap30 = new SourceFileSpan(filePath, sourceTextV1.Lines.GetLinePositionSpan(exceptionSpans[3][0])); 500var erPreRemap31 = new SourceFileSpan(filePath, sourceTextV1.Lines.GetLinePositionSpan(exceptionSpans[3][1]));
Microsoft.CodeAnalysis.Features (55)
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (16)
638var newExceptionRegions = ImmutableArray.CreateBuilder<ImmutableArray<SourceFileSpan>>(oldActiveStatements.Length); 798[In, Out] ImmutableArray<ImmutableArray<SourceFileSpan>>.Builder newExceptionRegions, 890newExceptionRegions[i] = ImmutableArray<SourceFileSpan>.Empty; 956[Out] ImmutableArray<ImmutableArray<SourceFileSpan>>.Builder newExceptionRegions, 987newExceptionRegions[activeStatementIndex] = ImmutableArray<SourceFileSpan>.Empty; 1111newExceptionRegions[activeStatementIndex] = ImmutableArray<SourceFileSpan>.Empty; 1226newExceptionRegions[i] = ImmutableArray<SourceFileSpan>.Empty; 1319ImmutableArray<ImmutableArray<SourceFileSpan>>.Builder newExceptionRegions, 1581return new ActiveStatementExceptionRegions(ImmutableArray<SourceFileSpan>.Empty, isActiveStatementCovered: false); 1585using var _ = ArrayBuilder<SourceFileSpan>.GetInstance(out var result); 2053var oldMappedBreakpointSpan = (SourceFileSpan)oldTree.GetMappedLineSpan(oldBreakpointSpan, cancellationToken); 2054var newMappedBreakpointSpan = (SourceFileSpan)newTree.GetMappedLineSpan(newBreakpointSpan, cancellationToken); 2414ImmutableArray<ImmutableArray<SourceFileSpan>>.Builder newExceptionRegions, 2624newExceptionRegions[index] = ImmutableArray<SourceFileSpan>.Empty;
EditAndContinue\ActiveStatement.cs (3)
33public readonly SourceFileSpan FileSpan; 40public ActiveStatement(int ordinal, ActiveStatementFlags flags, SourceFileSpan span, ManagedInstructionId instructionId) 56public ActiveStatement WithFileSpan(SourceFileSpan span)
EditAndContinue\ActiveStatementExceptionRegions.cs (2)
15public readonly ImmutableArray<SourceFileSpan> Spans; 22public ActiveStatementExceptionRegions(ImmutableArray<SourceFileSpan> spans, bool isActiveStatementCovered)
EditAndContinue\ActiveStatementsMap.cs (4)
28private static readonly Comparer<(ManagedActiveStatementDebugInfo, SourceFileSpan, int)> s_infoSpanComparer = 29Comparer<(ManagedActiveStatementDebugInfo, SourceFileSpan span, int)>.Create((x, y) => x.span.Start.CompareTo(y.span.Start)); 63using var _1 = PooledDictionary<string, ArrayBuilder<(ManagedActiveStatementDebugInfo info, SourceFileSpan span, int ordinal)>>.GetInstance(out var updatedSpansByDocumentPath); 82updatedSpansByDocumentPath.Add(documentName, documentInfos = ArrayBuilder<(ManagedActiveStatementDebugInfo, SourceFileSpan, int)>.GetInstance());
EditAndContinue\DocumentActiveStatementChanges.cs (3)
15public readonly ImmutableArray<ImmutableArray<SourceFileSpan>> NewExceptionRegions; 20ImmutableArray<ImmutableArray<SourceFileSpan>> newExceptionRegions) 41out ImmutableArray<ImmutableArray<SourceFileSpan>> newExceptionRegions)
EditAndContinue\DocumentAnalysisResults.cs (2)
69public ImmutableArray<ImmutableArray<SourceFileSpan>> ExceptionRegions { get; } 104ImmutableArray<ImmutableArray<SourceFileSpan>> exceptionRegionsOpt,
EditAndContinue\EditSession.cs (6)
1148using var _1 = PooledDictionary<(ManagedModuleMethodId MethodId, SourceFileSpan BaseSpan), SourceFileSpan>.GetInstance(out var changedNonRemappableSpans); 1176void AddNonRemappableRegion(SourceFileSpan oldSpan, SourceFileSpan newSpan, bool isExceptionRegion) 1258var baseSpan = region.NewSpan; 1261if (changedNonRemappableSpans.TryGetValue((methodInstance.Method, baseSpan), out var newSpan))
EditAndContinue\Extensions.cs (2)
18internal static SourceFileSpan AddLineDelta(this SourceFileSpan span, int lineDelta)
EditAndContinue\NonRemappableRegion.cs (5)
22public readonly SourceFileSpan OldSpan; 27public readonly SourceFileSpan NewSpan; 34public NonRemappableRegion(SourceFileSpan oldSpan, SourceFileSpan newSpan, bool isExceptionRegion) 58public NonRemappableRegion WithNewSpan(SourceFileSpan newSpan)
EditAndContinue\SourceFileSpan.cs (12)
17internal readonly struct SourceFileSpan : IEquatable<SourceFileSpan> 35/// Initializes the <see cref="SourceFileSpan"/> instance. 46public SourceFileSpan WithSpan(LinePositionSpan span) 49public SourceFileSpan WithPath(string path) 70public bool Equals(SourceFileSpan other) 74=> other is SourceFileSpan span && Equals(span); 82public static implicit operator SourceFileSpan(FileLinePositionSpan span) 85public static bool operator ==(SourceFileSpan left, SourceFileSpan right) 88public static bool operator !=(SourceFileSpan left, SourceFileSpan right) 91public bool Contains(SourceFileSpan span)