Upstream Tyrrrz/CliFx state of the touched files before 9ef5dcb635

This commit is contained in:
upstream committed 2026-08-28 10:12:58 +02:00
commit e3e64a40e4
6 files changed
+2165

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
using System;
namespace CliFx.Binding;
/// <summary>
/// Binds a type to a command.
/// </summary>
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
public class CommandAttribute(string? name) : Attribute
{
/// <summary>
/// Initializes an instance of <see cref="CommandAttribute" />.
/// </summary>
public CommandAttribute()
: this(null) { }
/// <summary>
/// Command name.
/// </summary>
/// <remarks>
/// Command can have no name, in which case it's treated as the application's default (i.e., root) command.
/// Only one default command is allowed to be registered in an application.
/// All commands registered in an application must have unique names (comparison IS NOT case-sensitive).
/// </remarks>
public string? Name { get; } = name;
/// <summary>
/// Command description.
/// Used for display purposes in the help text.
/// </summary>
public string? Description { get; set; }
}