Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
651b5b7c8This file is pinned to the selected release. Download the original to open it in your design tool.
using System;
namespace Hast.Console.Attributes
{
/// <summary>
/// Indicates that if the first positional argument is the <see cref="Name"/> then an instance of the decorated
/// class should take over from <see cref="Program"/>.
/// </summary>
public class SubcommandAttribute : Attribute
{
/// <summary>
/// Gets the name of the subcommand to look for in the positional arguments.
/// </summary>
public string Name { get; }
public SubcommandAttribute(string name) => Name = name;
}
}