5 instantiations of VersionStamp
Microsoft.CodeAnalysis.Workspaces (4)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
587 references to VersionStamp
Microsoft.Analyzers.Extra.Tests (1)
Microsoft.Analyzers.Local.Tests (1)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (16)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (5)
Microsoft.CodeAnalysis.EditorFeatures (4)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (6)
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 (9)
Diagnostics\DiagnosticAnalyzerServiceTests.cs (8)
159VersionStamp.Create(),
260VersionStamp.Create(),
304VersionStamp.Create(),
312loader: TextLoader.From(TextAndVersion.Create(SourceText.From("class A {}"), VersionStamp.Create(), filePath: "test.cs")),
382VersionStamp.Create(),
391loader: TextLoader.From(TextAndVersion.Create(SourceText.From("class A {}"), VersionStamp.Create(), filePath: "test.cs")),
424var projectInfo = ProjectInfo.Create(ProjectId.CreateNewId(), VersionStamp.Create(), "CSharpProject", "CSharpProject", LanguageNames.CSharp);
886VersionStamp.Create(),
Microsoft.CodeAnalysis.Features (24)
Microsoft.CodeAnalysis.Features.Test.Utilities (3)
Microsoft.CodeAnalysis.Features.UnitTests (3)
Microsoft.CodeAnalysis.LanguageServer (4)
Microsoft.CodeAnalysis.LanguageServer.Protocol (71)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.AnalysisData.cs (11)
22public static readonly DocumentAnalysisData Empty = new(VersionStamp.Default, lineCount: 0, []);
27public readonly VersionStamp Version;
44public DocumentAnalysisData(VersionStamp version, int lineCount, ImmutableArray<DiagnosticData> items)
54public DocumentAnalysisData(VersionStamp version, int lineCount, ImmutableArray<DiagnosticData> oldItems, ImmutableArray<DiagnosticData> newItems)
75public readonly VersionStamp Version;
87public ProjectAnalysisData(ProjectId projectId, VersionStamp version, ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult> result)
98VersionStamp version,
114VersionStamp? version = null;
127else if (version.Value != VersionStamp.Default && version.Value != result.Version)
132version = VersionStamp.Default;
141return new ProjectAnalysisData(project.Id, VersionStamp.Default, ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>.Empty);
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.Executor.cs (6)
34var version = await GetDiagnosticVersionAsync(project, cancellationToken).ConfigureAwait(false);
131var version = await GetDiagnosticVersionAsync(project, cancellationToken).ConfigureAwait(false);
165VersionStamp version, ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult> existing, ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult> result)
187CompilationWithAnalyzersPair compilationWithAnalyzers, VersionStamp version,
245var version = await GetDiagnosticVersionAsync(project, cancellationToken).ConfigureAwait(false);
299VersionStamp version,
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.IncrementalMemberEditAnalyzer.cs (1)
49VersionStamp version,
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.ProjectState.cs (28)
72var version = await GetDiagnosticVersionAsync(project, cancellationToken).ConfigureAwait(false);
85var serializerVersion = lastResult.Version;
98Debug.Assert(lastResult.Version == VersionStamp.Default);
129var version = await GetDiagnosticVersionAsync(document.Project, cancellationToken).ConfigureAwait(false);
142var serializerVersion = lastResult.Version;
147Debug.Assert(lastResult.Version == VersionStamp.Default);
170var version = await GetDiagnosticVersionAsync(project, cancellationToken).ConfigureAwait(false);
183var serializerVersion = lastResult.Version;
210var serializerVersion = result.Version;
272syntax.Version != VersionStamp.Default &&
281var version = VersionStamp.Default;
284var serializerVersion = version;
309var version = await GetDiagnosticVersionAsync(project, cancellationToken).ConfigureAwait(false);
310var serializerVersion = version;
322return DiagnosticAnalysisResult.CreateEmpty(project.Id, VersionStamp.Default);
332var version = await GetDiagnosticVersionAsync(project, cancellationToken).ConfigureAwait(false);
333var serializerVersion = version;
338return DiagnosticAnalysisResult.CreateEmpty(project.Id, VersionStamp.Default);
347var version = await GetDiagnosticVersionAsync(project, cancellationToken).ConfigureAwait(false);
348var serializerVersion = version;
352return DiagnosticAnalysisResult.CreateEmpty(project.Id, VersionStamp.Default);
358VersionStamp serializerVersion, Project project, TextDocument? document, object key, string stateKey, ImmutableArray<DiagnosticData> diagnostics)
366private async ValueTask<bool> TryGetDiagnosticsFromInMemoryStorageAsync(VersionStamp serializerVersion, TextDocument document, Builder builder, CancellationToken cancellationToken)
405private async ValueTask<bool> TryGetProjectDiagnosticsFromInMemoryStorageAsync(VersionStamp serializerVersion, Project project, Builder builder, CancellationToken cancellationToken)
418VersionStamp serializerVersion, Project project, TextDocument? document, object key, string stateKey, CancellationToken _)
456private readonly VersionStamp _version;
464public Builder(Project project, VersionStamp version, ImmutableHashSet<DocumentId>? documentIds = null)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Microsoft.CodeAnalysis.VisualBasic.Features.UnitTests (1)
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (1)
Microsoft.CodeAnalysis.Workspaces (196)
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,
266public DiagnosticAnalysisResult UpdateAggregatedResult(VersionStamp version, DocumentId documentId, bool fromBuild)
270=> new(ProjectId, VersionStamp.Default, DocumentIds, IsEmpty, FromBuild);
Workspace\Solution\DocumentState.cs (13)
252private static TreeAndVersion MakeNewTreeAndVersion(SyntaxTree oldTree, SourceText oldText, VersionStamp oldVersion, SyntaxTree newTree, SourceText newText, VersionStamp newVersion)
255var version = topLevelChanged ? newVersion : oldVersion;
495var newTextVersion = GetNewerVersion();
496var newTreeVersion = GetNewTreeVersionForUpdatedTree(newRoot, newTextVersion, mode);
518VersionStamp textVersion,
519VersionStamp treeVersion,
540private VersionStamp GetNewTreeVersionForUpdatedTree(SyntaxNode newRoot, VersionStamp newTextVersion, PreservationMode mode)
567private VersionStamp GetNewerVersion()
579return VersionStamp.Create();
620public bool TryGetTopLevelChangeTextVersion(out VersionStamp version)
634public override async ValueTask<VersionStamp> GetTopLevelChangeTextVersionAsync(CancellationToken cancellationToken)
Workspace\Solution\ProjectState.cs (29)
47private readonly AsyncLazy<VersionStamp> _lazyLatestDocumentVersion;
48private readonly AsyncLazy<VersionStamp> _lazyLatestDocumentTopLevelChangeVersion;
73AsyncLazy<VersionStamp> lazyLatestDocumentVersion,
74AsyncLazy<VersionStamp> lazyLatestDocumentTopLevelChangeVersion,
223private static async Task<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\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\Workspace.cs (8)
93SolutionInfo.Create(SolutionId.CreateNewId(), VersionStamp.Create()),
144=> CreateSolution(SolutionInfo.Create(id, VersionStamp.Create()));
2031project.State.Attributes.With(version: VersionStamp.Create()),
2044=> CreateDocumentInfoWithoutText(doc).WithTextLoader(TextLoader.From(TextAndVersion.Create(doc.GetTextSynchronously(CancellationToken.None), VersionStamp.Create(), doc.FilePath)));
2211this.OnDocumentAdded(info.WithTextLoader(TextLoader.From(TextAndVersion.Create(text, VersionStamp.Create()))));
2255this.OnAdditionalDocumentAdded(info.WithTextLoader(TextLoader.From(TextAndVersion.Create(text, VersionStamp.Create()))));
2288this.OnAnalyzerConfigDocumentAdded(info.WithTextLoader(TextLoader.From(TextAndVersion.Create(text, VersionStamp.Create()))));
2310this.OnAnalyzerConfigDocumentTextLoaderChanged(id, TextLoader.From(TextAndVersion.Create(text, VersionStamp.Create())));
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (8)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (9)
Microsoft.CodeAnalysis.Workspaces.UnitTests (164)
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)
25Assert.Throws<ArgumentNullException>(() => ProjectInfo.Create(id: null, version: VersionStamp.Default, name: "Goo", assemblyName: "Bar", language: "C#"));
26Assert.Throws<ArgumentNullException>(() => ProjectInfo.Create(pid, VersionStamp.Default, name: null, assemblyName: "Bar", language: "C#"));
27Assert.Throws<ArgumentNullException>(() => ProjectInfo.Create(pid, VersionStamp.Default, name: "Goo", assemblyName: null, language: "C#"));
28Assert.Throws<ArgumentNullException>(() => ProjectInfo.Create(pid, VersionStamp.Default, name: "Goo", assemblyName: "Bar", language: null));
30Assert.Throws<ArgumentNullException>(() => ProjectInfo.Create(pid, VersionStamp.Default, name: "Goo", assemblyName: "Bar", language: "C#",
41() => ProjectInfo.Create(pid, VersionStamp.Default, "proj", "assembly", "C#", documents: [documentInfo, documentInfo]));
43Assert.Throws<ArgumentNullException>(() => ProjectInfo.Create(pid, VersionStamp.Default, name: "Goo", assemblyName: "Bar", language: "C#",
47() => ProjectInfo.Create(pid, VersionStamp.Default, "proj", "assembly", "C#", additionalDocuments: [documentInfo, documentInfo]));
49Assert.Throws<ArgumentNullException>(() => ProjectInfo.Create(pid, VersionStamp.Default, name: "Goo", assemblyName: "Bar", language: "C#",
54() => ProjectInfo.Create(pid, VersionStamp.Default, "proj", "assembly", "C#", projectReferences: [projectReference, projectReference]));
56Assert.Throws<ArgumentNullException>("analyzerReferences[0]", () => ProjectInfo.Create(pid, VersionStamp.Default, name: "Goo", assemblyName: "Bar", language: "C#",
61() => ProjectInfo.Create(pid, VersionStamp.Default, "proj", "assembly", "C#", analyzerReferences: [analyzerReference, analyzerReference]));
63Assert.Throws<ArgumentNullException>(() => ProjectInfo.Create(pid, VersionStamp.Default, name: "Goo", assemblyName: "Bar", language: "C#",
68() => ProjectInfo.Create(pid, VersionStamp.Default, "proj", "assembly", "C#", metadataReferences: [metadataReference, metadataReference]));
74var version = VersionStamp.Default;
93var version = VersionStamp.Default;
112var version = VersionStamp.Default;
131var version = VersionStamp.Default;
150var version = VersionStamp.Default;
169var projectInfo = ProjectInfo.Create(name: "Goo", filePath: @"C:\", id: ProjectId.CreateNewId(), version: VersionStamp.Default, assemblyName: "Bar", language: "C#");
176var projectInfo = ProjectInfo.Create(name: "Goo", id: ProjectId.CreateNewId(), version: VersionStamp.Default, assemblyName: "Bar", language: "C#");
185var instance = ProjectInfo.Create(name: "Name", id: ProjectId.CreateNewId(), version: VersionStamp.Default, assemblyName: "AssemblyName", language: "C#");
188SolutionTestHelpers.TestProperty(instance, (old, value) => old.WithVersion(value), opt => opt.Version, VersionStamp.Create());
SolutionTests\SolutionTests.cs (87)
59.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj1", "proj1", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj1.dll")))
374var textAndVersion = TextAndVersion.Create(SourceText.From("new text"), VersionStamp.Default);
378Assert.True(newSolution1.GetDocument(documentId)!.TryGetTextVersion(out var actualVersion));
452var textAndVersion = TextAndVersion.Create(text, VersionStamp.Create());
540var textAndVersion = TextAndVersion.Create(text, VersionStamp.Create());
623var textAndVersion = TextAndVersion.Create(text, VersionStamp.Create());
706var textAndVersion = TextAndVersion.Create(text, VersionStamp.Create());
782var textAndVersion = TextAndVersion.Create(text, VersionStamp.Create());
869var textAndVersion = TextAndVersion.Create(text, VersionStamp.Create());
942var textAndVersion = TextAndVersion.Create(SourceText.From("new text"), VersionStamp.Default);
946Assert.True(newSolution1.GetAdditionalDocument(documentId)!.TryGetTextVersion(out var actualVersion));
988var textAndVersion = TextAndVersion.Create(SourceText.From("new text"), VersionStamp.Default);
992Assert.True(newSolution1.GetAnalyzerConfigDocument(documentId)!.TryGetTextVersion(out var actualVersion));
1091.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj1", "proj1", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj1.dll")))
1092.AddProject(ProjectInfo.Create(projectId2, VersionStamp.Default, "proj2", "proj2", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj2.dll")))
1108loader: TextLoader.From(TextAndVersion.Create(SourceText.From("class NewD1;", Encoding.UTF32, SourceHashAlgorithm.Sha256), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD1.cs"))),
1117loader: TextLoader.From(TextAndVersion.Create(SourceText.From("class NewD3;", Encoding.UTF8, SourceHashAlgorithms.Default), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD3.cs"))),
1127loader: TextLoader.From(TextAndVersion.Create(SourceText.From("new text1", Encoding.UTF32, SourceHashAlgorithm.Sha256), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD1.cs"))),
1136loader: TextLoader.From(TextAndVersion.Create(SourceText.From("new text3", Encoding.UTF8, SourceHashAlgorithms.Default), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD3.cs"))),
1146loader: TextLoader.From(TextAndVersion.Create(SourceText.From("#new empty1", Encoding.UTF32, SourceHashAlgorithm.Sha256), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD1.cs"))),
1155loader: TextLoader.From(TextAndVersion.Create(SourceText.From("#new empty3", Encoding.UTF8, SourceHashAlgorithms.Default), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD3.cs"))),
1168VersionStamp.Create(),
1300.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj1", "proj1", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj1.dll")));
1307VersionStamp.Create(),
1335.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj1", "proj1", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj1.dll")));
1342VersionStamp.Create(),
1370.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj1", "proj1", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj1.dll")));
1377VersionStamp.Create(),
1405.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj1", "proj1", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj1.dll")));
1412VersionStamp.Create(),
2048.AddProject(ProjectInfo.Create(submissionId1, VersionStamp.Default, name: "submission1", assemblyName: "submission1.dll", LanguageNames.CSharp, isSubmission: true))
2049.AddProject(ProjectInfo.Create(submissionId2, VersionStamp.Default, name: "submission2", assemblyName: "submission2.dll", LanguageNames.CSharp, isSubmission: true))
2050.AddProject(ProjectInfo.Create(submissionId3, VersionStamp.Default, name: "submission3", assemblyName: "submission3.dll", LanguageNames.CSharp, isSubmission: true))
4019VersionStamp.Create(),
4027VersionStamp.Create(),
4047VersionStamp.Create(),
4057VersionStamp.Create(),
4220VersionStamp.Create(),
4229VersionStamp.Create(),
4566VersionStamp GetVersion() => solution.GetProject(pid).Version;
4595var oldVersion = GetVersion();
4599var newVersion = GetVersion();
4624var newSameVersion = GetVersion();
4688loader: TextLoader.From(TextAndVersion.Create(SourceText.From("[*.*]\r\n\r\ndotnet_diagnostic.CA1234.severity = error"), VersionStamp.Default)))));
4721loader: TextLoader.From(TextAndVersion.Create(SourceText.From("[*.*]\r\n\r\ndotnet_diagnostic.CA1234.severity = error"), VersionStamp.Default)))));
4762loader: TextLoader.From(TextAndVersion.Create(SourceText.From("[*.*]\r\n\r\ndotnet_diagnostic.CA1234.severity = error"), VersionStamp.Default)))));
4774TextLoader.From(TextAndVersion.Create(SourceText.From("[*.*]\r\n\r\ndotnet_diagnostic.CA6789.severity = error"), VersionStamp.Default)),
4810loader: TextLoader.From(TextAndVersion.Create(SourceText.From("is_global = true\r\n\r\ndotnet_diagnostic.CA1234.severity = error"), VersionStamp.Default)))));
4856loader: TextLoader.From(TextAndVersion.Create(SourceText.From("[*.*]\r\n\r\ngenerated_code = true"), VersionStamp.Default)))));
4942ProjectInfo.Create(projectId, VersionStamp.Default, "Test", "Test", LanguageNames.CSharp)
4964projects.Add(ProjectInfo.Create(projectId1, VersionStamp.Default, "Test1", "Test1", LanguageNames.CSharp));
4965projects.Add(ProjectInfo.Create(projectId2, VersionStamp.Default, "Test2", "Test2", LanguageNames.CSharp));
4988projects.Add(ProjectInfo.Create(projectId1, VersionStamp.Default, "Test1", "Test1", LanguageNames.CSharp, projectReferences: [new ProjectReference(projectId2)]));
4989projects.Add(ProjectInfo.Create(projectId2, VersionStamp.Default, "Test2", "Test2", LanguageNames.CSharp));
5016projects.Add(ProjectInfo.Create(projectId1, VersionStamp.Default, "Test1", "Test1", LanguageNames.CSharp));
5017projects.Add(ProjectInfo.Create(projectId2, VersionStamp.Default, "Test2", "Test2", LanguageNames.CSharp, projectReferences: [new ProjectReference(projectId1)]));
5042solution = solution.AddProject(ProjectInfo.Create(projectId1, VersionStamp.Default, "Test1", "Test1", LanguageNames.CSharp));
5047projects.Add(ProjectInfo.Create(projectId2, VersionStamp.Default, "Test2", "Test2", LanguageNames.CSharp));
5048projects.Add(ProjectInfo.Create(projectId3, VersionStamp.Default, "Test3", "Test3", LanguageNames.CSharp));
5072solution = solution.AddProject(ProjectInfo.Create(projectId1, VersionStamp.Default, "Test1", "Test1", LanguageNames.CSharp, projectReferences: [new ProjectReference(projectId2)]));
5078projects.Add(ProjectInfo.Create(projectId2, VersionStamp.Default, "Test2", "Test2", LanguageNames.CSharp));
5079projects.Add(ProjectInfo.Create(projectId3, VersionStamp.Default, "Test3", "Test3", LanguageNames.CSharp));
5103solution = solution.AddProject(ProjectInfo.Create(projectId1, VersionStamp.Default, "Test1", "Test1", LanguageNames.CSharp,
5110projects.Add(ProjectInfo.Create(projectId2, VersionStamp.Default, "Test2", "Test2", LanguageNames.CSharp));
5111projects.Add(ProjectInfo.Create(projectId3, VersionStamp.Default, "Test3", "Test3", LanguageNames.CSharp));
5141projects.Add(ProjectInfo.Create(projectId1, VersionStamp.Default, "Test2", "Test2", LanguageNames.CSharp));
5142projects.Add(ProjectInfo.Create(projectId1, VersionStamp.Default, "Test3", "Test3", LanguageNames.CSharp));
5160projects.Add(ProjectInfo.Create(projectId1, VersionStamp.Default, "Test1", "Test1", LanguageNames.CSharp,
5162projects.Add(ProjectInfo.Create(projectId2, VersionStamp.Default, "Test2", "Test2", LanguageNames.CSharp));
5163projects.Add(ProjectInfo.Create(projectId3, VersionStamp.Default, "Test3", "Test3", LanguageNames.CSharp));
5206projects.Add(ProjectInfo.Create(projectId1, VersionStamp.Default, "Test1", "Test1", LanguageNames.CSharp));
5207projects.Add(ProjectInfo.Create(projectId2, VersionStamp.Default, "Test2", "Test2", LanguageNames.CSharp));
5208projects.Add(ProjectInfo.Create(projectId3, VersionStamp.Default, "Test3", "Test3", LanguageNames.CSharp));
5249projects.Add(ProjectInfo.Create(projectId1, VersionStamp.Default, "Test2", "Test2", LanguageNames.CSharp));
5250projects.Add(ProjectInfo.Create(projectId2, VersionStamp.Default, "Test3", "Test3", LanguageNames.CSharp));
5272ProjectInfo.Create(csProjectId, VersionStamp.Default, "CS1", "CS1", LanguageNames.CSharp),
5273ProjectInfo.Create(vbProjectId, VersionStamp.Default, "VB1", "VB1", LanguageNames.VisualBasic)
5325VersionStamp.Create(),
5334VersionStamp.Create(),
5343VersionStamp.Create(),
5353VersionStamp.Create(),
5363VersionStamp.Create(),
5373VersionStamp.Create(),
5422var version = VersionStamp.Create();
5426version: VersionStamp.Default,
5507VersionStamp.Default,
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();
Microsoft.Gen.ComplianceReports.Unit.Tests (1)
Microsoft.Gen.ContextualOptions.Unit.Tests (1)
Microsoft.Gen.Logging.Unit.Tests (1)
Microsoft.Gen.Metrics.Unit.Tests (1)
Microsoft.Gen.MetricsReports.Unit.Tests (1)
Microsoft.VisualStudio.LanguageServices (5)
Microsoft.VisualStudio.LanguageServices.CodeLens (1)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (7)
Microsoft.VisualStudio.LanguageServices.LiveShare (4)
Roslyn.VisualStudio.Next.UnitTests (33)
Services\ServiceHubServicesTests.cs (26)
354SolutionId.CreateNewId(), VersionStamp.Create(), "",
357p1, VersionStamp.Create(), "p1", "p1", LanguageNames.CSharp, outputFilePath: file.Path,
360p2, VersionStamp.Create(), "p2", "p2", LanguageNames.CSharp,
430.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp))
769.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp))
911.AddProject(ProjectInfo.Create(projectId1, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp))
920.AddProject(ProjectInfo.Create(projectId2, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp))
962.AddProject(ProjectInfo.Create(projectId1, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp))
971.AddProject(ProjectInfo.Create(projectId2, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp))
1003.AddProject(ProjectInfo.Create(projectId1, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp))
1012.AddProject(ProjectInfo.Create(projectId2, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp))
1046.AddProject(ProjectInfo.Create(projectId1, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp))
1055.AddProject(ProjectInfo.Create(projectId2, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp))
1098.AddProject(ProjectInfo.Create(projectId1, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp))
1107.AddProject(ProjectInfo.Create(projectId2, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp))
1151.AddProject(ProjectInfo.Create(projectId1, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp))
1160.AddProject(ProjectInfo.Create(projectId2, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp))
1204.AddProject(ProjectInfo.Create(projectId1, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp))
1213.AddProject(ProjectInfo.Create(projectId2, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp))
1249.AddProject(ProjectInfo.Create(projectId1, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp))
1258.AddProject(ProjectInfo.Create(projectId2, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp))
1294.AddProject(ProjectInfo.Create(projectId1, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp))
1303.AddProject(ProjectInfo.Create(projectId2, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp))
1337.AddProject(ProjectInfo.Create(projectId1, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp))
1346.AddProject(ProjectInfo.Create(projectId2, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp))
1543.AddProject(ProjectInfo.Create(projectId1, VersionStamp.Default, name: "Test", assemblyName: "Test", language: LanguageNames.CSharp))
Services\SolutionServiceTests.cs (5)
88ProjectId.CreateNewId(), VersionStamp.Create(), "test", "test.dll", LanguageNames.CSharp,
117ProjectId.CreateNewId(), VersionStamp.Create(), "test", "test.dll", LanguageNames.CSharp,
335loader: TextLoader.From(TextAndVersion.Create(SourceText.From("test"), VersionStamp.Create())));
367loader: TextLoader.From(TextAndVersion.Create(SourceText.From("root = true"), VersionStamp.Create(), filePath: configPath)),
399loader: TextLoader.From(TextAndVersion.Create(SourceText.From("class A { }"), VersionStamp.Create())));