Class FlagAttribute
- Namespace
- Signal.Application.Commands
- Assembly
- Signal.Application.dll
Binds the parameter to a named option (--name value or --name=value) instead of a position.
bool flags are switches: --name sets them to true.
[AttributeUsage(AttributeTargets.Parameter)]
public sealed class FlagAttribute : Attribute
- Inheritance
-
FlagAttribute
- Inherited Members
Constructors
FlagAttribute(string?)
Binds the parameter to a named option (--name value or --name=value) instead of a position.
bool flags are switches: --name sets them to true.
public FlagAttribute(string? name = null)
Parameters
namestringThe option name; defaults to the parameter name.
Properties
Name
The option name, or null to use the parameter name.
public string? Name { get; }