6 instantiations of SourceGeneratorExecutionVersion
Microsoft.CodeAnalysis.Workspaces (4)
Workspace\Solution\SolutionCompilationState.cs (1)
352
versionMapBuilder.Add(projectInfo.Id,
new
());
Workspace\Solution\SourceGeneratorExecutionVersion.cs (3)
33
=>
new
(MajorVersion + 1, MinorVersion: 0);
36
=>
new
(MajorVersion, MinorVersion + 1);
45
=>
new
(reader.ReadInt32(), reader.ReadInt32());
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
SolutionTests\SourceGeneratorExecutionVersionMapTests.cs (2)
23
var project1Kvp = new KeyValuePair<ProjectId, SourceGeneratorExecutionVersion>(projectId1,
new
(MajorVersion: 1, MinorVersion: 1));
24
var project2Kvp = new KeyValuePair<ProjectId, SourceGeneratorExecutionVersion>(projectId2,
new
(MajorVersion: 2, MinorVersion: 2));
28 references to SourceGeneratorExecutionVersion
Microsoft.CodeAnalysis.Workspaces (26)
Diagnostics\Extensions.cs (2)
349
/// This checksum is also affected by the <see cref="
SourceGeneratorExecutionVersion
"/> for this project.
373
if (solution.CompilationState.SourceGeneratorExecutionVersionMap.Map.TryGetValue(project.Id, out
var
executionVersion))
FindSymbols\FindReferences\DependentTypeFinder_ProjectIndex.cs (1)
30
/// cref="
SourceGeneratorExecutionVersion
"/> for the project changes, we'll still have the same project state.
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ISolutionExtensions.cs (2)
138
var projectIdToSourceGenerationVersion = ImmutableSortedDictionary.CreateBuilder<ProjectId,
SourceGeneratorExecutionVersion
>();
144
var
currentVersion = solution.GetSourceGeneratorExecutionVersion(projectId);
Workspace\Solution\Solution.cs (1)
1932
internal
SourceGeneratorExecutionVersion
GetSourceGeneratorExecutionVersion(ProjectId projectId)
Workspace\Solution\SolutionCompilationState.cs (2)
304
/// Map from each project to the <see cref="
SourceGeneratorExecutionVersion
"/> it is currently at. Loosely, the
1526
var
currentExecutionVersion = versionMapBuilder[projectId];
Workspace\Solution\SourceGeneratorExecutionVersion.cs (15)
32
public
SourceGeneratorExecutionVersion
IncrementMajorVersion()
35
public
SourceGeneratorExecutionVersion
IncrementMinorVersion()
44
public static
SourceGeneratorExecutionVersion
ReadFrom(ObjectReader reader)
52
public static bool operator >(
SourceGeneratorExecutionVersion
left,
SourceGeneratorExecutionVersion
right)
56
public static bool operator <(
SourceGeneratorExecutionVersion
left,
SourceGeneratorExecutionVersion
right)
61
/// Helper construct to allow a mapping from <see cref="ProjectId"/>s to <see cref="
SourceGeneratorExecutionVersion
"/>.
64
internal sealed class SourceGeneratorExecutionVersionMap(ImmutableSortedDictionary<ProjectId,
SourceGeneratorExecutionVersion
> map)
68
public ImmutableSortedDictionary<ProjectId,
SourceGeneratorExecutionVersion
> Map { get; } = map;
71
: this(ImmutableSortedDictionary<ProjectId,
SourceGeneratorExecutionVersion
>.Empty)
75
public
SourceGeneratorExecutionVersion
this[ProjectId projectId] => Map[projectId];
104
var builder = ImmutableSortedDictionary.CreateBuilder<ProjectId,
SourceGeneratorExecutionVersion
>();
108
var
version =
SourceGeneratorExecutionVersion
.ReadFrom(reader);
Workspace\Workspace_SourceGeneration.cs (3)
77
var result = ImmutableSortedDictionary.CreateBuilder<ProjectId,
SourceGeneratorExecutionVersion
>();
133
static
SourceGeneratorExecutionVersion
Increment(
SourceGeneratorExecutionVersion
version, bool major)
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
SolutionTests\SourceGeneratorExecutionVersionMapTests.cs (2)
23
var project1Kvp = new KeyValuePair<ProjectId,
SourceGeneratorExecutionVersion
>(projectId1, new(MajorVersion: 1, MinorVersion: 1));
24
var project2Kvp = new KeyValuePair<ProjectId,
SourceGeneratorExecutionVersion
>(projectId2, new(MajorVersion: 2, MinorVersion: 2));