add dotnet list p2ps (#4929)
* add stub for dotnet list p2ps * apply review feedback * PR feedback: consistent method modifiers * apply missed review feedback * add test coverage and do not treat no p2ps as error * move private methods to the bottom, rename weird res name
This commit is contained in:
parent
d29925a689
commit
79e6126b2a
17 changed files with 448 additions and 3 deletions
40
src/dotnet/commands/dotnet-list/Program.cs
Normal file
40
src/dotnet/commands/dotnet-list/Program.cs
Normal file
|
@ -0,0 +1,40 @@
|
|||
// 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;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.DotNet.Tools.List.ProjectToProjectReferences;
|
||||
|
||||
namespace Microsoft.DotNet.Tools.List
|
||||
{
|
||||
public class ListCommand : DispatchCommand
|
||||
{
|
||||
protected override string HelpText => $@"{LocalizableStrings.ListCommandDescription}
|
||||
|
||||
{LocalizableStrings.Usage}: dotnet list [options] <object> <command> [[--] <arg>...]]
|
||||
|
||||
Options:
|
||||
-h|--help {LocalizableStrings.HelpDefinition}
|
||||
|
||||
{LocalizableStrings.Arguments}:
|
||||
<object> {LocalizableStrings.ObjectDefinition}
|
||||
<command> {LocalizableStrings.CommandDefinition}
|
||||
|
||||
{LocalizableStrings.ExtraArgs}:
|
||||
{LocalizableStrings.ExtraArgumentsDefinition}
|
||||
|
||||
{LocalizableStrings.Commands}:
|
||||
p2ps {LocalizableStrings.P2PsDefinition}";
|
||||
|
||||
protected override Dictionary<string, Func<string[], int>> BuiltInCommands => new Dictionary<string, Func<string[], int>>
|
||||
{
|
||||
["p2ps"] = ListProjectToProjectReferencesCommand.Run,
|
||||
};
|
||||
|
||||
public static int Run(string[] args)
|
||||
{
|
||||
var cmd = new ListCommand();
|
||||
return cmd.Start(args);
|
||||
}
|
||||
}
|
||||
}
|
Reference in a new issue