Merge branch 'master' into config-checks-ipv6
[mono.git] / mcs / class / Mono.Options / Documentation / en / Mono.Options / CommandSet.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <Type Name="CommandSet" FullName="Mono.Options.CommandSet">
3   <TypeSignature Language="C#" Value="public class CommandSet : System.Collections.ObjectModel.KeyedCollection&lt;string,Mono.Options.Command&gt;" />
4   <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit CommandSet extends System.Collections.ObjectModel.KeyedCollection`2&lt;string, class Mono.Options.Command&gt;" />
5   <AssemblyInfo>
6     <AssemblyName>Mono.Options</AssemblyName>
7     <AssemblyVersion>0.2.3.0</AssemblyVersion>
8   </AssemblyInfo>
9   <ThreadingSafetyStatement>
10     Public <c>static</c> members of this type are thread safe.
11     Any instance members are not guaranteed to be thread safe.
12   </ThreadingSafetyStatement>
13   <Base>
14     <BaseTypeName>System.Collections.ObjectModel.KeyedCollection&lt;System.String,Mono.Options.Command&gt;</BaseTypeName>
15     <BaseTypeArguments>
16       <BaseTypeArgument TypeParamName="!0">System.String</BaseTypeArgument>
17       <BaseTypeArgument TypeParamName="!1">Mono.Options.Command</BaseTypeArgument>
18     </BaseTypeArguments>
19   </Base>
20   <Interfaces />
21   <Docs>
22     <summary>
23       A <i>suite</i> of commands, global program options, and associated documentation.
24     </summary>
25     <remarks>
26       <para>
27         A common requirement of some programs are discrete <i>commands</i>.
28         A <c>CommandSet</c> represents a <i>suite</i> of commands, intermixed
29         with suite documentation. Commands are managed by
30         <see cref="T:Mono.Options.Command" /> instances, which have a required
31         <i>name</i> and optional help text, and <c>CommandSet</c> will use the
32         intermixed documentation, options, and commands to produce <c>help</c>
33         command output.
34       </para>
35       <para>
36         To create a <c>CommandSet</c> instance, use the
37         <see cref="C:Mono.Options.CommandSet(System.String, System.Converter, System.IO.TextWriter, System.IO.TextWriter)" />
38         constructor. Only the suite name is required; all other parameters are
39         optional.
40       </para>
41       <para>
42         Once a <c>CommandSet</c> instance has been constructed, use the
43         <see cref="M:Mono.Options.CommandSet.Add" /> methods to add and
44         intermix suite documentation, global options, and commands.
45         Documentation is any string constant, global options are handled
46         by <see cref="T:Mono.Options.Option" /> instances and associated
47         <c>Add()</c> method overloads which implicitly create <c>Option</c>
48         instances, and commands are through <c>Command</c> instances.
49       </para>
50       <para>
51         Once the <c>CommandSet</c> instance has been initialized, call the
52         <see cref="M:Mono.Options.CommandSet.Run(System.String[])" />
53         method to process the arguments provided to <c>Main()</c>.
54         The appropriate <c>Command</c> instance will be determined, it's
55         options parsed, and <see cref="M:Mono.Options.Command.Invoke" />
56         will be executed. The return value of <c>Command.Invoke()</c>
57         is returned from <c>CommandSet.Run()</c>, and should be treated
58         as the process exit value.
59       </para>
60     </remarks>
61     <example>
62       <para>
63         The following <c>commands</c> example demonstrates some simple usage
64         of <see cref="T:Mono.Options.CommandSet" />.
65       </para>
66       <code lang="C#" src="examples/commands.cs">// Sub-commands with Mono.Options.CommandSet
67 //
68 // Compile as:
69 //   mcs -r:Mono.Options.dll commands.cs
70
71 using System;
72 using System.Collections.Generic;
73
74 using Mono.Options;
75
76 class CommandDemo {
77         public static int Main (string[] args)
78         {
79                 var commands = new CommandSet ("commands") {
80                         "usage: commands COMMAND [OPTIONS]",
81                         "",
82                         "Mono.Options.CommandSet sample app.",
83                         "",
84                         "Global options:",
85                         { "v:",
86                           "Output verbosity.",
87                           (int? n) =&gt; Verbosity = n.HasValue ? n.Value : Verbosity + 1 },
88                         "",
89                         "Available commands:",
90                         new Command ("echo", "Echo arguments to the screen") {
91                                 Run = ca =&gt; Console.WriteLine ("{0}", string.Join (" ", ca)),
92                         },
93                         new RequiresArgs (),
94                 };
95                 return commands.Run (args);
96         }
97
98         public static int Verbosity;
99 }
100
101 class RequiresArgs : Command {
102
103         public RequiresArgs ()
104                 : base ("requires-args", "Class-based Command subclass")
105         {
106                 Options = new OptionSet () {
107                         "usage: commands requires-args [OPTIONS]",
108                         "",
109                         "Class-based Command subclass example.",
110                         { "name|n=",
111                           "{name} of person to greet.",
112                           v =&gt; Name = v },
113                         { "help|h|?",
114                           "Show this message and exit.",
115                           v =&gt; ShowHelp = v != null },
116                 };
117         }
118
119         public        bool    ShowHelp    {get; private set;}
120         public  new   string  Name        {get; private set;}
121
122         public override int Invoke (IEnumerable&lt;string&gt; args)
123         {
124                 try {
125                         var extra = Options.Parse (args);
126                         if (ShowHelp) {
127                                 Options.WriteOptionDescriptions (CommandSet.Out);
128                                 return 0;
129                         }
130                         if (string.IsNullOrEmpty (Name)) {
131                                 Console.Error.WriteLine ("commands: Missing required argument `--name=NAME`.");
132                                 Console.Error.WriteLine ("commands: Use `commands help requires-args` for details.");
133                                 return 1;
134                         }
135                         Console.WriteLine ($"Hello, {Name}!");
136                         return 0;
137                 }
138                 catch (Exception e) {
139                         Console.Error.WriteLine ("commands: {0}", CommandDemo.Verbosity &gt;= 1 ? e.ToString () : e.Message);
140                         return 1;
141                 }
142         }
143 }
144 </code>
145       <para>
146         The output, under the influence of different command-line arguments, is:
147       </para>
148       <code lang="sh" src="examples/commands.txt">$ mono commands.exe
149 Use `commands help` for usage.
150
151 $ mono commands.exe --help
152 usage: commands COMMAND [OPTIONS]
153
154 Mono.Options.CommandSet sample app.
155
156 Global options:
157   -v[=VALUE]                 Output verbosity.
158
159 Available commands:
160         echo                 Echo arguments to the screen
161         requires-args        Class-based Command subclass
162
163 $ mono commands.exe help
164 usage: commands COMMAND [OPTIONS]
165
166 Mono.Options.CommandSet sample app.
167
168 Global options:
169   -v[=VALUE]                 Output verbosity.
170
171 Available commands:
172         echo                 Echo arguments to the screen
173         requires-args        Class-based Command subclass
174
175 $ mono commands.exe help --help
176 Usage: commands COMMAND [OPTIONS]
177 Use `commands help COMMAND` for help on a specific command.
178
179 Available commands:
180
181         echo                 Echo arguments to the screen
182         requires-args        Class-based Command subclass
183         help                 Show this message and exit
184
185 $ mono commands.exe help echo
186 --help
187
188 $ mono commands.exe echo --help
189 --help
190
191 $ mono commands.exe echo hello, world
192 hello, world
193
194 $ mono commands.exe requires-args
195 commands: Missing required argument `--name=NAME`.
196 commands: Use `commands help requires-args` for details.
197
198 $ mono commands.exe help requires-args
199 usage: commands requires-args [OPTIONS]
200
201 Class-based Command subclass example.
202       --name, -n=name        name of person to greet.
203       --help, -h, -?         Show this message and exit.
204
205 $ mono commands.exe requires-args --help
206 usage: commands requires-args [OPTIONS]
207
208 Class-based Command subclass example.
209       --name, -n=name        name of person to greet.
210       --help, -h, -?         Show this message and exit.
211
212 $ mono commands.exe requires-args -n World
213 Hello, World!
214
215 $ mono commands.exe invalid-command
216 commands: Unknown command: invalid-command
217 commands: Use `commands help` for usage.
218
219 $ mono commands.exe help invalid-command
220 commands: Unknown command: invalid-command
221 commands: Use `commands help` for usage.
222 </code>
223       <para>
224         The <c>commands.exe</c> output is short, informing the user that
225         commands are required for use.
226       </para>
227       <para>
228         The <c>commands.exe --help</c> is identical to the <c>commands help</c>
229         output, and shows the provided suite documentation.
230       </para>
231       <para>
232         <c>commands.exe COMMAND --help</c> and <c>commands.exe help COMMAND</c>
233         output is likewise identical, and will attempt to generate documentation
234         for the specified command, if available. This is performed by invoking
235         <see cref="M:Mono.Options.Command.Invoke(System.Collections.Generic.IEnumerable{System.String})" />
236         with the value <c>{ "--help" }</c>. This can be seen in the
237         <c>commands.exe help echo</c> and <c>commands.exe echo --help</c>
238         output, which simply prints <c>--help</c>. If a command wants
239         to partake in <c>help COMMAND</c> support, it needs to explicitly
240         handle the <c>--help</c> option in its associated
241         <see cref="T:Mono.Options.OptionSet" /> instance, referenced by the
242         <see cref="P:Mono.Options.Command.Options" /> property.
243       </para>
244       <para>
245         Finally, if an invalid command is specified, then an error is written
246         to <see cref="P:Mono.Options.CommandSet.Error" />, prefixed with the
247         <see cref="P:Mono.Options.CommandSet.Suite" /> value.
248       </para>
249     </example>
250   </Docs>
251   <Members>
252     <Member MemberName=".ctor">
253       <MemberSignature Language="C#" Value="public CommandSet (string suite, Converter&lt;string,string&gt; localizer = null);" />
254       <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string suite, class System.Converter`2&lt;string, string&gt; localizer) cil managed" />
255       <MemberType>Constructor</MemberType>
256       <AssemblyInfo>
257         <AssemblyVersion>0.2.3.0</AssemblyVersion>
258       </AssemblyInfo>
259       <Parameters>
260         <Parameter Name="suite" Type="System.String" />
261         <Parameter Name="localizer" Type="System.Converter&lt;System.String,System.String&gt;" />
262       </Parameters>
263       <Docs>
264         <param name="suite">
265           A <see cref="T:System.String" /> containing the name of the suite.
266           This value is used in default <c>help</c> text output.
267         </param>
268         <param name="localizer">
269           A <see cref="T:System.Converter{System.String,System.String}" />
270           instance that will be used to translate strings.
271           If <see langword="null" />, then no localization is performed.
272         </param>
273         <summary>
274           Creates and initializes a new <c>CommandSet</c> instance.
275         </summary>
276         <remarks>
277           <para>
278             This constructor initializes
279             the <see cref="P:Mono.Options.CommandSet.Suite" /> property
280             of the new instance using <paramref name="suite" />,
281             the <see cref="P:Mono.Options.CommandSet.MessageLocalizer" /> property
282             of the new instance using <paramref name="localizer" />,
283             the <see cref="P:Mono.Options.CommandSet.Out" /> property
284             to <see cref="P:System.Console.Out" />, and
285             the <see cref="P:Mono.Options.CommandSet.Error" /> property
286             to <see cref="P:System.Console.Error" />.
287           </para>
288         </remarks>
289         <exception cref="T:System.ArgumentNullException">
290           <paramref name="suite" /> is <see langword="null" />.
291         </exception>
292       </Docs>
293     </Member>
294     <Member MemberName=".ctor">
295       <MemberSignature Language="C#" Value="public CommandSet (string suite, System.IO.TextWriter output, System.IO.TextWriter error, Converter&lt;string,string&gt; localizer = null);" />
296       <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string suite, class System.IO.TextWriter output, class System.IO.TextWriter error, class System.Converter`2&lt;string, string&gt; localizer) cil managed" />
297       <MemberType>Constructor</MemberType>
298       <AssemblyInfo>
299         <AssemblyVersion>0.2.3.0</AssemblyVersion>
300       </AssemblyInfo>
301       <Parameters>
302         <Parameter Name="suite" Type="System.String" />
303         <Parameter Name="output" Type="System.IO.TextWriter" />
304         <Parameter Name="error" Type="System.IO.TextWriter" />
305         <Parameter Name="localizer" Type="System.Converter&lt;System.String,System.String&gt;" />
306       </Parameters>
307       <Docs>
308         <param name="suite">
309           A <see cref="T:System.String" /> containing the name of the suite.
310           This value is used in default <c>help</c> text output.
311         </param>
312         <param name="output">
313           A <see cref="T:System.IO.TextWriter" /> where output messages will be
314           written to.
315         </param>
316         <param name="error">
317           A <see cref="T:System.IO.TextWriter" /> where error messages will be
318           written to.
319         </param>
320         <param name="localizer">
321           A <see cref="T:System.Converter{System.String,System.String}" />
322           instance that will be used to translate strings.
323           If <see langword="null" />, then no localization is performed.
324         </param>
325         <summary>
326           Creates and initializes a new <c>CommandSet</c> instance.
327         </summary>
328         <remarks>
329           <para>
330             This constructor initializes
331             the <see cref="P:Mono.Options.CommandSet.Suite" /> property
332             of the new instance using <paramref name="suite" />,
333             the <see cref="P:Mono.Options.CommandSet.MessageLocalizer" /> property
334             of the new instance using <paramref name="localizer" />,
335             the <see cref="P:Mono.Options.CommandSet.Out" /> property
336             of the new instance using <paramref name="output" />, and
337             the <see cref="P:Mono.Options.CommandSet.Error" /> property
338             of the new instance using <paramref name="error" />.
339           </para>
340         </remarks>
341         <exception cref="T:System.ArgumentNullException">
342           <paramref name="suite" /> is <see langword="null" />.
343         </exception>
344         <exception cref="T:System.ArgumentNullException">
345           <paramref name="output" /> is <see langword="null" />.
346         </exception>
347         <exception cref="T:System.ArgumentNullException">
348           <paramref name="error" /> is <see langword="null" />.
349         </exception>
350       </Docs>
351     </Member>
352     <Member MemberName="Add">
353       <MemberSignature Language="C#" Value="public Mono.Options.CommandSet Add (Mono.Options.ArgumentSource source);" />
354       <MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Mono.Options.CommandSet Add(class Mono.Options.ArgumentSource source) cil managed" />
355       <MemberType>Method</MemberType>
356       <AssemblyInfo>
357         <AssemblyVersion>0.2.3.0</AssemblyVersion>
358       </AssemblyInfo>
359       <ReturnValue>
360         <ReturnType>Mono.Options.CommandSet</ReturnType>
361       </ReturnValue>
362       <Parameters>
363         <Parameter Name="source" Type="Mono.Options.ArgumentSource" />
364       </Parameters>
365       <Docs>
366         <param name="source">
367           A <see cref="T:Mono.Options.ArgumentSource" /> to register for
368           argument processing.
369         </param>
370         <summary>
371           Registers <paramref name="source" /> so that it may be consulted
372           during argument processing within
373           <see cref="M:Mono.Options.CommandSet.Run(System.Collections.Generic.IEnumerable{System.String})" />.
374         </summary>
375         <returns>
376           The current <see cref="T:Mono.Options.CommandSet" /> instance.
377           This is to permit method chaining.
378         </returns>
379         <remarks>
380         </remarks>
381         <exception cref="T:System.ArgumentNullException">
382           <paramref name="source" /> is <see langword="null" />.
383         </exception>
384       </Docs>
385     </Member>
386     <Member MemberName="Add">
387       <MemberSignature Language="C#" Value="public Mono.Options.CommandSet Add (Mono.Options.Command value);" />
388       <MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Mono.Options.CommandSet Add(class Mono.Options.Command value) cil managed" />
389       <MemberType>Method</MemberType>
390       <AssemblyInfo>
391         <AssemblyVersion>0.2.3.0</AssemblyVersion>
392       </AssemblyInfo>
393       <ReturnValue>
394         <ReturnType>Mono.Options.CommandSet</ReturnType>
395       </ReturnValue>
396       <Parameters>
397         <Parameter Name="value" Type="Mono.Options.Command" />
398       </Parameters>
399       <Docs>
400         <param name="value">
401           A <see cref="T:Mono.Options.Command" /> to add to the suite.
402         </param>
403         <summary>
404           Add a <c>Command</c> to the suite.
405         </summary>
406         <returns>
407           The current <see cref="T:Mono.Options.CommandSet" /> instance.
408           This is to permit method chaining.
409         </returns>
410         <remarks>
411         </remarks>
412         <exception cref="T:System.ArgumentException">
413           <para>
414             A <c>Command</c> with the same value for
415             <c><paramref name="value" />.Name</c>
416             has already been added to the <c>CommandSet</c>.
417           </para>
418           <para>-or-</para>
419           <para>
420             <paramref name="value" /> has been <c>Add()</c>ed to a different
421             <c>CommandSet</c> instance.
422           </para>
423         </exception>
424         <exception cref="T:System.ArgumentNullException">
425           <paramref name="value" /> is <see langword="null" />.
426         </exception>
427       </Docs>
428     </Member>
429     <Member MemberName="Add">
430       <MemberSignature Language="C#" Value="public Mono.Options.CommandSet Add (Mono.Options.Option option);" />
431       <MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Mono.Options.CommandSet Add(class Mono.Options.Option option) cil managed" />
432       <MemberType>Method</MemberType>
433       <AssemblyInfo>
434         <AssemblyVersion>0.2.3.0</AssemblyVersion>
435       </AssemblyInfo>
436       <ReturnValue>
437         <ReturnType>Mono.Options.CommandSet</ReturnType>
438       </ReturnValue>
439       <Parameters>
440         <Parameter Name="option" Type="Mono.Options.Option" />
441       </Parameters>
442       <Docs>
443         <param name="option">
444           The <see cref="T:Mono.Options.Option" /> to register.
445         </param>
446         <summary>
447           Adds <paramref name="option" /> as a global suite option.
448         </summary>
449         <returns>
450           The current <see cref="T:Mono.Options.CommandSet" /> instance.
451           This is to permit method chaining.
452         </returns>
453         <remarks>
454           <para>
455             Registers each option name returned by
456             <see cref="M:Mono.Options.Option.GetNames" />, ensuring that any
457             option with a matching name will be handled by the
458             <paramref name="option" /> instance.
459           </para>
460         </remarks>
461         <exception cref="T:System.ArgumentException">
462           <paramref name="option" /> has an alias (as returned from
463           <see cref="M:Mono.Options.Option.GetNames" />) that conflicts with
464           a previously registered <see cref="T:Mono.Options.Option" />.
465         </exception>
466         <exception cref="T:System.ArgumentNullException">
467           <paramref name="option" /> is <see langword="null" />.
468         </exception>
469       </Docs>
470     </Member>
471     <Member MemberName="Add">
472       <MemberSignature Language="C#" Value="public Mono.Options.CommandSet Add (string header);" />
473       <MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Mono.Options.CommandSet Add(string header) cil managed" />
474       <MemberType>Method</MemberType>
475       <AssemblyInfo>
476         <AssemblyVersion>0.2.3.0</AssemblyVersion>
477       </AssemblyInfo>
478       <ReturnValue>
479         <ReturnType>Mono.Options.CommandSet</ReturnType>
480       </ReturnValue>
481       <Parameters>
482         <Parameter Name="header" Type="System.String" />
483       </Parameters>
484       <Docs>
485         <param name="header">
486           A <see cref="T:System.String" /> containing the header to display
487           during <see cref="M:Mono.Options.CommandSet.Run" /><c>help</c> processing.
488         </param>
489         <summary>
490           Declare a header to be printed during for <c>help</c> output.
491         </summary>
492         <returns>
493           The current <see cref="T:Mono.Options.CommandSet" /> instance.
494           This is to permit method chaining.
495         </returns>
496         <remarks>
497         </remarks>
498       </Docs>
499     </Member>
500     <Member MemberName="Add">
501       <MemberSignature Language="C#" Value="public Mono.Options.CommandSet Add (string prototype, Mono.Options.OptionAction&lt;string,string&gt; action);" />
502       <MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Mono.Options.CommandSet Add(string prototype, class Mono.Options.OptionAction`2&lt;string, string&gt; action) cil managed" />
503       <MemberType>Method</MemberType>
504       <AssemblyInfo>
505         <AssemblyVersion>0.2.3.0</AssemblyVersion>
506       </AssemblyInfo>
507       <ReturnValue>
508         <ReturnType>Mono.Options.CommandSet</ReturnType>
509       </ReturnValue>
510       <Parameters>
511         <Parameter Name="prototype" Type="System.String" />
512         <Parameter Name="action" Type="Mono.Options.OptionAction&lt;System.String,System.String&gt;" />
513       </Parameters>
514       <Docs>
515         <param name="prototype">
516           A <see cref="T:System.String" /> containing all option aliases to
517           register, an (optional) type specifier, and an (optional) value
518           separator list; see 
519           <see cref="C:Mono.Options.Option(System.String,System.String,System.Int32)" />
520           for details.
521         </param>
522         <param name="action">
523           A <see cref="T:Mono.Options.OptionAction{System.String,System.String}" />
524           to invoke when an option is parsed.
525         </param>
526         <summary>
527           Registers each alias within <paramref name="prototype" /> so that any 
528           options matching the aliases in <paramref name="prototype" /> will be
529           handled by <paramref name="action" /> during any subsequent
530           <see cref="M:Mono.Options.OptionSet.Parse(System.Collections.Generic.IEnumerable{System.String})" />
531           calls.
532         </summary>
533         <returns>
534           The current <see cref="T:Mono.Options.CommandSet" /> instance.
535           This is to permit method chaining.
536         </returns>
537         <remarks>
538           Calls 
539           <see cref="M:Mono.Options.CommandSet.Add(System.String,System.String,Mono.Options.OptionAction{System.String,System.String})" />
540           with a <paramref name="description" /> value of 
541           <see langword="null" />.
542         </remarks>
543         <altmember cref="M:Mono.Options.CommandSet.Add(System.String,System.String,Mono.Options.OptionAction{System.String,System.String})" />
544         <altmember cref="M:Mono.Options.CommandSet.Add(Mono.Options.Option)" />
545         <exception cref="T:System.ArgumentException">
546           <paramref name="prototype" /> has an alias (as returned from
547           <see cref="M:Mono.Options.Option.GetNames" />) that conflicts with
548           a previously registered <see cref="T:Mono.Options.Option" />.
549         </exception>
550         <exception cref="T:System.ArgumentNullException">
551           <para>
552             <paramref name="prototype" /> is <see langword="null" /></para>
553           <para>-or-</para>
554           <para>
555             <paramref name="action" /> is <see langword="null" /></para>
556         </exception>
557       </Docs>
558     </Member>
559     <Member MemberName="Add">
560       <MemberSignature Language="C#" Value="public Mono.Options.CommandSet Add (string prototype, Action&lt;string&gt; action);" />
561       <MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Mono.Options.CommandSet Add(string prototype, class System.Action`1&lt;string&gt; action) cil managed" />
562       <MemberType>Method</MemberType>
563       <AssemblyInfo>
564         <AssemblyVersion>0.2.3.0</AssemblyVersion>
565       </AssemblyInfo>
566       <ReturnValue>
567         <ReturnType>Mono.Options.CommandSet</ReturnType>
568       </ReturnValue>
569       <Parameters>
570         <Parameter Name="prototype" Type="System.String" />
571         <Parameter Name="action" Type="System.Action&lt;System.String&gt;" />
572       </Parameters>
573       <Docs>
574         <param name="prototype">
575           A <see cref="T:System.String" /> containing all option aliases to
576           register, an (optional) type specifier, and an (optional) value
577           separator list; see 
578           <see cref="C:Mono.Options.Option(System.String,System.String,System.Int32)" />
579           for details.
580         </param>
581         <param name="action">
582           A <see cref="T:System.Action{System.String}" />
583           to invoke when an option is parsed.
584         </param>
585         <summary>
586           Registers each alias within <paramref name="prototype" /> so that any 
587           options matching the aliases in <paramref name="prototype" /> will be
588           handled by <paramref name="action" /> during any subsequent
589           <see cref="M:Mono.Options.CommandSet.Run(System.Collections.Generic.IEnumerable{System.String})" />
590           calls.
591         </summary>
592         <returns>
593           The current <see cref="T:Mono.Options.CommandSet" /> instance.
594           This is to permit method chaining.
595         </returns>
596         <remarks>
597           Calls 
598           <see cref="M:Mono.Options.CommandSet.Add(System.String,System.String,System.Action{System.String})" />
599           with a <paramref name="description" /> value of 
600           <see langword="null" />.
601         </remarks>
602         <altmember cref="M:Mono.Options.CommandSet.Add(System.String,System.String,System.Action{System.String})" />
603         <altmember cref="M:Mono.Options.CommandSet.Add(Mono.Options.Option)" />
604         <exception cref="T:System.ArgumentException">
605           <paramref name="prototype" /> has an alias (as returned from
606           <see cref="M:Mono.Options.Option.GetNames" />) that conflicts with
607           a previously registered <see cref="T:Mono.Options.Option" />.
608         </exception>
609         <exception cref="T:System.ArgumentNullException">
610           <para>
611             <paramref name="prototype" /> is <see langword="null" /></para>
612           <para>-or-</para>
613           <para>
614             <paramref name="action" /> is <see langword="null" /></para>
615         </exception>
616       </Docs>
617     </Member>
618     <Member MemberName="Add">
619       <MemberSignature Language="C#" Value="public Mono.Options.CommandSet Add (string prototype, string description, Mono.Options.OptionAction&lt;string,string&gt; action);" />
620       <MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Mono.Options.CommandSet Add(string prototype, string description, class Mono.Options.OptionAction`2&lt;string, string&gt; action) cil managed" />
621       <MemberType>Method</MemberType>
622       <AssemblyInfo>
623         <AssemblyVersion>0.2.3.0</AssemblyVersion>
624       </AssemblyInfo>
625       <ReturnValue>
626         <ReturnType>Mono.Options.CommandSet</ReturnType>
627       </ReturnValue>
628       <Parameters>
629         <Parameter Name="prototype" Type="System.String" />
630         <Parameter Name="description" Type="System.String" />
631         <Parameter Name="action" Type="Mono.Options.OptionAction&lt;System.String,System.String&gt;" />
632       </Parameters>
633       <Docs>
634         <param name="prototype">
635           A <see cref="T:System.String" /> containing all option aliases to
636           register, an (optional) type specifier, and an (optional) value
637           separator list; see 
638           <see cref="C:Mono.Options.Option(System.String,System.String,System.Int32)" />
639           for details.
640         </param>
641         <param name="description">
642           A <see cref="T:System.String" /> to be used to initialize
643           the <see cref="P:Mono.Options.Option.Description" /> property.
644         </param>
645         <param name="action">
646           A <see cref="T:Mono.Options.OptionAction{System.String,System.String}" />
647           to invoke when an option is parsed.
648         </param>
649         <summary>
650           Registers each alias within <paramref name="prototype" /> so that any 
651           options matching the aliases in <paramref name="prototype" /> will be
652           handled by <paramref name="action" /> during any subsequent
653           <see cref="M:Mono.Options.CommandSet.Run(System.Collections.Generic.IEnumerable{System.String})" />
654           calls.
655         </summary>
656         <returns>
657           The current <see cref="T:Mono.Options.CommandSet" /> instance.
658           This is to permit method chaining.
659         </returns>
660         <remarks>
661           <para>
662             Use this method when <paramref name="prototype" /> should accept
663             two values, generally a key and a value.
664           </para>
665           <block subset="none" type="note">
666             If <paramref name="prototype" /> specifies a 
667             <see cref="F:Mono.Options.OptionValueType.Optional" /> option,
668             then it's possible that both the key and the value will be
669             <see langword="null" /> in the callback function.
670           </block>
671         </remarks>
672         <altmember cref="M:Mono.Options.CommandSet.Add(Mono.Options.Option)" />
673         <exception cref="T:System.ArgumentException">
674           <paramref name="prototype" /> has an alias (as returned from
675           <see cref="M:Mono.Options.Option.GetNames" />) that conflicts with
676           a previously registered <see cref="T:Mono.Options.Option" />.
677         </exception>
678         <exception cref="T:System.ArgumentNullException">
679           <para>
680             <paramref name="prototype" /> is <see langword="null" /></para>
681           <para>-or-</para>
682           <para>
683             <paramref name="action" /> is <see langword="null" /></para>
684         </exception>
685       </Docs>
686     </Member>
687     <Member MemberName="Add">
688       <MemberSignature Language="C#" Value="public Mono.Options.CommandSet Add (string prototype, string description, Action&lt;string&gt; action);" />
689       <MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Mono.Options.CommandSet Add(string prototype, string description, class System.Action`1&lt;string&gt; action) cil managed" />
690       <MemberType>Method</MemberType>
691       <AssemblyInfo>
692         <AssemblyVersion>0.2.3.0</AssemblyVersion>
693       </AssemblyInfo>
694       <ReturnValue>
695         <ReturnType>Mono.Options.CommandSet</ReturnType>
696       </ReturnValue>
697       <Parameters>
698         <Parameter Name="prototype" Type="System.String" />
699         <Parameter Name="description" Type="System.String" />
700         <Parameter Name="action" Type="System.Action&lt;System.String&gt;" />
701       </Parameters>
702       <Docs>
703         <param name="prototype">
704           A <see cref="T:System.String" /> containing all option aliases to
705           register, an (optional) type specifier, and an (optional) value
706           separator list; see 
707           <see cref="C:Mono.Options.Option(System.String,System.String,System.Int32)" />
708           for details.
709         </param>
710         <param name="description">
711           A <see cref="T:System.String" /> containing to used to initialize
712           the <see cref="P:Mono.Options.Option.Description" /> property.
713         </param>
714         <param name="action">
715           A <see cref="T:System.Action{System.String}" />
716           to invoke when an option is parsed.
717         </param>
718         <summary>
719           Registers each alias within <paramref name="prototype" /> so that any 
720           options matching the aliases in <paramref name="prototype" /> will be
721           handled by <paramref name="action" /> during any subsequent
722           <see cref="M:Mono.Options.CommandSet.Run(System.Collections.Generic.IEnumerable{System.String})" />
723           calls.
724         </summary>
725         <returns>
726           The current <see cref="T:Mono.Options.CommandSet" /> instance.
727           This is to permit method chaining.
728         </returns>
729         <remarks>
730         </remarks>
731         <altmember cref="M:Mono.Options.CommandSet.Add(Mono.Options.Option)" />
732         <exception cref="T:System.ArgumentException">
733           <paramref name="option" /> has an alias (as returned from
734           <see cref="M:Mono.Options.Option.GetNames" />) that conflicts with
735           a previously registered <see cref="T:Mono.Options.Option" />.
736         </exception>
737         <exception cref="T:System.ArgumentNullException">
738           <para>
739             <paramref name="prototype" /> is <see langword="null" /></para>
740           <para>-or-</para>
741           <para>
742             <paramref name="action" /> is <see langword="null" /></para>
743         </exception>
744       </Docs>
745     </Member>
746     <Member MemberName="Add">
747       <MemberSignature Language="C#" Value="public Mono.Options.CommandSet Add (string prototype, string description, Mono.Options.OptionAction&lt;string,string&gt; action, bool hidden);" />
748       <MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Mono.Options.CommandSet Add(string prototype, string description, class Mono.Options.OptionAction`2&lt;string, string&gt; action, bool hidden) cil managed" />
749       <MemberType>Method</MemberType>
750       <AssemblyInfo>
751         <AssemblyVersion>0.2.3.0</AssemblyVersion>
752       </AssemblyInfo>
753       <ReturnValue>
754         <ReturnType>Mono.Options.CommandSet</ReturnType>
755       </ReturnValue>
756       <Parameters>
757         <Parameter Name="prototype" Type="System.String" />
758         <Parameter Name="description" Type="System.String" />
759         <Parameter Name="action" Type="Mono.Options.OptionAction&lt;System.String,System.String&gt;" />
760         <Parameter Name="hidden" Type="System.Boolean" />
761       </Parameters>
762       <Docs>
763         <param name="prototype">
764           A <see cref="T:System.String" /> containing all option aliases to
765           register, an (optional) type specifier, and an (optional) value
766           separator list; see
767           <see cref="C:Mono.Options.Option(System.String,System.String,System.Int32)" />
768           for details.
769         </param>
770         <param name="description">
771           A <see cref="T:System.String" /> containing to used to initialize
772           the <see cref="P:Mono.Options.Option.Description" /> property.
773         </param>
774         <param name="action">
775           A <see cref="T:Mono.Options.OptionAction{System.String,System.String}" />
776           to invoke when an option is parsed.
777         </param>
778         <param name="hidden">
779           A <see cref="T:System.Boolean" /> specifying whether or not the
780           Option should be displayed in
781           <see cref="M:Mono.Options.CommandSet.Run" /><c>help</c> output.
782         </param>
783         <summary>
784           Registers each alias within <paramref name="prototype" /> so that any
785           options matching the aliases in <paramref name="prototype" /> will be
786           handled by <paramref name="action" /> during any subsequent
787           <see cref="M:Mono.Options.CommandSet.Run(System.Collections.Generic.IEnumerable{System.String})" />
788           calls.
789         </summary>
790         <returns>
791           The current <see cref="T:Mono.Options.CommandSet" /> instance.
792           This is to permit method chaining.
793         </returns>
794         <remarks>
795         </remarks>
796         <altmember cref="M:Mono.Options.CommandSet.Add(Mono.Options.Option)" />
797         <exception cref="T:System.ArgumentException">
798           <paramref name="option" /> has an alias (as returned from
799           <see cref="M:Mono.Options.Option.GetNames" />) that conflicts with
800           a previously registered <see cref="T:Mono.Options.Option" />.
801         </exception>
802         <exception cref="T:System.ArgumentNullException">
803           <para>
804             <paramref name="prototype" /> is <see langword="null" /></para>
805           <para>-or-</para>
806           <para>
807             <paramref name="action" /> is <see langword="null" /></para>
808         </exception>
809       </Docs>
810     </Member>
811     <Member MemberName="Add">
812       <MemberSignature Language="C#" Value="public Mono.Options.CommandSet Add (string prototype, string description, Action&lt;string&gt; action, bool hidden);" />
813       <MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Mono.Options.CommandSet Add(string prototype, string description, class System.Action`1&lt;string&gt; action, bool hidden) cil managed" />
814       <MemberType>Method</MemberType>
815       <AssemblyInfo>
816         <AssemblyVersion>0.2.3.0</AssemblyVersion>
817       </AssemblyInfo>
818       <ReturnValue>
819         <ReturnType>Mono.Options.CommandSet</ReturnType>
820       </ReturnValue>
821       <Parameters>
822         <Parameter Name="prototype" Type="System.String" />
823         <Parameter Name="description" Type="System.String" />
824         <Parameter Name="action" Type="System.Action&lt;System.String&gt;" />
825         <Parameter Name="hidden" Type="System.Boolean" />
826       </Parameters>
827       <Docs>
828         <param name="prototype">
829           A <see cref="T:System.String" /> containing all option aliases to
830           register, an (optional) type specifier, and an (optional) value
831           separator list; see
832           <see cref="C:Mono.Options.Option(System.String,System.String,System.Int32)" />
833           for details.
834         </param>
835         <param name="description">
836           A <see cref="T:System.String" /> containing to used to initialize
837           the <see cref="P:Mono.Options.Option.Description" /> property.
838         </param>
839         <param name="action">
840           A <see cref="T:System.Action{System.String}" />
841           to invoke when an option is parsed.
842         </param>
843         <param name="hidden">
844           A <see cref="T:System.Boolean" /> specifying whether or not the
845           Option should be displayed in
846           <see cref="M:Mono.Options.CommandSet.Run" /><c>help</c> output.
847         </param>
848         <summary>
849           Registers each alias within <paramref name="prototype" /> so that any
850           options matching the aliases in <paramref name="prototype" /> will be
851           handled by <paramref name="action" /> during any subsequent
852           <see cref="M:Mono.Options.CommandSet.Run(System.Collections.Generic.IEnumerable{System.String})" />
853           calls.
854         </summary>
855         <returns>
856           The current <see cref="T:Mono.Options.CommandSet" /> instance.
857           This is to permit method chaining.
858         </returns>
859         <remarks>
860         </remarks>
861         <altmember cref="M:Mono.Options.OptionSet.Add(Mono.Options.Option)" />
862         <exception cref="T:System.ArgumentException">
863           <paramref name="option" /> has an alias (as returned from
864           <see cref="M:Mono.Options.Option.GetNames" />) that conflicts with
865           a previously registered <see cref="T:Mono.Options.Option" />.
866         </exception>
867         <exception cref="T:System.ArgumentNullException">
868           <para>
869             <paramref name="prototype" /> is <see langword="null" /></para>
870           <para>-or-</para>
871           <para>
872             <paramref name="action" /> is <see langword="null" /></para>
873         </exception>
874       </Docs>
875     </Member>
876     <Member MemberName="Add&lt;T&gt;">
877       <MemberSignature Language="C#" Value="public Mono.Options.CommandSet Add&lt;T&gt; (string prototype, Action&lt;T&gt; action);" />
878       <MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Mono.Options.CommandSet Add&lt;T&gt;(string prototype, class System.Action`1&lt;!!T&gt; action) cil managed" />
879       <MemberType>Method</MemberType>
880       <AssemblyInfo>
881         <AssemblyVersion>0.2.3.0</AssemblyVersion>
882       </AssemblyInfo>
883       <ReturnValue>
884         <ReturnType>Mono.Options.CommandSet</ReturnType>
885       </ReturnValue>
886       <TypeParameters>
887         <TypeParameter Name="T" />
888       </TypeParameters>
889       <Parameters>
890         <Parameter Name="prototype" Type="System.String" />
891         <Parameter Name="action" Type="System.Action&lt;T&gt;" />
892       </Parameters>
893       <Docs>
894         <typeparam name="T">
895           The type of the option to parse and provide to the 
896           <paramref name="action" /> callback.
897         </typeparam>
898         <param name="prototype">
899           A <see cref="T:System.String" /> containing all option aliases to
900           register, an (optional) type specifier, and an (optional) value
901           separator list; see 
902           <see cref="C:Mono.Options.Option(System.String,System.String,System.Int32)" />
903           for details.
904         </param>
905         <param name="action">
906           A <see cref="T:System.Action{``0}" />
907           to invoke when an option is parsed.
908         </param>
909         <summary>
910           Registers each alias within <paramref name="prototype" /> so that any 
911           options matching the aliases in <paramref name="prototype" /> will be
912           handled by <paramref name="action" /> during any subsequent
913           <see cref="M:Mono.Options.CommandSet.Run(System.Collections.Generic.IEnumerable{System.String})" />
914           calls.
915         </summary>
916         <returns>
917           The current <see cref="T:Mono.Options.CommandSet" /> instance.
918           This is to permit method chaining.
919         </returns>
920         <remarks>
921           Calls 
922           <see cref="M:Mono.Options.OptionSet.Add``1(System.String,System.String,System.Action{``0})" />
923           with a <paramref name="description" /> value of 
924           <see langword="null" />.
925         </remarks>
926         <altmember cref="M:Mono.Options.CommandSet.Add(Mono.Options.Option)" />
927         <altmember cref="M:Mono.Options.CommandSet.Add``1(System.String,System.String,System.Action{``0})" />
928         <exception cref="T:System.ArgumentException">
929           <paramref name="option" /> has an alias (as returned from
930           <see cref="M:Mono.Options.Option.GetNames" />) that conflicts with
931           a previously registered <see cref="T:Mono.Options.Option" />.
932         </exception>
933       </Docs>
934     </Member>
935     <Member MemberName="Add&lt;T&gt;">
936       <MemberSignature Language="C#" Value="public Mono.Options.CommandSet Add&lt;T&gt; (string prototype, string description, Action&lt;T&gt; action);" />
937       <MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Mono.Options.CommandSet Add&lt;T&gt;(string prototype, string description, class System.Action`1&lt;!!T&gt; action) cil managed" />
938       <MemberType>Method</MemberType>
939       <AssemblyInfo>
940         <AssemblyVersion>0.2.3.0</AssemblyVersion>
941       </AssemblyInfo>
942       <ReturnValue>
943         <ReturnType>Mono.Options.CommandSet</ReturnType>
944       </ReturnValue>
945       <TypeParameters>
946         <TypeParameter Name="T" />
947       </TypeParameters>
948       <Parameters>
949         <Parameter Name="prototype" Type="System.String" />
950         <Parameter Name="description" Type="System.String" />
951         <Parameter Name="action" Type="System.Action&lt;T&gt;" />
952       </Parameters>
953       <Docs>
954         <typeparam name="T">
955           The type of the option to parse and provide to the 
956           <paramref name="action" /> callback.
957         </typeparam>
958         <param name="prototype">
959           A <see cref="T:System.String" /> containing all option aliases to
960           register, an (optional) type specifier, and an (optional) value
961           separator list; see 
962           <see cref="C:Mono.Options.Option(System.String,System.String,System.Int32)" />
963           for details.
964         </param>
965         <param name="description">
966           A <see cref="T:System.String" /> containing to used to initialize
967           the <see cref="P:Mono.Options.Option.Description" /> property.
968         </param>
969         <param name="action">
970           A <see cref="T:System.Action{``0}" />
971           to invoke when an option is parsed.
972         </param>
973         <summary>
974           Registers each alias within <paramref name="prototype" /> so that any 
975           options matching the aliases in <paramref name="prototype" /> will be
976           handled by <paramref name="action" /> during any subsequent
977           <see cref="M:Mono.Options.CommandSet.Run(System.Collections.Generic.IEnumerable{System.String})" />
978           calls.
979         </summary>
980         <returns>
981           The current <see cref="T:Mono.Options.CommandSet" /> instance.
982           This is to permit method chaining.
983         </returns>
984         <remarks>
985           <para>
986             Use this typed overload when you want strongly typed option values
987             that correspond to a managed type.
988             <see cref="M:System.ComponentModel.TypeDescriptor.GetConverter(System.Type)" />
989             is used to lookup the
990             <see cref="T:System.ComponentModel.TypeConverter" /> to use when
991             performing the string-to-type conversion.
992           </para>
993           <para>
994             Special support is provided for <see cref="T:System.Nullable{X}" />
995             types; <see cref="T:System.ComponentModel.TypeConverter" />
996             doesn't currently support their use, but if 
997             <typeparamref name="T" /> is a nullable type, then this method
998             will instead use the 
999             <see cref="T:System.ComponentModel.TypeConverter" /> for the 
1000             <typeparamref name="X" /> type.  This allows straightforward use
1001             of nullable types, identical to using any other strongly typed
1002             value.
1003           </para>
1004           <block subset="none" type="note">
1005             <para>
1006               If <paramref name="prototype" /> specifies an
1007               <see cref="F:Mono.Options.OptionValueType.Optional" /> value
1008               and the value is not provided, then <c>default(T)</c> is
1009               provided as the value to <paramref name="action" />.
1010             </para>
1011           </block>
1012         </remarks>
1013         <altmember cref="M:Mono.Options.OptionSet.Add(Mono.Options.Option)" />
1014         <exception cref="T:System.ArgumentException">
1015           <paramref name="option" /> has an alias (as returned from
1016           <see cref="M:Mono.Options.Option.GetNames" />) that conflicts with
1017           a previously registered <see cref="T:Mono.Options.Option" />.
1018         </exception>
1019         <exception cref="T:System.ArgumentNullException">
1020           <para>
1021             <paramref name="prototype" /> is <see langword="null" /></para>
1022           <para>-or-</para>
1023           <para>
1024             <paramref name="action" /> is <see langword="null" /></para>
1025         </exception>
1026       </Docs>
1027     </Member>
1028     <Member MemberName="Add&lt;TKey,TValue&gt;">
1029       <MemberSignature Language="C#" Value="public Mono.Options.CommandSet Add&lt;TKey,TValue&gt; (string prototype, Mono.Options.OptionAction&lt;TKey,TValue&gt; action);" />
1030       <MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Mono.Options.CommandSet Add&lt;TKey, TValue&gt;(string prototype, class Mono.Options.OptionAction`2&lt;!!TKey, !!TValue&gt; action) cil managed" />
1031       <MemberType>Method</MemberType>
1032       <AssemblyInfo>
1033         <AssemblyVersion>0.2.3.0</AssemblyVersion>
1034       </AssemblyInfo>
1035       <ReturnValue>
1036         <ReturnType>Mono.Options.CommandSet</ReturnType>
1037       </ReturnValue>
1038       <TypeParameters>
1039         <TypeParameter Name="TKey" />
1040         <TypeParameter Name="TValue" />
1041       </TypeParameters>
1042       <Parameters>
1043         <Parameter Name="prototype" Type="System.String" />
1044         <Parameter Name="action" Type="Mono.Options.OptionAction&lt;TKey,TValue&gt;" />
1045       </Parameters>
1046       <Docs>
1047         <typeparam name="TKey">
1048           The type of the first argument to parse and provide to the 
1049           <paramref name="action" /> callback.
1050         </typeparam>
1051         <typeparam name="TValue">
1052           The type of the second argument to parse and provide to the 
1053           <paramref name="action" /> callback.
1054         </typeparam>
1055         <param name="prototype">
1056           A <see cref="T:System.String" /> containing all option aliases to
1057           register, an (optional) type specifier, and an (optional) value
1058           separator list; see 
1059           <see cref="C:Mono.Options.Option(System.String,System.String,System.Int32)" />
1060           for details.
1061         </param>
1062         <param name="action">
1063           A <see cref="T:Mono.Options.OptionAction{TKey,TValue}" />
1064           to invoke when an option is parsed.
1065         </param>
1066         <summary>
1067           Registers each alias within <paramref name="prototype" /> so that any 
1068           options matching the aliases in <paramref name="prototype" /> will be
1069           handled by <paramref name="action" /> during any subsequent
1070           <see cref="M:Mono.Options.CommandSet.Run(System.Collections.Generic.IEnumerable{System.String})" />
1071           calls.
1072         </summary>
1073         <returns>
1074           The current <see cref="T:Mono.Options.CommandSet" /> instance.
1075           This is to permit method chaining.
1076         </returns>
1077         <remarks>
1078           Calls 
1079           <see cref="M:Mono.Options.OptionSet.Add``2(System.String,System.String,Mono.Options.OptionAction{``0,``1})" />
1080           with a <paramref name="description" /> value of 
1081           <see langword="null" />.
1082         </remarks>
1083         <altmember cref="M:Mono.Options.CommandSet.Add(Mono.Options.Option)" />
1084         <altmember cref="M:Mono.Options.CommandSet.Add``2(System.String,System.String,Mono.Options.OptionAction{``0,``1})" />
1085         <exception cref="T:System.ArgumentException">
1086           <paramref name="prototype" /> has an alias (as returned from
1087           <see cref="M:Mono.Options.Option.GetNames" />) that conflicts with
1088           a previously registered <see cref="T:Mono.Options.Option" />.
1089         </exception>
1090         <exception cref="T:System.ArgumentNullException">
1091           <para>
1092             <paramref name="prototype" /> is <see langword="null" /></para>
1093           <para>-or-</para>
1094           <para>
1095             <paramref name="action" /> is <see langword="null" /></para>
1096         </exception>
1097       </Docs>
1098     </Member>
1099     <Member MemberName="Add&lt;TKey,TValue&gt;">
1100       <MemberSignature Language="C#" Value="public Mono.Options.CommandSet Add&lt;TKey,TValue&gt; (string prototype, string description, Mono.Options.OptionAction&lt;TKey,TValue&gt; action);" />
1101       <MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Mono.Options.CommandSet Add&lt;TKey, TValue&gt;(string prototype, string description, class Mono.Options.OptionAction`2&lt;!!TKey, !!TValue&gt; action) cil managed" />
1102       <MemberType>Method</MemberType>
1103       <AssemblyInfo>
1104         <AssemblyVersion>0.2.3.0</AssemblyVersion>
1105       </AssemblyInfo>
1106       <ReturnValue>
1107         <ReturnType>Mono.Options.CommandSet</ReturnType>
1108       </ReturnValue>
1109       <TypeParameters>
1110         <TypeParameter Name="TKey" />
1111         <TypeParameter Name="TValue" />
1112       </TypeParameters>
1113       <Parameters>
1114         <Parameter Name="prototype" Type="System.String" />
1115         <Parameter Name="description" Type="System.String" />
1116         <Parameter Name="action" Type="Mono.Options.OptionAction&lt;TKey,TValue&gt;" />
1117       </Parameters>
1118       <Docs>
1119         <typeparam name="TKey">
1120           The type of the first argument to parse and provide to the 
1121           <paramref name="action" /> callback.
1122         </typeparam>
1123         <typeparam name="TValue">
1124           The type of the second argument to parse and provide to the 
1125           <paramref name="action" /> callback.
1126         </typeparam>
1127         <param name="prototype">
1128           A <see cref="T:System.String" /> containing all option aliases to
1129           register, an (optional) type specifier, and an (optional) value
1130           separator list; see 
1131           <see cref="C:Mono.Options.Option(System.String,System.String,System.Int32)" />
1132           for details.
1133         </param>
1134         <param name="description">
1135           A <see cref="T:System.String" /> to be used to initialize
1136           the <see cref="P:Mono.Options.Option.Description" /> property.
1137         </param>
1138         <param name="action">
1139           A <see cref="T:Mono.Options.OptionAction{TKey,TValue}" />
1140           to invoke when an option is parsed.
1141         </param>
1142         <summary>
1143           Registers each alias within <paramref name="prototype" /> so that any 
1144           options matching the aliases in <paramref name="prototype" /> will be
1145           handled by <paramref name="action" /> during any subsequent
1146           <see cref="M:Mono.Options.CommandSet.Run(System.Collections.Generic.IEnumerable{System.String})" />
1147           calls.
1148         </summary>
1149         <returns>
1150           The current <see cref="T:Mono.Options.CommandSet" /> instance.
1151           This is to permit method chaining.
1152         </returns>
1153         <remarks>
1154           <para>
1155             Use this method when <paramref name="prototype" /> should accept
1156             two typed values, generally a key and a value.
1157           </para>
1158           <block subset="none" type="note">
1159             <para>
1160               If <paramref name="prototype" /> specifies an
1161               <see cref="F:Mono.Options.OptionValueType.Optional" /> value
1162               and the value is not provided, then <c>default(TKey)</c> and
1163               <c>default(TValue)</c> may be provided as the values to
1164               <paramref name="action" />.
1165             </para>
1166           </block>
1167         </remarks>
1168         <altmember cref="M:Mono.Options.CommandSet.Add(Mono.Options.Option)" />
1169         <exception cref="T:System.ArgumentException">
1170           <paramref name="prototype" /> has an alias (as returned from
1171           <see cref="M:Mono.Options.Option.GetNames" />) that conflicts with
1172           a previously registered <see cref="T:Mono.Options.Option" />.
1173         </exception>
1174         <exception cref="T:System.ArgumentNullException">
1175           <para>
1176             <paramref name="prototype" /> is <see langword="null" /></para>
1177           <para>-or-</para>
1178           <para>
1179             <paramref name="action" /> is <see langword="null" /></para>
1180         </exception>
1181       </Docs>
1182     </Member>
1183     <Member MemberName="Error">
1184       <MemberSignature Language="C#" Value="public System.IO.TextWriter Error { get; }" />
1185       <MemberSignature Language="ILAsm" Value=".property instance class System.IO.TextWriter Error" />
1186       <MemberType>Property</MemberType>
1187       <AssemblyInfo>
1188         <AssemblyVersion>0.2.3.0</AssemblyVersion>
1189       </AssemblyInfo>
1190       <ReturnValue>
1191         <ReturnType>System.IO.TextWriter</ReturnType>
1192       </ReturnValue>
1193       <Docs>
1194         <summary>
1195           Where <c>CommandSet</c> should write error messages.
1196         </summary>
1197         <value>
1198           A <see cref="T:System.IO.TextWriter" /> where error messages will
1199           be written to.
1200         </value>
1201         <remarks>
1202           <para>
1203             This value may be set by providing the <paramref name="error" />
1204             constructor parameter. If not specified, then
1205             <see cref="P:System.Console.Error" /> will be used.
1206           </para>
1207           <para>
1208             Error messages by <c>CommandSet</c> are written to the <c>Error</c>
1209             property. <c>Command</c> instances may also choose to write error
1210             messages to the <c>CommandSet.Error</c> property. This is suggested
1211             to help with unit testing.
1212           </para>
1213         </remarks>
1214       </Docs>
1215     </Member>
1216     <Member MemberName="GetKeyForItem">
1217       <MemberSignature Language="C#" Value="protected override string GetKeyForItem (Mono.Options.Command item);" />
1218       <MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance string GetKeyForItem(class Mono.Options.Command item) cil managed" />
1219       <MemberType>Method</MemberType>
1220       <AssemblyInfo>
1221         <AssemblyVersion>0.2.3.0</AssemblyVersion>
1222       </AssemblyInfo>
1223       <ReturnValue>
1224         <ReturnType>System.String</ReturnType>
1225       </ReturnValue>
1226       <Parameters>
1227         <Parameter Name="item" Type="Mono.Options.Command" />
1228       </Parameters>
1229       <Docs>
1230         <param name="item">
1231           An <see cref="T:Mono.Options.Command" /> to return the key of.
1232         </param>
1233         <summary>
1234           Returns <c><paramref name="item" />.Name</c>.
1235         </summary>
1236         <returns>
1237           A <see cref="T:System.String" /> containing the command name.
1238         </returns>
1239         <remarks>
1240           <para>
1241             This is to support the
1242             <see cref="T:System.Collections.ObjectModel.KeyedCollection{System.String,Mono.Options.Command}" />
1243             infrastructure.
1244           </para>
1245         </remarks>
1246       </Docs>
1247     </Member>
1248     <Member MemberName="MessageLocalizer">
1249       <MemberSignature Language="C#" Value="public Converter&lt;string,string&gt; MessageLocalizer { get; }" />
1250       <MemberSignature Language="ILAsm" Value=".property instance class System.Converter`2&lt;string, string&gt; MessageLocalizer" />
1251       <MemberType>Property</MemberType>
1252       <AssemblyInfo>
1253         <AssemblyVersion>0.2.3.0</AssemblyVersion>
1254       </AssemblyInfo>
1255       <ReturnValue>
1256         <ReturnType>System.Converter&lt;System.String,System.String&gt;</ReturnType>
1257       </ReturnValue>
1258       <Docs>
1259         <summary>
1260           Permits access to the message localization facility.
1261         </summary>
1262         <value>
1263           A <see cref="T:System.Converter{System.String,System.String}" />
1264           that can be used to localize messages.
1265         </value>
1266         <remarks>
1267         </remarks>
1268       </Docs>
1269     </Member>
1270     <Member MemberName="Out">
1271       <MemberSignature Language="C#" Value="public System.IO.TextWriter Out { get; }" />
1272       <MemberSignature Language="ILAsm" Value=".property instance class System.IO.TextWriter Out" />
1273       <MemberType>Property</MemberType>
1274       <AssemblyInfo>
1275         <AssemblyVersion>0.2.3.0</AssemblyVersion>
1276       </AssemblyInfo>
1277       <ReturnValue>
1278         <ReturnType>System.IO.TextWriter</ReturnType>
1279       </ReturnValue>
1280       <Docs>
1281         <summary>
1282           Where <c>CommandSet</c> should write output messages.
1283         </summary>
1284         <value>
1285           A <see cref="T:System.IO.TextWriter" /> where output messages will
1286           be written to.
1287         </value>
1288         <remarks>
1289           <para>
1290             This value may be set by providing the <paramref name="output" />
1291             constructor parameter. If not specified, then
1292             <see cref="P:System.Console.Out" /> will be used.
1293           </para>
1294           <para>
1295             Output messages by <c>CommandSet</c> are written to the <c>Out</c>
1296             property. <c>Command</c> instances may also choose to write output
1297             messages to the <c>CommandSet.Out</c> property. This is suggested
1298             to help with unit testing.
1299           </para>
1300         </remarks>
1301       </Docs>
1302     </Member>
1303     <Member MemberName="Run">
1304       <MemberSignature Language="C#" Value="public int Run (System.Collections.Generic.IEnumerable&lt;string&gt; arguments);" />
1305       <MemberSignature Language="ILAsm" Value=".method public hidebysig instance int32 Run(class System.Collections.Generic.IEnumerable`1&lt;string&gt; arguments) cil managed" />
1306       <MemberType>Method</MemberType>
1307       <AssemblyInfo>
1308         <AssemblyVersion>0.2.3.0</AssemblyVersion>
1309       </AssemblyInfo>
1310       <ReturnValue>
1311         <ReturnType>System.Int32</ReturnType>
1312       </ReturnValue>
1313       <Parameters>
1314         <Parameter Name="arguments" Type="System.Collections.Generic.IEnumerable&lt;System.String&gt;" />
1315       </Parameters>
1316       <Docs>
1317         <param name="arguments">
1318           A <see cref="T:System.Collections.Generic.IEnumerable{System.String}" />
1319           containing the command-line arguments to process.
1320         </param>
1321         <summary>
1322           Processes command-line arguments and invokes the specified command.
1323         </summary>
1324         <returns>
1325           A <see cref="T:System.Int32" /> containing the command's exit value.
1326           Normal Unix process exit values should be used: <c>0</c> for success,
1327           non-zero values for failures.
1328         </returns>
1329         <remarks>
1330           <para>
1331             Processes <paramref name="arguments" />, parsing global options in the first pass.
1332             The first unprocessed argument is treated as a command name, and the
1333             <see cref="T:Mono.Options.Command" /> instance with a
1334             <see cref="P:Mono.Options.Command.Name" /> value matching the command name
1335             has its <see cref="M:Mono.Options.Command.Invoke" /> method invoked with the
1336             unprocessed arguments.
1337           </para>
1338           <block subset="none" type="behaviors">
1339             <para>
1340               If no command is specified within <paramref name="arguments" /><i>or</i> an invalid command name is specified, then <c>1</c> is returned.
1341               Otherwise, the value returned from
1342               <see cref="M:Mono.Options.Command.Invoke" /> is returned.
1343             </para>
1344           </block>
1345           <para>
1346             If the <c>help</c> command is provided with no arguments, then the
1347             suite help text will be written to
1348             <see cref="P:Mono.Options.CommandSet.Out" />
1349             consisting of the descriptive text ("headers"), options, and
1350             <c>Command</c> values provided to
1351             <see cref="M:Mono.Options.CommandSet.Add" />.
1352           </para>
1353           <para>
1354             If the <c>help</c> command is provided with <c>--help</c> as an
1355             argument, then all registered <c>Command</c> instances are written to
1356             <see cref="P:Mono.Options.CommandSet.Out" />.
1357           </para>
1358           <para>
1359             If the <c>help</c> command is provided with any other string, the
1360             following value is treated as a command name, and the output of
1361             <c>command --help</c> is written to
1362             <see cref="P:Mono.Options.CommandSet.Out" />. If the specified
1363             command name has not been registered, then an error message is written to
1364             <see cref="P:Mono.Options.CommandSet.Error" />.
1365           </para>
1366         </remarks>
1367       </Docs>
1368     </Member>
1369     <Member MemberName="Suite">
1370       <MemberSignature Language="C#" Value="public string Suite { get; }" />
1371       <MemberSignature Language="ILAsm" Value=".property instance string Suite" />
1372       <MemberType>Property</MemberType>
1373       <AssemblyInfo>
1374         <AssemblyVersion>0.2.3.0</AssemblyVersion>
1375       </AssemblyInfo>
1376       <ReturnValue>
1377         <ReturnType>System.String</ReturnType>
1378       </ReturnValue>
1379       <Docs>
1380         <summary>
1381           The name of the suite.
1382         </summary>
1383         <value>
1384           A <see cref="T:System.String" /> containing the name of the command suite.
1385         </value>
1386         <remarks>
1387           <para>
1388             The <c>Suite</c> value is used when no command is specified, or
1389             when an unregistered command name is provided.
1390           </para>
1391         </remarks>
1392       </Docs>
1393     </Member>
1394   </Members>
1395 </Type>