5 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);
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
PersistentStorage\AbstractPersistentStorageTests.cs (1)
841workspace.AddSolution(SolutionInfo.Create(SolutionId.CreateNewId(), new VersionStamp(), @"D:\git\PCLCrypto\PCLCrypto.sln"));
516 references to VersionStamp
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.CSharp.EditorFeatures.UnitTests (16)
CodeActions\PreviewTests.cs (1)
81solution = solution.AddProject(ProjectInfo.Create(s_addedProjectId, VersionStamp.Create(), AddedProjectName, AddedProjectName, LanguageNames.CSharp));
EditorConfigSettings\Updater\SettingsUpdaterTests.cs (1)
40.AddProject(ProjectInfo.Create(projectId, VersionStamp.Create(), "proj1", "proj1.dll", LanguageNames.CSharp, filePath: "/a/b/proj1.csproj"))
Formatting\RazorLineFormattingOptionsTests.cs (1)
61loader: TextLoader.From(TextAndVersion.Create(sourceText, VersionStamp.Create(), "file.razor.g.cs")),
Workspaces\WorkspaceTests_EditorFeatures.cs (13)
585var newVersion = await cs.GetProject(project1.Id).GetDependentSemanticVersionAsync(); 586var newVersionX = await doc1Z.Project.GetDependentSemanticVersionAsync(); 587Assert.NotEqual(VersionStamp.Default, newVersion); 1121var oldVersion = await project.GetSemanticVersionAsync(); 1154var oldVersion = await project.GetSemanticVersionAsync(); 1452Assert.Throws<ArgumentException>(() => VersionStamp.Create(DateTime.Now)); 1458var version1 = VersionStamp.Create(default); 1459var version2 = VersionStamp.Create(default); 1461var version3 = version1.GetNewerVersion(version2); 1464var version4 = version1.GetNewerVersion(); 1465var version5 = version4.GetNewerVersion(version3);
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (2)
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (2)
44AddProject(ProjectInfo.Create(projectId, VersionStamp.Create(), "proj", "proj", LanguageNames.CSharp)).GetProject(projectId). 464AddProject(ProjectInfo.Create(projectId, VersionStamp.Create(), "proj", "proj", LanguageNames.CSharp)).GetProject(projectId).
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (5)
CodeGeneration\AddAttributesTests.cs (1)
30VersionStamp.Default,
CodeGeneration\AddImportsTests.cs (2)
34VersionStamp.Default, 780VersionStamp.Default,
CodeGeneration\SymbolEditorTests.cs (2)
40loader: TextLoader.From(TextAndVersion.Create(SourceText.From(s, encoding: null, SourceHashAlgorithms.Default), VersionStamp.Default)))).ToList(); 42var proj = ProjectInfo.Create(pid, VersionStamp.Default, "test", "test.dll", LanguageNames.CSharp, documents: docs,
Microsoft.CodeAnalysis.EditorFeatures (4)
Classification\Semantic\AbstractSemanticOrEmbeddedClassificationViewTaggerProvider.cs (3)
144VersionStamp currentSemanticVersion, 156var (lastSemanticVersion, lastTextImageVersion) = ((VersionStamp, ITextImageVersion))context.State; 222VersionStamp currentSemanticVersion,
Interactive\InteractiveSession.cs (1)
309version: VersionStamp.Create(),
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (4)
Rename\RenamerTests.cs (4)
44var projectInfo = ProjectInfo.Create(projectId, VersionStamp.Create(), "ProjectName", "AssemblyName", LanguageName, filePath: ""); 179var projectInfo = ProjectInfo.Create(projectId, VersionStamp.Create(), "ProjectName", "AssemblyName", LanguageName, filePath: ""); 218var projectInfo = ProjectInfo.Create(projectId, VersionStamp.Create(), "ProjectName", "AssemblyName", LanguageName, filePath: ""); 229loader: TextLoader.From(TextAndVersion.Create(startSourceText, VersionStamp.Create(), documentName)),
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (8)
Diagnostics\DiagnosticAnalyzerServiceTests.cs (7)
155VersionStamp.Create(), 248VersionStamp.Create(), 256loader: TextLoader.From(TextAndVersion.Create(SourceText.From("class A {}"), VersionStamp.Create(), filePath: "test.cs")), 324VersionStamp.Create(), 333loader: TextLoader.From(TextAndVersion.Create(SourceText.From("class A {}"), VersionStamp.Create(), filePath: "test.cs")), 364var projectInfo = ProjectInfo.Create(ProjectId.CreateNewId(), VersionStamp.Create(), "CSharpProject", "CSharpProject", LanguageNames.CSharp); 820VersionStamp.Create(),
SymbolFinder\SymbolFinderTests.cs (1)
35VersionStamp.Default,
Microsoft.CodeAnalysis.Features (30)
CodeLens\CodeLensReferencesService.cs (2)
84public async ValueTask<VersionStamp> GetProjectCodeLensVersionAsync(Solution solution, ProjectId projectId, CancellationToken cancellationToken) 91var projectVersion = await GetProjectCodeLensVersionAsync(solution, documentId.ProjectId, cancellationToken).ConfigureAwait(false);
CodeLens\ICodeLensReferencesService.cs (1)
14ValueTask<VersionStamp> GetProjectCodeLensVersionAsync(Solution solution, ProjectId projectId, CancellationToken cancellationToken);
DesignerAttribute\DesignerAttributeDiscoveryService.cs (5)
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);
Diagnostics\DiagnosticAnalyzerExtensions.cs (4)
29public static (string analyzerId, VersionStamp version) GetAnalyzerIdAndVersion(this DiagnosticAnalyzer analyzer) 37private static VersionStamp GetAnalyzerVersion(string path) 41return VersionStamp.Default; 44return VersionStamp.Create(File.GetLastWriteTimeUtc(path));
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer.IncrementalMemberEditAnalyzer.cs (2)
51VersionStamp version, 86if (oldDocumentVersion == VersionStamp.Default)
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer.IncrementalMemberEditAnalyzer_MemberSpans.cs (4)
24private readonly record struct MemberSpans(DocumentId DocumentId, VersionStamp Version, ImmutableArray<TextSpan> Spans); 29private async Task<ImmutableArray<TextSpan>> GetOrCreateMemberSpansAsync(Document document, VersionStamp version, CancellationToken cancellationToken) 46static async Task<ImmutableArray<TextSpan>> CreateMemberSpansAsync(Document document, VersionStamp version, CancellationToken cancellationToken) 59private void SaveMemberSpans(DocumentId documentId, VersionStamp version, ImmutableArray<TextSpan> memberSpans)
EditAndContinue\CommittedSolution.cs (1)
248var 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\MetadataAsSourceGeneratedFileInfo.cs (2)
79loader: TextLoader.From(assemblyInfoSourceText.Container, VersionStamp.Default), 96version: VersionStamp.Default,
PdbSourceDocument\PdbSourceDocumentLoaderService.cs (1)
200var textAndVersion = TextAndVersion.Create(sourceText, VersionStamp.Default, filePath);
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (1)
326version: 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)
67version: VersionStamp.Create(),
Microsoft.CodeAnalysis.Features.Test.Utilities (3)
EditAndContinue\EditAndContinueTestVerifier.cs (1)
461version: VersionStamp.Create(),
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (1)
412loader: TextLoader.From(TextAndVersion.Create(sourceText, VersionStamp.Create(), path)),
EditAndContinue\Extensions.cs (1)
105VersionStamp.Create(),
Microsoft.CodeAnalysis.Features.UnitTests (3)
EditAndContinue\CompileTimeSolutionProviderTests.cs (2)
42AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj", "proj", LanguageNames.CSharp, filePath: projectFilePath)). 112.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj", "proj", LanguageNames.CSharp))
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (1)
356loader: TextLoader.From(TextAndVersion.Create(sourceText, VersionStamp.Create(), "design-time-only.cs")),
Microsoft.CodeAnalysis.LanguageServer.Protocol (11)
Handler\CodeLens\CodeLensHandler.cs (1)
90var syntaxVersion = await document.GetSyntaxVersionAsync(cancellationToken).ConfigureAwait(false);
Handler\CodeLens\CodeLensResolveHandler.cs (1)
39var currentDocumentSyntaxVersion = await document.GetSyntaxVersionAsync(cancellationToken).ConfigureAwait(false);
Handler\Diagnostics\DiagnosticsPullCache.cs (3)
25/// changed. The <see cref="VersionStamp"/> is produced by <see 32: VersionedPullCache<(int globalStateVersion, VersionStamp? dependentVersion), (int globalStateVersion, Checksum dependentChecksum), DiagnosticsRequestState, ImmutableArray<DiagnosticData>>(uniqueKey) 36public override async Task<(int globalStateVersion, VersionStamp? dependentVersion)> ComputeCheapVersionAsync(DiagnosticsRequestState state, CancellationToken cancellationToken)
Handler\InlayHint\InlayHintHandler.cs (1)
54var syntaxVersion = await document.GetSyntaxVersionAsync(cancellationToken).ConfigureAwait(false);
Handler\InlayHint\InlayHintResolveHandler.cs (1)
49var currentSyntaxVersion = await document.GetSyntaxVersionAsync(cancellationToken).ConfigureAwait(false);
Handler\SourceGenerators\SourceGeneratedDocumentCache.cs (3)
17internal sealed class SourceGeneratedDocumentCache(string uniqueKey) : VersionedPullCache<(SourceGeneratorExecutionVersion, VersionStamp), object?, SourceGeneratedDocumentGetTextState, SourceText?>(uniqueKey), ILspService 19public override async Task<(SourceGeneratorExecutionVersion, VersionStamp)> ComputeCheapVersionAsync(SourceGeneratedDocumentGetTextState state, CancellationToken cancellationToken) 24var dependentVersion = await state.Document.Project.GetDependentVersionAsync(cancellationToken).ConfigureAwait(false);
Workspaces\SourceTextLoader.cs (1)
27=> Task.FromResult(TextAndVersion.Create(_sourceText, VersionStamp.Create(), _fileUri));
Microsoft.CodeAnalysis.VisualBasic.Features.UnitTests (1)
EditAndContinue\VisualBasicEditAndContinueAnalyzerTests.vb (1)
29AddProject(ProjectInfo.Create(pid, VersionStamp.Create(), "proj", "proj", LanguageNames.VisualBasic)).GetProject(pid).
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (1)
CodeGeneration\AddImportsTests.vb (1)
35VersionStamp.Default,
Microsoft.CodeAnalysis.Workspaces (186)
FindSymbols\SymbolTree\SymbolTreeInfoCacheService.cs (2)
30private readonly ConcurrentDictionary<ProjectId, (VersionStamp semanticVersion, SymbolTreeInfo info)> _projectIdToInfo = []; 166var semanticVersion = await project.GetSemanticVersionAsync(cancellationToken).ConfigureAwait(false);
SemanticModelReuse\SemanticModelWorkspaceServiceFactory.SemanticModelWorkspaceService.cs (2)
15internal readonly struct SemanticModelReuseInfo(SemanticModel previousNonSpeculativeSemanticModel, SemanticModel currentSemanticModel, SyntaxNode bodyNode, VersionStamp topLevelSementicVersion) 37public readonly VersionStamp TopLevelSemanticVersion = topLevelSementicVersion;
Serialization\SerializableSourceText.cs (2)
218private readonly VersionStamp _version = VersionStamp.Create();
Workspace\AdhocWorkspace.cs (2)
65var info = ProjectInfo.Create(ProjectId.CreateNewId(), VersionStamp.Create(), name, name, language); 126var loader = TextLoader.From(TextAndVersion.Create(text, VersionStamp.Create()));
Workspace\CommandLineProject.cs (1)
120version: VersionStamp.Create(),
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (1)
644=> Task.FromResult(TextAndVersion.Create(_textContainer.CurrentText, VersionStamp.Create(), _filePath));
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (5)
116var versionStamp = creationInfo.FilePath != null 117? VersionStamp.Create(File.GetLastWriteTimeUtc(creationInfo.FilePath)) 118: VersionStamp.Create(); 151VersionStamp.Create(), 462VersionStamp.Create(),
Workspace\Solution\ConstantTextAndVersionSource.cs (2)
39public bool TryGetVersion(LoadTextOptions options, out VersionStamp version) 45public 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 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)
549public VersionStamp Version => State.Version; 554public Task<VersionStamp> GetLatestDocumentVersionAsync(CancellationToken cancellationToken = default) 560public Task<VersionStamp> GetDependentVersionAsync(CancellationToken cancellationToken = default) 567public Task<VersionStamp> GetDependentSemanticVersionAsync(CancellationToken cancellationToken = default) 574public Task<VersionStamp> GetSemanticVersionAsync(CancellationToken cancellationToken = default)
Workspace\Solution\ProjectInfo.cs (8)
31public VersionStamp Version => Attributes.Version; 186VersionStamp version, 214VersionStamp version, 337public ProjectInfo WithVersion(VersionStamp version) 413VersionStamp version, 442public VersionStamp Version { get; } = version; 534VersionStamp? version = null, 651VersionStamp.Create(),
Workspace\Solution\ProjectState.cs (29)
47private readonly AsyncLazy<VersionStamp> _lazyLatestDocumentVersion; 48private readonly AsyncLazy<VersionStamp> _lazyLatestDocumentTopLevelChangeVersion; 73AsyncLazy<VersionStamp> lazyLatestDocumentVersion, 74AsyncLazy<VersionStamp> lazyLatestDocumentTopLevelChangeVersion, 223private static async ValueTask<VersionStamp> ComputeLatestDocumentVersionAsync(TextDocumentStates<DocumentState> documentStates, TextDocumentStates<AdditionalDocumentState> additionalDocumentStates, CancellationToken cancellationToken) 226var latestVersion = VersionStamp.Default; 233var version = await state.GetTextVersionAsync(cancellationToken).ConfigureAwait(false); 242var version = await state.GetTextVersionAsync(cancellationToken).ConfigureAwait(false); 249private AsyncLazy<VersionStamp> CreateLazyLatestDocumentTopLevelChangeVersion( 254if (_lazyLatestDocumentTopLevelChangeVersion.TryGetValue(out var oldVersion)) 268private static async Task<VersionStamp> ComputeTopLevelChangeTextVersionAsync( 269VersionStamp oldVersion, ImmutableArray<TextDocumentState> newDocuments, CancellationToken cancellationToken) 271var finalVersion = oldVersion; 274var newVersion = await newDocument.GetTopLevelChangeTextVersionAsync(cancellationToken).ConfigureAwait(false); 281private static async Task<VersionStamp> ComputeLatestDocumentTopLevelChangeVersionAsync(TextDocumentStates<DocumentState> documentStates, TextDocumentStates<AdditionalDocumentState> additionalDocumentStates, CancellationToken cancellationToken) 284var latestVersion = VersionStamp.Default; 289var version = await state.GetTopLevelChangeTextVersionAsync(cancellationToken).ConfigureAwait(false); 297var version = await state.GetTopLevelChangeTextVersionAsync(cancellationToken).ConfigureAwait(false); 618public Task<VersionStamp> GetLatestDocumentVersionAsync(CancellationToken cancellationToken) 621public async Task<VersionStamp> GetSemanticVersionAsync(CancellationToken cancellationToken = default) 674public VersionStamp Version => this.ProjectInfo.Version; 711AsyncLazy<VersionStamp>? latestDocumentVersion = null, 712AsyncLazy<VersionStamp>? latestDocumentTopLevelChangeVersion = null, 1063out AsyncLazy<VersionStamp> dependentDocumentVersion, 1064out AsyncLazy<VersionStamp> dependentSemanticVersion) 1077if (oldDocument.TryGetTextVersion(out var oldVersion)) 1102var finalVersion = await newDocuments[0].GetTextVersionAsync(cancellationToken).ConfigureAwait(false);
Workspace\Solution\Solution.cs (6)
115public VersionStamp Version => this.SolutionState.Version; 138public VersionStamp GetLatestProjectVersion() => this.SolutionState.GetLatestProjectVersion(); 368=> this.AddProject(ProjectInfo.Create(projectId, VersionStamp.Create(), name, assemblyName, language)); 1001loader: TextLoader.From(TextAndVersion.Create(text, VersionStamp.Create(), name)), 1114var version = VersionStamp.Create();
Workspace\Solution\SolutionCompilationState.cs (2)
1173public Task<VersionStamp> GetDependentVersionAsync(ProjectId projectId, CancellationToken cancellationToken) 1176public 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 (6)
1018private AsyncLazy<VersionStamp>? _lazyDependentVersion; 1019private AsyncLazy<VersionStamp>? _lazyDependentSemanticVersion; 1021public Task<VersionStamp> GetDependentVersionAsync( 1038private async Task<VersionStamp> ComputeDependentVersionAsync( 1060public Task<VersionStamp> GetDependentSemanticVersionAsync( 1077private async Task<VersionStamp> ComputeDependentSemanticVersionAsync(
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)
152public Task<VersionStamp> GetDependentVersionAsync(SolutionCompilationState compilationState, CancellationToken cancellationToken) 155public Task<VersionStamp> GetDependentSemanticVersionAsync(SolutionCompilationState compilationState, CancellationToken cancellationToken)
Workspace\Solution\SolutionInfo.cs (8)
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, 180return new SolutionAttributes(solutionId, VersionStamp.Create(), filePath, telemetryId);
Workspace\Solution\SolutionState.cs (4)
150public VersionStamp Version => SolutionAttributes.Version; 260public VersionStamp GetLatestProjectVersion() 263var 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) 120public VersionStamp GetTextVersionSynchronously(CancellationToken cancellationToken) 126public async ValueTask<VersionStamp> GetTextVersionAsync(CancellationToken cancellationToken) 129if (TryGetTextVersion(out var version)) 147var newVersion = GetNewerVersion(); 164: CreateStrongText(TextAndVersion.Create(SourceText.From(string.Empty, encoding: null, loadTextOptions.ChecksumAlgorithm), VersionStamp.Default, filePath)); 207private VersionStamp GetNewerVersion() 214return VersionStamp.Create(); 217public 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\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())); 2056project.State.Attributes.With(version: VersionStamp.Create()), 2069=> CreateDocumentInfoWithoutText(doc).WithTextLoader(TextLoader.From(TextAndVersion.Create(doc.GetTextSynchronously(CancellationToken.None), VersionStamp.Create(), doc.FilePath))); 2236this.OnDocumentAdded(info.WithTextLoader(TextLoader.From(TextAndVersion.Create(text, VersionStamp.Create())))); 2280this.OnAdditionalDocumentAdded(info.WithTextLoader(TextLoader.From(TextAndVersion.Create(text, VersionStamp.Create())))); 2313this.OnAnalyzerConfigDocumentAdded(info.WithTextLoader(TextLoader.From(TextAndVersion.Create(text, VersionStamp.Create())))); 2335this.OnAnalyzerConfigDocumentTextLoaderChanged(id, TextLoader.From(TextAndVersion.Create(text, VersionStamp.Create())));
Workspace\Workspace_Editor.cs (3)
397oldDocument.TryGetTextVersion(out var version)) 485private static TextAndVersion GetProperTextAndVersion(SourceText oldText, SourceText newText, VersionStamp version, string? filePath) 595var version = oldDocument.GetTextVersionSynchronously(CancellationToken.None);
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
MSBuild\MSBuildProjectLoader.Worker.cs (2)
285? VersionStamp.Default 286: VersionStamp.Create(FileUtilities.GetFileTimeStamp(projectPath));
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (8)
VisualStudioMSBuildWorkspaceTests.cs (8)
395var sversion = solution.Version; 396var latestPV = solution.GetLatestProjectVersion(); 398var pversion = project.Version; 400var dversion = await document.GetTextVersionAsync(); 401var latestDV = await project.GetLatestDocumentVersionAsync(); 406var dversion1 = await document1.GetTextVersionAsync(); 411var latestDV1 = await document1.Project.GetLatestDocumentVersionAsync(); 419var dversion2 = await document2.GetTextVersionAsync();
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (9)
SolutionUtilities.cs (1)
111VersionStamp.Default,
TestTextLoader.cs (1)
18_textAndVersion = TextAndVersion.Create(SourceText.From(text, encoding: null, checksumAlgorithm), VersionStamp.Create());
Workspaces\TestHostDocument.cs (1)
189=> Task.FromResult(TextAndVersion.Create(SourceText.From(_text, encoding: null, options.ChecksumAlgorithm), VersionStamp.Create(), _hostDocument.FilePath));
Workspaces\TestHostProject`1.cs (3)
77public VersionStamp Version { get; } 119Version = VersionStamp.Create(); 155Version = VersionStamp.Create();
Workspaces\TestHostSolution`1.cs (2)
15public readonly VersionStamp Version; 22this.Version = VersionStamp.Create();
Workspaces\TestWorkspace`1.cs (1)
78SetCurrentSolutionEx(CreateSolution(SolutionInfo.Create(SolutionId.CreateNewId(), VersionStamp.Create()).WithTelemetryId(solutionTelemetryId)));
Microsoft.CodeAnalysis.Workspaces.UnitTests (165)
FindReferencesTests.cs (2)
34VersionStamp.Default, 50VersionStamp.Default,
LinkedFileDiffMerging\LinkedFileDiffMergingTests.cs (1)
30var projectInfo = ProjectInfo.Create(projectId, VersionStamp.Create(), "ProjectName" + i, "AssemblyName" + i, languageName);
SolutionTests\ProjectDependencyGraphTests.cs (2)
246var projectAInfo = ProjectInfo.Create(projectAId, VersionStamp.Create(), "A", "A", LanguageNames.CSharp, 713return solution.AddProject(ProjectInfo.Create(projectId, VersionStamp.Create(), projectName, projectName, LanguageNames.CSharp, projectName));
SolutionTests\ProjectInfoTests.cs (28)
24Assert.Throws<ArgumentNullException>(() => ProjectInfo.Create(id: null, version: VersionStamp.Default, name: "Goo", assemblyName: "Bar", language: "C#")); 25Assert.Throws<ArgumentNullException>(() => ProjectInfo.Create(pid, VersionStamp.Default, name: null, assemblyName: "Bar", language: "C#")); 26Assert.Throws<ArgumentNullException>(() => ProjectInfo.Create(pid, VersionStamp.Default, name: "Goo", assemblyName: null, language: "C#")); 27Assert.Throws<ArgumentNullException>(() => ProjectInfo.Create(pid, VersionStamp.Default, name: "Goo", assemblyName: "Bar", language: null)); 29Assert.Throws<ArgumentNullException>(() => ProjectInfo.Create(pid, VersionStamp.Default, name: "Goo", assemblyName: "Bar", language: "C#", 40() => ProjectInfo.Create(pid, VersionStamp.Default, "proj", "assembly", "C#", documents: [documentInfo, documentInfo])); 42Assert.Throws<ArgumentNullException>(() => ProjectInfo.Create(pid, VersionStamp.Default, name: "Goo", assemblyName: "Bar", language: "C#", 46() => ProjectInfo.Create(pid, VersionStamp.Default, "proj", "assembly", "C#", additionalDocuments: [documentInfo, documentInfo])); 48Assert.Throws<ArgumentNullException>(() => ProjectInfo.Create(pid, VersionStamp.Default, name: "Goo", assemblyName: "Bar", language: "C#", 53() => ProjectInfo.Create(pid, VersionStamp.Default, "proj", "assembly", "C#", projectReferences: [projectReference, projectReference])); 55Assert.Throws<ArgumentNullException>("analyzerReferences[0]", () => ProjectInfo.Create(pid, VersionStamp.Default, name: "Goo", assemblyName: "Bar", language: "C#", 60() => ProjectInfo.Create(pid, VersionStamp.Default, "proj", "assembly", "C#", analyzerReferences: [analyzerReference, analyzerReference])); 62Assert.Throws<ArgumentNullException>(() => ProjectInfo.Create(pid, VersionStamp.Default, name: "Goo", assemblyName: "Bar", language: "C#", 67() => ProjectInfo.Create(pid, VersionStamp.Default, "proj", "assembly", "C#", metadataReferences: [metadataReference, metadataReference])); 73var version = VersionStamp.Default; 92var version = VersionStamp.Default; 111var version = VersionStamp.Default; 130var version = VersionStamp.Default; 149var version = VersionStamp.Default; 168var projectInfo = ProjectInfo.Create(name: "Goo", filePath: @"C:\", id: ProjectId.CreateNewId(), version: VersionStamp.Default, assemblyName: "Bar", language: "C#"); 175var projectInfo = ProjectInfo.Create(name: "Goo", id: ProjectId.CreateNewId(), version: VersionStamp.Default, assemblyName: "Bar", language: "C#"); 184var instance = ProjectInfo.Create(name: "Name", id: ProjectId.CreateNewId(), version: VersionStamp.Default, assemblyName: "AssemblyName", language: "C#"); 187SolutionTestHelpers.TestProperty(instance, (old, value) => old.WithVersion(value), opt => opt.Version, VersionStamp.Create());
SolutionTests\SolutionInfoTests.cs (5)
20var version = VersionStamp.Default; 31var version = VersionStamp.Default; 53var info = SolutionInfo.Create(SolutionId.CreateNewId(), VersionStamp.Default, filePath: path);
SolutionTests\SolutionTests.cs (88)
57.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj1", "proj1", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj1.dll"))) 372var textAndVersion = TextAndVersion.Create(SourceText.From("new text"), VersionStamp.Default); 376Assert.True(newSolution1.GetDocument(documentId)!.TryGetTextVersion(out var actualVersion)); 450var textAndVersion = TextAndVersion.Create(text, VersionStamp.Create()); 538var textAndVersion = TextAndVersion.Create(text, VersionStamp.Create()); 621var textAndVersion = TextAndVersion.Create(text, VersionStamp.Create()); 704var textAndVersion = TextAndVersion.Create(text, VersionStamp.Create()); 780var textAndVersion = TextAndVersion.Create(text, VersionStamp.Create()); 867var textAndVersion = TextAndVersion.Create(text, VersionStamp.Create()); 940var textAndVersion = TextAndVersion.Create(SourceText.From("new text"), VersionStamp.Default); 944Assert.True(newSolution1.GetAdditionalDocument(documentId)!.TryGetTextVersion(out var actualVersion)); 986var textAndVersion = TextAndVersion.Create(SourceText.From("new text"), VersionStamp.Default); 990Assert.True(newSolution1.GetAnalyzerConfigDocument(documentId)!.TryGetTextVersion(out var actualVersion)); 1089.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj1", "proj1", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj1.dll"))) 1090.AddProject(ProjectInfo.Create(projectId2, VersionStamp.Default, "proj2", "proj2", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj2.dll"))) 1106loader: TextLoader.From(TextAndVersion.Create(SourceText.From("class NewD1;", Encoding.UTF32, SourceHashAlgorithm.Sha256), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD1.cs"))), 1115loader: TextLoader.From(TextAndVersion.Create(SourceText.From("class NewD3;", Encoding.UTF8, SourceHashAlgorithms.Default), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD3.cs"))), 1125loader: TextLoader.From(TextAndVersion.Create(SourceText.From("new text1", Encoding.UTF32, SourceHashAlgorithm.Sha256), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD1.cs"))), 1134loader: TextLoader.From(TextAndVersion.Create(SourceText.From("new text3", Encoding.UTF8, SourceHashAlgorithms.Default), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD3.cs"))), 1144loader: TextLoader.From(TextAndVersion.Create(SourceText.From("#new empty1", Encoding.UTF32, SourceHashAlgorithm.Sha256), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD1.cs"))), 1153loader: TextLoader.From(TextAndVersion.Create(SourceText.From("#new empty3", Encoding.UTF8, SourceHashAlgorithms.Default), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD3.cs"))), 1166VersionStamp.Create(), 1298.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj1", "proj1", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj1.dll"))); 1305VersionStamp.Create(), 1333.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj1", "proj1", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj1.dll"))); 1340VersionStamp.Create(), 1368.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj1", "proj1", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj1.dll"))); 1375VersionStamp.Create(), 1403.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj1", "proj1", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj1.dll"))); 1410VersionStamp.Create(), 2046.AddProject(ProjectInfo.Create(submissionId1, VersionStamp.Default, name: "submission1", assemblyName: "submission1.dll", LanguageNames.CSharp, isSubmission: true)) 2047.AddProject(ProjectInfo.Create(submissionId2, VersionStamp.Default, name: "submission2", assemblyName: "submission2.dll", LanguageNames.CSharp, isSubmission: true)) 2048.AddProject(ProjectInfo.Create(submissionId3, VersionStamp.Default, name: "submission3", assemblyName: "submission3.dll", LanguageNames.CSharp, isSubmission: true)) 2821.AddProject(ProjectInfo.Create(pm1, VersionStamp.Create(), "goo", "goo.dll", LanguageNames.CSharp, compilationOptions: workspace.Services 4027VersionStamp.Create(), 4039VersionStamp.Create(), 4059VersionStamp.Create(), 4069VersionStamp.Create(), 4232VersionStamp.Create(), 4245VersionStamp.Create(), 4582VersionStamp GetVersion() => solution.GetProject(pid).Version; 4611var oldVersion = GetVersion(); 4615var newVersion = GetVersion(); 4640var newSameVersion = GetVersion(); 4704loader: TextLoader.From(TextAndVersion.Create(SourceText.From("[*.*]\r\n\r\ndotnet_diagnostic.CA1234.severity = error"), VersionStamp.Default))))); 4737loader: TextLoader.From(TextAndVersion.Create(SourceText.From("[*.*]\r\n\r\ndotnet_diagnostic.CA1234.severity = error"), VersionStamp.Default))))); 4778loader: TextLoader.From(TextAndVersion.Create(SourceText.From("[*.*]\r\n\r\ndotnet_diagnostic.CA1234.severity = error"), VersionStamp.Default))))); 4790TextLoader.From(TextAndVersion.Create(SourceText.From("[*.*]\r\n\r\ndotnet_diagnostic.CA6789.severity = error"), VersionStamp.Default)), 4826loader: TextLoader.From(TextAndVersion.Create(SourceText.From("is_global = true\r\n\r\ndotnet_diagnostic.CA1234.severity = error"), VersionStamp.Default))))); 4872loader: TextLoader.From(TextAndVersion.Create(SourceText.From("[*.*]\r\n\r\ngenerated_code = true"), VersionStamp.Default))))); 4958ProjectInfo.Create(projectId, VersionStamp.Default, "Test", "Test", LanguageNames.CSharp) 4980projects.Add(ProjectInfo.Create(projectId1, VersionStamp.Default, "Test1", "Test1", LanguageNames.CSharp)); 4981projects.Add(ProjectInfo.Create(projectId2, VersionStamp.Default, "Test2", "Test2", LanguageNames.CSharp)); 5004projects.Add(ProjectInfo.Create(projectId1, VersionStamp.Default, "Test1", "Test1", LanguageNames.CSharp, projectReferences: [new ProjectReference(projectId2)])); 5005projects.Add(ProjectInfo.Create(projectId2, VersionStamp.Default, "Test2", "Test2", LanguageNames.CSharp)); 5032projects.Add(ProjectInfo.Create(projectId1, VersionStamp.Default, "Test1", "Test1", LanguageNames.CSharp)); 5033projects.Add(ProjectInfo.Create(projectId2, VersionStamp.Default, "Test2", "Test2", LanguageNames.CSharp, projectReferences: [new ProjectReference(projectId1)])); 5058solution = solution.AddProject(ProjectInfo.Create(projectId1, VersionStamp.Default, "Test1", "Test1", LanguageNames.CSharp)); 5063projects.Add(ProjectInfo.Create(projectId2, VersionStamp.Default, "Test2", "Test2", LanguageNames.CSharp)); 5064projects.Add(ProjectInfo.Create(projectId3, VersionStamp.Default, "Test3", "Test3", LanguageNames.CSharp)); 5088solution = solution.AddProject(ProjectInfo.Create(projectId1, VersionStamp.Default, "Test1", "Test1", LanguageNames.CSharp, projectReferences: [new ProjectReference(projectId2)])); 5094projects.Add(ProjectInfo.Create(projectId2, VersionStamp.Default, "Test2", "Test2", LanguageNames.CSharp)); 5095projects.Add(ProjectInfo.Create(projectId3, VersionStamp.Default, "Test3", "Test3", LanguageNames.CSharp)); 5119solution = solution.AddProject(ProjectInfo.Create(projectId1, VersionStamp.Default, "Test1", "Test1", LanguageNames.CSharp, 5126projects.Add(ProjectInfo.Create(projectId2, VersionStamp.Default, "Test2", "Test2", LanguageNames.CSharp)); 5127projects.Add(ProjectInfo.Create(projectId3, VersionStamp.Default, "Test3", "Test3", LanguageNames.CSharp)); 5157projects.Add(ProjectInfo.Create(projectId1, VersionStamp.Default, "Test2", "Test2", LanguageNames.CSharp)); 5158projects.Add(ProjectInfo.Create(projectId1, VersionStamp.Default, "Test3", "Test3", LanguageNames.CSharp)); 5176projects.Add(ProjectInfo.Create(projectId1, VersionStamp.Default, "Test1", "Test1", LanguageNames.CSharp, 5178projects.Add(ProjectInfo.Create(projectId2, VersionStamp.Default, "Test2", "Test2", LanguageNames.CSharp)); 5179projects.Add(ProjectInfo.Create(projectId3, VersionStamp.Default, "Test3", "Test3", LanguageNames.CSharp)); 5222projects.Add(ProjectInfo.Create(projectId1, VersionStamp.Default, "Test1", "Test1", LanguageNames.CSharp)); 5223projects.Add(ProjectInfo.Create(projectId2, VersionStamp.Default, "Test2", "Test2", LanguageNames.CSharp)); 5224projects.Add(ProjectInfo.Create(projectId3, VersionStamp.Default, "Test3", "Test3", LanguageNames.CSharp)); 5265projects.Add(ProjectInfo.Create(projectId1, VersionStamp.Default, "Test2", "Test2", LanguageNames.CSharp)); 5266projects.Add(ProjectInfo.Create(projectId2, VersionStamp.Default, "Test3", "Test3", LanguageNames.CSharp)); 5288ProjectInfo.Create(csProjectId, VersionStamp.Default, "CS1", "CS1", LanguageNames.CSharp), 5289ProjectInfo.Create(vbProjectId, VersionStamp.Default, "VB1", "VB1", LanguageNames.VisualBasic) 5341VersionStamp.Create(), 5355VersionStamp.Create(), 5368VersionStamp.Create(), 5382VersionStamp.Create(), 5396VersionStamp.Create(), 5406VersionStamp.Create(), 5455var version = VersionStamp.Create(); 5459version: VersionStamp.Default, 5540VersionStamp.Default,
SolutionTests\TextLoaderTests.cs (3)
82public static readonly TextAndVersion Value = TextAndVersion.Create(SourceText.From(""), VersionStamp.Default); 91public static new readonly TextAndVersion Value = TextAndVersion.Create(SourceText.From(""), VersionStamp.Default); 100public static readonly TextAndVersion Value = TextAndVersion.Create(SourceText.From(""), VersionStamp.Default);
SolutionTests\TryApplyChangesTests.cs (1)
39OnProjectAdded(ProjectInfo.Create(ProjectId.CreateNewId(), VersionStamp.Default, "TestProject", "TestProject", LanguageNames.CSharp));
WorkspaceTests\AdhocWorkspaceTests.cs (25)
30version: VersionStamp.Default, 85version: VersionStamp.Default, 90var sinfo = SolutionInfo.Create(SolutionId.CreateNewId(), VersionStamp.Default, projects: [pinfo]); 112version: VersionStamp.Default, 120version: VersionStamp.Default, 155loader: TextLoader.From(TextAndVersion.Create(SourceText.From(""), VersionStamp.Create()))); 159VersionStamp.Create(), 190version: VersionStamp.Default, 214var version = VersionStamp.Create(); 218version: VersionStamp.Default, 233Assert.True(doc.TryGetTextVersion(out var currentVersion)); 248var version = VersionStamp.Create(); 252version: VersionStamp.Default, 267Assert.True(doc.TryGetTextVersion(out var currentVersion)); 282var version = VersionStamp.Create(); 291version: VersionStamp.Default, 306Assert.True(doc.TryGetTextVersion(out var currentVersion)); 321var version = VersionStamp.Create(); 325version: VersionStamp.Default, 335Assert.False(doc.TryGetTextVersion(out var currentVersion)); 357var actualVersion = await newDoc.GetTextVersionAsync();
WorkspaceTests\WorkspaceReferenceTests.cs (8)
22VersionStamp.Create(), 51VersionStamp.Create(), 61VersionStamp.Create(), 91VersionStamp.Create(), 101VersionStamp.Create(), 131VersionStamp.Create(), 141VersionStamp.Create(), 175VersionStamp.Create(),
WorkspaceTests\WorkspaceTests.cs (2)
129var info = ProjectInfo.Create(ProjectId.CreateNewId(), VersionStamp.Create(), name, name, language); 165var loader = TextLoader.From(TextAndVersion.Create(text, 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()))
Microsoft.VisualStudio.LanguageServices (5)
CodeLens\RemoteCodeLensReferencesService.cs (1)
35public ValueTask<VersionStamp> GetProjectCodeLensVersionAsync(Solution solution, ProjectId projectId, CancellationToken cancellationToken)
ExternalAccess\VSTypeScript\Api\VSTypeScriptContainedLanguageWrapper.cs (1)
74workspace.OnProjectAdded(ProjectInfo.Create(projectId, VersionStamp.Default, filePath, string.Empty, InternalLanguageNames.TypeScript));
Library\ObjectBrowser\AbstractObjectBrowserLibraryManager.cs (2)
119if (oldDocument.TryGetTextVersion(out var oldTextVersion) 120&& newDocument.TryGetTextVersion(out var newTextVersion)
Preview\PreviewUpdater.PreviewDialogWorkspace.cs (1)
54=> TextAndVersion.Create(_text, VersionStamp.Create());
Microsoft.VisualStudio.LanguageServices.CodeLens (1)
ReferenceCodeLensProvider.cs (1)
132var versionedPoints = _dataPoints.GetOrAdd(dataPoint.Descriptor.ProjectGuid, _ => (version: VersionStamp.Default.ToString(), dataPoints: []));
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (7)
EditorConfigSettings\DataProvider\DataProviderTests.cs (1)
30.AddProject(ProjectInfo.Create(projectId, VersionStamp.Create(), "proj1", "proj1.dll", LanguageNames.CSharp, filePath: projectFilePath))
PersistentStorage\AbstractPersistentStorageTests.cs (2)
980var info = SolutionInfo.Create(SolutionId.CreateNewId(), VersionStamp.Create(), solutionFile.Path); 988solution = solution.AddProject(ProjectInfo.Create(ProjectId.CreateNewId(), VersionStamp.Create(), "Project1", "Project1", LanguageNames.CSharp,
ProjectSystemShim\CPS\SourceFileHandlingTests.cs (4)
69VersionStamp GetVersion() => environment.Workspace.CurrentSolution.Projects.Single().Version; 90var oldVersion = GetVersion(); 94var newVersion = GetVersion(); 98var newSameVersion = GetVersion();
Microsoft.VisualStudio.LanguageServices.LiveShare (4)
Client\Projects\RoslynRemoteProjectInfoProvider.cs (1)
102VersionStamp.Create(),
Client\Projects\WorkspaceFileTextLoaderNoException.cs (1)
32return Task.FromResult(TextAndVersion.Create(SourceText.From("", encoding: null, options.ChecksumAlgorithm), VersionStamp.Create()));
Client\Razor\CSharpLspRazorProjectFactory.cs (1)
26var projectInfo = ProjectInfo.Create(ProjectId.CreateNewId(projectName), VersionStamp.Default, projectName, projectName, LanguageNames.CSharp);
Client\RemoteLanguageServiceWorkspace.cs (1)
323VersionStamp.Create(),
Roslyn.VisualStudio.Next.UnitTests (33)
Remote\RemoteHostClientServiceFactoryTests.cs (1)
46workspace.AddSolution(SolutionInfo.Create(SolutionId.CreateNewId(), VersionStamp.Default));
Remote\SnapshotSerializationTests.cs (1)
67loader: TextLoader.From(TextAndVersion.Create(SourceText.From("root = true"), VersionStamp.Create())))]);
Services\ServiceHubServicesTests.cs (26)
371SolutionId.CreateNewId(), VersionStamp.Create(), "", 374p1, VersionStamp.Create(), "p1", "p1", LanguageNames.CSharp, outputFilePath: file.Path, 377p2, VersionStamp.Create(), "p2", "p2", LanguageNames.CSharp, 447.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp)) 786.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp)) 928.AddProject(ProjectInfo.Create(projectId1, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp)) 937.AddProject(ProjectInfo.Create(projectId2, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp)) 979.AddProject(ProjectInfo.Create(projectId1, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp)) 988.AddProject(ProjectInfo.Create(projectId2, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp)) 1020.AddProject(ProjectInfo.Create(projectId1, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp)) 1029.AddProject(ProjectInfo.Create(projectId2, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp)) 1063.AddProject(ProjectInfo.Create(projectId1, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp)) 1072.AddProject(ProjectInfo.Create(projectId2, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp)) 1115.AddProject(ProjectInfo.Create(projectId1, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp)) 1124.AddProject(ProjectInfo.Create(projectId2, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp)) 1168.AddProject(ProjectInfo.Create(projectId1, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp)) 1177.AddProject(ProjectInfo.Create(projectId2, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp)) 1221.AddProject(ProjectInfo.Create(projectId1, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp)) 1230.AddProject(ProjectInfo.Create(projectId2, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp)) 1266.AddProject(ProjectInfo.Create(projectId1, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp)) 1275.AddProject(ProjectInfo.Create(projectId2, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp)) 1311.AddProject(ProjectInfo.Create(projectId1, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp)) 1320.AddProject(ProjectInfo.Create(projectId2, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp)) 1354.AddProject(ProjectInfo.Create(projectId1, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp)) 1363.AddProject(ProjectInfo.Create(projectId2, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp)) 1560.AddProject(ProjectInfo.Create(projectId1, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp))
Services\SolutionServiceTests.cs (5)
87ProjectId.CreateNewId(), VersionStamp.Create(), "test", "test.dll", LanguageNames.CSharp, 116ProjectId.CreateNewId(), VersionStamp.Create(), "test", "test.dll", LanguageNames.CSharp, 334loader: TextLoader.From(TextAndVersion.Create(SourceText.From("test"), VersionStamp.Create()))); 366loader: TextLoader.From(TextAndVersion.Create(SourceText.From("root = true"), VersionStamp.Create(), filePath: configPath)), 398loader: TextLoader.From(TextAndVersion.Create(SourceText.From("class A { }"), VersionStamp.Create())));