|
3 | 3 |
|
4 | 4 | namespace MatthiWare.CommandLine.Abstractions.Command |
5 | 5 | { |
| 6 | + /// <summary> |
| 7 | + /// Configures commands using a fluent interface |
| 8 | + /// </summary> |
| 9 | + /// <typeparam name="Tsource">Command options class</typeparam> |
6 | 10 | public interface ICommandBuilder<Tsource> where Tsource : class, new() |
7 | 11 | { |
| 12 | + /// <summary> |
| 13 | + /// Configures if the command is required |
| 14 | + /// </summary> |
| 15 | + /// <param name="required">True or false</param> |
| 16 | + /// <returns><see cref="ICommandBuilder{Tsource}"/></returns> |
8 | 17 | ICommandBuilder<Tsource> Required(bool required = true); |
9 | 18 |
|
| 19 | + /// <summary> |
| 20 | + /// Configures the help text for the command |
| 21 | + /// </summary> |
| 22 | + /// <param name="required">True or false</param> |
| 23 | + /// <returns><see cref="ICommandBuilder{Tsource}"/></returns> |
10 | 24 | ICommandBuilder<Tsource> HelpText(string help); |
11 | 25 |
|
| 26 | + /// <summary> |
| 27 | + /// Configures the command name |
| 28 | + /// </summary> |
| 29 | + /// <param name="shortName">Short name</param> |
| 30 | + /// <returns><see cref="ICommandBuilder{Tsource}"/></returns> |
12 | 31 | ICommandBuilder<Tsource> Name(string shortName); |
13 | 32 |
|
| 33 | + /// <summary> |
| 34 | + /// Configures the command name |
| 35 | + /// </summary> |
| 36 | + /// <param name="shortName">Short name</param> |
| 37 | + /// <param name="longName">Long name</param> |
| 38 | + /// <returns><see cref="ICommandBuilder{Tsource}"/></returns> |
14 | 39 | ICommandBuilder<Tsource> Name(string shortName, string longName); |
15 | 40 |
|
| 41 | + /// <summary> |
| 42 | + /// Configures the execution of the command |
| 43 | + /// </summary> |
| 44 | + /// <param name="required">True or false</param> |
| 45 | + /// <returns><see cref="ICommandBuilder{Tsource}"/></returns> |
16 | 46 | ICommandBuilder<Tsource> OnExecuting(Action<Tsource> action); |
17 | 47 |
|
| 48 | + /// <summary> |
| 49 | + /// Configures if the command options |
| 50 | + /// </summary> |
| 51 | + /// <param name="selector">Property to configure</param> |
| 52 | + /// <returns><see cref="IOptionBuilder"/></returns> |
18 | 53 | IOptionBuilder Configure<TProperty>(Expression<Func<Tsource, TProperty>> selector); |
19 | 54 | } |
20 | 55 | } |
0 commit comments