4 instantiations of VersionStamp
Microsoft.CodeAnalysis.Workspaces (4)
Workspace\Solution\VersionStamp.cs (4)
69
=>
new
(DateTime.UtcNow);
75
=>
new
(utcTimeLastModified);
112
return new
VersionStamp
(_utcLastModified, (thisGlobalVersion > thatGlobalVersion) ? thisGlobalVersion : thatGlobalVersion, GlobalVersionMarker);
130
return new
VersionStamp
(now, incr);
265 references to VersionStamp
dotnet-format (2)
Formatters\DocumentFormatter.cs (2)
217
var
aVersion = await a.GetTextVersionAsync(cancellationToken).ConfigureAwait(false);
218
var
bVersion = await b.GetTextVersionAsync(cancellationToken).ConfigureAwait(false);
GenerateDocumentationAndConfigFiles (4)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\SemanticModelWorkspaceServiceFactory.SemanticModelWorkspaceService.cs (4)
15
internal readonly struct SemanticModelReuseInfo(SemanticModel previousNonSpeculativeSemanticModel, SemanticModel currentSemanticModel, SyntaxNode bodyNode,
VersionStamp
topLevelSementicVersion)
37
public readonly
VersionStamp
TopLevelSemanticVersion = topLevelSementicVersion;
145
var
topLevelSemanticVersion = await document.Project.GetDependentSemanticVersionAsync(cancellationToken).ConfigureAwait(false);
178
VersionStamp
topLevelSemanticVersion,
Microsoft.Analyzers.Extra.Tests (1)
Resources\RoslynTestUtils.cs (1)
56
.AddSolution(SolutionInfo.Create(SolutionId.CreateNewId(),
VersionStamp
.Create()))
Microsoft.Analyzers.Local.Tests (1)
Resources\RoslynTestUtils.cs (1)
56
.AddSolution(SolutionInfo.Create(SolutionId.CreateNewId(),
VersionStamp
.Create()))
Microsoft.CodeAnalysis.Analyzers (4)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\SemanticModelWorkspaceServiceFactory.SemanticModelWorkspaceService.cs (4)
15
internal readonly struct SemanticModelReuseInfo(SemanticModel previousNonSpeculativeSemanticModel, SemanticModel currentSemanticModel, SyntaxNode bodyNode,
VersionStamp
topLevelSementicVersion)
37
public readonly
VersionStamp
TopLevelSemanticVersion = topLevelSementicVersion;
145
var
topLevelSemanticVersion = await document.Project.GetDependentSemanticVersionAsync(cancellationToken).ConfigureAwait(false);
178
VersionStamp
topLevelSemanticVersion,
Microsoft.CodeAnalysis.CodeStyle.Fixes (4)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\SemanticModelWorkspaceServiceFactory.SemanticModelWorkspaceService.cs (4)
15
internal readonly struct SemanticModelReuseInfo(SemanticModel previousNonSpeculativeSemanticModel, SemanticModel currentSemanticModel, SyntaxNode bodyNode,
VersionStamp
topLevelSementicVersion)
37
public readonly
VersionStamp
TopLevelSemanticVersion = topLevelSementicVersion;
145
var
topLevelSemanticVersion = await document.Project.GetDependentSemanticVersionAsync(cancellationToken).ConfigureAwait(false);
178
VersionStamp
topLevelSemanticVersion,
Microsoft.CodeAnalysis.Features (31)
CodeLens\CodeLensReferencesService.cs (2)
85
public async ValueTask<
VersionStamp
> GetProjectCodeLensVersionAsync(Solution solution, ProjectId projectId, CancellationToken cancellationToken)
92
var
projectVersion = await GetProjectCodeLensVersionAsync(solution, documentId.ProjectId, cancellationToken).ConfigureAwait(false);
CodeLens\ICodeLensReferencesService.cs (1)
15
ValueTask<
VersionStamp
> GetProjectCodeLensVersionAsync(Solution solution, ProjectId projectId, CancellationToken cancellationToken);
DesignerAttribute\DesignerAttributeDiscoveryService.cs (6)
60
private readonly ConcurrentDictionary<DocumentId, (string? category,
VersionStamp
projectVersion)> _documentToLastReportedInformation = [];
200
AsyncLazy<
VersionStamp
> lazyProjectVersion,
220
private async Task<ImmutableArray<(DesignerAttributeData data,
VersionStamp
version)>> ComputeChangedDataAsync(
223
AsyncLazy<
VersionStamp
> lazyProjectVersion,
234
using var _ = ArrayBuilder<(DesignerAttributeData data,
VersionStamp
version)>.GetInstance(out var results);
251
var
projectVersion = await lazyProjectVersion.GetValueAsync(cancellationToken).ConfigureAwait(false);
Diagnostics\Service\DiagnosticAnalyzerService.cs (1)
98
public static Task<
VersionStamp
> GetDiagnosticVersionAsync(Project project, CancellationToken cancellationToken)
Diagnostics\Service\DiagnosticAnalyzerService.IncrementalMemberEditAnalyzer.cs (7)
40
private readonly record struct MemberSpans(DocumentId DocumentId,
VersionStamp
Version, ImmutableArray<TextSpan> Spans);
57
VersionStamp
version,
82
var
oldDocumentVersion = await GetDiagnosticVersionAsync(oldDocument.Project, cancellationToken).ConfigureAwait(false);
92
if (oldDocumentVersion ==
VersionStamp
.Default)
227
private async Task<ImmutableArray<TextSpan>> GetOrCreateMemberSpansAsync(Document document,
VersionStamp
version, CancellationToken cancellationToken)
244
static async Task<ImmutableArray<TextSpan>> CreateMemberSpansAsync(Document document,
VersionStamp
version, CancellationToken cancellationToken)
257
private void SaveMemberSpans(DocumentId documentId,
VersionStamp
version, ImmutableArray<TextSpan> memberSpans)
Diagnostics\Service\DiagnosticAnalyzerService_GetDiagnosticsForSpan.cs (1)
323
var
version = await GetDiagnosticVersionAsync(document.Project, cancellationToken).ConfigureAwait(false);
EditAndContinue\CommittedSolution.cs (1)
234
var
sourceTextVersion = (committedDocument == null) ? await document.GetTextVersionAsync(cancellationToken).ConfigureAwait(false) : default;
ExternalAccess\UnitTesting\SolutionCrawler\AbstractUnitTestingDocumentDifferenceService.cs (2)
35
if (oldDocument.TryGetSyntaxVersion(out
var
oldVersion) &&
36
newDocument.TryGetSyntaxVersion(out
var
newVersion) &&
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (3)
358
loader: TextLoader.From(assemblyInfoSourceText.Container,
VersionStamp
.Default),
369
loader: TextLoader.From(emptySourceText.Container,
VersionStamp
.Default),
377
version:
VersionStamp
.Default,
PdbSourceDocument\PdbSourceDocumentLoaderService.cs (1)
196
var textAndVersion = TextAndVersion.Create(sourceText,
VersionStamp
.Default, filePath);
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (1)
317
version:
VersionStamp
.Default,
SolutionCrawler\AbstractDocumentDifferenceService.cs (4)
38
if (oldDocument.TryGetSyntaxVersion(out
var
oldVersion) &&
39
newDocument.TryGetSyntaxVersion(out
var
newVersion) &&
74
if (!oldDocument.TryGetTopLevelChangeTextVersion(out
var
oldTopLevelChangeVersion) ||
75
!newDocument.TryGetTopLevelChangeTextVersion(out
var
newTopLevelChangeVersion))
Workspace\MiscellaneousFileUtilities.cs (1)
90
version:
VersionStamp
.Create(),
Microsoft.CodeAnalysis.Workspaces (204)
FindSymbols\SymbolTree\SymbolTreeInfoCacheService.cs (2)
30
private readonly ConcurrentDictionary<ProjectId, (
VersionStamp
semanticVersion, SymbolTreeInfo info)> _projectIdToInfo = [];
166
var
semanticVersion = await project.GetSemanticVersionAsync(cancellationToken).ConfigureAwait(false);
Serialization\SerializableSourceText.cs (2)
213
private readonly
VersionStamp
_version =
VersionStamp
.Create();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\SemanticModelWorkspaceServiceFactory.SemanticModelWorkspaceService.cs (4)
15
internal readonly struct SemanticModelReuseInfo(SemanticModel previousNonSpeculativeSemanticModel, SemanticModel currentSemanticModel, SyntaxNode bodyNode,
VersionStamp
topLevelSementicVersion)
37
public readonly
VersionStamp
TopLevelSemanticVersion = topLevelSementicVersion;
145
var
topLevelSemanticVersion = await document.Project.GetDependentSemanticVersionAsync(cancellationToken).ConfigureAwait(false);
178
VersionStamp
topLevelSemanticVersion,
Workspace\AdhocWorkspace.cs (5)
65
var info = ProjectInfo.Create(ProjectId.CreateNewId(),
VersionStamp
.Create(), name, name, language);
126
var loader = TextLoader.From(TextAndVersion.Create(text,
VersionStamp
.Create()));
168
var
version = doc.GetTextVersionSynchronously(CancellationToken.None);
196
var
version = doc.GetTextVersionSynchronously(CancellationToken.None);
224
var
version = doc.GetTextVersionSynchronously(CancellationToken.None);
Workspace\CommandLineProject.cs (1)
120
version:
VersionStamp
.Create(),
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (1)
668
=> TextAndVersion.Create(_textContainer.CurrentText,
VersionStamp
.Create(), _filePath);
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (5)
105
var
versionStamp = creationInfo.FilePath != null
106
?
VersionStamp
.Create(File.GetLastWriteTimeUtc(creationInfo.FilePath))
107
:
VersionStamp
.Create();
141
VersionStamp
.Create(),
474
VersionStamp
.Create(),
Workspace\Solution\ConstantTextAndVersionSource.cs (2)
39
public bool TryGetVersion(LoadTextOptions options, out
VersionStamp
version)
45
public async ValueTask<
VersionStamp
> GetVersionAsync(LoadTextOptions options, CancellationToken cancellationToken)
Workspace\Solution\Document.cs (7)
107
public bool TryGetSyntaxVersion(out
VersionStamp
version)
110
if (!this.TryGetTextVersion(out
var
textVersion))
115
var
projectVersion = this.Project.Version;
123
internal bool TryGetTopLevelChangeTextVersion(out
VersionStamp
version)
129
public async Task<
VersionStamp
> GetSyntaxVersionAsync(CancellationToken cancellationToken = default)
131
var
textVersion = await this.GetTextVersionAsync(cancellationToken).ConfigureAwait(false);
132
var
projectVersion = this.Project.Version;
Workspace\Solution\DocumentState.cs (13)
250
private static TreeAndVersion MakeNewTreeAndVersion(SyntaxTree oldTree, SourceText oldText,
VersionStamp
oldVersion, SyntaxTree newTree, SourceText newText,
VersionStamp
newVersion)
253
var
version = topLevelChanged ? newVersion : oldVersion;
493
var
newTextVersion = GetNewerVersion();
494
var
newTreeVersion = GetNewTreeVersionForUpdatedTree(newRoot, newTextVersion, mode);
530
VersionStamp
textVersion,
531
VersionStamp
treeVersion,
552
protected
VersionStamp
GetNewTreeVersionForUpdatedTree(SyntaxNode newRoot,
VersionStamp
newTextVersion, PreservationMode mode)
569
protected
VersionStamp
GetNewerVersion()
581
return
VersionStamp
.Create();
622
public bool TryGetTopLevelChangeTextVersion(out
VersionStamp
version)
636
public override async ValueTask<
VersionStamp
> GetTopLevelChangeTextVersionAsync(CancellationToken cancellationToken)
Workspace\Solution\DocumentState_LinkedFileReuse.cs (1)
133
VersionStamp
siblingVersion,
Workspace\Solution\DocumentState_TreeTextSource.cs (4)
16
internal sealed class TreeTextSource(AsyncLazy<SourceText> textSource,
VersionStamp
version) : ITextAndVersionSource
18
private readonly
VersionStamp
_version = version;
55
public bool TryGetVersion(LoadTextOptions options, out
VersionStamp
version)
61
public async ValueTask<
VersionStamp
> GetVersionAsync(LoadTextOptions options, CancellationToken cancellationToken)
Workspace\Solution\FileTextLoader.cs (4)
178
var
version =
VersionStamp
.Create(t.prevLastWriteTime);
206
var
version =
VersionStamp
.Create(t.prevLastWriteTime);
Workspace\Solution\Project.cs (5)
551
public
VersionStamp
Version => State.Version;
556
public Task<
VersionStamp
> GetLatestDocumentVersionAsync(CancellationToken cancellationToken = default)
562
public Task<
VersionStamp
> GetDependentVersionAsync(CancellationToken cancellationToken = default)
569
public Task<
VersionStamp
> GetDependentSemanticVersionAsync(CancellationToken cancellationToken = default)
576
public Task<
VersionStamp
> GetSemanticVersionAsync(CancellationToken cancellationToken = default)
Workspace\Solution\ProjectInfo.cs (9)
32
public
VersionStamp
Version => Attributes.Version;
187
VersionStamp
version,
215
VersionStamp
version,
338
public ProjectInfo WithVersion(
VersionStamp
version)
414
VersionStamp
version,
443
public
VersionStamp
Version { get; } = version;
535
VersionStamp
? version = null,
551
var
newVersion = version ?? Version;
652
VersionStamp
.Create(),
Workspace\Solution\ProjectState.cs (32)
48
private readonly AsyncLazy<
VersionStamp
> _lazyLatestDocumentVersion;
49
private readonly AsyncLazy<
VersionStamp
> _lazyLatestDocumentTopLevelChangeVersion;
62
AsyncLazy<
VersionStamp
> lazyLatestDocumentVersion,
63
AsyncLazy<
VersionStamp
> lazyLatestDocumentTopLevelChangeVersion,
213
private static async ValueTask<
VersionStamp
> ComputeLatestDocumentVersionAsync(TextDocumentStates<DocumentState> documentStates, TextDocumentStates<AdditionalDocumentState> additionalDocumentStates, CancellationToken cancellationToken)
216
var
latestVersion =
VersionStamp
.Default;
223
var
version = await state.GetTextVersionAsync(cancellationToken).ConfigureAwait(false);
232
var
version = await state.GetTextVersionAsync(cancellationToken).ConfigureAwait(false);
239
private AsyncLazy<
VersionStamp
> CreateLazyLatestDocumentTopLevelChangeVersion(
244
if (_lazyLatestDocumentTopLevelChangeVersion.TryGetValue(out
var
oldVersion))
258
private static async Task<
VersionStamp
> ComputeTopLevelChangeTextVersionAsync(
259
VersionStamp
oldVersion, ImmutableArray<TextDocumentState> newDocuments, CancellationToken cancellationToken)
261
var
finalVersion = oldVersion;
264
var
newVersion = await newDocument.GetTopLevelChangeTextVersionAsync(cancellationToken).ConfigureAwait(false);
271
private static async Task<
VersionStamp
> ComputeLatestDocumentTopLevelChangeVersionAsync(TextDocumentStates<DocumentState> documentStates, TextDocumentStates<AdditionalDocumentState> additionalDocumentStates, CancellationToken cancellationToken)
274
var
latestVersion =
VersionStamp
.Default;
279
var
version = await state.GetTopLevelChangeTextVersionAsync(cancellationToken).ConfigureAwait(false);
287
var
version = await state.GetTopLevelChangeTextVersionAsync(cancellationToken).ConfigureAwait(false);
600
public Task<
VersionStamp
> GetLatestDocumentVersionAsync(CancellationToken cancellationToken)
603
public async Task<
VersionStamp
> GetSemanticVersionAsync(CancellationToken cancellationToken = default)
605
var
docVersion = await _lazyLatestDocumentTopLevelChangeVersion.GetValueAsync(cancellationToken).ConfigureAwait(false);
656
public
VersionStamp
Version => this.ProjectInfo.Version;
693
AsyncLazy<
VersionStamp
>? latestDocumentVersion = null,
694
AsyncLazy<
VersionStamp
>? latestDocumentTopLevelChangeVersion = null,
1045
out AsyncLazy<
VersionStamp
> dependentDocumentVersion,
1046
out AsyncLazy<
VersionStamp
> dependentSemanticVersion)
1059
if (oldDocument.TryGetTextVersion(out
var
oldVersion))
1061
if (!_lazyLatestDocumentVersion.TryGetValue(out
var
documentVersion) || documentVersion == oldVersion)
1064
if (!_lazyLatestDocumentTopLevelChangeVersion.TryGetValue(out
var
semanticVersion) || semanticVersion == oldVersion)
1084
var
finalVersion = await newDocuments[0].GetTextVersionAsync(cancellationToken).ConfigureAwait(false);
Workspace\Solution\Solution.cs (6)
114
public
VersionStamp
Version => this.SolutionState.Version;
137
public
VersionStamp
GetLatestProjectVersion() => this.SolutionState.GetLatestProjectVersion();
367
=> this.AddProject(ProjectInfo.Create(projectId,
VersionStamp
.Create(), name, assemblyName, language));
1040
loader: TextLoader.From(TextAndVersion.Create(text,
VersionStamp
.Create(), name)),
1153
var
version =
VersionStamp
.Create();
Workspace\Solution\SolutionCompilationState.cs (2)
1192
public Task<
VersionStamp
> GetDependentVersionAsync(ProjectId projectId, CancellationToken cancellationToken)
1195
public Task<
VersionStamp
> GetDependentSemanticVersionAsync(ProjectId projectId, CancellationToken cancellationToken)
Workspace\Solution\SolutionCompilationState.ICompilationTracker.cs (2)
54
Task<
VersionStamp
> GetDependentVersionAsync(SolutionCompilationState compilationState, CancellationToken cancellationToken);
55
Task<
VersionStamp
> GetDependentSemanticVersionAsync(SolutionCompilationState compilationState, CancellationToken cancellationToken);
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (12)
1027
private AsyncLazy<
VersionStamp
>? _lazyDependentVersion;
1028
private AsyncLazy<
VersionStamp
>? _lazyDependentSemanticVersion;
1030
public Task<
VersionStamp
> GetDependentVersionAsync(
1047
private async Task<
VersionStamp
> ComputeDependentVersionAsync(
1051
var
projVersion = projectState.Version;
1052
var
docVersion = await projectState.GetLatestDocumentVersionAsync(cancellationToken).ConfigureAwait(false);
1054
var
version = docVersion.GetNewerVersion(projVersion);
1061
var
dependentProjectVersion = await compilationState.GetDependentVersionAsync(dependentProjectReference.ProjectId, cancellationToken).ConfigureAwait(false);
1069
public Task<
VersionStamp
> GetDependentSemanticVersionAsync(
1086
private async Task<
VersionStamp
> ComputeDependentSemanticVersionAsync(
1090
var
version = await projectState.GetSemanticVersionAsync(cancellationToken).ConfigureAwait(false);
1098
var
dependentProjectVersion = await compilationState.GetDependentSemanticVersionAsync(
Workspace\Solution\SolutionCompilationState.SkeletonReferenceCache.cs (7)
38
/// cref="
VersionStamp
"/> for a project. As long as the <see cref="Project.GetDependentSemanticVersionAsync"/> for
105
/// cref="_skeletonReferenceSet"/> corresponds to. Initially set to <see cref="
VersionStamp
.Default"/>.
107
private
VersionStamp
_version;
146
var
version = await compilationTracker.GetDependentSemanticVersionAsync(
149
Debug.Assert(version !=
VersionStamp
.Default);
161
VersionStamp
version,
164
Debug.Assert(version !=
VersionStamp
.Default);
Workspace\Solution\SolutionCompilationState.WithFrozenSourceGeneratedDocumentsCompilationTracker.cs (2)
153
public Task<
VersionStamp
> GetDependentVersionAsync(SolutionCompilationState compilationState, CancellationToken cancellationToken)
156
public Task<
VersionStamp
> GetDependentSemanticVersionAsync(SolutionCompilationState compilationState, CancellationToken cancellationToken)
Workspace\Solution\SolutionInfo.cs (9)
29
public
VersionStamp
Version => Attributes.Version;
71
VersionStamp
version,
83
VersionStamp
version,
94
VersionStamp
version,
118
internal sealed class SolutionAttributes(SolutionId id,
VersionStamp
version, string? filePath, Guid telemetryId)
130
public
VersionStamp
Version { get; } = version;
143
VersionStamp
? version = null,
147
var
newVersion = version ?? Version;
180
return new SolutionAttributes(solutionId,
VersionStamp
.Create(), filePath, telemetryId);
Workspace\Solution\SolutionState.cs (4)
160
public
VersionStamp
Version => SolutionAttributes.Version;
276
public
VersionStamp
GetLatestProjectVersion()
279
var
latestVersion =
VersionStamp
.Default;
Workspace\Solution\SourceGeneratedDocumentState.cs (4)
91
var textAndVersion = TextAndVersion.Create(generatedSourceText,
VersionStamp
.Create());
108
treeSource = SimpleTreeAndVersionSource.Create(new TreeAndVersion(newTree,
VersionStamp
.Create()));
242
var textAndVersion = TextAndVersion.Create(sourceText,
VersionStamp
.Create());
244
var
newTreeVersion = GetNewTreeVersionForUpdatedTree(newRoot, GetNewerVersion(), PreservationMode.PreserveValue);
Workspace\Solution\TextAndVersion.cs (4)
23
public
VersionStamp
Version { get; }
36
private TextAndVersion(SourceText text,
VersionStamp
version, string? filePath, string? exceptionMessage)
53
public static TextAndVersion Create(SourceText text,
VersionStamp
version, string? filePath = null)
61
internal static TextAndVersion Create(SourceText text,
VersionStamp
version, string? filePath, string? exceptionMessage)
Workspace\Solution\TextDocument.cs (4)
69
public bool TryGetTextVersion(out
VersionStamp
version)
92
public async Task<
VersionStamp
> GetTextVersionAsync(CancellationToken cancellationToken = default)
100
internal
VersionStamp
GetTextVersionSynchronously(CancellationToken cancellationToken)
106
internal ValueTask<
VersionStamp
> GetTopLevelChangeTextVersionAsync(CancellationToken cancellationToken = default)
Workspace\Solution\TextDocumentState.cs (9)
94
public bool TryGetTextVersion(out
VersionStamp
version)
115
public
VersionStamp
GetTextVersionSynchronously(CancellationToken cancellationToken)
121
public async ValueTask<
VersionStamp
> GetTextVersionAsync(CancellationToken cancellationToken)
124
if (TryGetTextVersion(out
var
version))
142
var
newVersion = GetNewerVersion();
159
: CreateStrongText(TextAndVersion.Create(SourceText.From(string.Empty, encoding: null, loadTextOptions.ChecksumAlgorithm),
VersionStamp
.Default, filePath));
202
private
VersionStamp
GetNewerVersion()
209
return
VersionStamp
.Create();
212
public virtual ValueTask<
VersionStamp
> GetTopLevelChangeTextVersionAsync(CancellationToken cancellationToken)
Workspace\Solution\TextLoader.cs (4)
162
VersionStamp
.Default,
186
public static TextLoader From(SourceTextContainer container,
VersionStamp
version, string? filePath = null)
213
private readonly
VersionStamp
_version;
216
internal TextContainerLoader(SourceTextContainer container,
VersionStamp
version, string? filePath)
Workspace\Solution\TreeAndVersion.cs (2)
10
internal sealed class TreeAndVersion(SyntaxTree tree,
VersionStamp
version)
20
public
VersionStamp
Version { get; } = version;
Workspace\Solution\VersionSource\ITextAndVersionSource.cs (2)
29
bool TryGetVersion(LoadTextOptions options, out
VersionStamp
version);
35
ValueTask<
VersionStamp
> GetVersionAsync(LoadTextOptions options, CancellationToken cancellationToken);
Workspace\Solution\VersionSource\LoadableTextAndVersionSource.cs (2)
135
public bool TryGetVersion(LoadTextOptions options, out
VersionStamp
version)
147
public async ValueTask<
VersionStamp
> GetVersionAsync(LoadTextOptions options, CancellationToken cancellationToken)
Workspace\Solution\VersionSource\RecoverableTextAndVersion.cs (4)
69
public bool TryGetVersion(LoadTextOptions options, out
VersionStamp
version)
132
public async ValueTask<
VersionStamp
> GetVersionAsync(LoadTextOptions options, CancellationToken cancellationToken)
141
public readonly
VersionStamp
Version;
207
public bool TryGetTextVersion(LoadTextOptions options, out
VersionStamp
version)
Workspace\Solution\VersionStamp.cs (17)
15
public readonly struct VersionStamp : IEquatable<
VersionStamp
>
17
public static
VersionStamp
Default => default;
68
public static
VersionStamp
Create()
74
public static
VersionStamp
Create(DateTime utcTimeLastModified)
81
public
VersionStamp
GetNewerVersion(
VersionStamp
version)
122
public
VersionStamp
GetNewerVersion()
147
if (obj is
VersionStamp
v)
155
public bool Equals(
VersionStamp
version)
165
public static bool operator ==(
VersionStamp
left,
VersionStamp
right)
168
public static bool operator !=(
VersionStamp
left,
VersionStamp
right)
171
private static int GetGlobalVersion(
VersionStamp
version)
187
var globalVersion = Interlocked.Increment(ref
VersionStamp
.s_globalVersion);
195
internal readonly struct TestAccessor(
VersionStamp
versionStamp)
201
internal bool IsNewerThan(in
VersionStamp
version)
Workspace\Workspace.cs (8)
92
SolutionInfo.Create(SolutionId.CreateNewId(),
VersionStamp
.Create()),
143
=> CreateSolution(SolutionInfo.Create(id,
VersionStamp
.Create()));
2025
project.State.Attributes.With(version:
VersionStamp
.Create()),
2038
=> CreateDocumentInfoWithoutText(doc).WithTextLoader(TextLoader.From(TextAndVersion.Create(doc.GetTextSynchronously(CancellationToken.None),
VersionStamp
.Create(), doc.FilePath)));
2205
this.OnDocumentAdded(info.WithTextLoader(TextLoader.From(TextAndVersion.Create(text,
VersionStamp
.Create()))));
2249
this.OnAdditionalDocumentAdded(info.WithTextLoader(TextLoader.From(TextAndVersion.Create(text,
VersionStamp
.Create()))));
2282
this.OnAnalyzerConfigDocumentAdded(info.WithTextLoader(TextLoader.From(TextAndVersion.Create(text,
VersionStamp
.Create()))));
2304
this.OnAnalyzerConfigDocumentTextLoaderChanged(id, TextLoader.From(TextAndVersion.Create(text,
VersionStamp
.Create())));
Workspace\Workspace_Editor.cs (3)
398
oldDocument.TryGetTextVersion(out
var
version))
486
private static TextAndVersion GetProperTextAndVersion(SourceText oldText, SourceText newText,
VersionStamp
version, string? filePath)
596
var
version = oldDocument.GetTextVersionSynchronously(CancellationToken.None);
Microsoft.CodeAnalysis.Workspaces.MSBuild (3)
MSBuild\MSBuildProjectLoader.Worker.cs (3)
198
var
version = projectPath is null
199
?
VersionStamp
.Default
200
:
VersionStamp
.Create(FileUtilities.GetFileTimeStamp(projectPath));
Microsoft.Gen.BuildMetadata.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
79
.AddSolution(SolutionInfo.Create(SolutionId.CreateNewId(),
VersionStamp
.Create()))
Microsoft.Gen.ComplianceReports.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
79
.AddSolution(SolutionInfo.Create(SolutionId.CreateNewId(),
VersionStamp
.Create()))
Microsoft.Gen.ContextualOptions.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
79
.AddSolution(SolutionInfo.Create(SolutionId.CreateNewId(),
VersionStamp
.Create()))
Microsoft.Gen.Logging.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
79
.AddSolution(SolutionInfo.Create(SolutionId.CreateNewId(),
VersionStamp
.Create()))
Microsoft.Gen.MetadataExtractor.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
79
.AddSolution(SolutionInfo.Create(SolutionId.CreateNewId(),
VersionStamp
.Create()))
Microsoft.Gen.Metrics.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
79
.AddSolution(SolutionInfo.Create(SolutionId.CreateNewId(),
VersionStamp
.Create()))
Microsoft.Gen.MetricsReports.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
79
.AddSolution(SolutionInfo.Create(SolutionId.CreateNewId(),
VersionStamp
.Create()))
Roslyn.Diagnostics.Analyzers (4)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\SemanticModelWorkspaceServiceFactory.SemanticModelWorkspaceService.cs (4)
15
internal readonly struct SemanticModelReuseInfo(SemanticModel previousNonSpeculativeSemanticModel, SemanticModel currentSemanticModel, SyntaxNode bodyNode,
VersionStamp
topLevelSementicVersion)
37
public readonly
VersionStamp
TopLevelSemanticVersion = topLevelSementicVersion;
145
var
topLevelSemanticVersion = await document.Project.GetDependentSemanticVersionAsync(cancellationToken).ConfigureAwait(false);
178
VersionStamp
topLevelSemanticVersion,