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