Last change
on this file since 17039 was
17025,
checked in by dpiringe, 5 years ago
|
#2924:
- added base attribute CLIBaseAttribute for CLI attributes, which contains the property Description
- changed inheritance from Attribute to CLIBaseAttribute for types: CommandAttribute, OptionAttribute and ValueAttribute
- added comment in RunnerHost
|
File size:
829 bytes
|
Rev | Line | |
---|
[16985] | 1 | using System;
|
---|
[17025] | 2 | using HeuristicLab.CommandLineInterface.Core;
|
---|
[16985] | 3 |
|
---|
| 4 | namespace HeuristicLab.CommandLineInterface {
|
---|
| 5 |
|
---|
| 6 | /// <summary>
|
---|
| 7 | /// Attribute to specify a command. The class still needs to implement the ICommand interface.
|
---|
| 8 | /// </summary>
|
---|
| 9 | [AttributeUsage(AttributeTargets.Class)]
|
---|
[17025] | 10 | public class CommandAttribute : CLIBaseAttribute {
|
---|
[16985] | 11 | /// <summary>
|
---|
| 12 | /// To identify the command. This is the string, the user has to enter to activate this command.
|
---|
| 13 | /// If not set, the classname without 'Command' will be used. For example: DummyCommand -> Dummy
|
---|
| 14 | /// </summary>
|
---|
| 15 | public string Identifier { get; set; } = "";
|
---|
| 16 | /// <summary>
|
---|
| 17 | /// To specify child commands. For example: myApp myCommand childCommand ...
|
---|
| 18 | /// </summary>
|
---|
| 19 | public Type[] SubCommands { get; set; } = new Type[0];
|
---|
| 20 | }
|
---|
| 21 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.