2 writes to Path
Microsoft.CodeAnalysis (2)
Diagnostic\FileLinePositionSpan.cs (2)
63Path = path ?? throw new ArgumentNullException(nameof(path)); 70Path = path;
81 references to Path
Microsoft.AspNetCore.Components.Analyzers.Tests (4)
Verifiers\DiagnosticVerifier.cs (4)
194Assert.True(actualSpan.Path == expected.Path || (actualSpan.Path != null && actualSpan.Path.Contains("Test0.") && expected.Path.Contains("Test.")), 198expected.Path, actualSpan.Path, FormatDiagnostics(analyzer, diagnostic)));
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (4)
Verifiers\DiagnosticVerifier.cs (4)
194Assert.True(actualSpan.Path == expected.Path || (actualSpan.Path != null && actualSpan.Path.Contains("Test0.") && expected.Path.Contains("Test.")), 198expected.Path, actualSpan.Path, FormatDiagnostics(analyzer, diagnostic)));
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (2)
CompilationFailedExceptionFactory.cs (2)
123mappedLineSpan.Path, 153return diagnostic.Location.GetMappedLineSpan().Path;
Microsoft.CodeAnalysis (27)
CodeGen\SequencePointList.cs (3)
123lastPath = firstReal.Value.Path; 168if (lastPath != fileLinePositionSpan.Path || lastPathIsMapped != fileLinePositionSpan.HasMappedPath) 170lastPath = fileLinePositionSpan.Path;
CommandLine\SarifErrorLogger.cs (1)
120return !string.IsNullOrEmpty(location.GetLineSpan().Path);
CommandLine\SarifV1ErrorLogger.cs (1)
143_writer.Write("uri", GetUri(span.Path));
CommandLine\SarifV2ErrorLogger.cs (1)
179_writer.Write("uri", GetUri(span.Path));
Diagnostic\DiagnosticFormatter.cs (3)
47path = mappedSpan.Path; 48basePath = span.Path; 52path = span.Path;
Diagnostic\FileLinePositionSpan.cs (6)
35/// True if the <see cref="Path"/> is a mapped path. 91=> Path != null; // invalid span can be constructed by new FileLinePositionSpan() 102string.Equals(Path, other.Path, StringComparison.Ordinal); 118=> Hash.Combine(Path, Hash.Combine(HasMappedPath, Span.GetHashCode())); 126=> Path + ": " + Span;
Diagnostic\Location.cs (4)
112if (pos.Path != null) 115result += "(" + pos.Path + "@" + (pos.StartLinePosition.Line + 1) + ":" + (pos.StartLinePosition.Character + 1) + ")"; 141if (pos.Path != null) 144result += "(" + pos.Path + "@" + (pos.StartLinePosition.Line + 1) + ":" + (pos.StartLinePosition.Character + 1) + ")";
DiagnosticAnalyzer\AnalysisResultBuilder.cs (1)
310if (_pathToAdditionalTextMap.TryGetValue(externalFileLocation.GetLineSpan().Path, out var additionalTexts))
DiagnosticAnalyzer\AnalysisScope.cs (1)
310!PathUtilities.Comparer.Equals(externalFileLocation.GetLineSpan().Path, filterFile.AdditionalFile.Path))
DiagnosticAnalyzer\AnalyzerExecutor.AnalyzerDiagnosticReporter.cs (1)
135return PathUtilities.Comparer.Equals(_contextFile.Value.AdditionalFile.Path, externalFileLocation.GetLineSpan().Path);
Syntax\LineMapping.cs (1)
29/// If the path is not mapped <see cref="FileLinePositionSpan.Path"/> is empty and <see cref="FileLinePositionSpan.HasMappedPath"/> is false.
Syntax\SyntaxTree.cs (4)
288if (resolver is null || mappedSpan.Path.IsEmpty()) 290return mappedSpan.Path; 293return resolver.NormalizePath(mappedSpan.Path, baseFilePath: mappedSpan.HasMappedPath ? FilePath : null) ?? mappedSpan.Path;
Microsoft.CodeAnalysis.CSharp (3)
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (1)
483currentXmlFilePath = location.GetLineSpan().Path;
Emitter\Model\PEModuleBuilder.cs (1)
454Cci.DebugSourceDocument doc = DebugDocumentsBuilder.TryGetDebugDocument(span.Path, basePath: location.SourceTree.FilePath);
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (1)
483string path = span.Path;
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Diagnostics\DiagnosticAnalyzerTests.cs (1)
3906Assert.Equal(additionalFile.Path, location.GetLineSpan().Path);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (9)
Diagnostics\LocationsTests.cs (9)
50Assert.Equal(expectedPath, mappedSpan.Path); 95Assert.Equal("c:\\goo.cs", flpsX.Path); 102Assert.Equal("d:\\banana.cs", flpsX.Path); 109Assert.Equal("c:\\goo.cs", flpsXToCloseBrace.Path); 116Assert.Equal("d:\\banana.cs", flpsXToCloseBrace.Path); 530Assert.Equal(filePath, lineInfo.Path); 535Assert.Equal(filePath, mappedLineInfo.Path); 540Assert.Equal(filePath, lineInfo.Path); 545Assert.Equal(mappedFilePath, mappedLineInfo.Path);
Microsoft.CodeAnalysis.EditorFeatures.Wpf (2)
Peek\DefinitionPeekableItem.cs (1)
102resultCollection.Add(PeekHelpers.CreateDocumentPeekResult(declarationLocation.Path, declarationLocation.Span, entityOfInterestSpan, _peekableItem.PeekResultFactory));
Peek\ExternalFilePeekableItem.cs (1)
48resultCollection.Add(PeekHelpers.CreateDocumentPeekResult(_peekableItem._span.Path, _peekableItem._span.Span, _peekableItem._span.Span, _peekableItem.PeekResultFactory));
Microsoft.CodeAnalysis.Features (7)
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (5)
1337if (mappedLineSpan.HasMappedPath && mappedLineSpan.Path != oldStatement.Statement.FileSpan.Path) 2185if (currentSegment.path != oldMappedSpan.Path || currentSegment.delta != lineDelta) 2192if (lastOldStartLine == oldStartLine && string.Equals(lastOldFilePath, oldMappedSpan.Path)) 2209currentSegment = (oldMappedSpan.Path, oldStartLine, lineDelta, oldTokensEnum.Current, newTokensEnum.Current); 2214lastOldFilePath = oldMappedSpan.Path;
EditAndContinue\ActiveStatementsMap.cs (1)
217var targetPath = mappedSection.HasMappedPath ? mappedSection.Path : oldTree.FilePath;
EditAndContinue\SourceFileSpan.cs (1)
77=> new(span.Path, span.Span);
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
EditAndContinue\ActiveStatementsDescription.cs (1)
108var documentActiveStatements = documentMap.GetOrAdd(mappedSpan.Path, path => []);
Microsoft.CodeAnalysis.LanguageServer.Protocol (3)
Features\Diagnostics\DocumentAnalysisExecutor_Helpers.cs (2)
362var filePath = location.GetLineSpan().Path; 430var documentIds = targetTextDocument.Project.Solution.GetDocumentIdsWithFilePath(lineSpan.Path);
Handler\Diagnostics\DiagnosticsPullCache.cs (1)
106writer.WriteString(fileSpan.Path);
Microsoft.CodeAnalysis.VisualBasic (4)
CommandLine\CommandLineDiagnosticFormatter.vb (1)
137Dim path = diagnostic.Location.GetLineSpan().Path
Compilation\DocumentationComments\DocumentationCommentCompiler.Includes.vb (1)
597currentXmlFilePath = location.GetLineSpan().Path
Emit\PEModuleBuilder.vb (1)
282Dim doc As Cci.DebugSourceDocument = DebugDocumentsBuilder.TryGetDebugDocument(span.Path, basePath:=location.SourceTree.FilePath)
Lowering\Instrumentation\CodeCoverageInstrumenter.vb (1)
440Dim path As String = span.Path
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (1)
LocationTests.vb (1)
41Assert.Equal(expectedPath, mappedSpan.Path)
Microsoft.CodeAnalysis.Workspaces (7)
CodeFixes\CodeFix.cs (1)
72var document = Project.Documents.FirstOrDefault(d => d.FilePath == diagnostic.Location.GetLineSpan().Path);
Diagnostics\DiagnosticDataLocation.cs (4)
33/// to <see cref="UnmappedFileSpan"/>. The <see cref="FileLinePositionSpan.Path"/> of this value will be the 62Contract.ThrowIfNull(unmappedFileSpan.Path); 73MappedFileSpan = new FileLinePositionSpan(GetNormalizedFilePath(unmappedFileSpan.Path, mappedSpan.Path), mappedSpan.Span);
Shared\Extensions\ISolutionExtensions.cs (1)
49var documentId = solution.GetDocumentIdsWithFilePath(location.GetLineSpan().Path).FirstOrDefault();
Shared\Extensions\ProjectExtensions.cs (1)
25return project.GetDocumentIdWithFilePath(location.GetLineSpan().Path);
Microsoft.Gen.ComplianceReports (3)
Parser.cs (3)
125ci.SourceFilePath = fileLine.Path; 186ci.SourceFilePath = fileLine.Path; 222SourceFilePath = fileLine.Path,
Microsoft.VisualStudio.LanguageServices (3)
Diagnostics\VisualStudioVenusSpanMappingService.cs (3)
51originalLineInfo = new FileLinePositionSpan(originalLineInfo.Path, originalSpan.Start, originalSpan.End); 66mappedLineInfo = new FileLinePositionSpan(mappedLineInfo.Path, mappedSpan.Start, mappedSpan.End); 79var filePath = location.GetLineSpan().Path;