417 references to FilePath
AnalyzerRunner (3)
DiagnosticAnalyzerRunner.cs (3)
115if (!_options.TestDocumentMatch(document.FilePath)) 121Console.WriteLine($"{document.FilePath ?? document.Name}: {currentDocumentPerformance.EditsPerSecond:0.00} ({currentDocumentPerformance.AllocatedBytesPerEdit} bytes)"); 141Console.WriteLine($" {document.FilePath ?? document.Name}: {pair.Value.EditsPerSecond:0.00} ({pair.Value.AllocatedBytesPerEdit} bytes)");
Microsoft.CodeAnalysis.CodeStyle.Fixes (4)
AbstractFileHeaderCodeFixProvider.cs (1)
78var expectedFileHeader = fileHeaderTemplate.Replace("{fileName}", Path.GetFileName(document.FilePath));
ProjectExtensions.cs (3)
69var analyzerConfigDirectory = PathUtilities.GetDirectoryName(analyzerConfigDocument.FilePath)!; 80return bestAnalyzerConfigDocument.FilePath; 102return project.AnalyzerConfigDocuments.FirstOrDefault(d => d.FilePath == analyzerConfigPath);
Microsoft.CodeAnalysis.CodeStyle.LegacyTestFramework.UnitTestUtilities (5)
AbstractCodeActionOrUserDiagnosticTest.cs (5)
215if (!PathUtilities.IsAbsolute(document.FilePath)) 217newSolution = newSolution.WithDocumentFilePath(documentId, Path.Combine(projectRootFilePath, document.FilePath)); 221Assert.Equal(projectRootFilePath, PathUtilities.GetPathRoot(document.FilePath)); 714var expectedDocument = expectedProject.AnalyzerConfigDocuments.Single(d => d.FilePath == analyzerConfigDoc.FilePath);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (20)
CodeActions\ApplyChangesOperationTests.cs (10)
79var document1 = solution.Projects.Single().Documents.Single(d => d.FilePath!.Contains("Program1")); 84var document2 = solution.Projects.Single().Documents.Single(d => d.FilePath!.Contains("Program2")); 111var document1 = solution.Projects.Single().Documents.Single(d => d.FilePath!.Contains("Program1")); 116var document2 = solution.Projects.Single().Documents.Single(d => d.FilePath!.Contains("Program2")); 143var document1 = solution.Projects.Single().Documents.Single(d => d.FilePath!.Contains("Program1")); 148var document1 = solution.Projects.Single().Documents.Single(d => d.FilePath!.Contains("Program1")); 174var document1 = solution.Projects.Single().Documents.Single(d => d.FilePath!.Contains("Program1")); 179var document1 = solution.Projects.Single().Documents.Single(d => d.FilePath!.Contains("Program1")); 206var document1 = solution.Projects.Single().Documents.Single(d => d.FilePath!.Contains("Program1")); 211var document2 = solution.Projects.Single().Documents.Single(d => d.FilePath!.Contains("Program2"));
EditAndContinue\ActiveStatementTrackingServiceTests.cs (4)
206}, spans1[document1.FilePath].Select(s => $"{s.Span}: {s.Flags}")); 208var spans2 = await trackingSession.GetSpansAsync(solution, document1.Id, document1.FilePath, CancellationToken.None); 211var spans3 = await trackingSession.GetSpansAsync(solution, document2.Id, document2.FilePath, CancellationToken.None); 233}, spans5[document1.FilePath].Select(s => $"{s.Span}: {s.Flags}"));
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (2)
322KeyValuePairUtil.Create(newDocument.FilePath, ImmutableArray.Create( 326new SourceFileSpan(newDocument.FilePath, oldStatementSpan),
EditorConfigSettings\Updater\SettingsUpdaterTests.cs (3)
68var result = SettingsUpdateHelper.TryUpdateAnalyzerConfigDocument(sourcetext, analyzerConfigDocument.FilePath!, options); 77var result = SettingsUpdateHelper.TryUpdateAnalyzerConfigDocument(sourcetext, analyzerConfigDocument.FilePath!, options); 364var editorconfig = solution.Projects.SelectMany(p => p.AnalyzerConfigDocuments.Where(a => a.FilePath == EditorconfigPath)).Single();
PdbSourceDocument\AbstractPdbSourceDocumentTests.cs (1)
160var document = masWorkspace!.CurrentSolution.Projects.First().Documents.First(d => d.FilePath == file.FilePath);
Microsoft.CodeAnalysis.EditorFeatures (15)
CodeDefinitionWindow\DefinitionContextTracker.cs (2)
177if (item.Document.FilePath != null) 179builder.Add(new CodeDefinitionWindowLocation(item.DisplayTaggedParts.JoinText(), item.Document.FilePath, linePositionSpan.Start));
EditAndContinue\ActiveStatementTrackingService.cs (8)
146if (e.Document.FilePath != null) 150_trackingSpans.Remove(e.Document.FilePath); 222if (document?.FilePath == null) 234if (!_trackingSpans.ContainsKey(document.FilePath)) 238_trackingSpans.Add(document.FilePath, CreateTrackingSpans(snapshot, baseActiveStatementSpans[i])); 343if (document.FilePath == null) 361var hasExistingSpans = _trackingSpans.TryGetValue(document.FilePath, out var oldSpans); 370return _trackingSpans[document.FilePath] = hasExistingSpans
EditAndContinue\PdbMatchingSourceTextProvider.cs (3)
80Contract.ThrowIfNull(oldDocument.FilePath); 91if (_isActive && oldSolutionVersion >= _baselineSolutionVersion && !_documentsWithChangedLoaderByPath.ContainsKey(oldDocument.FilePath)) 93_documentsWithChangedLoaderByPath.Add(oldDocument.FilePath, (oldDocument.DocumentState, oldSolutionVersion));
EditorConfigSettings\Updater\SettingsUpdaterBase.cs (1)
77.FirstOrDefault(d => d.FilePath == EditorconfigPath);
Structure\AbstractStructureTaggerProvider.cs (1)
87masWorkspace.FileService.ShouldCollapseOnOpen(openDocument.FilePath, options))
Microsoft.CodeAnalysis.EditorFeatures.DiagnosticsTests.Utilities (5)
CodeActions\AbstractCodeActionOrUserDiagnosticTest.cs (5)
215if (!PathUtilities.IsAbsolute(document.FilePath)) 217newSolution = newSolution.WithDocumentFilePath(documentId, Path.Combine(projectRootFilePath, document.FilePath)); 221Assert.Equal(projectRootFilePath, PathUtilities.GetPathRoot(document.FilePath)); 714var expectedDocument = expectedProject.AnalyzerConfigDocuments.Single(d => d.FilePath == analyzerConfigDoc.FilePath);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (3)
LanguageServer\AbstractLanguageServerProtocolTests.cs (1)
426locationsForName.AddRange(spans.Select(span => ConvertTextSpanWithTextToLocation(span, text, new Uri(document.FilePath))));
Workspaces\NoCompilationDocumentDiagnosticAnalyzer.cs (1)
30Diagnostic.Create(Descriptor, Location.Create(document.FilePath, default, default))));
Workspaces\TestHostDocument.cs (1)
67_id = sourceGeneratedDocuments.Single(d => d.FilePath == this.FilePath).Id;
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (85)
Diagnostics\DiagnosticAnalyzerServiceTests.cs (3)
394var location = Location.Create(document.FilePath, textSpan: default, lineSpan: default); 704d => d.Id == analyzer.Descriptor.Id && d.DataLocation.UnmappedFileSpan.Path == additionalDoc.FilePath); 1300=> Task.FromResult(ImmutableArray.Create(Diagnostic.Create(s_syntaxRule, Location.Create(document.FilePath, TextSpan.FromBounds(0, 0), new LinePositionSpan(new LinePosition(0, 0), new LinePosition(0, 0))))));
Diagnostics\DiagnosticDataTests.cs (3)
161location: new DiagnosticDataLocation(new FileLinePositionSpan(document.FilePath, span: default), document.Id), 194new(document.FilePath, new(3, 10), new(3, 11)), documentId); 255location: new DiagnosticDataLocation(new FileLinePositionSpan(firstDocument.FilePath, span: default), firstDocument.Id),
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (25)
1302AssertEx.Equal(new[] { $"{document2.FilePath}: (5,0)-(5,32): Error ENC2016: {string.Format(FeaturesResources.EditAndContinueDisallowedByProject, document2.Project.Name, "*message*")}" }, InspectDiagnostics(emitDiagnostics)); 1464document.FilePath, 1837AssertEx.Equal(new[] { $"{document2.FilePath}: (0,30)-(0,32): Error CS0266: {string.Format(CSharpResources.ERR_NoImplicitConvCast, "long", "int")}" }, InspectDiagnostics(emitDiagnostics)); 1982Assert.False(await EditSession.HasChangesAsync(oldSolution, solution, generatedDocument.FilePath, CancellationToken.None)); 2373AssertEx.Equal(new[] { $"{document2.FilePath}: (0,0)-(0,54): Error CS8055: {string.Format(CSharpResources.ERR_EncodinglessSyntaxTree)}" }, InspectDiagnostics(emitDiagnostics)); 2390AssertEx.Equal(new[] { $"{document2.FilePath}: (0,0)-(0,54): Error CS8055: {string.Format(CSharpResources.ERR_EncodinglessSyntaxTree)}" }, InspectDiagnostics(emitDiagnostics)); 3550var documentPath = document1.FilePath; 3643var documentFilePath = document1.FilePath; 3791solution = p.Solution.AddDocument(linkedDocId, doc.Name, text, filePath: doc.FilePath); 3811$"2: {doc1.FilePath}: (2,32)-(2,52) flags=[MethodUpToDate, NonLeafFrame]", 3812$"1: {doc1.FilePath}: (3,29)-(3,49) flags=[MethodUpToDate, NonLeafFrame]" 3813}, documentMap[doc1.FilePath].Select(InspectActiveStatement)); 3817$"0: {doc2.FilePath}: (0,39)-(0,59) flags=[LeafFrame, MethodUpToDate]", 3818}, documentMap[doc2.FilePath].Select(InspectActiveStatement)); 3915$"0: {document.FilePath}: (9,18)-(9,22) flags=[LeafFrame, MethodUpToDate]", 3916}, baseActiveStatementMap.DocumentPathMap[document.FilePath].Select(InspectActiveStatement)); 3922Assert.Equal(document.FilePath, activeStatement1.FilePath); 3992filePaths: new[] { generatedDocument1.FilePath }, 4182$"0x06000002 v1 | AS {document.FilePath}: (4,41)-(4,42) => (4,41)-(4,42)", 4183$"0x06000003 v1 | AS {document.FilePath}: (9,14)-(9,18) => (10,14)-(10,18)", 4203$"0x06000002 v1 | AS {document.FilePath}: (4,41)-(4,42) => (4,41)-(4,42)", 4204$"0x06000003 v1 | AS {document.FilePath}: (9,14)-(9,18) => (10,14)-(10,18)", 4239$"0x06000002 v1 | AS {document.FilePath}: (4,41)-(4,42) => (4,41)-(4,42)", 4364$"0x06000002 v1 | AS {document.FilePath}: (3,41)-(3,42) => (3,41)-(3,42)", 4365$"0x06000003 v1 | AS {document.FilePath}: (7,14)-(7,18) => (9,14)-(9,18)",
EditAndContinue\EditSessionActiveStatementsTests.cs (52)
193$"0: {document1.FilePath}: (9,14)-(9,35) flags=[LeafFrame, MethodUpToDate] mvid=11111111-1111-1111-1111-111111111111 0x06000001 v1 IL_0001", 194$"1: {document1.FilePath}: (4,32)-(4,37) flags=[MethodUpToDate, NonLeafFrame] mvid=11111111-1111-1111-1111-111111111111 0x06000002 v1 IL_0001", 195$"2: {document2.FilePath}: (21,14)-(21,24) flags=[MethodUpToDate, NonLeafFrame] mvid=22222222-2222-2222-2222-222222222222 0x06000003 v1 IL_0001", // [|Test1.M1()|] in F2 196$"3: {document2.FilePath}: (8,20)-(8,25) flags=[MethodUpToDate, NonLeafFrame] mvid=22222222-2222-2222-2222-222222222222 0x06000004 v1 IL_0002", // [|F2();|] in M2 197$"4: {document2.FilePath}: (26,20)-(26,25) flags=[MethodUpToDate, NonLeafFrame] mvid=22222222-2222-2222-2222-222222222222 0x06000005 v1 IL_0003", // [|M2();|] in Main 208$"1: {document1.FilePath}: (4,32)-(4,37) flags=[MethodUpToDate, NonLeafFrame]", 209$"0: {document1.FilePath}: (9,14)-(9,35) flags=[LeafFrame, MethodUpToDate]" 210}, baseActiveStatementsMap.DocumentPathMap[document1.FilePath].Select(InspectActiveStatement)); 214$"3: {document2.FilePath}: (8,20)-(8,25) flags=[MethodUpToDate, NonLeafFrame]", // [|F2();|] in M2 215$"2: {document2.FilePath}: (21,14)-(21,24) flags=[MethodUpToDate, NonLeafFrame]", // [|Test1.M1()|] in F2 216$"4: {document2.FilePath}: (26,20)-(26,25) flags=[MethodUpToDate, NonLeafFrame]" // [|M2();|] in Main 217}, baseActiveStatementsMap.DocumentPathMap[document2.FilePath].Select(InspectActiveStatement)); 236$"[{document1.FilePath}: (4,8)-(4,46)]", 243$"[{document2.FilePath}: (14,8)-(16,9), {document2.FilePath}: (10,10)-(12,11)]", 245$"[{document2.FilePath}: (26,35)-(26,46)]", 278$"0x06000004 v1 | AS {document2.FilePath}: (8,20)-(8,25) => (9,20)-(9,25)", 279$"0x06000004 v1 | ER {document2.FilePath}: (14,8)-(16,9) => (15,8)-(17,9)", 280$"0x06000004 v1 | ER {document2.FilePath}: (10,10)-(12,11) => (11,10)-(13,11)", 281$"0x06000003 v1 | AS {document2.FilePath}: (21,14)-(21,24) => (21,14)-(21,24)", 282$"0x06000005 v1 | AS {document2.FilePath}: (26,20)-(26,25) => (26,20)-(26,25)" 352$"0: {document.FilePath}: (6,18)-(6,23) flags=[MethodUpToDate, NonLeafFrame] mvid=11111111-1111-1111-1111-111111111111 0x06000001 v1 IL_0000 '<AS:0>F2();</AS:0>'", 353$"1: {document.FilePath}: (18,14)-(18,36) flags=[LeafFrame, MethodUpToDate] mvid=11111111-1111-1111-1111-111111111111 0x06000002 v1 IL_0000 '<AS:1>throw new Exception();</AS:1>'" 364$"[{document.FilePath}: (8,8)-(12,9) 'catch (Exception) {{']", 393$"0x06000001 v1 | AS {document.FilePath}: (6,18)-(6,23) => (6,18)-(6,23)", 394$"0x06000001 v1 | ER {document.FilePath}: (8,8)-(12,9) => (8,8)-(12,9)", 395$"0x06000002 v1 | AS {document.FilePath}: (18,14)-(18,36) => (18,14)-(18,36)", 535$"0: {document.FilePath}: (6,18)-(6,22) flags=[MethodUpToDate, NonLeafFrame] mvid=11111111-1111-1111-1111-111111111111 0x06000001 v2 IL_0000 '<AS:0>M();</AS:0>'", 536$"1: {document.FilePath}: (20,18)-(20,22) flags=[MethodUpToDate, NonLeafFrame] mvid=11111111-1111-1111-1111-111111111111 0x06000002 v2 IL_0000 '<AS:1>M();</AS:1>'", 537$"2: {document.FilePath}: (29,22)-(29,26) flags=[NonLeafFrame] mvid=11111111-1111-1111-1111-111111111111 0x06000003 v1 IL_0000 '{{ <AS:2>M();</AS:2>'", 538$"3: {document.FilePath}: (53,22)-(53,26) flags=[NonLeafFrame] mvid=11111111-1111-1111-1111-111111111111 0x06000004 v1 IL_0000 '<AS:3>M();</AS:3>'" 549$"[{document.FilePath}: (8,16)-(10,9) '<ER:0.0>catch']", 550$"[{document.FilePath}: (18,16)-(21,9) '<ER:1.0>catch']", 551$"[{document.FilePath}: (38,16)-(40,9) '<ER:2.1>catch', {document.FilePath}: (34,20)-(36,13) '<ER:2.0>finally']", 552$"[{document.FilePath}: (56,16)-(58,9) '<ER:3.1>catch', {document.FilePath}: (51,20)-(54,13) '<ER:3.0>catch']", 587$"0x06000001 v2 | AS {document.FilePath}: (6,18)-(6,22) => (6,18)-(6,22)", 588$"0x06000002 v2 | ER {document.FilePath}: (18,16)-(21,9) => (17,16)-(20,9)", 589$"0x06000002 v2 | AS {document.FilePath}: (20,18)-(20,22) => (19,18)-(19,22)", 590$"0x06000003 v1 | AS {document.FilePath}: (30,22)-(30,26) => (29,22)-(29,26)", // AS:2 moved -1 in first edit, 0 in second 591$"0x06000003 v1 | ER {document.FilePath}: (32,20)-(34,13) => (34,20)-(36,13)", // ER:2.0 moved +2 in first edit, 0 in second 592$"0x06000003 v1 | ER {document.FilePath}: (36,16)-(38,9) => (38,16)-(40,9)", // ER:2.0 moved +2 in first edit, 0 in second 593$"0x06000004 v1 | ER {document.FilePath}: (50,20)-(53,13) => (53,20)-(56,13)", // ER:3.0 moved +1 in first edit, +2 in second 594$"0x06000004 v1 | AS {document.FilePath}: (52,22)-(52,26) => (55,22)-(55,26)", // AS:3 moved +1 in first edit, +2 in second 595$"0x06000004 v1 | ER {document.FilePath}: (55,16)-(57,9) => (58,16)-(60,9)", // ER:3.1 moved +1 in first edit, +2 in second 669$"1: {document.FilePath}: (6,18)-(6,22) flags=[LeafFrame, MethodUpToDate, NonLeafFrame]", 670$"0: {document.FilePath}: (15,14)-(15,18) flags=[PartiallyExecuted, NonUserCode, MethodUpToDate, NonLeafFrame]", 671}, baseActiveStatementMap.DocumentPathMap[document.FilePath].Select(InspectActiveStatement)); 678Assert.Equal(document.FilePath, s.FilePath); 683Assert.Equal(document.FilePath, s.FilePath); 694$"[{document.FilePath}: (8,8)-(10,9)]",
InheritanceMargin\InheritanceMarginTests.cs (2)
165Assert.Equal(expectedDocumentSpans[i].Document.FilePath, docSpan.Value.Document.FilePath);
Microsoft.CodeAnalysis.EditorFeatures.Wpf (5)
InlineRename\UI\Adornment\RenameFlyoutViewModel.cs (2)
357var fileCount = renameLocations.GroupBy(s => s.Document.FilePath).Count(); 358var referenceCount = renameLocations.Select(loc => (loc.Document.FilePath, loc.TextSpan)).Distinct().Count();
NavigateTo\NavigateToItemDisplay.cs (1)
80new[] { new DescriptionRun(document.FilePath ?? document.Name) })),
Peek\PeekableItemSource.cs (2)
141if (document.FilePath != null) 144new FileLinePositionSpan(document.FilePath, linePositionSpan),
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (7)
CodeDefinitionWindow\CrossLanguageCodeDefinitionWindowTests.vb (1)
122document.FilePath,
FindReferences\FindReferencesTests.vb (1)
512Return $"{document.Project.Name}: {document.FilePath}"
GoToDefinition\GoToDefinitionTestsBase.vb (1)
102actualLocations.Add(New FilePathAndSpan(docSpan.Document.FilePath, docSpan.SourceSpan))
GoToHelpers\GoToHelpers.vb (1)
38actualDefinitions.Add(New FilePathAndSpan(sourceSpan.Document.FilePath, sourceSpan.SourceSpan))
NavigationBar\TestHelpers.vb (1)
119Dim sourceDocument = workspace.CurrentSolution.Projects.First().Documents.First(Function(doc) doc.FilePath = startingDocumentFilePath)
Rename\RenameEngineTests.vb (2)
348Dim originalDocument = result.ConflictResolution.OldSolution.Projects.First().Documents.Where(Function(d) d.FilePath = "Test2.cs").Single() 349Dim newDocument = result.ConflictResolution.NewSolution.Projects.First().Documents.Where(Function(d) d.FilePath = "Test2.cs").Single()
Microsoft.CodeAnalysis.ExternalAccess.FSharp (3)
Internal\Editor\FSharpSmartIndentProvider.cs (2)
80if (document?.FilePath == null) 95result = _provider._service.GetDesiredIndentation(document.Project.LanguageServices, text, document.Id, document.FilePath, line.LineNumber, fsharpOptions);
TaskList\FSharpTaskListService.cs (1)
47var span = new FileLinePositionSpan(document.FilePath!, text.Lines.GetLinePositionSpan(d.Span));
Microsoft.CodeAnalysis.Features (66)
AbstractFileHeaderCodeFixProvider.cs (1)
78var expectedFileHeader = fileHeaderTemplate.Replace("{fileName}", Path.GetFileName(document.FilePath));
AddFileBanner\AbstractAddFileBannerCodeRefactoringProvider.cs (4)
111var fileName = IOUtilities.PerformIO(() => Path.GetFileName(document.FilePath)); 120var fileName = IOUtilities.PerformIO(() => Path.GetFileName(document.FilePath)); 148var sourceName = IOUtilities.PerformIO(() => Path.GetFileName(sourceDocument.FilePath)); 149var destinationName = IOUtilities.PerformIO(() => Path.GetFileName(destinationDocument.FilePath));
CodeFixes\Configuration\ConfigurationUpdater.cs (2)
289service?.TrackFilePathAndAddSolutionItemWhenFileCreated(editorConfigDocument.FilePath); 438var editorConfigDirectory = PathUtilities.GetDirectoryName(editorConfigDocument.FilePath);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.AbstractGlobalSuppressMessageCodeAction.cs (1)
74var filePath = document.FilePath;
CodeLens\CodeLensReferencesService.cs (2)
161document.FilePath, 257return !string.IsNullOrEmpty(fullName) ? new ReferenceMethodDescriptor(fullName, document.FilePath, document.Project.OutputFilePath) : null;
CodeRefactorings\SyncNamespace\AbstractChangeNamespaceService.cs (4)
462RoslynDebug.AssertNotNull(refLocation.Document.FilePath); 463RoslynDebug.AssertNotNull(document.FilePath); 464Debug.Assert(!PathUtilities.PathsEqual(refLocation.Document.FilePath, document.FilePath));
CodeRefactorings\SyncNamespace\AbstractSyncNamespaceCodeRefactoringProvider.State.cs (1)
153var absoluteDirectoryPath = PathUtilities.GetDirectoryName(document.FilePath);
Common\AbstractProjectExtensionProvider.cs (2)
106if (document.FilePath != null && 108!extensionInfo.DocumentExtensions.Contains(PathUtilities.GetExtension(document.FilePath)))
Completion\Providers\Scripting\AbstractDirectivePathCompletionProvider.cs (1)
191var result = PathUtilities.GetDirectoryName(document.FilePath);
DesignerAttribute\DesignerAttributeDiscoveryService.cs (3)
191if (document.FilePath == null) 212Contract.ThrowIfNull(document.FilePath); 224FilePath = document.FilePath,
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (3)
510var filePath = newDocument.FilePath; 693? new RudeEditDiagnostic(RudeEditKind.SourceFileTooBig, span: default, arguments: new[] { newDocument.FilePath }) 694: new RudeEditDiagnostic(RudeEditKind.InternalError, span: default, arguments: new[] { newDocument.FilePath, e.ToString() });
EditAndContinue\CommittedSolution.cs (6)
222Contract.ThrowIfNull(document.FilePath); 277filePath: document.FilePath, 312Contract.ThrowIfNull(document.FilePath); 317await TryGetMatchingSourceTextAsync(sourceText, document.FilePath, currentDocument, _debuggingSession.SourceTextProvider, requiredChecksum, checksumAlgorithm, cancellationToken).ConfigureAwait(false) : default; 473Contract.ThrowIfNull(document.FilePath); 486return TryReadSourceFileChecksumFromPdb(debugInfoReader, document.FilePath, out requiredChecksum, out checksumAlgorithm);
EditAndContinue\DebuggingSession.cs (5)
655Contract.ThrowIfNull(document.FilePath); 660documentIndicesByMappedPath.MultiAdd(document.FilePath, (documentId.ProjectId, i)); 782Contract.ThrowIfNull(mappedDocument.FilePath); 795if (!baseActiveStatements.DocumentPathMap.TryGetValue(mappedDocument.FilePath, out var oldMappedDocumentActiveStatements)) 801var newDocumentActiveStatementSpans = await activeStatementSpanProvider(mappedDocument.Id, mappedDocument.FilePath, cancellationToken).ConfigureAwait(false);
EditAndContinue\EditAndContinueDocumentAnalysesCache.cs (3)
114if (newDocument.FilePath == null) 126var newMappedDocumentSpans = await newActiveStatementSpanProvider(newDocument.Id, newDocument.FilePath, cancellationToken).ConfigureAwait(false); 146newMappedDocumentSpans = await newActiveStatementSpanProvider((newDocument.FilePath == mappedFilePath) ? newDocument.Id : null, mappedFilePath, cancellationToken).ConfigureAwait(false);
EditAndContinue\EditSession.cs (2)
525documentDiagnostics.Add(Diagnostic.Create(descriptor, Location.Create(newDocument.FilePath!, textSpan: default, lineSpan: default), new[] { newDocument.FilePath }));
EditAndContinue\Remote\RemoteEditAndContinueServiceProxy.cs (2)
235Debug.Assert(designTimeDocument.FilePath != null); 240var location = Location.Create(designTimeDocument.FilePath, textSpan: default, span);
EditAndContinue\TraceLog.cs (7)
151Debug.Assert(document.FilePath != null); 155var documentDir = PathUtilities.GetDirectoryName(document.FilePath)!; 156var extension = PathUtilities.GetExtension(document.FilePath); 157var fileName = PathUtilities.GetFileName(document.FilePath, includeExtension: false); 197Debug.Assert(document.FilePath != null); 216if (oldDocument?.FilePath != null) 221if (newDocument?.FilePath != null)
ExternalAccess\VSTypeScript\VSTypeScriptTaskListService.cs (1)
46var location = Location.Create(document.FilePath!, textSpan, text.Lines.GetLinePositionSpan(textSpan));
MetadataAsSource\MetadataAsSourceFileService.cs (1)
209Contract.ThrowIfNull(document.FilePath);
NavigateTo\NavigateToSearchResultComparer.cs (3)
28=> x?.NavigableItem.Document.FilePath == y?.NavigableItem.Document.FilePath && 32=> Hash.Combine(obj?.NavigableItem.Document.FilePath, obj?.NavigableItem.SourceSpan.GetHashCode() ?? 0);
NavigateTo\RoslynNavigateToItem.cs (1)
235var fileName = Path.GetFileNameWithoutExtension(_itemDocument.FilePath ?? "");
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (6)
260var firstDocument = navigateProject.Documents.First(d => d.FilePath?.Equals(firstDocumentFilePath, StringComparison.OrdinalIgnoreCase) ?? false); 267var sourceDescription = sourceFileInfos.FirstOrDefault(sfi => sfi!.FilePath?.Equals(navigateDocument.FilePath, StringComparison.OrdinalIgnoreCase) ?? false)?.SourceDescription ?? FeaturesResources.from_metadata; 273var documentTooltip = navigateDocument.FilePath + Environment.NewLine + dllPath; 275return new MetadataAsSourceFile(navigateDocument.FilePath, navigateLocation, documentName, documentTooltip); 392if (document.FilePath is not null && 393_fileToDocumentInfoMap.TryGetValue(document.FilePath, out var info))
Shared\Utilities\ExtractTypeHelpers.cs (1)
62var newDocumentPath = PathUtilities.CombinePaths(PathUtilities.GetDirectoryName(hintDocument.FilePath), fileName);
StackTraceExplorer\StackTraceExplorerService.cs (1)
97if (document.FilePath == fileName)
SyncNamespaces\AbstractSyncNamespacesService.cs (1)
171.Where(diagnostic => diagnostic.Location.SourceTree?.FilePath == document.FilePath)
Workspace\CompileTimeSolutionProvider.cs (2)
185var generatedDocumentPath = BuildGeneratedDocumentPath(designTimeProjectDirectoryName, designTimeDocument.FilePath!, generatedDocumentPathPrefix); 188return sourceGeneratedDocuments.SingleOrDefault(d => d.FilePath == generatedDocumentPath);
Microsoft.CodeAnalysis.LanguageServer.Protocol (15)
Extensions\Extensions.cs (4)
27Contract.ThrowIfNull(document.FilePath); 29? ProtocolConversions.GetUriFromPartialFilePath(document.FilePath) 30: ProtocolConversions.GetUriFromFilePath(document.FilePath); 34=> ProtocolConversions.TryGetUriFromFilePath(document.FilePath, context);
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.cs (2)
255=> $"document close/reset: ({document.FilePath ?? document.Name})"; 258=> $"document open: ({document.FilePath ?? document.Name})";
Handler\Diagnostics\DiagnosticSources\AbstractDocumentDiagnosticSource.cs (2)
25=> !string.IsNullOrEmpty(Document.FilePath) 29public string ToDisplayString() => $"{this.GetType().Name}: {Document.FilePath ?? Document.Name} in {Document.Project.Name}";
Handler\References\FindUsagesLSPContext.cs (1)
153if (!_referenceLocations.Add((document.FilePath, reference.SourceSpan.SourceSpan)))
Handler\Rename\RenameHandler.cs (1)
83.GroupBy(docId => renamedSolution.GetRequiredDocument(docId).FilePath, StringComparer.OrdinalIgnoreCase).Select(group => group.First());
Handler\SpellCheck\AbstractSpellCheckingHandler.cs (4)
93context.TraceInformation($"Processing: {document.FilePath}"); 98context.TraceInformation($"Ignoring document '{document.FilePath}' because it does not support spell checking"); 109context.TraceInformation($"Spans were changed for document: {document.FilePath}"); 115context.TraceInformation($"Spans were unchanged for document: {document.FilePath}");
Workspaces\LspWorkspaceManager.cs (1)
194_logger.LogInformation($"{document.FilePath} found in workspace {workspaceKind}");
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (12)
Diagnostics\AbstractPullDiagnosticTestsBase.cs (1)
352Diagnostic.Create(Descriptor, Location.Create(document.FilePath!, default, default))));
FoldingRanges\FoldingRangesTests.cs (1)
76TextDocument = CreateTextDocumentIdentifier(new Uri(document.FilePath))
Miscellaneous\LspMiscellaneousFilesWorkspaceTests.cs (2)
123var fileInWorkspaceUri = new Uri(testLspServer.GetCurrentSolution().Projects.Single().Documents.Single().FilePath); 166Assert.Contains(looseFileUri.AbsolutePath, testLspServer.GetCurrentSolution().Projects.Single().Documents.Select(d => d.FilePath));
Symbols\DocumentSymbolsTests.cs (1)
108TextDocument = CreateTextDocumentIdentifier(new Uri(document.FilePath))
Workspaces\LspWorkspaceManagerTests.cs (7)
60var firstDocumentUri = testLspServer.GetCurrentSolution().Projects.First().Documents.Single(d => d.FilePath!.Contains("test1")).GetURI(); 61var secondDocumentUri = testLspServer.GetCurrentSolution().Projects.First().Documents.Single(d => d.FilePath!.Contains("test2")).GetURI(); 99var firstDocumentUri = testLspServer.GetCurrentSolution().Projects.First().Documents.Single(d => d.FilePath!.Contains("test1")).GetURI(); 101var secondDocument = testLspServer.GetCurrentSolution().Projects.First().Documents.Single(d => d.FilePath!.Contains("test2")); 127var documentUri = testLspServer.GetCurrentSolution().Projects.First().Documents.Single(d => d.FilePath!.Contains("test1")).GetURI(); 151var documentUri = testLspServer.GetCurrentSolution().Projects.First().Documents.Single(d => d.FilePath!.Contains("test1")).GetURI(); 175var documentUri = testLspServer.GetCurrentSolution().Projects.First().Documents.Single(d => d.FilePath!.Contains("test1")).GetURI();
Microsoft.CodeAnalysis.LanguageServerIndexFormat.Generator (2)
Generator.cs (2)
177await _logFile.WriteLineAsync($"Exception while processing {documents[i].FilePath}:"); 414var uri = document.FilePath ?? "";
Microsoft.CodeAnalysis.LanguageServerIndexFormat.Generator.UnitTests (3)
ProjectStructureTests.vb (1)
81Assert.Contains($"""uri"":""source-generated:///{generatedDocument.FilePath.Replace("\", "/")}""", outputText)
Utilities\TestLsifOutput.vb (2)
134Where(Function(d) d.Uri.LocalPath = document.FilePath). 143Where(Function(d) d.Uri.LocalPath = document.FilePath).
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures.UnitTests (2)
EditAndContinue\VisualBasicEditAndContinueAnalyzerTests.vb (2)
492KeyValuePairUtil.Create(newDocument.FilePath, ImmutableArray.Create( 496New SourceFileSpan(newDocument.FilePath, oldStatementSpan),
Microsoft.CodeAnalysis.Workspaces (22)
Classification\SemanticClassificationCacheUtilities.cs (1)
24var documentKey = new DocumentKey(projectKey, document.Id, document.FilePath, document.Name);
CodeFixes\CodeFix.cs (1)
72var document = Project.Documents.FirstOrDefault(d => d.FilePath == diagnostic.Location.GetLineSpan().Path);
Diagnostics\DiagnosticData.cs (1)
195originalLineInfo = new FileLinePositionSpan(document?.FilePath ?? "", span: default);
Diagnostics\DocumentAnalysisScope.cs (1)
53var filePath = TextDocument.FilePath ?? TextDocument.Name;
Diagnostics\Extensions.cs (2)
63if (textDocument.FilePath is null) 67return Location.Create(textDocument.FilePath, span, text.Lines.GetLinePositionSpan(span));
LinkedFileDiffMerging\LinkedFileDiffMergingSession.cs (2)
40.GroupBy(d => _oldSolution.GetDocument(d).FilePath, StringComparer.OrdinalIgnoreCase); 124groupSessionInfo.LinkedDocuments = _newSolution.GetDocumentIdsWithFilePath(originalDocument.FilePath).Length;
ProjectExtensions.cs (3)
69var analyzerConfigDirectory = PathUtilities.GetDirectoryName(analyzerConfigDocument.FilePath)!; 80return bestAnalyzerConfigDocument.FilePath; 102return project.AnalyzerConfigDocuments.FirstOrDefault(d => d.FilePath == analyzerConfigPath);
Rename\ConflictEngine\MutableConflictResolution.cs (2)
114if (File.Exists(document.FilePath)) 116var directory = Directory.GetParent(document.FilePath)?.FullName;
Workspace\AdhocWorkspace.cs (3)
174var loader = TextLoader.From(TextAndVersion.Create(text, version, doc.FilePath)); 202var loader = TextLoader.From(TextAndVersion.Create(text, version, doc.FilePath)); 230var loader = TextLoader.From(TextAndVersion.Create(text, version, doc.FilePath));
Workspace\Solution\Document.cs (1)
428/// share the same <see cref="TextDocument.FilePath" />. This <see cref="DocumentId"/> is excluded from the
Workspace\Solution\Solution.cs (1)
1818/// <see cref="TextDocument.FilePath"/> that matches the given file path.
Workspace\Solution\SolutionState.cs (1)
1525/// <see cref="TextDocument.FilePath"/> that matches the given file path.
Workspace\Workspace.cs (2)
1771=> CreateDocumentInfoWithoutText(doc).WithTextLoader(TextLoader.From(TextAndVersion.Create(doc.GetTextSynchronously(CancellationToken.None), VersionStamp.Create(), doc.FilePath))); 1780filePath: doc.FilePath,
Workspace\Workspace_Editor.cs (1)
547var newTextAndVersion = TextAndVersion.Create(newText, version, oldDocument.FilePath);
Microsoft.CodeAnalysis.Workspaces.MSBuild (9)
MSBuild\MSBuildWorkspace.cs (9)
373if (document.FilePath is null) 380this.SaveDocumentText(documentId, document.FilePath, text, encoding ?? new UTF8Encoding(encoderShouldEmitUTF8Identifier: false)); 391if (document.FilePath is null) 398this.SaveDocumentText(documentId, document.FilePath, text, encoding ?? new UTF8Encoding(encoderShouldEmitUTF8Identifier: false)); 412if (document.FilePath is null) 417using var stream = new FileStream(document.FilePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); 498if (document?.FilePath is not null) 500_applyChangesProjectFile.RemoveDocument(document.FilePath); 501this.DeleteDocumentFile(document.Id, document.FilePath);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (12)
VisualStudioMSBuildWorkspaceTests.cs (12)
943var doc = solution.Projects.First().Documents.First(d => d.FilePath == sourceFile); 977var doc = solution.Projects.First().Documents.First(d => d.FilePath == sourceFile); 1986Assert.Contains("OtherStuff", fooDoc.FilePath); 1987Assert.True(File.Exists(fooDoc.FilePath)); 1988var text = File.ReadAllText(fooDoc.FilePath); 2016var textOnDisk = File.ReadAllText(document2.FilePath); 2058var textOnDisk = File.ReadAllText(document2.FilePath); 2087Assert.False(File.Exists(document.FilePath)); 2117var textOnDisk = File.ReadAllText(document.FilePath); 2144var textOnDisk = File.ReadAllText(document.FilePath); 2170var textOnDisk = File.ReadAllText(document2.FilePath); 3179var analyzerConfigDocument = Assert.Single(project.AnalyzerConfigDocuments.Where(d => d.FilePath == expectedEditorConfigPath));
Microsoft.CodeAnalysis.Workspaces.UnitTests (21)
CommandLineProject\CommandLineProjectWorkspaceTests.cs (3)
41Assert.Equal(tempFile.Path, gooDoc.FilePath); 69Assert.Equal(@"C:\ProjectDirectory\goo.cs", gooDoc.FilePath); 74Assert.Equal(@"C:\ProjectDirectory\subdir\bar.cs", barDoc.FilePath);
SolutionTests\SolutionTests.cs (9)
226Assert.Equal(path, newSolution1.GetDocument(documentId)!.FilePath); 234Assert.Equal("", newSolution3.GetDocument(documentId)!.FilePath); 1158var tree = compilation.SyntaxTrees.Single(t => t.FilePath == document.FilePath); 1755Assert.Equal(filePath, document.FilePath); 1783Assert.Equal(filePath, document.FilePath); 1812Assert.Equal(filePath, document2.FilePath); 1848Assert.Equal(filePath, document2.FilePath); 2623Assert.Equal(OldFilePath, oldDocument.FilePath); 2631Assert.Equal(NewFilePath, newDocument.FilePath);
SolutionTests\SolutionWithSourceGeneratorTests.cs (1)
767.AddDocument(originalDocument1.Name, await originalDocument1.GetTextAsync().ConfigureAwait(false), filePath: originalDocument1.FilePath);
WorkspaceTests\AdhocWorkspaceTests.cs (6)
507Assert.Null(originalDoc.FilePath); 511Assert.Equal(newPath, changedDoc.FilePath); 526Assert.Equal(newPath, appliedDoc.FilePath); 572Assert.Null(originalDoc.FilePath); 582Assert.Equal(newPath, changedDoc.FilePath); 591Assert.Equal(newPath, appliedDoc.FilePath);
WorkspaceTests\WorkspaceTests.cs (2)
77Assert.Null(originalDoc.FilePath); 81Assert.Equal(newPath, changedDoc.FilePath);
Microsoft.VisualStudio.LanguageServices (46)
EditorConfigSettings\SettingsEditorFactory.cs (1)
91if (!_workspace.CurrentSolution.Projects.Any(p => p.AnalyzerConfigDocuments.Any(editorconfig => StringComparer.OrdinalIgnoreCase.Equals(editorconfig.FilePath, filePath))))
Extensions\VisualStudioWorkspaceImplExtensions.cs (2)
71if (hierarchy != null && !RoslynString.IsNullOrEmpty(document?.FilePath)) 73var itemId = hierarchy.TryGetItemId(document.FilePath);
FindReferences\Contexts\AbstractTableDataSourceFindUsagesContext.cs (1)
380document.FilePath,
FindReferences\Entries\AbstractDocumentSpanEntry.cs (2)
63return new MappedSpanResult(documentSpan.Document.FilePath, sourceText.Lines.GetLinePositionSpan(documentSpan.SourceSpan), documentSpan.SourceSpan); 71return new MappedSpanResult(documentSpan.Document.FilePath, sourceText.Lines.GetLinePositionSpan(documentSpan.SourceSpan), documentSpan.SourceSpan);
GenerateType\GenerateTypeDialogViewModel.cs (2)
279if (!TryGetImplicitFilePath(_document.FilePath, ServicesVSResources.DocumentPath_is_illegal, out implicitFilePath)) 377if (this.SelectedProject.Documents.Where(n => n != null).Where(n => n.FilePath == FullFilePath).Any() ||
Implementation\VsRefactorNotifyService.cs (1)
192var itemID = hierarchy.TryGetItemId(document.FilePath);
LanguageService\AbstractLanguageService`2.cs (3)
205collapseAllImplementations = masWorkspace.FileService.ShouldCollapseOnOpen(openDocument.FilePath, options); 223if (runningDocumentTable4.IsMonikerValid(openDocument.FilePath)) 225var cookie = runningDocumentTable4.GetDocumentCookie(openDocument.FilePath);
MoveStaticMembers\VisualStudioMoveStaticMembersOptionsService.cs (1)
183(currentType.Name != t.Name || GetFile(l) != currentDocument.FilePath))
NavigateTo\RoslynNavigateToSearchCallback.cs (1)
75result.NavigableItem.Document.FilePath,
NavigateTo\RoslynSearchResultView.cs (1)
36var filePath = _searchResult.NavigableItem.Document.FilePath;
NavigateTo\RoslynSearchResultViewFactory.cs (1)
62var filePath = document.FilePath;
NavigateTo\VisualStudioNavigateToPreviewService.cs (2)
21if (document.FilePath == null) 26return (int)VsShellUtilities.GetProvisionalViewingStatus(document.FilePath);
Preview\TopLevelChange.cs (3)
156solution = solution.AddDocument(oldDocument.Id, oldDocument.Name, oldText, oldDocument.Folders, oldDocument.FilePath); 160solution = solution.AddAnalyzerConfigDocument(oldDocument.Id, oldDocument.Name, SourceText.From(oldText), oldDocument.Folders, oldDocument.FilePath); 164solution = solution.AddAdditionalDocument(oldDocument.Id, oldDocument.Name, oldText, oldDocument.Folders, oldDocument.FilePath);
Progression\GraphBuilder.cs (4)
89d => string.Equals(d.FilePath, filePath.OriginalString, StringComparison.OrdinalIgnoreCase)); 681var fileName = Path.GetFileName(document.FilePath); 706if (document.FilePath == null || project.FilePath == null) 749var sourceLocation = TryCreateSourceLocation(document.FilePath, span);
Progression\GraphNavigatorExtension.cs (1)
64d.FilePath,
Progression\GraphNodeIdCreation.cs (1)
34GraphNodeId.GetPartial(CodeGraphNodeIdName.File, new Uri(document.FilePath, UriKind.RelativeOrAbsolute)));
ProjectSystem\VisualStudioWorkspace.cs (1)
101=> CurrentSolution.GetTextDocument(documentId)?.FilePath;
ProjectSystem\VisualStudioWorkspaceImpl.cs (8)
316return _projectCodeModelFactory.Value.GetOrCreateFileCodeModel(documentId.ProjectId, document.FilePath); 961Contract.ThrowIfNull(document.FilePath, "Removing files from projects that don't have file names are not supported."); 962var itemId = hierarchy.TryGetItemId(document.FilePath); 1037OpenDocumentFromPath(document.FilePath, document.Project.Id, activate); 1175if (document.FilePath == null) 1181var projectItemForDocument = dteProject.FindItemByPath(document.FilePath, StringComparer.OrdinalIgnoreCase); 1233if (document.FilePath != updatedInfo.FilePath) 1236$"This Workspace does not support changing a document's {nameof(document.FilePath)}.");
TableDataSource\AbstractRoslynTableDataSource.cs (1)
32return solution.GetDocumentIdsWithFilePath(document.FilePath);
TableDataSource\AbstractTableEntriesSnapshot.cs (1)
193documentId = documents.FirstOrDefault(document => Path.Combine(projectDirectory, document.FilePath) == item.GetOriginalFilePath())?.Id;
TableDataSource\VisualStudioDiagnosticListTable.BuildTableDataSource.cs (1)
258documentId = documents.FirstOrDefault(document => Path.Combine(projectDirectory, document.FilePath) == item.GetOriginalFilePath())?.Id;
ValueTracking\ValueTrackedTreeItemViewModel.cs (1)
105var fileName = document.FilePath ?? document.Name;
Venus\ContainedDocument.cs (3)
189if (document.FilePath != null && hierarchy.TryGetItemId(document.FilePath) == itemidInsertionPoint) 208return hierarchy.TryGetItemId(_workspace.CurrentSolution.GetDocument(document.Id).FilePath);
Venus\ContainedDocument.DocumentServiceProvider.cs (1)
118result = new MappedSpanResult(document.FilePath, primarySnapshotSpan.ToLinePositionSpan(), primarySpan.ToTextSpan());
Workspace\VisualStudioSymbolNavigationService.cs (2)
297&& document.FilePath is object) 302itemID = hierarchy.TryGetItemId(document.FilePath);
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (24)
Interactive\Commands\ResetInteractiveTests.cs (1)
55var document = project.Documents.FirstOrDefault(d => d.FilePath == "ResetInteractiveTestsDocument");
ProjectSystemShim\CPS\SourceFileHandlingTests.cs (23)
37Assert.True(GetCurrentDocuments().Any(s => s.FilePath == sourceFileFullPath)); 55Assert.True(GetCurrentAdditionalDocuments().Any(s => s.FilePath == additionalFileFullPath)); 105Assert.Equal(documents[0].FilePath, sourceFileFullPath5, StringComparer.OrdinalIgnoreCase); 106Assert.Equal(documents[1].FilePath, sourceFileFullPath4, StringComparer.OrdinalIgnoreCase); 107Assert.Equal(documents[2].FilePath, sourceFileFullPath3, StringComparer.OrdinalIgnoreCase); 108Assert.Equal(documents[3].FilePath, sourceFileFullPath2, StringComparer.OrdinalIgnoreCase); 109Assert.Equal(documents[4].FilePath, sourceFileFullPath1, StringComparer.OrdinalIgnoreCase); 148Assert.Equal(documents[0].FilePath, sourceFileFullPath5, StringComparer.OrdinalIgnoreCase); 149Assert.Equal(documents[1].FilePath, sourceFileFullPath3, StringComparer.OrdinalIgnoreCase); 150Assert.Equal(documents[2].FilePath, sourceFileFullPath1, StringComparer.OrdinalIgnoreCase); 199Assert.Equal(documents[0].FilePath, sourceFileFullPath5, StringComparer.OrdinalIgnoreCase); 200Assert.Equal(documents[1].FilePath, sourceFileFullPath4, StringComparer.OrdinalIgnoreCase); 201Assert.Equal(documents[2].FilePath, sourceFileFullPath3, StringComparer.OrdinalIgnoreCase); 202Assert.Equal(documents[3].FilePath, sourceFileFullPath2, StringComparer.OrdinalIgnoreCase); 203Assert.Equal(documents[4].FilePath, sourceFileFullPath1, StringComparer.OrdinalIgnoreCase); 238Assert.Equal(documents[0].FilePath, sourceFileFullPath5, StringComparer.OrdinalIgnoreCase); 239Assert.Equal(documents[1].FilePath, sourceFileFullPath4, StringComparer.OrdinalIgnoreCase); 240Assert.Equal(documents[2].FilePath, sourceFileFullPath3, StringComparer.OrdinalIgnoreCase); 241Assert.Equal(documents[3].FilePath, sourceFileFullPath2, StringComparer.OrdinalIgnoreCase); 242Assert.Equal(documents[4].FilePath, sourceFileFullPath1, StringComparer.OrdinalIgnoreCase); 280Assert.Equal(documents[0].FilePath, sourceFileFullPath2, StringComparer.OrdinalIgnoreCase); 281Assert.Equal(documents[1].FilePath, sourceFileFullPath1, StringComparer.OrdinalIgnoreCase); 393Assert.Equal(documents[0].FilePath, sourceFileFullPath1, StringComparer.OrdinalIgnoreCase);
Microsoft.VisualStudio.LanguageServices.Implementation (7)
CodeModel\RootCodeModel.cs (2)
65if (document.FilePath != null && string.Equals(absoluteFilePath, document.FilePath, StringComparison.OrdinalIgnoreCase))
CodeModel\TextManagerAdapter.cs (1)
24using var invisibleEditor = new InvisibleEditor(fileCodeModel.ServiceProvider, document.FilePath, hierarchyOpt, needsSave: false, needsUndoDisabled: false);
ProjectSystem\CPS\TempPECompiler.cs (2)
51if (document.FilePath != null && filesToInclude.Contains(document.FilePath))
RoslynVisualStudioWorkspace.cs (2)
87Contract.ThrowIfNull(textDocument.FilePath); 89return new InvisibleEditor(ServiceProvider.GlobalProvider, textDocument.FilePath, GetHierarchy(documentId.ProjectId), needsSave, needsUndoDisabled);
Microsoft.VisualStudio.LanguageServices.LiveShare (10)
Client\RemoteLanguageServiceWorkspace.cs (8)
318text = SourceText.From(File.ReadAllText(document.FilePath)); 403if (doc != null && doc.FilePath != null) 415await _session.DownloadFileAsync(_session.ConvertLocalPathToSharedUri(doc.FilePath), CancellationToken.None).ConfigureAwait(true); 420if (ErrorHandler.Succeeded(svc.OpenDocumentViaProject(doc.FilePath, 437if (_openTextBufferProvider.IsFileOpen(doc.FilePath) && _openTextBufferProvider.TryGetBufferFromFilePath(doc.FilePath, out var buffer)) 439NotifyOnDocumentOpened(doc.FilePath, buffer); 517using (var invisibleEditor = new InvisibleEditor(_serviceProvider, document.FilePath!, hierarchy: null,
ProjectsHandler.cs (2)
31var uri = new Uri(sourceFile.FilePath); 46SourceFiles = project.Documents.Select(d => requestContext.ProtocolConverter.ToProtocolUri(new Uri(d.FilePath))).ToArray(),
Microsoft.VisualStudio.LanguageServices.Test.Utilities2 (1)
CodeModel\CodeModelTestHelpers.vb (1)
77Dim fcm = projectCodeModel.GetOrCreateFileCodeModel(document.FilePath, parent:=Nothing)
Microsoft.VisualStudio.LanguageServices.UnitTests (4)
Diagnostics\DefaultDiagnosticUpdateSourceTests.vb (1)
349Return Task.FromResult(ImmutableArray.Create(Diagnostic.Create(Descriptor, Location.Create(document.FilePath, Nothing, Nothing))))
Diagnostics\ExternalDiagnosticUpdateSourceTests.vb (1)
525New FileLinePositionSpan(document.FilePath, New LinePositionSpan()), document.Id),
Venus\DocumentService_IntegrationTests.vb (2)
283results.Add(New MappedSpanResult(mappedDocument.FilePath, lineSpan, mappedSpan)) 287results.Add(New MappedSpanResult(mappedDocument.FilePath, lineSpan, mappedSpan))
Microsoft.VisualStudio.LanguageServices.Xaml (3)
Implementation\XamlProjectService.cs (3)
193var filePath = e.Document.FilePath; 202if (document?.FilePath != null) 205project?.RemoveSourceFile(document.FilePath);
Roslyn.VisualStudio.DiagnosticsWindow (3)
Panels\WorkspacePanel.xaml.cs (3)
83where document.FilePath != null 94using var fileStream = File.OpenRead(document.FilePath); 102output.AppendLine($"{document.FilePath}: {BitConverter.ToString(snapshotChecksum.ToArray())} : {BitConverter.ToString(fileChecksum.ToArray())}");