GeneratedCommandManagerAttribute Class

Indicates that the target class is a command manager created using source generation.

Definition

Namespace: Ookii.CommandLine.Commands
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.0.0+bb7ed9a8fdfd1cb21824750a8cf508863ad15086
C#
public sealed class GeneratedCommandManagerAttribute : Attribute
Inheritance
Object    Attribute    GeneratedCommandManagerAttribute

Remarks

When using this attribute, source generation is used to determine which classes are available at compile time, either in the assembly being compiled, or the assemblies specified using the AssemblyNames property. The target class will be modified to inherit from the CommandManager class, and should be used instead of the CommandManager class to find, create, and run commands.

Using a class with this attribute avoids the use of runtime reflection to determine which commands are available, improving performance and allowing your application to be trimmed.

To use source generation for the command line arguments of individual commands, use the GeneratedParserAttribute attribute on each command class.

Constructors

GeneratedCommandManagerAttributeInitializes a new instance of the GeneratedCommandManagerAttribute class

Properties

AssemblyNames Gets or sets the names of the assemblies that contain the commands that the generated CommandManager will use.
TypeIdWhen implemented in a derived class, gets a unique identifier for this Attribute.
(Inherited from Attribute)

Methods

EqualsReturns a value that indicates whether this instance is equal to a specified object.
(Inherited from Attribute)
GetHashCodeReturns the hash code for this instance.
(Inherited from Attribute)
GetTypeGets the Type of the current instance.
(Inherited from Object)
IsDefaultAttributeWhen overridden in a derived class, indicates whether the value of this instance is the default value for the derived class.
(Inherited from Attribute)
MatchWhen overridden in a derived class, returns a value that indicates whether this instance equals a specified object.
(Inherited from Attribute)
ToStringReturns a string that represents the current object.
(Inherited from Object)

Thread Safety

Static members of this type are safe for multi-threaded operations. Instance members of this type are safe for multi-threaded operations.

See Also