2016-11-15 15:42:15 -08: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.
|
|
|
|
|
|
2016-12-13 14:31:35 -10:00
|
|
|
|
using System;
|
2016-11-15 15:42:15 -08:00
|
|
|
|
using System.Collections.Generic;
|
2016-12-13 14:31:35 -10:00
|
|
|
|
using Microsoft.DotNet.Cli;
|
2017-01-06 10:58:23 -10:00
|
|
|
|
using Microsoft.DotNet.Cli.Utils;
|
2016-12-20 14:23:11 -08:00
|
|
|
|
using Microsoft.DotNet.Tools.Add.PackageReference;
|
2016-11-15 16:41:29 -08:00
|
|
|
|
using Microsoft.DotNet.Tools.Add.ProjectToProjectReference;
|
2016-11-15 15:42:15 -08:00
|
|
|
|
|
|
|
|
|
namespace Microsoft.DotNet.Tools.Add
|
|
|
|
|
{
|
2016-12-13 14:31:35 -10:00
|
|
|
|
public class AddCommand : DotNetTopLevelCommandBase
|
2016-11-15 15:42:15 -08:00
|
|
|
|
{
|
2016-12-13 14:31:35 -10:00
|
|
|
|
protected override string CommandName => "add";
|
|
|
|
|
protected override string FullCommandNameLocalized => LocalizableStrings.NetAddCommand;
|
2017-01-06 10:58:23 -10:00
|
|
|
|
protected override string ArgumentName => Constants.ProjectArgumentName;
|
|
|
|
|
protected override string ArgumentDescriptionLocalized => CommonLocalizableStrings.ArgumentsProjectDescription;
|
2016-12-16 01:04:09 -08:00
|
|
|
|
internal override List<Func<DotNetSubCommandBase>> SubCommands =>
|
|
|
|
|
new List<Func<DotNetSubCommandBase>>
|
2016-12-13 14:31:35 -10:00
|
|
|
|
{
|
2016-12-16 01:04:09 -08:00
|
|
|
|
AddProjectToProjectReferenceCommand.Create,
|
2017-01-06 10:58:23 -10:00
|
|
|
|
AddPackageReferenceCommand.Create,
|
2016-12-13 14:31:35 -10:00
|
|
|
|
};
|
2016-12-07 12:56:27 -08:00
|
|
|
|
|
|
|
|
|
public static int Run(string[] args)
|
|
|
|
|
{
|
2016-12-13 14:31:35 -10:00
|
|
|
|
var command = new AddCommand();
|
|
|
|
|
return command.RunCommand(args);
|
2016-12-07 12:56:27 -08:00
|
|
|
|
}
|
2016-11-15 15:42:15 -08:00
|
|
|
|
}
|
2016-12-20 14:23:11 -08:00
|
|
|
|
}
|