2016-08-22 12:21:34 -07:00
// 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 ;
2016-10-27 18:46:43 -07:00
using Microsoft.DotNet.Internal.ProjectModel ;
2016-08-22 12:21:34 -07:00
using System.Linq ;
namespace Microsoft.DotNet.ProjectJsonMigration
{
2016-10-27 18:46:43 -07:00
internal class MigrationRuleInputs
2016-08-22 12:21:34 -07:00
{
2016-09-21 17:27:02 -07:00
public ProjectRootElement ProjectXproj { get ; }
2016-08-22 12:21:34 -07:00
public ProjectRootElement OutputMSBuildProject { get ; }
public ProjectItemGroupElement CommonItemGroup { get ; }
public ProjectPropertyGroupElement CommonPropertyGroup { get ; }
2016-09-26 21:40:11 -07:00
public List < ProjectContext > ProjectContexts { get ; }
2016-08-22 12:21:34 -07:00
public ProjectContext DefaultProjectContext
{
get
{
return ProjectContexts . First ( ) ;
}
}
public MigrationRuleInputs (
IEnumerable < ProjectContext > projectContexts ,
2016-08-23 13:50:05 -07:00
ProjectRootElement outputMSBuildProject ,
2016-08-22 12:21:34 -07:00
ProjectItemGroupElement commonItemGroup ,
2016-09-21 17:27:02 -07:00
ProjectPropertyGroupElement commonPropertyGroup ,
ProjectRootElement projectXproj = null )
2016-08-22 12:21:34 -07:00
{
2016-09-21 17:27:02 -07:00
ProjectXproj = projectXproj ;
2016-09-26 21:40:11 -07:00
ProjectContexts = projectContexts . ToList ( ) ;
2016-08-23 13:50:05 -07:00
OutputMSBuildProject = outputMSBuildProject ;
2016-08-22 12:21:34 -07:00
CommonItemGroup = commonItemGroup ;
CommonPropertyGroup = commonPropertyGroup ;
}
}
}