A Swiss Army knife for developers.
C# blazorcross-platformcsharpdesktopdesktop-appdesktop-applicationdeveloper-toolsextensiblefluentfluent-designlinuxmacosmicasyntax-highlightingtypescriptwindowswindows-10windows-11winui
namespace DevToys.Api;
/// <summary>
/// Defines an option for a <see cref="ICommandLineTool"/>.
/// </summary>
[MetadataAttribute]
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public sealed class CommandLineOptionAttribute : CommandNameAttribute
{
/// <summary>
/// Gets the name of the option. Example, "file".
/// Implicitly, an option named "file" will be usable in a command line through "--file <value>".
/// </summary>
public new string Name
{
get => base.Name;
set => base.Name = value;
}
/// <summary>
/// Gets or sets the alias name of the option. Example, "f".
/// Implicitly, an option named "f" will be usable in a command line through "-f <value>".
/// </summary>
public new string Alias
{
get => base.Alias;
set => base.Alias = value;
}
/// <summary>
/// Gets or sets whether the option is required.
/// </summary>
public bool IsRequired { get; set; }
}