dotnet-installer/src/dotnet/commands/dotnet-clean/CleanCommandParser.cs

27 lines
1.1 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.
2017-03-09 18:16:20 -08:00
using System.Linq;
using Microsoft.DotNet.Cli.CommandLine;
2017-03-09 18:16:20 -08:00
using LocalizableStrings = Microsoft.DotNet.Tools.Clean.LocalizableStrings;
namespace Microsoft.DotNet.Cli
{
internal static class CleanCommandParser
{
public static Command Clean() =>
2017-03-09 18:16:20 -08:00
Create.Command(
"clean",
2017-03-10 13:36:18 -08:00
LocalizableStrings.AppFullName,
2017-03-10 17:52:40 -08:00
Accept.ZeroOrMoreArguments(),
2017-03-09 18:16:20 -08:00
CommonOptions.HelpOption(),
Create.Option("-o|--output",
2017-03-10 13:36:18 -08:00
LocalizableStrings.CmdOutputDirDescription,
2017-03-10 17:11:19 -08:00
Accept.ExactlyOneArgument()
2017-03-10 13:36:18 -08:00
.With(name: LocalizableStrings.CmdOutputDir)
.ForwardAsSingle(o => $"/p:OutputPath={o.Arguments.Single()}")),
2017-03-09 18:16:20 -08:00
CommonOptions.FrameworkOption(),
CommonOptions.ConfigurationOption(),
CommonOptions.VerbosityOption());
}
}