2024-02-21 11:30:53 -08:00
|
|
|
// Copyright (c) .NET Foundation. All rights reserved.
|
|
|
|
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
|
|
|
|
|
|
|
|
|
using System.ComponentModel.Composition;
|
|
|
|
|
using NuGet;
|
2024-08-20 14:20:27 -07:00
|
|
|
using NuGet.CommandLine;
|
2024-02-21 11:30:53 -08:00
|
|
|
|
|
|
|
|
namespace SampleCommandLineExtensions
|
|
|
|
|
{
|
|
|
|
|
[Export]
|
|
|
|
|
[Command("greet", "Prints greetings")]
|
|
|
|
|
[DeprecatedCommand(typeof(HelloCommand))]
|
|
|
|
|
public class GreetCommand : Command
|
|
|
|
|
{
|
|
|
|
|
public override void ExecuteCommand()
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine("Greetings");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|