114 references to FilePath
Microsoft.CodeAnalysis (7)
MetadataReference\MetadataImageReference.cs (4)
45this.FilePath, 53return _display ?? FilePath ?? (Properties.Kind == MetadataImageKind.Assembly ? CodeAnalysisResources.InMemoryAssembly : CodeAnalysisResources.InMemoryModule); 73if (FilePath != null) 76sb.Append(FilePath);
MetadataReference\PortableExecutableReference.cs (1)
37get { return FilePath; }
PEWriter\MetadataWriter.PortablePdb.cs (2)
965if (referenceManager.GetMetadataReference(pair.AssemblySymbol) is PortableExecutableReference { FilePath: { } } portableReference) 967var fileName = PathUtilities.GetFileName(portableReference.FilePath);
Microsoft.CodeAnalysis.CSharp (3)
Symbols\Source\SourceAssemblySymbol.cs (2)
974if ((object)fileRef != null && (object)fileRef.FilePath != null) 976string fileName = FileNameUtilities.GetFileName(fileRef.FilePath);
Symbols\SymbolDistinguisher.cs (1)
185string path = metadataReference.FilePath;
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (2)
InteractiveSessionReferencesTests.cs (2)
646Assert.Equal(fileBase1.Path, ((PortableExecutableReference)libBaseRefAndSymbol.Key).FilePath); 704Assert.Equal(fileBase1.Path, ((PortableExecutableReference)libBaseRefAndSymbol.Key).FilePath);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (3)
Compilation\ReferenceManagerTests.cs (3)
915Assert.Equal(p2, dr1.FilePath); 916Assert.Equal(p3, dr2.FilePath); 917Assert.Equal(p3, dr3.FilePath);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (4)
MetadataAsSource\AbstractMetadataAsSourceTests.TestContext.cs (4)
120Assert.True(File.Exists(portableExecutable.FilePath), $"'{portableExecutable.FilePath}' does not exist for reference '{portableExecutable.Display}'"); 121Assert.True(Path.IsPathRooted(portableExecutable.FilePath), $"'{portableExecutable.FilePath}' is not a fully-qualified file name");
Microsoft.CodeAnalysis.Features (16)
AddImport\AbstractAddImportFeatureService.cs (4)
415return PathUtilities.ContainsPathComponent(reference.FilePath, pathComponent, ignoreCase: true); 440var path1 = x?.FilePath ?? x?.Display; 441var path2 = y?.FilePath ?? y?.Display; 450var path = obj.FilePath ?? obj.Display;
AddImport\AddImportFixData.cs (1)
83/// is the <see cref="PortableExecutableReference.FilePath"/> for it.
AddImport\References\MetadataSymbolReference.cs (4)
46return (string.Format(FeaturesResources.Add_reference_to_0, Path.GetFileName(_reference.FilePath)), 56_referenceProjectId, _reference.FilePath); 70StringComparer.OrdinalIgnoreCase.Equals(_reference.FilePath, reference._reference.FilePath); 76StringComparer.OrdinalIgnoreCase.GetHashCode(_reference.FilePath));
Completion\Providers\ImportCompletionProvider\AbstractTypeImportCompletionService.cs (1)
157=> peReference.FilePath ?? peReference.Display;
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.SymbolComputer.cs (1)
64=> peReference.FilePath ?? peReference.Display;
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (3)
226var assemblyLocation = (metadataReference as PortableExecutableReference)?.FilePath; 373if (peMetadataReference?.FilePath != null) 375return new UniqueDocumentKey(peMetadataReference.FilePath, peMetadataReference.GetMetadataId(), project.Language, SymbolKey.Create(topLevelNamedType, cancellationToken), signaturesOnly);
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (1)
112if (compilation.GetMetadataReference(symbol.ContainingAssembly) is not PortableExecutableReference { FilePath: not null and var dllPath })
UnusedReferences\UnusedReferencesRemover.cs (1)
49.Select(reference => reference.FilePath)
Microsoft.CodeAnalysis.InteractiveHost (4)
Interactive\Core\InteractiveHost.Service.cs (2)
558metadataReferencePaths.AddRange(resolvedReferences.Where(r => r.FilePath != null).Select(r => r.FilePath!));
Interactive\Core\InteractiveHost.ShadowCopyReference.cs (2)
33return _provider.GetMetadata(FilePath, Properties.Kind); 38return new ShadowCopyReference(_provider, FilePath!, properties);
Microsoft.CodeAnalysis.LanguageServer (1)
HostWorkspace\MetadataService.cs (1)
68return new ThrowingExecutableReference(FilePath!, properties, _ex);
Microsoft.CodeAnalysis.Scripting (2)
Hosting\Resolvers\RuntimeMetadataReferenceResolver.cs (1)
120var definitionDirectory = PathUtilities.GetDirectoryName((definition as PortableExecutableReference)?.FilePath);
ScriptBuilder.cs (1)
144var path = (referencedAssembly.Key as PortableExecutableReference)?.FilePath;
Microsoft.CodeAnalysis.Test.Utilities (1)
TargetFrameworkUtil.cs (1)
400.Where(x => !(x is PortableExecutableReference pe && excludeReferenceNames.Contains(pe.FilePath)));
Microsoft.CodeAnalysis.UnitTests (20)
MetadataReferences\MetadataReferenceTests.cs (20)
103Assert.Null(r.FilePath); 134Assert.Null(r.FilePath); 150Assert.Null(r.FilePath); 166Assert.Equal(file.Path, r.FilePath); 189Assert.Equal(file.Path, r.FilePath); 209Assert.Equal(assembly.Location, r.FilePath); 226Assert.Equal(assembly.Location, r.FilePath); 264Assert.Equal(@"c:\temp", r.FilePath); 268Assert.Equal(@"c:\temp", r1.FilePath); 272Assert.Equal(@"c:\temp", r2.FilePath); 303Assert.Equal(@"c:\temp", r.FilePath); 307Assert.Equal(@"c:\temp", r2.FilePath); 315Assert.Equal(r.FilePath, r3.FilePath); 323Assert.Equal(r.FilePath, r4.FilePath); 405Assert.Null(mmr1.FilePath); 410Assert.Equal(path, r.FilePath); 420Assert.Null(mmr1.FilePath); 425Assert.Equal(path, r.FilePath);
Microsoft.CodeAnalysis.VisualBasic (2)
Symbols\Source\SourceAssemblySymbol.vb (2)
1356If fileRef IsNot Nothing AndAlso fileRef.FilePath IsNot Nothing Then 1357Dim fileName As String = FileNameUtilities.GetFileName(fileRef.FilePath)
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (2)
CommandLineTests.vb (2)
2544peRef.FilePath.EndsWith("mscorlib.dll", StringComparison.Ordinal) 2560peRef.FilePath.EndsWith("mscorlib.dll", StringComparison.Ordinal)
Microsoft.CodeAnalysis.Workspaces (17)
FindSymbols\SymbolTree\SymbolTreeInfo_Metadata.cs (1)
229=> "_Metadata_" + reference.FilePath;
Serialization\SerializedPortableExecutableReference.cs (2)
52=> new SerializedPortableExecutableReference(properties, FilePath, _metadata, _storageHandles, _provider); 61FilePath={this.FilePath}
Serialization\SerializerService_Reference.cs (3)
188writer.WriteString(reference.FilePath); 531throw new FileNotFoundException(FilePath); 535=> new MissingMetadataReference(properties, FilePath, _provider);
Workspace\ProjectSystem\ProjectSystemProject.cs (2)
687.Single(m => m.FilePath == path && m.Properties == properties); 1399_projectSystemProjectFactory.FileWatchedPortableExecutableReferenceFactory.StopWatchingReference(reference.FilePath!, referenceToTrack: reference);
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (6)
426FileWatchedPortableExecutableReferenceFactory.StopWatchingReference(reference.FilePath!, referenceToTrack: reference); 430FileWatchedPortableExecutableReferenceFactory.StartWatchingReference(reference.FilePath!); 562&& string.Equals(peReference.FilePath, outputPath, StringComparison.OrdinalIgnoreCase)) 575projectInfo.WithConvertedProjectReference(peReference.FilePath!, projectReference)); 823getFilePath: static reference => reference.FilePath!, 824createNewReference: static (solutionServices, reference) => CreateMetadataReference_NoLock(reference.FilePath!, reference.Properties, solutionServices),
Workspace\Solution\SolutionCompilationState.RootedSymbolSet.cs (1)
19=> new(reference.Properties, (reference as PortableExecutableReference)?.FilePath);
Workspace\Workspace.cs (2)
1477(!RoslynString.IsNullOrEmpty(pemeta.FilePath) && outputAssemblyToProjectIdMap.TryGetValue(pemeta.FilePath, out matchingProjectId)))
Microsoft.CodeAnalysis.Workspaces.MSBuild (9)
MSBuild\MSBuildProjectLoader.Worker_ResolveReferences.cs (1)
86PortableExecutableReference portableExecutableReference => portableExecutableReference.FilePath,
MSBuild\MSBuildWorkspace.cs (8)
581if (metadataReference is PortableExecutableReference peRef && peRef.FilePath != null) 583if (IsInGAC(peRef.FilePath) && identity != null) 589else if (IsFrameworkReferenceAssembly(peRef.FilePath)) 592var fileName = identity != null ? identity.Name : Path.GetFileNameWithoutExtension(peRef.FilePath); 597var relativePath = PathUtilities.GetRelativePath(Path.GetDirectoryName(CurrentSolution.GetRequiredProject(projectId).FilePath)!, peRef.FilePath); 598var fileName = Path.GetFileNameWithoutExtension(peRef.FilePath); 617if (metadataReference is PortableExecutableReference peRef && peRef.FilePath != null) 619_applyChangesProjectFile.RemoveMetadataReferenceAsync(identity.Name, identity.GetDisplayName(), peRef.FilePath, CancellationToken.None).Wait();
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (4)
VisualStudioMSBuildWorkspaceTests.cs (4)
80var fileNames = new HashSet<string>(references.Select(r => Path.GetFileName(((PortableExecutableReference)r).FilePath))); 185.SingleOrDefault(mr => mr.FilePath.Contains(name)); 790var csharpLib = refs.OfType<PortableExecutableReference>().FirstOrDefault(r => r.FilePath.Contains("Microsoft.CSharp")); 3218project.MetadataReferences.Select(r => Path.GetFileName(((PortableExecutableReference)r).FilePath)).OrderBy(StringComparer.Ordinal));
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
CommandLineProject\CommandLineProjectTests.cs (2)
180Assert.Single(info.MetadataReferences.OfType<PortableExecutableReference>(), r => r.FilePath == pathToAssembly); 192Assert.Single(info.MetadataReferences.OfType<PortableExecutableReference>(), r => r.FilePath == pathToAssembly);
Microsoft.VisualStudio.LanguageServices (13)
Library\ObjectBrowser\AbstractDescriptionBuilder.cs (1)
141AddText(portableExecutableReference.FilePath);
Library\ObjectBrowser\AbstractListItemFactory.cs (1)
620var assemblyIdentity = visitedAssemblies.GetOrAdd(portableExecutableReference.FilePath, filePath => AssemblyIdentityUtils.TryGetAssemblyIdentity(filePath));
Library\ObjectBrowser\ObjectList.cs (3)
850if (string.Equals(data.bstrFile, metadataReference.FilePath, StringComparison.OrdinalIgnoreCase)) 932var assemblyIdentity = AssemblyIdentityUtils.TryGetAssemblyIdentity(portableExecutableReference.FilePath); 938data.bstrFile = portableExecutableReference.FilePath;
Library\VsNavInfo\NavInfoFactory.cs (2)
28return new NavInfo(this, libraryName: portableExecutableReference.FilePath); 155? portableExecutableReference.FilePath
Progression\GraphNodeIdCreation.cs (2)
428if (compilation.GetMetadataReference(containingAssembly) is PortableExecutableReference reference && !string.IsNullOrEmpty(reference.FilePath)) 430return new Uri(reference.FilePath, UriKind.RelativeOrAbsolute);
ProjectSystem\MetadataReferences\VisualStudioPortableExecutableReference.cs (1)
71private new string FilePath => base.FilePath!;
ProjectSystem\VisualStudioWorkspaceImpl.AddMetadataReferenceUndoUnit.cs (1)
36.FirstOrDefault(p => StringComparer.OrdinalIgnoreCase.Equals(p.FilePath, _filePath));
ProjectSystem\VisualStudioWorkspaceImpl.cs (1)
565return fileMetadata.FilePath;
ProjectSystem\VisualStudioWorkspaceImpl.RemoveMetadataReferenceUndoUnit.cs (1)
35.FirstOrDefault(p => StringComparer.OrdinalIgnoreCase.Equals(p.FilePath!, _filePath));
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (2)
ProjectSystemShim\CPS\CSharpReferencesTests.cs (2)
65Assert.True(GetProject3MetadataReferences().Any(mr => mr.FilePath == metadaRefFilePath)); 84Assert.False(GetProject3MetadataReferences().Any(mr => mr.FilePath == metadaRefFilePath));