using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace Amazon.Common.DotNetCli.Tools.Options { /// /// The definitionn of an option for a command. /// public class CommandOption { /// /// An enum for the possible values for an option /// public enum CommandOptionValueType { NoValue, StringValue, BoolValue, IntValue, CommaDelimitedList, KeyValuePairs, JsonValue } /// /// The name of the option. /// public string Name { get; set; } /// /// The short form of the command line switch. This will start with just one dash e.g. -f for framework /// public string ShortSwitch { get; set; } /// /// The full form of the command line switch. This will start with two dashes e.g. --framework /// public string Switch { get; set; } /// /// The description of the option /// public string Description { get; set; } /// /// The type of value that is expected with this command option /// public CommandOptionValueType ValueType { get; set; } /// /// The JSON key used in configuration file.` /// public string ConfigFileKey { get { var key = this.Switch; if (key.StartsWith("--")) key = key.Substring(2); return key; } } } }