2 instantiations of ProjectInfo
Microsoft.CodeAnalysis.Workspaces (2)
Workspace\Solution\ProjectInfo.cs (2)
271return new ProjectInfo( 321return new ProjectInfo(
462 references to ProjectInfo
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
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"))
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (2)
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (2)
44AddProject(ProjectInfo.Create(projectId, VersionStamp.Create(), "proj", "proj", LanguageNames.CSharp)).GetProject(projectId). 463AddProject(ProjectInfo.Create(projectId, VersionStamp.Create(), "proj", "proj", LanguageNames.CSharp)).GetProject(projectId).
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (5)
CodeGeneration\AddAttributesTests.cs (1)
28ProjectInfo.Create(
CodeGeneration\AddImportsTests.cs (2)
32ProjectInfo.Create( 778ProjectInfo.Create(
CodeGeneration\SymbolEditorTests.cs (2)
42var proj = ProjectInfo.Create(pid, VersionStamp.Default, "test", "test.dll", LanguageNames.CSharp, documents: docs,
Microsoft.CodeAnalysis.EditorFeatures (2)
Interactive\InteractiveSession.cs (2)
290ProjectInfo.Create( 291new ProjectInfo.ProjectAttributes(
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (6)
Rename\RenamerTests.cs (6)
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: "");
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (9)
Diagnostics\DiagnosticAnalyzerServiceTests.cs (7)
157ProjectInfo.Create( 258ProjectInfo.Create( 302ProjectInfo.Create( 380ProjectInfo.Create( 424var projectInfo = ProjectInfo.Create(ProjectId.CreateNewId(), VersionStamp.Create(), "CSharpProject", "CSharpProject", LanguageNames.CSharp); 884ProjectInfo.Create(
SymbolFinder\DependentTypeFinderTests.cs (2)
32var pi = ProjectInfo.Create(
Microsoft.CodeAnalysis.Features (11)
MetadataAsSource\MetadataAsSourceGeneratedFileInfo.cs (4)
58public (ProjectInfo, DocumentId) GetProjectInfoAndDocumentId(SolutionServices services, bool loadFileFromDisk) 93var projectInfo = ProjectInfo.Create( 94new ProjectInfo.ProjectAttributes(
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (3)
294private ProjectInfo? CreateProjectInfo(Workspace workspace, Project project, ImmutableDictionary<string, string> pdbCompilationOptions, string assemblyName, string assemblyVersion, SourceHashAlgorithm checksumAlgorithm) 311return ProjectInfo.Create( 312new ProjectInfo.ProjectAttributes(
Workspace\MiscellaneousFileUtilities.cs (4)
18internal static ProjectInfo CreateMiscellaneousProjectInfoForDocument( 60var projectInfo = ProjectInfo.Create( 61new ProjectInfo.ProjectAttributes(
Microsoft.CodeAnalysis.Features.Test.Utilities (6)
EditAndContinue\EditAndContinueTestVerifier.cs (3)
436var projectInfo = ProjectInfo.Create( 437new ProjectInfo.ProjectAttributes(
EditAndContinue\Extensions.cs (3)
63var info = CreateProjectInfo(projectName, language); 86public static ProjectInfo CreateProjectInfo(string projectName, string language = LanguageNames.CSharp) 87=> ProjectInfo.Create(
Microsoft.CodeAnalysis.Features.UnitTests (2)
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))
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Workspaces\LspMiscellaneousFilesWorkspace.cs (1)
62var projectInfo = MiscellaneousFileUtilities.CreateMiscellaneousProjectInfoForDocument(
Microsoft.CodeAnalysis.Remote.ServiceHub (5)
Host\AssetProvider.cs (1)
194tasks.Add(SynchronizeProjectAssetAsync<ProjectInfo.ProjectAttributes>(new(AssetPathKind.ProjectAttributes, projectId), static p => p.Info));
Host\RemoteWorkspace.cs (1)
275using var _ = ArrayBuilder<ProjectInfo>.GetInstance(solutionInfo.Projects.Count, out var projectInfos);
Host\RemoteWorkspace.SolutionCreator.cs (3)
251await _assetProvider.GetAssetsAsync<ProjectInfo.ProjectAttributes>( 275using var _3 = ArrayBuilder<ProjectInfo>.GetInstance(projectStateChecksumsToAdd.Count, out var projectInfos); 332solution = solution.WithProjectAttributes(await _assetProvider.GetAssetAsync<ProjectInfo.ProjectAttributes>(
Microsoft.CodeAnalysis.Remote.Workspaces (4)
AbstractAssetProvider.cs (4)
43using var _1 = ArrayBuilder<Task<ProjectInfo>>.GetInstance(solutionChecksums.Projects.Length, out var projectsTasks); 74public async Task<ProjectInfo> CreateProjectInfoAsync( 83var attributes = await GetAssetAsync<ProjectInfo.ProjectAttributes>(new(AssetPathKind.ProjectAttributes, projectId), projectChecksums.Info, cancellationToken).ConfigureAwait(false); 109return ProjectInfo.Create(
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)
33ProjectInfo.Create(
Microsoft.CodeAnalysis.Workspaces (111)
Serialization\SerializationExtensions.cs (3)
22ProjectInfo.ProjectAttributes => WellKnownSynchronizationKind.ProjectAttributes, 36public static CompilationOptions FixUpCompilationOptions(this ProjectInfo.ProjectAttributes info, CompilationOptions compilationOptions) 59private static ImmutableArray<string> GetStrongNameKeyPaths(ProjectInfo.ProjectAttributes info)
Workspace\AdhocWorkspace.cs (5)
65var info = ProjectInfo.Create(ProjectId.CreateNewId(), VersionStamp.Create(), name, name, language); 72public Project AddProject(ProjectInfo projectInfo) 90public void AddProjects(IEnumerable<ProjectInfo> projectInfos) 97foreach (var info in projectInfos)
Workspace\CommandLineProject.cs (7)
20/// Create a <see cref="ProjectInfo"/> structure initialized from a compilers command line arguments. 23public static ProjectInfo CreateProjectInfo(string projectName, string language, IEnumerable<string> commandLineArgs, string projectDirectory, Workspace? workspace = null) 117var projectInfo = ProjectInfo.Create( 118new ProjectInfo.ProjectAttributes( 179/// Create a <see cref="ProjectInfo"/> structure initialized with data from a compiler command line. 182public static ProjectInfo CreateProjectInfo(string projectName, string language, string commandLine, string baseDirectory, Workspace? workspace = null)
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (4)
121var projectInfo = ProjectInfo.Create( 122new ProjectInfo.ProjectAttributes( 158using var _ = ArrayBuilder<ProjectInfo>.GetInstance(out var projectInfos);
Workspace\Solution\Project.cs (1)
693internal Project WithAttributes(ProjectInfo.ProjectAttributes attributes)
Workspace\Solution\ProjectInfo.cs (29)
182/// Create a new instance of a <see cref="ProjectInfo"/>. 184public static ProjectInfo Create( 210/// Create a new instance of a <see cref="ProjectInfo"/>. 212public static ProjectInfo Create( 259internal static ProjectInfo Create( 284internal ProjectInfo With( 334public ProjectInfo WithId(ProjectId id) 337public ProjectInfo WithVersion(VersionStamp version) 340public ProjectInfo WithName(string name) 343public ProjectInfo WithAssemblyName(string assemblyName) 346public ProjectInfo WithFilePath(string? filePath) 349public ProjectInfo WithOutputFilePath(string? outputFilePath) 352public ProjectInfo WithOutputRefFilePath(string? outputRefFilePath) 355public ProjectInfo WithCompilationOutputInfo(in CompilationOutputInfo info) 358public ProjectInfo WithDefaultNamespace(string? defaultNamespace) 361internal ProjectInfo WithChecksumAlgorithm(SourceHashAlgorithm checksumAlgorithm) 364internal ProjectInfo WithHasAllInformation(bool hasAllInformation) 367internal ProjectInfo WithRunAnalyzers(bool runAnalyzers) 370public ProjectInfo WithCompilationOptions(CompilationOptions? compilationOptions) 373public ProjectInfo WithParseOptions(ParseOptions? parseOptions) 376public ProjectInfo WithDocuments(IEnumerable<DocumentInfo>? documents) 379public ProjectInfo WithAdditionalDocuments(IEnumerable<DocumentInfo>? additionalDocuments) 382public ProjectInfo WithAnalyzerConfigDocuments(IEnumerable<DocumentInfo>? analyzerConfigDocuments) 385public ProjectInfo WithProjectReferences(IEnumerable<ProjectReference>? projectReferences) 388public ProjectInfo WithMetadataReferences(IEnumerable<MetadataReference>? metadataReferences) 391public ProjectInfo WithAnalyzerReferences(IEnumerable<AnalyzerReference>? analyzerReferences) 394internal ProjectInfo WithTelemetryId(Guid telemetryId) 399internal ProjectInfo WithHasSdkCodeStyleAnalyzers(bool hasSdkCodeStyleAnalyzers) 405=> nameof(ProjectInfo) + " " + Name + (!string.IsNullOrWhiteSpace(FilePath) ? " " + FilePath : "");
Workspace\Solution\ProjectState.cs (32)
69ProjectInfo projectInfo, 95public ProjectState(LanguageServices languageServices, ProjectInfo projectInfo, StructuredAnalyzerConfigOptions fallbackAnalyzerOptions) 102var projectInfoFixed = FixProjectInfo(projectInfo); 161private static ProjectInfo ClearAllDocumentsFromProjectInfo(ProjectInfo projectInfo) 175private ProjectInfo FixProjectInfo(ProjectInfo projectInfo) 331var extension = ProjectInfo.Language switch 343if (!PathUtilities.IsAbsolute(ProjectInfo.FilePath)) 354var projectDirectory = PathUtilities.GetDirectoryName(ProjectInfo.FilePath); 635/// <inheritdoc cref="ProjectInfo.NameAndFlavor"/> 652public ProjectInfo ProjectInfo { get; } 682ProjectInfo? projectInfo = null, 701internal ProjectInfo.ProjectAttributes Attributes 702=> ProjectInfo.Attributes; 705/// Updates <see cref="ProjectInfo"/> to a newer version of attributes. 707private ProjectState WithNewerAttributes(ProjectInfo.ProjectAttributes attributes) 712return With(projectInfo: ProjectInfo.With(attributes: attributes)); 753projectInfo: ProjectInfo.With(attributes: Attributes.With(checksumAlgorithm: checksumAlgorithm, version: Version.GetNewerVersion())), 774return With(projectInfo: ProjectInfo.WithCompilationOptions(options.WithSyntaxTreeOptionsProvider(newProvider)) 794projectInfo: ProjectInfo.WithParseOptions(options).WithVersion(Version.GetNewerVersion()), 836return With(projectInfo: ProjectInfo.With(projectReferences: projectReferences).WithVersion(Version.GetNewerVersion())); 846return With(projectInfo: ProjectInfo.With(metadataReferences: metadataReferences).WithVersion(Version.GetNewerVersion())); 856return With(projectInfo: ProjectInfo.WithAnalyzerReferences(analyzerReferences).WithVersion(Version.GetNewerVersion())); 867projectInfo: ProjectInfo.WithVersion(Version.GetNewerVersion()), 879projectInfo: ProjectInfo.WithVersion(Version.GetNewerVersion()), 898var projectInfo = ProjectInfo.WithVersion(Version.GetNewerVersion()); 922projectInfo: ProjectInfo.WithVersion(Version.GetNewerVersion()), 933projectInfo: ProjectInfo.WithVersion(Version.GetNewerVersion()), 955projectInfo: ProjectInfo.WithVersion(Version.GetNewerVersion()), 1029projectInfo: ProjectInfo.WithVersion(Version.GetNewerVersion()),
Workspace\Solution\Solution.cs (6)
357=> this.AddProject(ProjectInfo.Create(projectId, VersionStamp.Create(), name, assemblyName, language)); 360public Solution AddProject(ProjectInfo projectInfo) 362using var _ = ArrayBuilder<ProjectInfo>.GetInstance(1, out var projectInfos); 368internal Solution AddProjects(ArrayBuilder<ProjectInfo> projectInfos) 571internal Solution WithProjectAttributes(ProjectInfo.ProjectAttributes attributes) 580internal Solution WithProjectInfo(ProjectInfo info)
Workspace\Solution\SolutionCompilationState.cs (6)
319/// <inheritdoc cref="SolutionState.AddProjects(ArrayBuilder{ProjectInfo})"/> 320public SolutionCompilationState AddProjects(ArrayBuilder<ProjectInfo> projectInfos) 332foreach (var projectInfo in projectInfos) 348foreach (var projectInfo in projectInfos) 562public SolutionCompilationState WithProjectAttributes(ProjectInfo.ProjectAttributes attributes) 591public SolutionCompilationState WithProjectInfo(ProjectInfo info)
Workspace\Solution\SolutionInfo.cs (5)
39public IReadOnlyList<ProjectInfo> Projects { get; } 54IReadOnlyList<ProjectInfo> projects, 73IEnumerable<ProjectInfo>? projects) 85IEnumerable<ProjectInfo>? projects = null, 96IEnumerable<ProjectInfo>? projects,
Workspace\Solution\SolutionState.cs (3)
323public SolutionState AddProjects(ArrayBuilder<ProjectInfo> projectInfos) 333foreach (var projectInfo in projectInfos) 338ProjectState CreateProjectState(ProjectInfo projectInfo)
Workspace\Workspace.cs (10)
702private static Solution CheckAndAddProjects(Solution solution, IReadOnlyList<ProjectInfo> projects) 704using var _ = ArrayBuilder<ProjectInfo>.GetInstance(projects.Count, out var builder); 705foreach (var project in projects) 714private static Solution CheckAndAddProject(Solution newSolution, ProjectInfo project) 772protected internal void OnProjectAdded(ProjectInfo projectInfo) 782protected internal virtual void OnProjectReloaded(ProjectInfo reloadedProjectInfo) 983/// See <see cref="ProjectInfo.HasAllInformation"/> for more information. 1995private static ProjectInfo CreateProjectInfo(Project project) 1997return ProjectInfo.Create( 2030protected virtual void ApplyProjectAdded(ProjectInfo project)
Microsoft.CodeAnalysis.Workspaces.MSBuild (27)
MSBuild\MSBuildProjectLoader.cs (3)
245/// Loads the <see cref="ProjectInfo"/> from the specified project file and all referenced projects. 246/// The first <see cref="ProjectInfo"/> in the result corresponds to the specified project file. 255public async Task<ImmutableArray<ProjectInfo>> LoadProjectInfoAsync(
MSBuild\MSBuildProjectLoader.Worker.cs (12)
71private readonly Dictionary<string, ImmutableArray<ProjectInfo>> _pathToDiscoveredProjectInfosMap; 102_pathToDiscoveredProjectInfosMap = new Dictionary<string, ImmutableArray<ProjectInfo>>(PathUtilities.Comparer); 129public async Task<ImmutableArray<ProjectInfo>> LoadAsync(CancellationToken cancellationToken) 131var results = ImmutableArray.CreateBuilder<ProjectInfo>(); 219private async Task<ImmutableArray<ProjectInfo>> LoadProjectInfosFromPathAsync( 228var builder = ImmutableArray.CreateBuilder<ProjectInfo>(); 261var projectInfo = await CreateProjectInfoAsync(fileInfo, id, addDiscriminator, cancellationToken).ConfigureAwait(false); 274private Task<ProjectInfo> CreateProjectInfoAsync(ProjectFileInfo projectFileInfo, ProjectId projectId, bool addDiscriminator, CancellationToken cancellationToken) 298ProjectInfo.Create( 299new ProjectInfo.ProjectAttributes( 368return ProjectInfo.Create( 369new ProjectInfo.ProjectAttributes(
MSBuild\MSBuildProjectLoader.Worker_ResolveReferences.cs (6)
128public ProjectInfo? SelectProjectInfoByOutput(IEnumerable<ProjectInfo> projectInfos) 130foreach (var projectInfo in projectInfos) 277ProjectInfo? projectReferenceInfo = null; 278foreach (var info in projectReferenceInfos) 380private static bool ProjectReferenceExists(ProjectId to, ProjectInfo from)
MSBuild\MSBuildWorkspace.cs (1)
254foreach (var project in projects)
MSBuild\ProjectMap.cs (5)
27/// A map of project path to <see cref="ProjectInfo"/>s. Note that there can be multiple <see cref="ProjectId"/>s per project path 30private readonly Dictionary<string, ImmutableArray<ProjectInfo>> _projectPathToProjectInfosMap; 45_projectPathToProjectInfosMap = new Dictionary<string, ImmutableArray<ProjectInfo>>(PathUtilities.Comparer); 100internal void AddProjectInfo(ProjectInfo projectInfo) 206internal bool TryGetProjectInfosByProjectPath(string projectPath, out ImmutableArray<ProjectInfo> projectInfos)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
VisualStudioMSBuildWorkspaceTests.cs (1)
101var projectInfo = Assert.Single(solutionInfo.Projects);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (5)
SolutionUtilities.cs (1)
109ProjectInfo.Create(
Workspaces\TestHostProject`1.cs (4)
248public ProjectInfo ToProjectInfo() 250var info = ProjectInfo.Create( 251new ProjectInfo.ProjectAttributes(
Microsoft.CodeAnalysis.Workspaces.UnitTests (205)
CommandLineProject\CommandLineProjectTests.cs (14)
25var info = CommandLineProject.CreateProjectInfo("TestProject", LanguageNames.CSharp, commandLine, @"C:\ProjectDirectory"); 40var info = CommandLineProject.CreateProjectInfo("TestProject", LanguageNames.CSharp, commandLine, @"C:\ProjectDirectory", ws); 56var info = CommandLineProject.CreateProjectInfo("TestProject", LanguageNames.CSharp, commandLine, @"C:\ProjectDirectory"); 67var info = CommandLineProject.CreateProjectInfo("TestProject", LanguageNames.CSharp, commandLine, @"C:\ProjectDirectory"); 79var info = CommandLineProject.CreateProjectInfo("TestProject", LanguageNames.CSharp, commandLine, @"C:\ProjectDirectory"); 90var info = CommandLineProject.CreateProjectInfo("TestProject", LanguageNames.CSharp, commandLine, @"C:\ProjectDirectory"); 102var info = CommandLineProject.CreateProjectInfo("TestProject", LanguageNames.CSharp, commandLine, @"C:\ProjectDirectory"); 113var info = CommandLineProject.CreateProjectInfo("TestProject", LanguageNames.CSharp, commandLine, @"C:\ProjectDirectory"); 124var info = CommandLineProject.CreateProjectInfo("TestProject", LanguageNames.CSharp, commandLine, @"C:\ProjectDirectory"); 136var info = CommandLineProject.CreateProjectInfo("TestProject", LanguageNames.CSharp, commandLine, @"C:\ProjectDirectory"); 150var info = CommandLineProject.CreateProjectInfo("TestProject", LanguageNames.CSharp, commandLine, assemblyBaseDir); 165var info = CommandLineProject.CreateProjectInfo("TestProject", LanguageNames.CSharp, commandLine, assemblyBaseDir); 177var info = CommandLineProject.CreateProjectInfo("TestProject", LanguageNames.VisualBasic, commandLine, baseDirectory: @"C:\ProjectDirectory"); 189var info = CommandLineProject.CreateProjectInfo("TestProject", LanguageNames.VisualBasic, commandLine, baseDirectory: @"C:\ProjectDirectory");
CommandLineProject\CommandLineProjectWorkspaceTests.cs (2)
28var info = CommandLineProject.CreateProjectInfo("TestProject", LanguageNames.CSharp, commandLine, tempDirectory.Path, ws); 55var info = CommandLineProject.CreateProjectInfo("TestProject", LanguageNames.CSharp, commandLine, @"C:\ProjectDirectory");
FindReferencesTests.cs (4)
32var pi = ProjectInfo.Create( 48var pi = ProjectInfo.Create(
LinkedFileDiffMerging\LinkedFileDiffMergingTests.cs (2)
30var projectInfo = ProjectInfo.Create(projectId, VersionStamp.Create(), "ProjectName" + i, "AssemblyName" + i, languageName);
SolutionTests\ProjectDependencyGraphTests.cs (3)
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 (60)
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])); 77var info1 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#", documents: [documentInfo]); 80var info2 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#"); 83var info3 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#", documents: []); 86var info4 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#", documents: []); 96var info1 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#", additionalDocuments: [documentInfo]); 99var info2 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#"); 102var info3 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#", additionalDocuments: []); 105var info4 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#", additionalDocuments: []); 115var info1 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#", projectReferences: [projectReference]); 118var info2 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#"); 121var info3 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#", projectReferences: []); 124var info4 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#", projectReferences: []); 134var info1 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#", metadataReferences: [metadataReference]); 137var info2 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#"); 140var info3 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#", metadataReferences: []); 143var info4 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#", metadataReferences: []); 153var info1 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#", analyzerReferences: [analyzerReference]); 156var info2 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#"); 159var info3 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#", analyzerReferences: []); 162var info4 = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#", analyzerReferences: []); 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#");
SolutionTests\SolutionInfoTests.cs (8)
21var projectInfo = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#"); 32var projectInfo = ProjectInfo.Create(ProjectId.CreateNewId(), version, "proj", "assembly", "C#"); 35Assert.Same(projectInfo, ((ImmutableArray<ProjectInfo>)info1.Projects).Single()); 38Assert.True(((ImmutableArray<ProjectInfo>)info2.Projects).IsEmpty); 41Assert.True(((ImmutableArray<ProjectInfo>)info3.Projects).IsEmpty); 44Assert.True(((ImmutableArray<ProjectInfo>)info4.Projects).IsEmpty);
SolutionTests\SolutionTests.cs (73)
59.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj1", "proj1", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj1.dll"))) 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"))) 1166var newInfo = ProjectInfo.Create( 1300.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj1", "proj1", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj1.dll"))); 1305var newInfo = ProjectInfo.Create( 1335.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj1", "proj1", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj1.dll"))); 1340var newInfo = ProjectInfo.Create( 1370.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj1", "proj1", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj1.dll"))); 1375var newInfo = ProjectInfo.Create( 1405.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj1", "proj1", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj1.dll"))); 1410var newInfo = ProjectInfo.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)) 4017ProjectInfo.Create( 4025ProjectInfo.Create( 4045ProjectInfo.Create( 4055ProjectInfo.Create( 4218ProjectInfo.Create( 4227ProjectInfo.Create( 4942ProjectInfo.Create(projectId, VersionStamp.Default, "Test", "Test", LanguageNames.CSharp) 4963using var _ = ArrayBuilder<ProjectInfo>.GetInstance(out var projects); 4964projects.Add(ProjectInfo.Create(projectId1, VersionStamp.Default, "Test1", "Test1", LanguageNames.CSharp)); 4965projects.Add(ProjectInfo.Create(projectId2, VersionStamp.Default, "Test2", "Test2", LanguageNames.CSharp)); 4985using var _ = ArrayBuilder<ProjectInfo>.GetInstance(out var projects); 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)); 5013using var _ = ArrayBuilder<ProjectInfo>.GetInstance(out var projects); 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)); 5045using var _ = ArrayBuilder<ProjectInfo>.GetInstance(out var projects); 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)])); 5075using var _ = ArrayBuilder<ProjectInfo>.GetInstance(out var projects); 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, 5107using var _ = ArrayBuilder<ProjectInfo>.GetInstance(out var projects); 5110projects.Add(ProjectInfo.Create(projectId2, VersionStamp.Default, "Test2", "Test2", LanguageNames.CSharp)); 5111projects.Add(ProjectInfo.Create(projectId3, VersionStamp.Default, "Test3", "Test3", LanguageNames.CSharp)); 5138using var _ = ArrayBuilder<ProjectInfo>.GetInstance(out var projects); 5141projects.Add(ProjectInfo.Create(projectId1, VersionStamp.Default, "Test2", "Test2", LanguageNames.CSharp)); 5142projects.Add(ProjectInfo.Create(projectId1, VersionStamp.Default, "Test3", "Test3", LanguageNames.CSharp)); 5157using var _ = ArrayBuilder<ProjectInfo>.GetInstance(out var projects); 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)); 5203using var _ = ArrayBuilder<ProjectInfo>.GetInstance(out var projects); 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)); 5246using var _ = ArrayBuilder<ProjectInfo>.GetInstance(out var projects); 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) 5323ProjectInfo.Create( 5332ProjectInfo.Create( 5341ProjectInfo.Create( 5351ProjectInfo.Create( 5361ProjectInfo.Create( 5371ProjectInfo.Create( 5424var projInfo = ProjectInfo.Create( 5505var projectInfo = ProjectInfo.Create(
SolutionTests\TryApplyChangesTests.cs (1)
39OnProjectAdded(ProjectInfo.Create(ProjectId.CreateNewId(), VersionStamp.Default, "TestProject", "TestProject", LanguageNames.CSharp));
WorkspaceTests\AdhocWorkspaceTests.cs (19)
28var info = ProjectInfo.Create( 83var pinfo = ProjectInfo.Create( 110var info1 = ProjectInfo.Create( 118var info2 = ProjectInfo.Create( 157var projInfo = ProjectInfo.Create( 188var info = ProjectInfo.Create( 216var projInfo = ProjectInfo.Create( 250var projInfo = ProjectInfo.Create( 289var projInfo = ProjectInfo.Create( 323var projInfo = ProjectInfo.Create(
WorkspaceTests\WorkspaceReferenceTests.cs (16)
21var projectInfo = ProjectInfo.Create( 50var referenceInfo = ProjectInfo.Create( 60var projectInfo = ProjectInfo.Create( 90var referenceInfo = ProjectInfo.Create( 100var projectInfo = ProjectInfo.Create( 130var referenceInfo = ProjectInfo.Create( 140var projectInfo = ProjectInfo.Create( 174var projectInfo = ProjectInfo.Create(
WorkspaceTests\WorkspaceTests.cs (3)
129var info = ProjectInfo.Create(ProjectId.CreateNewId(), VersionStamp.Create(), name, name, language); 133public Project AddProject(ProjectInfo projectInfo)
Microsoft.VisualStudio.LanguageServices (4)
ExternalAccess\VSTypeScript\Api\VSTypeScriptContainedLanguageWrapper.cs (1)
74workspace.OnProjectAdded(ProjectInfo.Create(projectId, VersionStamp.Default, filePath, string.Empty, InternalLanguageNames.TypeScript));
ProjectSystem\MiscellaneousFilesWorkspace.cs (3)
275var projectInfo = CreateProjectInfoForDocument(moniker); 286/// Creates the <see cref="ProjectInfo"/> that can be added to the workspace for a newly opened document. 288private ProjectInfo CreateProjectInfoForDocument(string filePath)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (2)
EditorConfigSettings\DataProvider\DataProviderTests.cs (1)
30.AddProject(ProjectInfo.Create(projectId, VersionStamp.Create(), "proj1", "proj1.dll", LanguageNames.CSharp, filePath: projectFilePath))
PersistentStorage\AbstractPersistentStorageTests.cs (1)
988solution = solution.AddProject(ProjectInfo.Create(ProjectId.CreateNewId(), VersionStamp.Create(), "Project1", "Project1", LanguageNames.CSharp,
Microsoft.VisualStudio.LanguageServices.LiveShare (22)
Client\Projects\IRemoteProjectInfoProvider.cs (1)
16Task<ImmutableArray<ProjectInfo>> GetRemoteProjectInfosAsync(CancellationToken cancellationToken);
Client\Projects\RemoteProjectInfoProvider.cs (3)
30public async Task<IReadOnlyCollection<ProjectInfo>> GetRemoteProjectInfosAsync(CancellationToken cancellationToken) 32var projectInfos = new List<ProjectInfo>(); 37foreach (var projectInfo in await remoteProjectInfoProvider.GetRemoteProjectInfosAsync(cancellationToken).ConfigureAwait(false))
Client\Projects\RoslynRemoteProjectInfoProvider.cs (9)
39public async Task<ImmutableArray<ProjectInfo>> GetRemoteProjectInfosAsync(CancellationToken cancellationToken) 43return ImmutableArray<ProjectInfo>.Empty; 49return ImmutableArray<ProjectInfo>.Empty; 65return ImmutableArray<ProjectInfo>.Empty; 68var projectInfos = ImmutableArray.CreateBuilder<ProjectInfo>(); 80var projectInfo = CreateProjectInfo(project.Name, project.Language, files.Select(f => f.LocalPath).ToImmutableArray(), _remoteLanguageServiceWorkspace.Services.SolutionServices); 87private static ProjectInfo CreateProjectInfo(string projectName, string language, ImmutableArray<string> files, SolutionServices services) 99return ProjectInfo.Create( 100new ProjectInfo.ProjectAttributes(
Client\Razor\CSharpLspRazorProjectFactory.cs (2)
26var projectInfo = ProjectInfo.Create(ProjectId.CreateNewId(projectName), VersionStamp.Default, projectName, projectName, LanguageNames.CSharp);
Client\RemoteLanguageServiceWorkspace.cs (3)
320var projectInfo = ProjectInfo.Create( 321new ProjectInfo.ProjectAttributes(
Client\RemoteLanguageServiceWorkspaceHost.cs (4)
38private ImmutableDictionary<string, ProjectInfo> _loadedProjectInfo = ImmutableDictionary.Create<string, ProjectInfo>(StringComparer.OrdinalIgnoreCase); 117foreach (var projectInfo in projectInfos) 135if (_loadedProjectInfo.TryGetValue(projectName, out var projInfo))
Roslyn.VisualStudio.Next.UnitTests (28)
Remote\SerializationValidator.cs (1)
139var info = await VerifyAssetSerializationAsync<ProjectInfo.ProjectAttributes>(
Services\ServiceHubServicesTests.cs (25)
356ProjectInfo.Create( 359ProjectInfo.Create( 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 (2)
87ProjectInfo.Create( 116ProjectInfo.Create(