40 references to ReferenceInfo
Microsoft.CodeAnalysis.Features (40)
UnusedReferences\IReferenceCleanupService.cs (1)
18Task<ImmutableArray<ReferenceInfo>> GetProjectReferencesAsync(
UnusedReferences\IUnusedReferenceAnalysisService.cs (4)
14Task<ImmutableArray<ReferenceInfo>> GetUnusedReferencesAsync( 18ImmutableArray<ReferenceInfo> projectReferences, 24ValueTask<ImmutableArray<ReferenceInfo>> GetUnusedReferencesAsync( 28ImmutableArray<ReferenceInfo> projectReferences,
UnusedReferences\ProjectAssets\ProjectAssetsReader.cs (11)
23public static ImmutableArray<ReferenceInfo> AddDependencyHierarchies( 24ImmutableArray<ReferenceInfo> projectReferences, 59var builtReferences = new Dictionary<string, ReferenceInfo?>(); 69private static ReferenceInfo? EnhanceReference( 71ReferenceInfo referenceInfo, 74Dictionary<string, ReferenceInfo?> builtReferences) 85var reference = BuildReference(projectAssets, referenceName, referenceInfo.TreatAsUsed, targetLibraryKeys, builtReferences); 94private static ReferenceInfo? BuildReference( 99Dictionary<string, ReferenceInfo?> builtReferences) 168if (builtReferences.TryGetValue(itemSpecification, out var builtReference)) 178var reference = new ReferenceInfo(referenceType, itemSpecification, treatAsUsed, compilationAssemblies.ToImmutable(), dependencies);
UnusedReferences\ReferenceInfo.cs (5)
12internal sealed class ReferenceInfo(ReferenceType referenceType, string itemSpecification, bool treatAsUsed, ImmutableArray<string> compilationAssemblies, ImmutableArray<ReferenceInfo> dependencies) 45public ImmutableArray<ReferenceInfo> Dependencies { get; } = dependencies; 47public ReferenceInfo WithItemSpecification(string itemSpecification) 50public ReferenceInfo WithDependencies(IEnumerable<ReferenceInfo>? dependencies)
UnusedReferences\ReferenceUpdate.cs (2)
7internal sealed class ReferenceUpdate(UpdateAction action, ReferenceInfo referenceInfo) 17public ReferenceInfo ReferenceInfo { get; } = referenceInfo;
UnusedReferences\UnusedReferencesRemover.cs (17)
24public static async Task<ImmutableArray<ReferenceInfo>> GetUnusedReferencesAsync( 27ImmutableArray<ReferenceInfo> references, 63internal static ImmutableArray<ReferenceInfo> GetUnusedReferences( 66ImmutableArray<ReferenceInfo> references) 68var unusedReferencesBuilder = ImmutableArray.CreateBuilder<ReferenceInfo>(); 127private static ImmutableArray<ReferenceInfo> RemoveDirectlyUsedReferences( 128ImmutableArray<ReferenceInfo> references, 138var unusedReferencesBuilder = ImmutableArray.CreateBuilder<ReferenceInfo>(); 140foreach (var reference in references) 183private static ImmutableArray<ReferenceInfo> RemoveTransitivelyUsedReferences( 184ImmutableArray<ReferenceInfo> references, 197var unusedReferencesBuilder = ImmutableArray.CreateBuilder<ReferenceInfo>(); 199foreach (var reference in references) 225internal static bool HasAnyCompilationAssembly(ReferenceInfo reference) 235internal static bool ContainsAnyCompilationAssembly(ReferenceInfo reference, HashSet<string> usedAssemblyFilePaths) 245internal static void RemoveAllCompilationAssemblies(ReferenceInfo reference, HashSet<string> usedAssemblyFilePaths) 255internal static ImmutableArray<string> GetAllCompilationAssemblies(ReferenceInfo reference)