Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 1.22 KB

CodeSnippets.md

File metadata and controls

24 lines (19 loc) · 1.22 KB

Code Snippets

Several code snippets for Visual Studio are provided to make working with Ookii.CommandLine even easier:

  • clargclass: Creates an arguments class.
  • clarg: Creates a property for a command line argument.
  • clargpos: Creates a property for a positional command line argument.
  • clargreq: Creates a property for a required positional command line argument (C# only).
  • clargmulti: Creates a property for a multi-value command line argument.
  • clargdict: Creates a property for a dictionary command line argument.
  • clargswitch: Creates a property for a switch argument.
  • clcmd: Creates a subcommand class.
  • clcmdasync: Creates an asynchronous subcommand class.

All snippets are provided for C# and Visual Basic, except as noted.

A Visual Studio extension is provided that installs the snippets.

Alternatively, you can use the snippet manager inside Visual Studio to import the snippet files, or manually copy the snippet files to the "Visual Studio <version>\Code Snippets\Visual C#\My Code Snippets" or "Visual Studio <version>\Code Snippets\Visual Basic\My Code Snippets" folder located in your Documents folder.