6 instantiations of VersionStamp
Microsoft.CodeAnalysis.Workspaces (5)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
576 references to VersionStamp
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (18)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (5)
Microsoft.CodeAnalysis.EditorFeatures (7)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (15)
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 (35)
Diagnostics\DiagnosticAnalyzerServiceTests.cs (11)
180VersionStamp.Create(),
294VersionStamp.Create(),
355VersionStamp.Create(),
365loader: TextLoader.From(TextAndVersion.Create(SourceText.From(""), VersionStamp.Create(), filePath)),
436VersionStamp.Create(),
480VersionStamp.Create(),
488loader: TextLoader.From(TextAndVersion.Create(SourceText.From("class A {}"), VersionStamp.Create(), filePath: "test.cs")),
577VersionStamp.Create(),
586loader: TextLoader.From(TextAndVersion.Create(SourceText.From("class A {}"), VersionStamp.Create(), filePath: "test.cs")),
632var projectInfo = ProjectInfo.Create(ProjectId.CreateNewId(), VersionStamp.Create(), "CSharpProject", "CSharpProject", LanguageNames.CSharp);
1194VersionStamp.Create(),
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (5)
125AddProject(ProjectInfo.Create(projectId, VersionStamp.Create(), "proj", "proj", LanguageNames.CSharp, parseOptions: CSharpParseOptions.Default.WithNoRefSafetyRulesAttribute()).WithTelemetryId(s_defaultProjectTelemetryId)).GetProject(projectId).
401loader: TextLoader.From(TextAndVersion.Create(sourceText, VersionStamp.Create(), path)),
756loader: TextLoader.From(TextAndVersion.Create(sourceText, VersionStamp.Create(), "design-time-only.cs")),
3718loader: TextLoader.From(TextAndVersion.Create(sourceText, VersionStamp.Create(), filePath)),
4558AddProject(ProjectInfo.Create(projectId, VersionStamp.Create(), "P", "P", LanguageNames.CSharp, parseOptions: CSharpParseOptions.Default.WithNoRefSafetyRulesAttribute())).GetProject(projectId).
SolutionCrawler\WorkCoordinatorTests.cs (16)
95var solutionInfo = SolutionInfo.Create(SolutionId.CreateNewId(), VersionStamp.Create(),
98ProjectInfo.Create(projectId, VersionStamp.Create(), "P1", "P1", LanguageNames.CSharp,
220projectId, VersionStamp.Create(), "P3", "P3", LanguageNames.CSharp,
1435var solution = SolutionInfo.Create(SolutionId.CreateNewId(), VersionStamp.Create(),
1438ProjectInfo.Create(projectId1, VersionStamp.Create(), "P1", "P1", LanguageNames.CSharp,
1440ProjectInfo.Create(projectId2, VersionStamp.Create(), "P2", "P2", LanguageNames.CSharp,
1442ProjectInfo.Create(projectId3, VersionStamp.Create(), "P3", "P3", LanguageNames.CSharp,
1621var solution = SolutionInfo.Create(SolutionId.CreateNewId(), VersionStamp.Create(),
1624ProjectInfo.Create(projectId1, VersionStamp.Create(), "P1", "P1", LanguageNames.CSharp,
1626ProjectInfo.Create(projectId2, VersionStamp.Create(), "P2", "P2", LanguageNames.CSharp,
1629ProjectInfo.Create(projectId3, VersionStamp.Create(), "P3", "P3", LanguageNames.CSharp,
1632ProjectInfo.Create(projectId4, VersionStamp.Create(), "P4", "P4", LanguageNames.CSharp,
1634ProjectInfo.Create(projectId5, VersionStamp.Create(), "P5", "P5", LanguageNames.CSharp,
1647return SolutionInfo.Create(SolutionId.CreateNewId(), VersionStamp.Create(),
1650ProjectInfo.Create(projectId1, VersionStamp.Create(), "P1", "P1", LanguageNames.CSharp,
1652ProjectInfo.Create(projectId2, VersionStamp.Create(), "P2", "P2", LanguageNames.CSharp,
Microsoft.CodeAnalysis.Features (25)
Microsoft.CodeAnalysis.LanguageServer.Protocol (74)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.AnalysisData.cs (11)
23public static readonly DocumentAnalysisData Empty = new(VersionStamp.Default, ImmutableArray<DiagnosticData>.Empty);
28public readonly VersionStamp Version;
40public DocumentAnalysisData(VersionStamp version, ImmutableArray<DiagnosticData> items)
49public DocumentAnalysisData(VersionStamp version, ImmutableArray<DiagnosticData> oldItems, ImmutableArray<DiagnosticData> newItems)
78public readonly VersionStamp Version;
90public ProjectAnalysisData(ProjectId projectId, VersionStamp version, ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult> result)
101VersionStamp version,
117VersionStamp? version = null;
130else if (version.Value != VersionStamp.Default && version.Value != result.Version)
135version = VersionStamp.Default;
144return new ProjectAnalysisData(project.Id, VersionStamp.Default, ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>.Empty);
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.Executor.cs (9)
34AnalysisKind kind, VersionStamp version,
152var version = await GetDiagnosticVersionAsync(document.Project, cancellationToken).ConfigureAwait(false);
178var version = await GetDiagnosticVersionAsync(project, cancellationToken).ConfigureAwait(false);
230return new ProjectAnalysisData(project.Id, VersionStamp.Default, existingData.Result, results);
352var version = await GetDiagnosticVersionAsync(project, cancellationToken).ConfigureAwait(false);
385VersionStamp version, ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult> existing, ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult> result)
407CompilationWithAnalyzers compilationWithAnalyzers, VersionStamp version,
449var version = await GetDiagnosticVersionAsync(project, cancellationToken).ConfigureAwait(false);
503VersionStamp version,
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.ProjectState.cs (28)
67var version = await GetDiagnosticVersionAsync(project, cancellationToken).ConfigureAwait(false);
80var serializerVersion = lastResult.Version;
93Debug.Assert(lastResult.Version == VersionStamp.Default);
124var version = await GetDiagnosticVersionAsync(document.Project, cancellationToken).ConfigureAwait(false);
137var serializerVersion = lastResult.Version;
142Debug.Assert(lastResult.Version == VersionStamp.Default);
165var version = await GetDiagnosticVersionAsync(project, cancellationToken).ConfigureAwait(false);
178var serializerVersion = lastResult.Version;
201var serializerVersion = result.Version;
265syntax.Version != VersionStamp.Default &&
274var version = VersionStamp.Default;
277var serializerVersion = version;
302var version = await GetDiagnosticVersionAsync(project, cancellationToken).ConfigureAwait(false);
303var serializerVersion = version;
315return DiagnosticAnalysisResult.CreateEmpty(project.Id, VersionStamp.Default);
325var version = await GetDiagnosticVersionAsync(project, cancellationToken).ConfigureAwait(false);
326var serializerVersion = version;
331return DiagnosticAnalysisResult.CreateEmpty(project.Id, VersionStamp.Default);
340var version = await GetDiagnosticVersionAsync(project, cancellationToken).ConfigureAwait(false);
341var serializerVersion = version;
345return DiagnosticAnalysisResult.CreateEmpty(project.Id, VersionStamp.Default);
350private ValueTask AddToInMemoryStorageAsync(VersionStamp serializerVersion, Project project, TextDocument? document, object key, string stateKey, ImmutableArray<DiagnosticData> diagnostics)
359private async ValueTask<bool> TryGetDiagnosticsFromInMemoryStorageAsync(VersionStamp serializerVersion, TextDocument document, Builder builder, CancellationToken cancellationToken)
398private async ValueTask<bool> TryGetProjectDiagnosticsFromInMemoryStorageAsync(VersionStamp serializerVersion, Project project, Builder builder, CancellationToken cancellationToken)
411VersionStamp serializerVersion, Project project, TextDocument? document, object key, string stateKey, CancellationToken _)
449private readonly VersionStamp _version;
457public Builder(Project project, VersionStamp version, ImmutableHashSet<DocumentId>? documentIds = null)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (3)
Microsoft.CodeAnalysis.LanguageServerIndexFormat.Generator (1)
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Microsoft.CodeAnalysis.Remote.Workspaces (1)
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures.UnitTests (2)
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (1)
Microsoft.CodeAnalysis.Workspaces (214)
Diagnostics\DiagnosticAnalysisResult.cs (10)
25public readonly VersionStamp Version;
53private DiagnosticAnalysisResult(ProjectId projectId, VersionStamp version, ImmutableHashSet<DocumentId>? documentIds, bool isEmpty, bool fromBuild)
69VersionStamp version,
95public static DiagnosticAnalysisResult CreateEmpty(ProjectId projectId, VersionStamp version)
112version: VersionStamp.Default,
122var version = VersionStamp.Default;
159VersionStamp version,
274public DiagnosticAnalysisResult UpdateAggregatedResult(VersionStamp version, DocumentId documentId, bool fromBuild)
278=> new(ProjectId, VersionStamp.Default, DocumentIds, IsEmpty, FromBuild);
Workspace\Solution\DocumentState.cs (13)
237private static TreeAndVersion MakeNewTreeAndVersion(SyntaxTree oldTree, SourceText oldText, VersionStamp oldVersion, SyntaxTree newTree, SourceText newText, VersionStamp newVersion)
240var version = topLevelChanged ? newVersion : oldVersion;
498var newTextVersion = GetNewerVersion();
499var newTreeVersion = GetNewTreeVersionForUpdatedTree(newRoot, newTextVersion, mode);
536VersionStamp textVersion,
537VersionStamp treeVersion,
558private VersionStamp GetNewTreeVersionForUpdatedTree(SyntaxNode newRoot, VersionStamp newTextVersion, PreservationMode mode)
585private VersionStamp GetNewerVersion()
597return VersionStamp.Create();
638public bool TryGetTopLevelChangeTextVersion(out VersionStamp version)
652public override async Task<VersionStamp> GetTopLevelChangeTextVersionAsync(CancellationToken cancellationToken)
Workspace\Solution\ProjectState.cs (37)
50private readonly AsyncLazy<VersionStamp> _lazyLatestDocumentVersion;
51private readonly AsyncLazy<VersionStamp> _lazyLatestDocumentTopLevelChangeVersion;
74AsyncLazy<VersionStamp> lazyLatestDocumentVersion,
75AsyncLazy<VersionStamp> lazyLatestDocumentTopLevelChangeVersion,
122_lazyLatestDocumentVersion = new AsyncLazy<VersionStamp>(c => ComputeLatestDocumentVersionAsync(DocumentStates, AdditionalDocumentStates, c), cacheResult: true);
123_lazyLatestDocumentTopLevelChangeVersion = new AsyncLazy<VersionStamp>(c => ComputeLatestDocumentTopLevelChangeVersionAsync(DocumentStates, AdditionalDocumentStates, c), cacheResult: true);
165private static async Task<VersionStamp> ComputeLatestDocumentVersionAsync(TextDocumentStates<DocumentState> documentStates, TextDocumentStates<AdditionalDocumentState> additionalDocumentStates, CancellationToken cancellationToken)
168var latestVersion = VersionStamp.Default;
175var version = await state.GetTextVersionAsync(cancellationToken).ConfigureAwait(false);
184var version = await state.GetTextVersionAsync(cancellationToken).ConfigureAwait(false);
191private AsyncLazy<VersionStamp> CreateLazyLatestDocumentTopLevelChangeVersion(
196if (_lazyLatestDocumentTopLevelChangeVersion.TryGetValue(out var oldVersion))
198return new AsyncLazy<VersionStamp>(c => ComputeTopLevelChangeTextVersionAsync(oldVersion, newDocument, c), cacheResult: true);
202return new AsyncLazy<VersionStamp>(c => ComputeLatestDocumentTopLevelChangeVersionAsync(newDocumentStates, newAdditionalDocumentStates, c), cacheResult: true);
206private static async Task<VersionStamp> ComputeTopLevelChangeTextVersionAsync(VersionStamp oldVersion, TextDocumentState newDocument, CancellationToken cancellationToken)
208var newVersion = await newDocument.GetTopLevelChangeTextVersionAsync(cancellationToken).ConfigureAwait(false);
212private static async Task<VersionStamp> ComputeLatestDocumentTopLevelChangeVersionAsync(TextDocumentStates<DocumentState> documentStates, TextDocumentStates<AdditionalDocumentState> additionalDocumentStates, CancellationToken cancellationToken)
215var latestVersion = VersionStamp.Default;
220var version = await state.GetTopLevelChangeTextVersionAsync(cancellationToken).ConfigureAwait(false);
228var version = await state.GetTopLevelChangeTextVersionAsync(cancellationToken).ConfigureAwait(false);
516public Task<VersionStamp> GetLatestDocumentVersionAsync(CancellationToken cancellationToken)
519public async Task<VersionStamp> GetSemanticVersionAsync(CancellationToken cancellationToken = default)
521var docVersion = await _lazyLatestDocumentTopLevelChangeVersion.GetValueAsync(cancellationToken).ConfigureAwait(false);
572public VersionStamp Version => this.ProjectInfo.Version;
606AsyncLazy<VersionStamp>? latestDocumentVersion = null,
607AsyncLazy<VersionStamp>? latestDocumentTopLevelChangeVersion = null,
934out AsyncLazy<VersionStamp> dependentDocumentVersion, out AsyncLazy<VersionStamp> dependentSemanticVersion)
941if (oldDocument.TryGetTextVersion(out var oldVersion))
943if (!_lazyLatestDocumentVersion.TryGetValue(out var documentVersion) || documentVersion == oldVersion)
948if (!_lazyLatestDocumentTopLevelChangeVersion.TryGetValue(out var semanticVersion) || semanticVersion == oldVersion)
956? new AsyncLazy<VersionStamp>(c => ComputeLatestDocumentVersionAsync(newDocumentStates, newAdditionalDocumentStates, c), cacheResult: true)
958? new AsyncLazy<VersionStamp>(newDocument.GetTextVersionAsync, cacheResult: true)
962? new AsyncLazy<VersionStamp>(c => ComputeLatestDocumentTopLevelChangeVersionAsync(newDocumentStates, newAdditionalDocumentStates, c), cacheResult: true)
Workspace\Solution\SolutionState.CompilationTracker.cs (14)
1130private AsyncLazy<VersionStamp>? _lazyDependentVersion;
1131private AsyncLazy<VersionStamp>? _lazyDependentSemanticVersion;
1134public Task<VersionStamp> GetDependentVersionAsync(SolutionState solution, CancellationToken cancellationToken)
1140Interlocked.CompareExchange(ref _lazyDependentVersion, new AsyncLazy<VersionStamp>(c => ComputeDependentVersionAsync(tmp, c), cacheResult: true), null);
1146private async Task<VersionStamp> ComputeDependentVersionAsync(SolutionState solution, CancellationToken cancellationToken)
1149var projVersion = projectState.Version;
1150var docVersion = await projectState.GetLatestDocumentVersionAsync(cancellationToken).ConfigureAwait(false);
1152var version = docVersion.GetNewerVersion(projVersion);
1159var dependentProjectVersion = await solution.GetDependentVersionAsync(dependentProjectReference.ProjectId, cancellationToken).ConfigureAwait(false);
1167public Task<VersionStamp> GetDependentSemanticVersionAsync(SolutionState solution, CancellationToken cancellationToken)
1173Interlocked.CompareExchange(ref _lazyDependentSemanticVersion, new AsyncLazy<VersionStamp>(c => ComputeDependentSemanticVersionAsync(tmp, c), cacheResult: true), null);
1179private async Task<VersionStamp> ComputeDependentSemanticVersionAsync(SolutionState solution, CancellationToken cancellationToken)
1182var version = await projectState.GetSemanticVersionAsync(cancellationToken).ConfigureAwait(false);
1190var dependentProjectVersion = await solution.GetDependentSemanticVersionAsync(dependentProjectReference.ProjectId, cancellationToken).ConfigureAwait(false);
Workspace\Workspace.cs (8)
85var info = SolutionInfo.Create(SolutionId.CreateNewId(), VersionStamp.Create());
129=> CreateSolution(SolutionInfo.Create(id, VersionStamp.Create()));
1758project.State.Attributes.With(version: VersionStamp.Create()),
1771=> CreateDocumentInfoWithoutText(doc).WithTextLoader(TextLoader.From(TextAndVersion.Create(doc.GetTextSynchronously(CancellationToken.None), VersionStamp.Create(), doc.FilePath)));
1938this.OnDocumentAdded(info.WithTextLoader(TextLoader.From(TextAndVersion.Create(text, VersionStamp.Create()))));
1982this.OnAdditionalDocumentAdded(info.WithTextLoader(TextLoader.From(TextAndVersion.Create(text, VersionStamp.Create()))));
2015this.OnAnalyzerConfigDocumentAdded(info.WithTextLoader(TextLoader.From(TextAndVersion.Create(text, VersionStamp.Create()))));
2037this.OnAnalyzerConfigDocumentTextLoaderChanged(id, TextLoader.From(TextAndVersion.Create(text, VersionStamp.Create())));
Microsoft.CodeAnalysis.Workspaces.MSBuild (3)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (8)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
Microsoft.CodeAnalysis.Workspaces.UnitTests (131)
SolutionTests\ProjectDependencyGraphTests.cs (2)
248var projectAInfo = ProjectInfo.Create(projectAId, VersionStamp.Create(), "A", "A", LanguageNames.CSharp,
716return solution.AddProject(ProjectInfo.Create(projectId, VersionStamp.Create(), projectName, projectName, LanguageNames.CSharp, projectName));
SolutionTests\ProjectInfoTests.cs (28)
23Assert.Throws<ArgumentNullException>(() => ProjectInfo.Create(id: null, version: VersionStamp.Default, name: "Goo", assemblyName: "Bar", language: "C#"));
24Assert.Throws<ArgumentNullException>(() => ProjectInfo.Create(pid, VersionStamp.Default, name: null, assemblyName: "Bar", language: "C#"));
25Assert.Throws<ArgumentNullException>(() => ProjectInfo.Create(pid, VersionStamp.Default, name: "Goo", assemblyName: null, language: "C#"));
26Assert.Throws<ArgumentNullException>(() => ProjectInfo.Create(pid, VersionStamp.Default, name: "Goo", assemblyName: "Bar", language: null));
28Assert.Throws<ArgumentNullException>(() => ProjectInfo.Create(pid, VersionStamp.Default, name: "Goo", assemblyName: "Bar", language: "C#",
39() => ProjectInfo.Create(pid, VersionStamp.Default, "proj", "assembly", "C#", documents: new[] { documentInfo, documentInfo }));
41Assert.Throws<ArgumentNullException>(() => ProjectInfo.Create(pid, VersionStamp.Default, name: "Goo", assemblyName: "Bar", language: "C#",
45() => ProjectInfo.Create(pid, VersionStamp.Default, "proj", "assembly", "C#", additionalDocuments: new[] { documentInfo, documentInfo }));
47Assert.Throws<ArgumentNullException>(() => ProjectInfo.Create(pid, VersionStamp.Default, name: "Goo", assemblyName: "Bar", language: "C#",
52() => ProjectInfo.Create(pid, VersionStamp.Default, "proj", "assembly", "C#", projectReferences: new[] { projectReference, projectReference }));
54Assert.Throws<ArgumentNullException>("analyzerReferences[0]", () => ProjectInfo.Create(pid, VersionStamp.Default, name: "Goo", assemblyName: "Bar", language: "C#",
59() => ProjectInfo.Create(pid, VersionStamp.Default, "proj", "assembly", "C#", analyzerReferences: new[] { analyzerReference, analyzerReference }));
61Assert.Throws<ArgumentNullException>(() => ProjectInfo.Create(pid, VersionStamp.Default, name: "Goo", assemblyName: "Bar", language: "C#",
66() => ProjectInfo.Create(pid, VersionStamp.Default, "proj", "assembly", "C#", metadataReferences: new[] { metadataReference, metadataReference }));
72var version = VersionStamp.Default;
91var version = VersionStamp.Default;
110var version = VersionStamp.Default;
129var version = VersionStamp.Default;
148var version = VersionStamp.Default;
167var projectInfo = ProjectInfo.Create(name: "Goo", filePath: @"C:\", id: ProjectId.CreateNewId(), version: VersionStamp.Default, assemblyName: "Bar", language: "C#");
174var projectInfo = ProjectInfo.Create(name: "Goo", id: ProjectId.CreateNewId(), version: VersionStamp.Default, assemblyName: "Bar", language: "C#");
183var instance = ProjectInfo.Create(name: "Name", id: ProjectId.CreateNewId(), version: VersionStamp.Default, assemblyName: "AssemblyName", language: "C#");
185SolutionTestHelpers.TestProperty(instance, (old, value) => old.WithVersion(value), opt => opt.Version, VersionStamp.Create());
SolutionTests\SolutionTests.cs (51)
350var textAndVersion = TextAndVersion.Create(SourceText.From("new text"), VersionStamp.Default);
354Assert.True(newSolution1.GetDocument(documentId)!.TryGetTextVersion(out var actualVersion));
415var version1 = await document1.GetTextVersionAsync();
416var version2 = await document2.GetTextVersionAsync();
428var textAndVersion = TextAndVersion.Create(text, VersionStamp.Create());
503var version1 = await document1.GetTextVersionAsync();
504var version2 = await document2.GetTextVersionAsync();
516var textAndVersion = TextAndVersion.Create(text, VersionStamp.Create());
582var version1 = await document1.GetTextVersionAsync();
583var version2 = await document2.GetTextVersionAsync();
599var textAndVersion = TextAndVersion.Create(text, VersionStamp.Create());
668var version1 = await document1.GetTextVersionAsync();
669var version2 = await document2.GetTextVersionAsync();
682var textAndVersion = TextAndVersion.Create(text, VersionStamp.Create());
745var version1 = await document1.GetTextVersionAsync();
746var version2 = await document2.GetTextVersionAsync();
758var textAndVersion = TextAndVersion.Create(text, VersionStamp.Create());
830var textAndVersion = TextAndVersion.Create(SourceText.From("new text"), VersionStamp.Default);
834Assert.True(newSolution1.GetAdditionalDocument(documentId)!.TryGetTextVersion(out var actualVersion));
876var textAndVersion = TextAndVersion.Create(SourceText.From("new text"), VersionStamp.Default);
880Assert.True(newSolution1.GetAnalyzerConfigDocument(documentId)!.TryGetTextVersion(out var actualVersion));
1481.AddProject(ProjectInfo.Create(submissionId1, VersionStamp.Default, name: "submission1", assemblyName: "submission1.dll", LanguageNames.CSharp, isSubmission: true))
1482.AddProject(ProjectInfo.Create(submissionId2, VersionStamp.Default, name: "submission2", assemblyName: "submission2.dll", LanguageNames.CSharp, isSubmission: true))
1483.AddProject(ProjectInfo.Create(submissionId3, VersionStamp.Default, name: "submission3", assemblyName: "submission3.dll", LanguageNames.CSharp, isSubmission: true))
3380VersionStamp.Create(),
3388VersionStamp.Create(),
3408VersionStamp.Create(),
3418VersionStamp.Create(),
3553VersionStamp.Create(),
3562VersionStamp.Create(),
3812VersionStamp GetVersion() => solution.GetProject(pid).Version;
3841var oldVersion = GetVersion();
3845var newVersion = GetVersion();
3870var newSameVersion = GetVersion();
3935loader: TextLoader.From(TextAndVersion.Create(SourceText.From("[*.*]\r\n\r\ndotnet_diagnostic.CA1234.severity = error"), VersionStamp.Default)))));
3969loader: TextLoader.From(TextAndVersion.Create(SourceText.From("[*.*]\r\n\r\ndotnet_diagnostic.CA1234.severity = error"), VersionStamp.Default)))));
4011loader: TextLoader.From(TextAndVersion.Create(SourceText.From("[*.*]\r\n\r\ndotnet_diagnostic.CA1234.severity = error"), VersionStamp.Default)))));
4023TextLoader.From(TextAndVersion.Create(SourceText.From("[*.*]\r\n\r\ndotnet_diagnostic.CA6789.severity = error"), VersionStamp.Default)),
4059loader: TextLoader.From(TextAndVersion.Create(SourceText.From("is_global = true\r\n\r\ndotnet_diagnostic.CA1234.severity = error"), VersionStamp.Default)))));
4105loader: TextLoader.From(TextAndVersion.Create(SourceText.From("[*.*]\r\n\r\ngenerated_code = true"), VersionStamp.Default)))));
4171ProjectInfo.Create(projectId, VersionStamp.Default, "Test", "Test", LanguageNames.CSharp)
4196VersionStamp.Create(),
4205VersionStamp.Create(),
4214VersionStamp.Create(),
4224VersionStamp.Create(),
4234VersionStamp.Create(),
4244VersionStamp.Create(),
4293var version = VersionStamp.Create();
4297version: VersionStamp.Default,
4378VersionStamp.Default,
WorkspaceTests\AdhocWorkspaceTests.cs (25)
33version: VersionStamp.Default,
88version: VersionStamp.Default,
93var sinfo = SolutionInfo.Create(SolutionId.CreateNewId(), VersionStamp.Default, projects: new ProjectInfo[] { pinfo });
115version: VersionStamp.Default,
123version: VersionStamp.Default,
158loader: TextLoader.From(TextAndVersion.Create(SourceText.From(""), VersionStamp.Create())));
162VersionStamp.Create(),
193version: VersionStamp.Default,
217var version = VersionStamp.Create();
221version: VersionStamp.Default,
236Assert.True(doc.TryGetTextVersion(out var currentVersion));
251var version = VersionStamp.Create();
255version: VersionStamp.Default,
270Assert.True(doc.TryGetTextVersion(out var currentVersion));
285var version = VersionStamp.Create();
294version: VersionStamp.Default,
310Assert.True(doc.TryGetTextVersion(out var currentVersion));
345var version = VersionStamp.Create();
349version: VersionStamp.Default,
359Assert.False(doc.TryGetTextVersion(out var currentVersion));
381var actualVersion = await newDoc.GetTextVersionAsync();
Microsoft.VisualStudio.LanguageServices (8)
Microsoft.VisualStudio.LanguageServices.CodeLens (1)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (7)
Microsoft.VisualStudio.LanguageServices.LiveShare (4)
Roslyn.VisualStudio.Next.UnitTests (10)
Services\ServiceHubServicesTests.cs (3)
304SolutionId.CreateNewId(), VersionStamp.Create(), "",
308p1, VersionStamp.Create(), "p1", "p1", LanguageNames.CSharp, outputFilePath: file.Path,
311p2, VersionStamp.Create(), "p2", "p2", LanguageNames.CSharp,
Services\SolutionServiceTests.cs (5)
84ProjectId.CreateNewId(), VersionStamp.Create(), "test", "test.dll", LanguageNames.CSharp,
113ProjectId.CreateNewId(), VersionStamp.Create(), "test", "test.dll", LanguageNames.CSharp,
247loader: TextLoader.From(TextAndVersion.Create(SourceText.From("test"), VersionStamp.Create())));
279loader: TextLoader.From(TextAndVersion.Create(SourceText.From("root = true"), VersionStamp.Create(), filePath: configPath)),
311loader: TextLoader.From(TextAndVersion.Create(SourceText.From("class A { }"), VersionStamp.Create())));