CommandLineApplication.Option Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Option(String, String, CommandOptionType)
public:
Microsoft::Extensions::CommandLineUtils::CommandOption ^ Option(System::String ^ template, System::String ^ description, Microsoft::Extensions::CommandLineUtils::CommandOptionType optionType);
public Microsoft.Extensions.CommandLineUtils.CommandOption Option (string template, string description, Microsoft.Extensions.CommandLineUtils.CommandOptionType optionType);
member this.Option : string * string * Microsoft.Extensions.CommandLineUtils.CommandOptionType -> Microsoft.Extensions.CommandLineUtils.CommandOption
Public Function Option (template As String, description As String, optionType As CommandOptionType) As CommandOption
Parameters
- template
- String
- description
- String
- optionType
- CommandOptionType
Returns
Applies to
Option(String, String, CommandOptionType, Action<CommandOption>)
public:
Microsoft::Extensions::CommandLineUtils::CommandOption ^ Option(System::String ^ template, System::String ^ description, Microsoft::Extensions::CommandLineUtils::CommandOptionType optionType, Action<Microsoft::Extensions::CommandLineUtils::CommandOption ^> ^ configuration);
public Microsoft.Extensions.CommandLineUtils.CommandOption Option (string template, string description, Microsoft.Extensions.CommandLineUtils.CommandOptionType optionType, Action<Microsoft.Extensions.CommandLineUtils.CommandOption> configuration);
member this.Option : string * string * Microsoft.Extensions.CommandLineUtils.CommandOptionType * Action<Microsoft.Extensions.CommandLineUtils.CommandOption> -> Microsoft.Extensions.CommandLineUtils.CommandOption
Public Function Option (template As String, description As String, optionType As CommandOptionType, configuration As Action(Of CommandOption)) As CommandOption
Parameters
- template
- String
- description
- String
- optionType
- CommandOptionType
- configuration
- Action<CommandOption>
Returns
Applies to
Option(String, String, CommandOptionType, Boolean)
public:
Microsoft::Extensions::CommandLineUtils::CommandOption ^ Option(System::String ^ template, System::String ^ description, Microsoft::Extensions::CommandLineUtils::CommandOptionType optionType, bool inherited);
public Microsoft.Extensions.CommandLineUtils.CommandOption Option (string template, string description, Microsoft.Extensions.CommandLineUtils.CommandOptionType optionType, bool inherited);
member this.Option : string * string * Microsoft.Extensions.CommandLineUtils.CommandOptionType * bool -> Microsoft.Extensions.CommandLineUtils.CommandOption
Public Function Option (template As String, description As String, optionType As CommandOptionType, inherited As Boolean) As CommandOption
Parameters
- template
- String
- description
- String
- optionType
- CommandOptionType
- inherited
- Boolean
Returns
Applies to
Option(String, String, CommandOptionType, Action<CommandOption>, Boolean)
public:
Microsoft::Extensions::CommandLineUtils::CommandOption ^ Option(System::String ^ template, System::String ^ description, Microsoft::Extensions::CommandLineUtils::CommandOptionType optionType, Action<Microsoft::Extensions::CommandLineUtils::CommandOption ^> ^ configuration, bool inherited);
public Microsoft.Extensions.CommandLineUtils.CommandOption Option (string template, string description, Microsoft.Extensions.CommandLineUtils.CommandOptionType optionType, Action<Microsoft.Extensions.CommandLineUtils.CommandOption> configuration, bool inherited);
member this.Option : string * string * Microsoft.Extensions.CommandLineUtils.CommandOptionType * Action<Microsoft.Extensions.CommandLineUtils.CommandOption> * bool -> Microsoft.Extensions.CommandLineUtils.CommandOption
Public Function Option (template As String, description As String, optionType As CommandOptionType, configuration As Action(Of CommandOption), inherited As Boolean) As CommandOption
Parameters
- template
- String
- description
- String
- optionType
- CommandOptionType
- configuration
- Action<CommandOption>
- inherited
- Boolean
Returns
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for