Free cookie consent management tool by TermsFeed Policy Generator

source: branches/2924_DotNetCoreMigration/HeuristicLab.CommandLineInterface/Attributes/CommandAttribute.cs @ 17039

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
Line 
1using System;
2using HeuristicLab.CommandLineInterface.Core;
3
4namespace 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)]
10  public class CommandAttribute : CLIBaseAttribute {
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.