dotnet-installer/src/Microsoft.DotNet.ProjectJsonMigration/MigrationRuleInputs.cs

46 lines
1.5 KiB
C#
Raw Normal View History

// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Collections.Generic;
using Microsoft.Build.Construction;
using Microsoft.DotNet.Internal.ProjectModel;
using System.Linq;
namespace Microsoft.DotNet.ProjectJsonMigration
{
internal class MigrationRuleInputs
{
2016-09-22 00:27:02 +00:00
public ProjectRootElement ProjectXproj { get; }
public ProjectRootElement OutputMSBuildProject { get; }
public ProjectItemGroupElement CommonItemGroup { get; }
public ProjectPropertyGroupElement CommonPropertyGroup { get; }
2016-09-27 04:40:11 +00:00
public List<ProjectContext> ProjectContexts { get; }
public ProjectContext DefaultProjectContext
{
get
{
return ProjectContexts.First();
}
}
public MigrationRuleInputs(
IEnumerable<ProjectContext> projectContexts,
2016-08-23 20:50:05 +00:00
ProjectRootElement outputMSBuildProject,
ProjectItemGroupElement commonItemGroup,
2016-09-22 00:27:02 +00:00
ProjectPropertyGroupElement commonPropertyGroup,
ProjectRootElement projectXproj=null)
{
2016-09-22 00:27:02 +00:00
ProjectXproj = projectXproj;
2016-09-27 04:40:11 +00:00
ProjectContexts = projectContexts.ToList();
2016-08-23 20:50:05 +00:00
OutputMSBuildProject = outputMSBuildProject;
CommonItemGroup = commonItemGroup;
CommonPropertyGroup = commonPropertyGroup;
}
}
}