2 writes to Path
Microsoft.CodeAnalysis (2)
Diagnostic\FileLinePositionSpan.cs (2)
63Path = path ?? throw new ArgumentNullException(nameof(path)); 70Path = path;
95 references to 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)
139_writer.Write("uri", GetUri(span.Path));
CommandLine\SarifV2ErrorLogger.cs (1)
174_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)
236!PathUtilities.Comparer.Equals(externalFileLocation.GetLineSpan().Path, filterFile.AdditionalFile.Path))
DiagnosticAnalyzer\AnalyzerExecutor.AnalyzerDiagnosticReporter.cs (1)
127return 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)
287if (resolver == null || mappedSpan.Path.IsEmpty()) 289return mappedSpan.Path; 292return resolver.NormalizePath(mappedSpan.Path, baseFilePath: mappedSpan.HasMappedPath ? FilePath : null) ?? mappedSpan.Path;
Microsoft.CodeAnalysis.CSharp (4)
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (1)
483currentXmlFilePath = location.GetLineSpan().Path;
Emitter\Model\PEModuleBuilder.cs (2)
266var debugDocument = DebugDocumentsBuilder.TryGetDebugDocument(span.Path, basePath: null); 447Cci.DebugSourceDocument doc = DebugDocumentsBuilder.TryGetDebugDocument(span.Path, basePath: location.SourceTree.FilePath);
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (1)
483string path = span.Path;
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (2)
Diagnostics\DiagnosticAnalyzerTests.cs (2)
3814Assert.Equal(additionalFile.Path, location.GetLineSpan().Path); 3876d => d.Id == analyzer.Descriptor.Id && PathUtilities.Comparer.Equals(d.Location.GetLineSpan().Path, additionalFile.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.Test.Utilities (1)
EditAndContinue\ActiveStatementsDescription.cs (1)
108var documentActiveStatements = documentMap.GetOrAdd(mappedSpan.Path, path => new List<ActiveStatement>());
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (4)
Diagnostics\DiagnosticAnalyzerServiceTests.cs (1)
704d => d.Id == analyzer.Descriptor.Id && d.DataLocation.UnmappedFileSpan.Path == additionalDoc.FilePath);
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (1)
262=> $"{(string.IsNullOrWhiteSpace(diagnostic.DataLocation.MappedFileSpan.Path) ? diagnostic.ProjectId.ToString() : diagnostic.DataLocation.MappedFileSpan.ToString())}: {diagnostic.Severity} {diagnostic.Id}: {diagnostic.Message}";
EditAndContinue\RemoteEditAndContinueServiceTests.cs (2)
40(!string.IsNullOrWhiteSpace(d.DataLocation.UnmappedFileSpan.Path) ? $" {d.DataLocation.UnmappedFileSpan.Path}({d.DataLocation.UnmappedFileSpan.StartLinePosition.Line}, {d.DataLocation.UnmappedFileSpan.StartLinePosition.Character}, {d.DataLocation.UnmappedFileSpan.EndLinePosition.Line}, {d.DataLocation.UnmappedFileSpan.EndLinePosition.Character}):" : "") +
Microsoft.CodeAnalysis.EditorFeatures.Wpf (2)
Peek\DefinitionPeekableItem.cs (1)
103resultCollection.Add(PeekHelpers.CreateDocumentPeekResult(declarationLocation.Path, declarationLocation.Span, entityOfInterestSpan, _peekableItem.PeekResultFactory));
Peek\ExternalFilePeekableItem.cs (1)
51resultCollection.Add(PeekHelpers.CreateDocumentPeekResult(_peekableItem._span.Path, _peekableItem._span.Span, _peekableItem._span.Span, _peekableItem.PeekResultFactory));
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
CodeDefinitionWindow\AbstractCodeDefinitionWindowTests.vb (1)
94expectedSpan.Path,
Microsoft.CodeAnalysis.Features (10)
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (5)
1299if (mappedLineSpan.HasMappedPath && mappedLineSpan.Path != oldStatement.Statement.FileSpan.Path) 2118if (currentSegment.path != oldMappedSpan.Path || currentSegment.delta != lineDelta) 2125if (lastOldStartLine == oldStartLine && string.Equals(lastOldFilePath, oldMappedSpan.Path)) 2142currentSegment = (oldMappedSpan.Path, oldStartLine, lineDelta, oldTokensEnum.Current.Parent, newTokensEnum.Current.Parent); 2147lastOldFilePath = oldMappedSpan.Path;
EditAndContinue\ActiveStatementsMap.cs (1)
211var targetPath = mappedSection.HasMappedPath ? mappedSection.Path : oldTree.FilePath;
EditAndContinue\EmitSolutionUpdateResults.cs (3)
160fileSpan.Path ?? "", 178fileSpan.Path, 206fileSpan.Path ?? "",
EditAndContinue\SourceFileSpan.cs (1)
83=> new(span.Path, span.Span);
Microsoft.CodeAnalysis.LanguageServer.Protocol (3)
Features\Diagnostics\DocumentAnalysisExecutor_Helpers.cs (2)
348var filePath = location.GetLineSpan().Path; 416var documentIds = targetTextDocument.Project.Solution.GetDocumentIdsWithFilePath(lineSpan.Path);
Handler\Diagnostics\AbstractPullDiagnosticHandler.cs (1)
403diagnostic.Identifier = (diagnostic.Code, diagnosticData.DataLocation.UnmappedFileSpan.Path, diagnostic.Range, diagnostic.Message)
Microsoft.CodeAnalysis.VisualBasic (5)
CommandLine\CommandLineDiagnosticFormatter.vb (1)
137Dim path = diagnostic.Location.GetLineSpan().Path
Compilation\DocumentationComments\DocumentationCommentCompiler.Includes.vb (1)
597currentXmlFilePath = location.GetLineSpan().Path
Emit\PEModuleBuilder.vb (2)
282Dim doc As Cci.DebugSourceDocument = DebugDocumentsBuilder.TryGetDebugDocument(span.Path, basePath:=location.SourceTree.FilePath) 693Dim debugDocument = DebugDocumentsBuilder.TryGetDebugDocument(span.Path, basePath:=Nothing)
Lowering\Instrumentation\CodeCoverageInstrumenter.vb (1)
440Dim path As String = span.Path
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
Diagnostics\DiagnosticAnalyzerTests.vb (1)
1681Assert.Equal(additionalFile.Path, location.GetLineSpan().Path)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (3)
LocationTests.vb (3)
41Assert.Equal(expectedPath, mappedSpan.Path) 78Assert.Equal("c:\\goo.vb", flpsX.Path) 85Assert.Equal("c:\\goo.vb", flpsXToEndClass.Path)
Microsoft.CodeAnalysis.Workspaces (6)
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\ProjectExtensions.cs (1)
25return project.GetDocumentIdWithFilePath(location.GetLineSpan().Path);
Microsoft.VisualStudio.LanguageServices (13)
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;
TableDataSource\DiagnosticTableItem.cs (1)
53=> Data.DataLocation.UnmappedFileSpan.Path;
TableDataSource\TaskList\TaskListTableItem.cs (1)
49=> Data.Span.Path;
TableDataSource\TaskList\VisualStudioTaskListTable.cs (2)
230content = data.MappedSpan.HasMappedPath ? data.MappedSpan.Path : data.Span.Path;
TableDataSource\VisualStudioBaseDiagnosticListTable.LiveTableDataSource.cs (1)
401content = data.DataLocation.MappedFileSpan.Path;
TableDataSource\VisualStudioDiagnosticListTable.BuildTableDataSource.cs (1)
187content = data.DataLocation.MappedFileSpan.Path;
TaskList\ExternalErrorDiagnosticUpdateSource.cs (4)
842!string.IsNullOrEmpty(diagnosticData.DataLocation.UnmappedFileSpan.Path) && 982: item1.DataLocation.UnmappedFileSpan.Path == item2.DataLocation.UnmappedFileSpan.Path; 1001: Hash.Combine(obj.DataLocation.UnmappedFileSpan.Path, result);
Microsoft.VisualStudio.LanguageServices.UnitTests (4)
Diagnostics\DiagnosticTableDataSourceTests.vb (2)
139Assert.Equal(item.DataLocation.UnmappedFileSpan.Path, filename) 189Assert.Equal(item.DataLocation.UnmappedFileSpan.Path, filename)
TaskList\TaskListTableDataSourceTests.vb (2)
128Assert.Equal(item.Span.Path, filename) 177Assert.Equal(item.Span.Path, filename)