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