27 references to SourceGeneratorPresence
Microsoft.CodeAnalysis.Remote.ServiceHub (10)
Services\SourceGeneration\RemoteSourceGenerationService.cs (10)
22using AnalyzerReferenceMap = ConditionalWeakTable<AnalyzerReference, StrongBox<SourceGeneratorPresence>>; 81private static StrongBox<SourceGeneratorPresence> GetSourceGeneratorPresence( 88public async ValueTask<SourceGeneratorPresence> GetSourceGeneratorPresenceAsync( 96return SourceGeneratorPresence.NoSourceGenerators; 132var generatorPresence = analyzerReferenceMap.GetValue(analyzerReference, callback).Value; 135if (generatorPresence is SourceGeneratorPresence.ContainsRequiredSourceGenerators) 136return SourceGeneratorPresence.ContainsRequiredSourceGenerators; 140if (generatorPresence is SourceGeneratorPresence.OnlyOptionalSourceGenerators) 146? SourceGeneratorPresence.OnlyOptionalSourceGenerators 147: SourceGeneratorPresence.NoSourceGenerators;
Microsoft.CodeAnalysis.Workspaces (17)
SourceGeneration\IRemoteSourceGenerationService.cs (1)
52ValueTask<SourceGeneratorPresence> GetSourceGeneratorPresenceAsync(
SourceGeneration\SourceGeneratorExtensions.cs (4)
34public static SourceGeneratorPresence GetSourceGeneratorPresence(this ImmutableArray<ISourceGenerator> generators) 37return SourceGeneratorPresence.NoSourceGenerators; 41? SourceGeneratorPresence.ContainsRequiredSourceGenerators 42: SourceGeneratorPresence.OnlyOptionalSourceGenerators;
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker_Generators.cs (2)
99var presence = await compilationState.GetProjectGeneratorPresenceAsync(ProjectState.Id, cancellationToken).ConfigureAwait(false); 100return presence is SourceGeneratorPresence.ContainsRequiredSourceGenerators;
Workspace\Solution\SolutionCompilationState_SourceGenerators.cs (10)
25using AnalyzerReferenceMap = ConditionalWeakTable<IReadOnlyList<AnalyzerReference>, AsyncLazy<SourceGeneratorPresence>>; 107var state = await GetProjectGeneratorPresenceAsync(projectId, cancellationToken).ConfigureAwait(false); 108return state is not SourceGeneratorPresence.NoSourceGenerators; 111public async Task<SourceGeneratorPresence> GetProjectGeneratorPresenceAsync(ProjectId projectId, CancellationToken cancellationToken) 115return SourceGeneratorPresence.NoSourceGenerators; 118return SourceGeneratorPresence.NoSourceGenerators; 129AsyncLazy<SourceGeneratorPresence> GetLazy(AnalyzerReferenceMap analyzerReferenceMap, ProjectState projectState) 135static async Task<SourceGeneratorPresence> ComputeHasSourceGeneratorsAsync( 149var result = await client.TryInvokeAsync<IRemoteSourceGenerationService, SourceGeneratorPresence>( 154return result.HasValue ? result.Value : SourceGeneratorPresence.NoSourceGenerators;