259 references to FilePath
AnalyzerRunner (3)
DiagnosticAnalyzerRunner.cs (3)
116if (!_options.TestDocumentMatch(document.FilePath)) 122Console.WriteLine($"{document.FilePath ?? document.Name}: {currentDocumentPerformance.EditsPerSecond:0.00} ({currentDocumentPerformance.AllocatedBytesPerEdit} bytes)"); 142Console.WriteLine($" {document.FilePath ?? document.Name}: {pair.Value.EditsPerSecond:0.00} ({pair.Value.AllocatedBytesPerEdit} bytes)");
Microsoft.CodeAnalysis.CodeStyle.Fixes (4)
src\Analyzers\Core\CodeFixes\FileHeaders\AbstractFileHeaderCodeFixProvider.cs (1)
78var expectedFileHeader = fileHeaderTemplate.Replace("{fileName}", Path.GetFileName(document.FilePath));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (3)
74var analyzerConfigDirectory = PathUtilities.GetDirectoryName(analyzerConfigDocument.FilePath)!; 85return bestAnalyzerConfigDocument.FilePath; 107return project.AnalyzerConfigDocuments.FirstOrDefault(d => d.FilePath == analyzerConfigPath);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (17)
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)
83], spans1[document1.FilePath].Select(s => $"{s.Span}: {s.Flags}")); 85var spans2 = await trackingSession.GetSpansAsync(solution, document1.Id, document1.FilePath, CancellationToken.None); 88var spans3 = await trackingSession.GetSpansAsync(solution, document2.Id, document2.FilePath, CancellationToken.None); 110], spans5[document1.FilePath].Select(s => $"{s.Span}: {s.Flags}"));
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();
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (2)
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (2)
321KeyValuePairUtil.Create(newDocument.FilePath, ImmutableArray.Create( 325new SourceFileSpan(newDocument.FilePath, oldStatementSpan),
Microsoft.CodeAnalysis.EditorFeatures (10)
EditAndContinue\ActiveStatementTrackingService.cs (5)
147if (e.Document.FilePath != null) 151_trackingSpans.Remove(e.Document.FilePath); 347if (document.FilePath == null) 365var hasExistingSpans = _trackingSpans.TryGetValue(document.FilePath, out var oldSpans); 374return _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)
75masWorkspace.FileService.ShouldCollapseOnOpen(openDocument.FilePath, options))
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Workspaces\NoCompilationDocumentDiagnosticAnalyzer.cs (1)
30Diagnostic.Create(Descriptor, Location.Create(document.FilePath, default, default))));
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (4)
Diagnostics\DiagnosticAnalyzerServiceTests.cs (2)
467d => d.Id == analyzer.Descriptor.Id && d.DataLocation.UnmappedFileSpan.Path == additionalDoc.FilePath); 952=> 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 (2)
158location: new DiagnosticDataLocation(new FileLinePositionSpan(document.FilePath, span: default), document.Id), 252location: new DiagnosticDataLocation(new FileLinePositionSpan(firstDocument.FilePath, span: default), firstDocument.Id),
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (4)
CodeDefinitionWindow\CrossLanguageCodeDefinitionWindowTests.vb (1)
119document.FilePath,
FindReferences\FindReferencesTests.vb (1)
479Return $"{document.Project.Name}: {document.FilePath}"
GoToDefinition\GoToDefinitionTestsBase.vb (1)
117actualLocations.Add(New FilePathAndSpan(docSpan.Document.FilePath, docSpan.SourceSpan))
GoToHelpers\GoToHelpers.vb (1)
37actualDefinitions.Add(New FilePathAndSpan(sourceSpan.Document.FilePath, sourceSpan.SourceSpan))
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.ExternalAccess.Xaml (2)
Internal\LocationService.cs (2)
35if (document.FilePath is null) 42return new FileLinePositionSpan(document.FilePath, linePosSpan);
Microsoft.CodeAnalysis.Features (37)
AddFileBanner\AbstractAddFileBannerCodeRefactoringProvider.cs (2)
102var fileName = IOUtilities.PerformIO(() => Path.GetFileName(document.FilePath)); 111var fileName = IOUtilities.PerformIO(() => Path.GetFileName(document.FilePath));
AddFileBanner\AddFileBannerHelpers.cs (1)
54var sourceName = IOUtilities.PerformIO(() => Path.GetFileName(sourceDocument.FilePath));
CodeFixes\Configuration\ConfigurationUpdater.cs (1)
421var editorConfigDirectory = PathUtilities.GetDirectoryName(editorConfigDocument.FilePath);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.AbstractGlobalSuppressMessageCodeAction.cs (1)
76var filePath = document.FilePath;
CodeLens\CodeLensReferencesService.cs (2)
160document.FilePath, 256return !string.IsNullOrEmpty(fullName) ? new ReferenceMethodDescriptor(fullName, document.FilePath, document.Project.OutputFilePath) : null;
CodeRefactorings\MoveType\AbstractMoveTypeService.MoveTypeEditor.cs (1)
246updatedDocument = await AddFileBannerHelpers.CopyBannerAsync(updatedDocument, sourceDocument.FilePath, sourceDocument, this.CancellationToken).ConfigureAwait(false);
CodeRefactorings\SyncNamespace\AbstractSyncNamespaceCodeRefactoringProvider.State.cs (1)
153var absoluteDirectoryPath = PathUtilities.GetDirectoryName(document.FilePath);
Common\AbstractProjectExtensionProvider.cs (2)
104if (document.FilePath != null && 106Array.IndexOf(extensionInfo.DocumentExtensions, PathUtilities.GetExtension(document.FilePath)) < 0)
Completion\Providers\Scripting\AbstractDirectivePathCompletionProvider.cs (1)
189var result = PathUtilities.GetDirectoryName(document.FilePath);
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (3)
521var filePath = newDocument.FilePath; 706? new RudeEditDiagnostic(RudeEditKind.SourceFileTooBig, span: default, arguments: [newDocument.FilePath]) 707: new RudeEditDiagnostic(RudeEditKind.InternalError, span: default, arguments: [newDocument.FilePath, e.ToString()]);
EditAndContinue\CommittedSolution.cs (6)
221Contract.ThrowIfNull(document.FilePath); 276filePath: document.FilePath, 311Contract.ThrowIfNull(document.FilePath); 316await TryGetMatchingSourceTextAsync(sourceText, document.FilePath, currentDocument, _debuggingSession.SourceTextProvider, requiredChecksum, checksumAlgorithm, cancellationToken).ConfigureAwait(false) : default; 472Contract.ThrowIfNull(document.FilePath); 485return TryReadSourceFileChecksumFromPdb(debugInfoReader, document.FilePath, out requiredChecksum, out checksumAlgorithm);
EditAndContinue\DebuggingSession.cs (3)
793Contract.ThrowIfNull(mappedDocument.FilePath); 806if (!baseActiveStatements.DocumentPathMap.TryGetValue(mappedDocument.FilePath, out var oldMappedDocumentActiveStatements)) 812var newDocumentActiveStatementSpans = await activeStatementSpanProvider(mappedDocument.Id, mappedDocument.FilePath, cancellationToken).ConfigureAwait(false);
EditAndContinue\EditAndContinueDocumentAnalysesCache.cs (3)
107if (newDocument.FilePath == null) 119var newMappedDocumentSpans = await newActiveStatementSpanProvider(newDocument.Id, newDocument.FilePath, cancellationToken).ConfigureAwait(false); 139newMappedDocumentSpans = await newActiveStatementSpanProvider((newDocument.FilePath == mappedFilePath) ? newDocument.Id : null, mappedFilePath, cancellationToken).ConfigureAwait(false);
ExternalAccess\VSTypeScript\VSTypeScriptTaskListService.cs (1)
41var location = Location.Create(document.FilePath!, textSpan, text.Lines.GetLinePositionSpan(textSpan));
MetadataAsSource\MetadataAsSourceFileService.cs (1)
248Contract.ThrowIfNull(document.FilePath);
Navigation\INavigableItem.cs (1)
57document.FilePath,
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (2)
433if (document.FilePath is not null && 434_fileToDocumentInfoMap.TryGetValue(document.FilePath, out var info))
Shared\Utilities\ExtractTypeHelpers.cs (1)
61var newDocumentPath = PathUtilities.CombinePaths(PathUtilities.GetDirectoryName(hintDocument.FilePath), fileName);
src\Analyzers\Core\CodeFixes\FileHeaders\AbstractFileHeaderCodeFixProvider.cs (1)
78var expectedFileHeader = fileHeaderTemplate.Replace("{fileName}", Path.GetFileName(document.FilePath));
StackTraceExplorer\StackTraceExplorerService.cs (1)
96if (document.FilePath == fileName)
SyncNamespaces\AbstractSyncNamespacesService.cs (1)
172.Where(diagnostic => diagnostic.Location.SourceTree?.FilePath == document.FilePath)
Workspace\CompileTimeSolutionProvider.cs (1)
190var generatedDocumentPaths = BuildGeneratedDocumentPaths(designTimeProjectDirectoryName, designTimeDocument.FilePath!, generatedDocumentPathPrefix);
Microsoft.CodeAnalysis.Features.UnitTests (29)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (2)
888AssertEx.Equal([$"{document2.FilePath}: (5,0)-(5,32): Error ENC2016: {string.Format(FeaturesResources.EditAndContinueDisallowedByProject, document2.Project.Name, "*message*")}"], InspectDiagnostics(emitDiagnostics)); 1515AssertEx.Equal([$"{document2.FilePath}: (0,30)-(0,32): Error CS0266: {string.Format(CSharpResources.ERR_NoImplicitConvCast, "long", "int")}"], InspectDiagnostics(emitDiagnostics));
EditAndContinue\EditSessionActiveStatementsTests.cs (27)
189$"0: {document1.FilePath}: (9,14)-(9,35) flags=[LeafFrame, MethodUpToDate] mvid=11111111-1111-1111-1111-111111111111 0x06000001 v1 IL_0001", 190$"1: {document1.FilePath}: (4,32)-(4,37) flags=[MethodUpToDate, NonLeafFrame] mvid=11111111-1111-1111-1111-111111111111 0x06000002 v1 IL_0001", 191$"2: {document2.FilePath}: (21,14)-(21,24) flags=[MethodUpToDate, NonLeafFrame] mvid=22222222-2222-2222-2222-222222222222 0x06000003 v1 IL_0001", // [|Test1.M1()|] in F2 192$"3: {document2.FilePath}: (8,20)-(8,25) flags=[MethodUpToDate, NonLeafFrame] mvid=22222222-2222-2222-2222-222222222222 0x06000004 v1 IL_0002", // [|F2();|] in M2 193$"4: {document2.FilePath}: (26,20)-(26,25) flags=[MethodUpToDate, NonLeafFrame] mvid=22222222-2222-2222-2222-222222222222 0x06000005 v1 IL_0003", // [|M2();|] in Main 204$"1: {document1.FilePath}: (4,32)-(4,37) flags=[MethodUpToDate, NonLeafFrame]", 205$"0: {document1.FilePath}: (9,14)-(9,35) flags=[LeafFrame, MethodUpToDate]" 206], baseActiveStatementsMap.DocumentPathMap[document1.FilePath].Select(InspectActiveStatement)); 210$"3: {document2.FilePath}: (8,20)-(8,25) flags=[MethodUpToDate, NonLeafFrame]", // [|F2();|] in M2 211$"2: {document2.FilePath}: (21,14)-(21,24) flags=[MethodUpToDate, NonLeafFrame]", // [|Test1.M1()|] in F2 212$"4: {document2.FilePath}: (26,20)-(26,25) flags=[MethodUpToDate, NonLeafFrame]" // [|M2();|] in Main 213], baseActiveStatementsMap.DocumentPathMap[document2.FilePath].Select(InspectActiveStatement)); 232$"[{document1.FilePath}: (4,8)-(4,46)]", 239$"[{document2.FilePath}: (14,8)-(16,9), {document2.FilePath}: (10,10)-(12,11)]", 241$"[{document2.FilePath}: (26,35)-(26,46)]", 274$"0x06000004 v1 | AS {document2.FilePath}: (8,20)-(8,25) => (9,20)-(9,25)", 275$"0x06000004 v1 | ER {document2.FilePath}: (14,8)-(16,9) => (15,8)-(17,9)", 276$"0x06000004 v1 | ER {document2.FilePath}: (10,10)-(12,11) => (11,10)-(13,11)", 277$"0x06000003 v1 | AS {document2.FilePath}: (21,14)-(21,24) => (21,14)-(21,24)", 278$"0x06000005 v1 | AS {document2.FilePath}: (26,20)-(26,25) => (26,20)-(26,25)" 665$"1: {document.FilePath}: (6,18)-(6,22) flags=[LeafFrame, MethodUpToDate, NonLeafFrame]", 666$"0: {document.FilePath}: (15,14)-(15,18) flags=[PartiallyExecuted, NonUserCode, MethodUpToDate, NonLeafFrame]", 667], baseActiveStatementMap.DocumentPathMap[document.FilePath].Select(InspectActiveStatement)); 674Assert.Equal(document.FilePath, s.FilePath); 679Assert.Equal(document.FilePath, s.FilePath); 690$"[{document.FilePath}: (8,8)-(10,9)]",
Microsoft.CodeAnalysis.LanguageServer (1)
HostWorkspace\LanguageServerWorkspace.cs (1)
105if (textDocument is { FilePath: { } filePath })
Microsoft.CodeAnalysis.LanguageServer.Protocol (18)
Extensions\Extensions.cs (4)
28Contract.ThrowIfNull(document.FilePath); 31: ProtocolConversions.CreateAbsoluteUri(document.FilePath); 40Contract.ThrowIfNull(document.FilePath); 43var directoryName = Path.GetDirectoryName(document.FilePath);
Extensions\ProtocolConversions.cs (1)
457Debug.Assert(document.FilePath != null);
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.cs (1)
93=> $"document open: ({document.FilePath ?? document.Name})";
Features\EditAndContinue\EditAndContinueDiagnosticSource_OpenDocument.cs (2)
70Debug.Assert(designTimeDocument.FilePath != null); 75var location = new DiagnosticDataLocation(new FileLinePositionSpan(designTimeDocument.FilePath, span));
Handler\CodeActions\CodeActionResolveHelper.cs (1)
229if (newTextDoc.FilePath != null)
Handler\Diagnostics\DiagnosticSourceProviders\WorkspaceDiagnosticSourceHelpers.cs (3)
64(document.FilePath?.EndsWith("__virtual.js") == true || document.FilePath?.EndsWith(".razor") == true || document.FilePath?.EndsWith(".cshtml") == true))
Handler\References\FindUsagesLSPContext.cs (1)
152if (!_referenceLocations.Add((document.FilePath, reference.SourceSpan.SourceSpan)))
Handler\SpellCheck\AbstractSpellCheckingHandler.cs (4)
93context.TraceInformation($"Processing: {document.FilePath}"); 98context.TraceInformation($"Ignoring document '{document.FilePath}' because it does not support spell checking"); 112context.TraceInformation($"Spans were changed for document: {document.FilePath}"); 121context.TraceInformation($"Spans were unchanged for document: {document.FilePath}");
Workspaces\LspWorkspaceManager.cs (1)
294_logger.LogInformation($"{document.FilePath} found in workspace {workspaceKind}");
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
Diagnostics\AbstractPullDiagnosticTestsBase.cs (1)
385Diagnostic.Create(Descriptor, Location.Create(document.FilePath!, default, default))));
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Host\RemoteWorkspace.SolutionCreator.cs (1)
557var loader = serializableSourceText.ToTextLoader(document.FilePath);
Microsoft.CodeAnalysis.VisualBasic.Features.UnitTests (2)
EditAndContinue\VisualBasicEditAndContinueAnalyzerTests.vb (2)
486KeyValuePairUtil.Create(newDocument.FilePath, ImmutableArray.Create( 490New SourceFileSpan(newDocument.FilePath, oldStatementSpan),
Microsoft.CodeAnalysis.Workspaces (17)
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)
170originalLineInfo = new FileLinePositionSpan(document?.FilePath ?? "", span: default);
Diagnostics\DocumentAnalysisScope.cs (1)
58var filePath = TextDocument.FilePath ?? TextDocument.Name;
Diagnostics\Extensions.cs (2)
62if (textDocument.FilePath is null) 66return Location.Create(textDocument.FilePath, span, text.Lines.GetLinePositionSpan(span));
LinkedFileDiffMerging\LinkedFileDiffMergingSession.cs (1)
34var filePath = newDocument.FilePath;
Rename\ConflictEngine\MutableConflictResolution.cs (2)
102if (File.Exists(document.FilePath)) 104var directory = Directory.GetParent(document.FilePath)?.FullName;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (3)
74var analyzerConfigDirectory = PathUtilities.GetDirectoryName(analyzerConfigDocument.FilePath)!; 85return bestAnalyzerConfigDocument.FilePath; 107return project.AnalyzerConfigDocuments.FirstOrDefault(d => d.FilePath == analyzerConfigPath);
Workspace\Solution\Document.cs (1)
500/// share the same <see cref="TextDocument.FilePath" />. This <see cref="DocumentId"/> is excluded from the
Workspace\Solution\Solution.cs (1)
1670/// <see cref="TextDocument.FilePath"/> that matches the given file path. This may return IDs for any type of document
Workspace\Workspace.cs (2)
2044=> CreateDocumentInfoWithoutText(doc).WithTextLoader(TextLoader.From(TextAndVersion.Create(doc.GetTextSynchronously(CancellationToken.None), VersionStamp.Create(), doc.FilePath))); 2053filePath: doc.FilePath,
Workspace\Workspace_Editor.cs (1)
596var newTextAndVersion = TextAndVersion.Create(newText, version, oldDocument.FilePath);
Microsoft.CodeAnalysis.Workspaces.MSBuild (9)
MSBuild\MSBuildWorkspace.cs (9)
391if (document.FilePath is null) 398this.SaveDocumentText(documentId, document.FilePath, text, encoding ?? new UTF8Encoding(encoderShouldEmitUTF8Identifier: false)); 409if (document.FilePath is null) 416this.SaveDocumentText(documentId, document.FilePath, text, encoding ?? new UTF8Encoding(encoderShouldEmitUTF8Identifier: false)); 430if (document.FilePath is null) 435using var stream = new FileStream(document.FilePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); 514if (document?.FilePath is not null) 516_applyChangesProjectFile.RemoveDocumentAsync(document.FilePath, CancellationToken.None).Wait(); 517this.DeleteDocumentFile(document.Id, document.FilePath);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (12)
VisualStudioMSBuildWorkspaceTests.cs (12)
955var doc = solution.Projects.First().Documents.First(d => d.FilePath == sourceFile); 989var doc = solution.Projects.First().Documents.First(d => d.FilePath == sourceFile); 1998Assert.Contains("OtherStuff", fooDoc.FilePath); 1999Assert.True(File.Exists(fooDoc.FilePath)); 2000var text = File.ReadAllText(fooDoc.FilePath); 2028var textOnDisk = File.ReadAllText(document2.FilePath); 2070var textOnDisk = File.ReadAllText(document2.FilePath); 2099Assert.False(File.Exists(document.FilePath)); 2129var textOnDisk = File.ReadAllText(document.FilePath); 2156var textOnDisk = File.ReadAllText(document.FilePath); 2182var textOnDisk = File.ReadAllText(document2.FilePath); 3243var analyzerConfigDocument = Assert.Single(project.AnalyzerConfigDocuments, d => d.FilePath == expectedEditorConfigPath);
Microsoft.CodeAnalysis.Workspaces.UnitTests (14)
CommandLineProject\CommandLineProjectWorkspaceTests.cs (3)
40Assert.Equal(tempFile.Path, gooDoc.FilePath); 68Assert.Equal(@"C:\ProjectDirectory\goo.cs", gooDoc.FilePath); 73Assert.Equal(@"C:\ProjectDirectory\subdir\bar.cs", barDoc.FilePath);
SolutionTests\SolutionTests.cs (3)
1663var tree = compilation.SyntaxTrees.Single(t => t.FilePath == document.FilePath); 3271Assert.Equal(OldFilePath, oldDocument.FilePath); 3279Assert.Equal(NewFilePath, newDocument.FilePath);
SolutionTests\SolutionWithSourceGeneratorTests.cs (1)
816.AddDocument(originalDocument1.Name, await originalDocument1.GetTextAsync().ConfigureAwait(false), filePath: originalDocument1.FilePath);
WorkspaceTests\AdhocWorkspaceTests.cs (5)
483Assert.Null(originalDoc.FilePath); 487Assert.Equal(newPath, changedDoc.FilePath); 502Assert.Equal(newPath, appliedDoc.FilePath); 548Assert.Null(originalDoc.FilePath); 567Assert.Equal(newPath, appliedDoc.FilePath);
WorkspaceTests\WorkspaceTests.cs (2)
74Assert.Null(originalDoc.FilePath); 78Assert.Equal(newPath, changedDoc.FilePath);
Microsoft.VisualStudio.LanguageServices (26)
DocumentOutline\DocumentOutlineViewModel.cs (2)
427var filePath = _textBuffer.GetRelatedDocuments().FirstOrDefault(static d => d.FilePath is not null)?.FilePath;
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)
456document.FilePath,
GenerateType\GenerateTypeDialogViewModel.cs (2)
278if (!TryGetImplicitFilePath(_document.FilePath, ServicesVSResources.DocumentPath_is_illegal, out implicitFilePath)) 376if (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)
167collapseAllImplementations = masWorkspace.FileService.ShouldCollapseOnOpen(openDocument.FilePath, options); 185if (runningDocumentTable4.IsMonikerValid(openDocument.FilePath)) 187var cookie = runningDocumentTable4.GetDocumentCookie(openDocument.FilePath);
MoveStaticMembers\VisualStudioMoveStaticMembersOptionsService.cs (1)
174.Where(l => l.IsInSource && (currentType.Name != t.Name || GetFile(l) != currentDocument.FilePath))
Preview\TopLevelChange.cs (3)
157solution = solution.AddDocument(oldDocument.Id, oldDocument.Name, oldText, oldDocument.Folders, oldDocument.FilePath); 161solution = solution.AddAnalyzerConfigDocument(oldDocument.Id, oldDocument.Name, SourceText.From(oldText), oldDocument.Folders, oldDocument.FilePath); 165solution = solution.AddAdditionalDocument(oldDocument.Id, oldDocument.Name, oldText, oldDocument.Folders, oldDocument.FilePath);
Progression\GraphBuilder.cs (1)
695var fileName = Path.GetFileName(document.FilePath);
Progression\GraphNodeIdCreation.cs (1)
33GraphNodeId.GetPartial(CodeGraphNodeIdName.File, new Uri(document.FilePath, UriKind.RelativeOrAbsolute)));
ProjectSystem\VisualStudioWorkspaceImpl.cs (2)
1288if (document.FilePath != updatedInfo.FilePath) 1291$"This Workspace does not support changing a document's {nameof(document.FilePath)}.");
Venus\ContainedDocument.cs (3)
186if (document.FilePath != null && hierarchy.TryGetItemId(document.FilePath) == itemidInsertionPoint) 205return hierarchy.TryGetItemId(_workspace.CurrentSolution.GetDocument(document.Id).FilePath);
Venus\ContainedDocument.DocumentServiceProvider.cs (1)
117result = new MappedSpanResult(document.FilePath, primarySnapshotSpan.ToLinePositionSpan(), primarySpan.ToTextSpan());
Workspace\VisualStudioSymbolNavigationService.cs (2)
285&& document.FilePath is object) 290itemID = hierarchy.TryGetItemId(document.FilePath);
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (24)
Interactive\Commands\ResetInteractiveTests.cs (1)
52var document = project.Documents.FirstOrDefault(d => d.FilePath == "ResetInteractiveTestsDocument");
ProjectSystemShim\CPS\SourceFileHandlingTests.cs (23)
38Assert.True(GetCurrentDocuments().Any(s => s.FilePath == sourceFileFullPath)); 56Assert.True(GetCurrentAdditionalDocuments().Any(s => s.FilePath == additionalFileFullPath)); 106Assert.Equal(documents[0].FilePath, sourceFileFullPath5, StringComparer.OrdinalIgnoreCase); 107Assert.Equal(documents[1].FilePath, sourceFileFullPath4, StringComparer.OrdinalIgnoreCase); 108Assert.Equal(documents[2].FilePath, sourceFileFullPath3, StringComparer.OrdinalIgnoreCase); 109Assert.Equal(documents[3].FilePath, sourceFileFullPath2, StringComparer.OrdinalIgnoreCase); 110Assert.Equal(documents[4].FilePath, sourceFileFullPath1, StringComparer.OrdinalIgnoreCase); 150Assert.Equal(documents[0].FilePath, sourceFileFullPath5, StringComparer.OrdinalIgnoreCase); 151Assert.Equal(documents[1].FilePath, sourceFileFullPath3, StringComparer.OrdinalIgnoreCase); 152Assert.Equal(documents[2].FilePath, sourceFileFullPath1, StringComparer.OrdinalIgnoreCase); 202Assert.Equal(documents[0].FilePath, sourceFileFullPath5, StringComparer.OrdinalIgnoreCase); 203Assert.Equal(documents[1].FilePath, sourceFileFullPath4, StringComparer.OrdinalIgnoreCase); 204Assert.Equal(documents[2].FilePath, sourceFileFullPath3, StringComparer.OrdinalIgnoreCase); 205Assert.Equal(documents[3].FilePath, sourceFileFullPath2, StringComparer.OrdinalIgnoreCase); 206Assert.Equal(documents[4].FilePath, sourceFileFullPath1, StringComparer.OrdinalIgnoreCase); 241Assert.Equal(documents[0].FilePath, sourceFileFullPath5, StringComparer.OrdinalIgnoreCase); 242Assert.Equal(documents[1].FilePath, sourceFileFullPath4, StringComparer.OrdinalIgnoreCase); 243Assert.Equal(documents[2].FilePath, sourceFileFullPath3, StringComparer.OrdinalIgnoreCase); 244Assert.Equal(documents[3].FilePath, sourceFileFullPath2, StringComparer.OrdinalIgnoreCase); 245Assert.Equal(documents[4].FilePath, sourceFileFullPath1, StringComparer.OrdinalIgnoreCase); 283Assert.Equal(documents[0].FilePath, sourceFileFullPath2, StringComparer.OrdinalIgnoreCase); 284Assert.Equal(documents[1].FilePath, sourceFileFullPath1, StringComparer.OrdinalIgnoreCase); 395Assert.Equal(documents[0].FilePath, sourceFileFullPath1, StringComparer.OrdinalIgnoreCase);
Microsoft.VisualStudio.LanguageServices.LiveShare (10)
Client\RemoteLanguageServiceWorkspace.cs (8)
302text = SourceText.From(File.ReadAllText(document.FilePath)); 387if (doc != null && doc.FilePath != null) 399await _session.DownloadFileAsync(_session.ConvertLocalPathToSharedUri(doc.FilePath), CancellationToken.None).ConfigureAwait(true); 404if (ErrorHandler.Succeeded(svc.OpenDocumentViaProject(doc.FilePath, 421if (_openTextBufferProvider.IsFileOpen(doc.FilePath) && _openTextBufferProvider.TryGetBufferFromFilePath(doc.FilePath, out var buffer)) 423NotifyOnDocumentOpened(doc.FilePath, buffer); 498using 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.UnitTests (2)
Venus\DocumentService_IntegrationTests.vb (2)
285results.Add(New MappedSpanResult(mappedDocument.FilePath, lineSpan, mappedSpan)) 289results.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])} : {BitConverter.ToString([.. fileChecksum])}");