Update mcs/class/Commons.Xml.Relaxng/Commons.Xml.Relaxng/RelaxngPattern.cs
[mono.git] / mcs / class / Mono.Options / Documentation / en / Mono.Options / Option.xml
1 <Type Name="Option" FullName="Mono.Options.Option">
2   <TypeSignature Language="C#" Value="public abstract class Option" />
3   <TypeSignature Language="ILAsm" Value=".class public auto ansi abstract beforefieldinit Option extends System.Object" />
4   <AssemblyInfo>
5     <AssemblyName>Mono.Options</AssemblyName>
6     <AssemblyVersion>0.2.0.0</AssemblyVersion>
7     <AssemblyVersion>0.2.1.0</AssemblyVersion>
8     <AssemblyVersion>0.2.2.0</AssemblyVersion>
9     <AssemblyVersion>0.2.3.0</AssemblyVersion>
10   </AssemblyInfo>
11   <ThreadingSafetyStatement>
12     All members of this type are safe for multithreaded operations.
13     Subclasses must be thread-safe if multithreaded invocation of 
14     <see cref="M:Mono.Options.OptionSet.Parse(System.Collections.Generic.IEnumerable&lt;System.String&gt;)" />
15     is required.
16   </ThreadingSafetyStatement>
17   <Base>
18     <BaseTypeName>System.Object</BaseTypeName>
19   </Base>
20   <Interfaces />
21   <Docs>
22     <summary>
23       Represents information about an option.
24     </summary>
25     <remarks>
26       <para>
27         Instances of <see cref="T:Mono.Options.Option" /> are created via
28         the various <see cref="M:Mono.Options.OptionSet.Add" /> overloads, 
29         such as:
30       </para>
31       <list type="bullet">
32         <item>
33           <term>
34             <see cref="M:Mono.Options.OptionSet.Add(System.String,System.Action{System.String})" />
35           </term>
36         </item>
37         <item>
38           <term>
39             <see cref="M:Mono.Options.OptionSet.Add(System.String,System.String,System.Action{System.String})" />
40           </term>
41         </item>
42         <item>
43           <term>
44             <see cref="M:Mono.Options.OptionSet.Add(System.String,Mono.Options.OptionAction{System.String,System.String})" />
45           </term>
46         </item>
47         <item>
48           <term>
49             <see cref="M:Mono.Options.OptionSet.Add(System.String,System.String,Mono.Options.OptionAction{System.String,System.String})" />
50           </term>
51         </item>
52         <item>
53           <term>
54             <see cref="M:Mono.Options.OptionSet.Add``1(System.String,System.Action{``0})" />
55           </term>
56         </item>
57         <item>
58           <term>
59             <see cref="M:Mono.Options.OptionSet.Add``1(System.String,System.String,System.Action{``0})" />
60           </term>
61         </item>
62         <item>
63           <term>
64             <see cref="M:Mono.Options.OptionSet.Add``2(System.String,Mono.Options.OptionAction{``0,``1})" />
65           </term>
66         </item>
67         <item>
68           <term>
69             <see cref="M:Mono.Options.OptionSet.Add``2(System.String,System.String,Mono.Options.OptionAction{``0,``1})" />
70           </term>
71         </item>
72       </list>
73       <para>
74         You can also add custom <see cref="T:Mono.Options.Option" /> 
75         subclasses to an <see cref="T:Mono.Options.OptionSet" /> via the 
76         <see cref="M:Mono.Options.OptionSet.Add(Mono.Options.Option)" />
77         method.
78       </para>
79       <block subset="none" type="overrides">
80         Inheritors of this type must override the <see langword="abstract" /> method
81         <see cref="M:Mono.Options.Option.OnParseComplete(Mono.Options.OptionContext)" />,
82         which is (indirectly) invoked from within 
83         <see cref="M:Mono.Options.OptionSet.Parse(System.String,Mono.Options.OptionContext)" />
84         when an option matching one of the <paramref name="prototype" />
85         aliases is encountered.
86       </block>
87     </remarks>
88   </Docs>
89   <Members>
90     <Member MemberName=".ctor">
91       <MemberSignature Language="C#" Value="protected Option (string prototype, string description);" />
92       <MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor(string prototype, string description) cil managed" />
93       <MemberType>Constructor</MemberType>
94       <AssemblyInfo>
95         <AssemblyVersion>0.2.0.0</AssemblyVersion>
96         <AssemblyVersion>0.2.1.0</AssemblyVersion>
97         <AssemblyVersion>0.2.2.0</AssemblyVersion>
98         <AssemblyVersion>0.2.3.0</AssemblyVersion>
99       </AssemblyInfo>
100       <Parameters>
101         <Parameter Name="prototype" Type="System.String" />
102         <Parameter Name="description" Type="System.String" />
103       </Parameters>
104       <Docs>
105         <param name="prototype">
106           A <see cref="T:System.String" /> containing a <c>|</c>-separated
107           list of option names (aliases) and an optional value-type specifier.
108         </param>
109         <param name="description">
110           A <see cref="T:System.String" /> containing documentation for the
111           option.
112         </param>
113         <summary>
114           Creates and initializes a new instance of the 
115           <see cref="T:Mono.Options.Option" /> class.
116         </summary>
117         <remarks>
118           <para>
119             This constructor initializes the 
120             <see cref="P:Mono.Options.Option.Prototype" /> property of the
121             new instance using <paramref name="prototype" />, the 
122             <see cref="P:Mono.Options.Option.Description" /> property of the
123             new instance using <paramref name="description" />. and
124             initializes the <see cref="P:Mono.Options.Option.MaxValueCount" /> 
125             property of the new instance to <c>1</c>.
126           </para>
127           <para>
128             This is equivalent to calling the 
129             <see cref="C:Mono.Options.Option(System.String,System.String,System.Int32)" />
130             constructor as with <c>Option(<paramref name="prototype" />, 
131             <paramref name="description" />, 1)</c>.
132           </para>
133         </remarks>
134         <exception cref="T:System.ArgumentException">
135           <para>
136             <paramref name="prototype" /> is the empty string <c>""</c>.
137           </para>
138           <para>-or-</para>
139           <para>
140             <paramref name="prototype" /> contains an empty alias, such as
141             <c>a||b</c>.
142           </para>
143           <para>-or-</para>
144           <para>
145             Conflicting <see cref="T:Mono.Options.OptionValueType" /> values
146             were found within <paramref name="prototype" />.
147           </para>
148           <para>-or-</para>
149           <para>
150             <paramref name="prototype" /> only includes the default handler
151             <c>&lt;&gt;</c> and <paramref name="prototype" /> did not specify an
152             <see cref="T:Mono.Options.OptionValueType" /> value of
153             <see cref="F:Mono.Options.OptionValueType.None" />.
154           </para>
155         </exception>
156         <exception cref="T:System.ArgumentNullException">
157           <paramref name="prototype" /> is <see langword="null" />.
158         </exception>
159       </Docs>
160     </Member>
161     <Member MemberName=".ctor">
162       <MemberSignature Language="C#" Value="protected Option (string prototype, string description, int maxValueCount);" />
163       <MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor(string prototype, string description, int32 maxValueCount) cil managed" />
164       <MemberType>Constructor</MemberType>
165       <AssemblyInfo>
166         <AssemblyVersion>0.2.0.0</AssemblyVersion>
167         <AssemblyVersion>0.2.1.0</AssemblyVersion>
168         <AssemblyVersion>0.2.2.0</AssemblyVersion>
169         <AssemblyVersion>0.2.3.0</AssemblyVersion>
170       </AssemblyInfo>
171       <Parameters>
172         <Parameter Name="prototype" Type="System.String" />
173         <Parameter Name="description" Type="System.String" />
174         <Parameter Name="maxValueCount" Type="System.Int32" />
175       </Parameters>
176       <Docs>
177         <param name="prototype">
178           A <see cref="T:System.String" /> containing a <c>|</c>-separated
179           list of option names (aliases) and an optional value-type specifier.
180         </param>
181         <param name="description">
182           A <see cref="T:System.String" /> containing documentation for the
183           option.
184         </param>
185         <param name="maxValueCount">
186           A <see cref="T:System.Int32" /> containing the number of values this
187           option accepts.
188         </param>
189         <summary>
190           Creates and initializes a new instance of the 
191           <see cref="T:Mono.Options.Option" /> class.
192         </summary>
193         <remarks>
194           <para>
195             This constructor initializes the 
196             <see cref="P:Mono.Options.Option.Prototype" /> property of the
197             new instance using <paramref name="prototype" />, the 
198             <see cref="P:Mono.Options.Option.Description" /> property of the
199             new instance using <paramref name="description" />. and
200             initializes the <see cref="P:Mono.Options.Option.MaxValueCount" /> 
201             property of the new instance using <paramref name="maxValueCount" />.
202           </para>
203           <para>
204             <paramref name="prototype" /> is a <c>|</c>-separated list of
205             option names.  It should be listed in shortest-to-longest order,
206             e.g. <c>h|help</c>.  <paramref name="prototype" /> may contain a
207             <see cref="T:Mono.Options.OptionValueType" /> specifier following
208             one of the <c>|</c>-separated entries, and a value separator list
209             following the <see cref="T:Mono.Options.OptionValueType" /> 
210             specifier.
211           </para>
212           <para>
213             The <see cref="P:Mono.Options.Option.OptionValueType" /> property
214             is initialized based on whether a <c>=</c> or <c>:</c> follows one
215             of the aliases within <paramref name="prototype" />.
216             <c>=</c> specifies a 
217             <see cref="F:Mono.Options.OptionValueType.Required" /> value,
218             while <c>:</c> specifies an 
219             <see cref="F:Mono.Options.OptionValueType.Optional" /> value.  
220             If neither <c>=</c> nor <c>:</c> is not specified, then 
221             <see cref="F:Mono.Options.OptionValueType.None" /> is used.
222             The value specifier may be used anywhere within 
223             <paramref name="prototype" />, so <c>n|name=</c>, <c>n=|name</c> 
224             and <c>n=|name=</c> are equivalent, but you cannot mix types; 
225             <c>n:|name=</c> is invalid.
226           </para>
227           <para>
228             A default handler may be specified by using <c>&lt;&gt;</c> as the
229             option name.  The default handler is invoked for any unhandled
230             argument within 
231                         <see cref="M:Mono.Options.OptionSet.Parse(System.Collections.Generic.IEnumerable{System.String})" />;
232             consequently, if a default handler is provided then
233                         <see cref="M:Mono.Options.OptionSet.Parse(System.Collections.Generic.IEnumerable{System.String})" />
234             will return an empty 
235             <see cref="T:System.Collections.Generic.List{System.String}" />.
236           </para>
237           <para>
238             The default handler may either be provided as a stand-alone 
239             <see cref="T:Mono.Options.Option" />, in which case it may not
240             specify a <see cref="T:Mono.Options.OptionValueType" /> other
241             than <see cref="F:Mono.Options.OptionValueType.None" />.
242             Alternatively, it may be an alias, in which case the 
243             <see cref="T:Mono.Options.Option" /> must accept an
244             <see cref="F:Mono.Options.OptionValueType.Optional" /> or
245             <see cref="F:Mono.Options.OptionValueType.Required" /> value, and
246             <paramref name="maxValueCount" /> must be <c>1</c>.
247           </para>
248           <para>
249             Multiple values may be bundled together, such as 
250             <c>-opt key=value</c>.  The value separator list specifies which
251             characters can be used to split the value argument to generate
252             separate values.  The value separator list is available when 
253             <paramref name="maxValueCount" /> is greater than <c>1</c>, and
254             and an <see cref="T:Mono.Options.OptionValueType" /> was
255             specified.  The value separator list follows the <c>=</c> or
256             <c>:</c> and is one of the following:
257           </para>
258           <list type="bullet">
259             <item>
260               <term>
261                 <para>
262                 A sequence of character enclosed by <c>{</c> and <c>}</c>.
263                 Multiple such sequences may be specified by listing the 
264                 <c>{...}</c> sequence multiple times.
265               </para>
266                 <para>
267                 The sequence <c>{}</c> requires that each value be a different 
268                 argument, and no argument splitting will be performed.
269                 This sequence has no effect if other separators are also
270                 listed (as separate arguments are always permitted for
271                 <see cref="F:Mono.Options.OptionValueType.Required" />
272                 values).
273               </para>
274               </term>
275             </item>
276             <item>
277               <term>
278               Any literal character other than <c>{</c> and <c>}</c>.
279             </term>
280             </item>
281           </list>
282           <para>
283             If the separator list is not provided, then <c>=:</c> is the
284             default separator list.
285           </para>
286           <para>
287             For example, the prototype <c>"A:+-*/"</c> would permit any of
288             `<c>+</c>', `<c>-</c>', `<c>*</c>', or `<c>/</c>' to be used to
289             split an argument into values, so <c>-A:5/2</c> would generate the
290             sequence of values <c>5</c> and <c>2</c> for the option <c>-A</c>.
291             Furthermore, the prototype <c>"A={--&gt;}{=&gt;}"</c> would permit
292             either the string <c>--&gt;</c> or the string <c>=&gt;</c> to be used,
293             so <c>-A A-&gt;B C</c> woud parse <c>A-&gt;B</c> as one value and
294             <c>C</c> as the other value, while <c>-A A--&gt;B C</c> would parse
295             <c>A</c> as one value and <c>B</c> as the other value while
296             <c>C</c> would be unhandled (unless the option required 3 values,
297             in which case <c>C</c> would be the 3rd value).
298           </para>
299         </remarks>
300         <exception cref="T:System.ArgumentException">
301           <para>
302             <paramref name="prototype" /> is the empty string <c>""</c>.
303           </para>
304           <para>-or-</para>
305           <para>
306             <paramref name="prototype" /> contains an empty alias, such as
307             <c>a||b</c>.
308           </para>
309           <para>-or-</para>
310           <para>
311             Conflicting <see cref="T:Mono.Options.OptionValueType" /> values
312             were found within <paramref name="prototype" />.
313           </para>
314           <para>-or-</para>
315           <para>
316             <paramref name="maxValueCount" /> is <c>0</c> and 
317             <paramref name="prototype" /> specified an
318             <see cref="T:Mono.Options.OptionValueType" /> value of
319             <see cref="F:Mono.Options.OptionValueType.Optional" /> or
320             <see cref="F:Mono.Options.OptionValueType.Required" />.
321           </para>
322           <para>-or-</para>
323           <para>
324             <paramref name="maxValueCount" /> is greater than <c>1</c> and
325             <paramref name="prototype" /> specified an
326             <see cref="T:Mono.Options.OptionValueType" /> value of
327             <see cref="F:Mono.Options.OptionValueType.None" />.
328           </para>
329           <para>-or-</para>
330           <para>
331             <paramref name="prototype" /> contains a separator list and
332             <paramref name="maxValueCount" /> is <c>0</c> or <c>1</c>.
333           </para>
334           <para>-or-</para>
335           <para>
336             <paramref name="prototype" /> contains a badly formatted 
337             separator list, such as <c>{{</c>, <c>}}</c>, <c>{{}</c>, etc.
338           </para>
339           <para>-or-</para>
340           <para>
341             <paramref name="prototype" /> only includes the default handler
342             <c>&lt;&gt;</c> and <paramref name="prototype" /> did not specify an
343             <see cref="T:Mono.Options.OptionValueType" /> value of
344             <see cref="F:Mono.Options.OptionValueType.None" />.
345           </para>
346           <para>-or-</para>
347           <para>
348             <paramref name="prototype" /> includes the default handler
349             <c>&lt;&gt;</c>, and <paramref name="MaxValueCount" /> is greater
350             than <c>1</c>.
351           </para>
352         </exception>
353         <exception cref="T:System.ArgumentNullException">
354           <paramref name="prototype" /> is <see langword="null" />.
355         </exception>
356       </Docs>
357     </Member>
358     <Member MemberName="Description">
359       <MemberSignature Language="C#" Value="public string Description { get; }" />
360       <MemberSignature Language="ILAsm" Value=".property instance string Description" />
361       <MemberType>Property</MemberType>
362       <AssemblyInfo>
363         <AssemblyVersion>0.2.0.0</AssemblyVersion>
364         <AssemblyVersion>0.2.1.0</AssemblyVersion>
365         <AssemblyVersion>0.2.2.0</AssemblyVersion>
366         <AssemblyVersion>0.2.3.0</AssemblyVersion>
367       </AssemblyInfo>
368       <ReturnValue>
369         <ReturnType>System.String</ReturnType>
370       </ReturnValue>
371       <Docs>
372         <summary>
373           A <see cref="T:System.String" /> containing documentation for this
374           option.
375         </summary>
376         <value>
377           A <see cref="T:System.String" /> containing documentation for this
378           option.
379         </value>
380         <remarks>
381           This property is used to generate documentation within 
382           <see cref="M:Mono.Options.OptionSet.WriteOptionDescriptions(System.IO.TextWriter)" />.
383           The string returned is translated via the 
384           <paramref name="localizer" /> parameter provided to the
385           <see cref="C:Mono.Options.OptionSet(System.Converter{System.String,System.String})" />
386           constructor before being written to the 
387           <see cref="T:System.IO.TextWriter" /> instance.
388         </remarks>
389         <altmember cref="M:Mono.Options.OptionSet.WriteOptionDescriptions(System.IO.TextWriter)" />
390       </Docs>
391     </Member>
392     <Member MemberName="GetNames">
393       <MemberSignature Language="C#" Value="public string[] GetNames ();" />
394       <MemberSignature Language="ILAsm" Value=".method public hidebysig instance string[] GetNames() cil managed" />
395       <MemberType>Method</MemberType>
396       <AssemblyInfo>
397         <AssemblyVersion>0.2.0.0</AssemblyVersion>
398         <AssemblyVersion>0.2.1.0</AssemblyVersion>
399         <AssemblyVersion>0.2.2.0</AssemblyVersion>
400         <AssemblyVersion>0.2.3.0</AssemblyVersion>
401       </AssemblyInfo>
402       <ReturnValue>
403         <ReturnType>System.String[]</ReturnType>
404       </ReturnValue>
405       <Parameters />
406       <Docs>
407         <summary>Retrieves all name aliases that make up 
408           <see cref="P:Mono.Options.Option.Prototype" />.</summary>
409         <returns>
410           A <see cref="T:System.String" /> array containing all name aliases
411           for this <see cref="T:Mono.Options.Option" /> instance.
412         </returns>
413         <remarks>
414           The returned option names will not contain any 
415           <see cref="T:Mono.Options.OptionValueType" /> specifier that may be
416           within <see cref="P:Mono.Options.Option.Prototype" />.  
417           If <see cref="P:Mono.Options.Option.Prototype" /> is
418           <c>a=|b=|c=</c>, the array returned will contain <c>a</c>, <c>b</c>,
419           and <c>c</c>.
420         </remarks>
421       </Docs>
422     </Member>
423     <Member MemberName="GetValueSeparators">
424       <MemberSignature Language="C#" Value="public string[] GetValueSeparators ();" />
425       <MemberSignature Language="ILAsm" Value=".method public hidebysig instance string[] GetValueSeparators() cil managed" />
426       <MemberType>Method</MemberType>
427       <AssemblyInfo>
428         <AssemblyVersion>0.2.0.0</AssemblyVersion>
429         <AssemblyVersion>0.2.1.0</AssemblyVersion>
430         <AssemblyVersion>0.2.2.0</AssemblyVersion>
431         <AssemblyVersion>0.2.3.0</AssemblyVersion>
432       </AssemblyInfo>
433       <ReturnValue>
434         <ReturnType>System.String[]</ReturnType>
435       </ReturnValue>
436       <Parameters />
437       <Docs>
438         <summary>
439           Retreives all value separators, strings which are used to split an
440           argument into one or more values for the this 
441           <see cref="T:Mono.Options.Option" />.
442         </summary>
443         <returns>
444           A <see cref="T:System.String" /> array containing all strings that
445           should be used when splitting an argument into one or more values
446           for this <see cref="T:Mono.Options.Option" />.
447         </returns>
448         <remarks>
449           <para>
450             Value separators may be provided within 
451             <see cref="P:Mono.Options.Option.Prototype" /> only if:
452           </para>
453           <list type="bullet">
454             <item>
455               <term>
456                 <see cref="P:Mono.Options.Option.MaxValueCount" /> is greater than 1.
457             </term>
458             </item>
459             <item>
460               <term>
461                 <see cref="P:Mono.Options.Option.OptionValueType" /> is 
462               <see cref="F:Mono.Options.OptionValueType.Optional" /> or
463               <see cref="F:Mono.Options.OptionValueType.Required" />.
464             </term>
465             </item>
466           </list>
467           <para>
468             See the 
469             <see cref="C:Mono.Options.Option(System.String,System.String,System.Int32)" />
470             constructor for more information.
471           </para>
472         </remarks>
473       </Docs>
474     </Member>
475     <Member MemberName="Invoke">
476       <MemberSignature Language="C#" Value="public void Invoke (Mono.Options.OptionContext c);" />
477       <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Invoke(class Mono.Options.OptionContext c) cil managed" />
478       <MemberType>Method</MemberType>
479       <AssemblyInfo>
480         <AssemblyVersion>0.2.0.0</AssemblyVersion>
481         <AssemblyVersion>0.2.1.0</AssemblyVersion>
482         <AssemblyVersion>0.2.2.0</AssemblyVersion>
483         <AssemblyVersion>0.2.3.0</AssemblyVersion>
484       </AssemblyInfo>
485       <ReturnValue>
486         <ReturnType>System.Void</ReturnType>
487       </ReturnValue>
488       <Parameters>
489         <Parameter Name="c" Type="Mono.Options.OptionContext" />
490       </Parameters>
491       <Docs>
492         <param name="c">
493           An <see cref="T:Mono.Options.OptionContext" /> instance containing
494           information about the option that was parsed.
495         </param>
496         <summary>
497           Invokes 
498           <see cref="M:Mono.Options.Option.OnParseComplete(Mono.Options.OptionContext)" />
499           then clears out <paramref name="c" />.
500         </summary>
501         <remarks>
502           <para>
503             This method is invoked from within 
504             <see cref="M:Mono.Options.OptionSet.Parse(System.String,Mono.Options.OptionContext)" />
505             when an option with a name from
506             <see cref="M:Mono.Options.Option.GetNames" /> is encountered and
507             matches the required number of values governed by
508             <see cref="P:Mono.Options.Option.OptionValueType" /> and
509             <see cref="P:Mono.Options.Option.MaxValueCount" />.
510           </para>
511           <block subset="none" type="behaviors">
512             <para>
513               This method invokes 
514               <see cref="M:Mono.Options.Option.OnParseComplete(Mono.Options.OptionContext)" />,
515               passing along <paramref name="c" /> unchanged, and then sets the 
516               <see cref="P:Mono.Options.OptionContext.Option" /> and
517               <see cref="P:Mono.Options.OptionContext.OptionName" />
518               properties to <see langword="null" />, and 
519               <see cref="M:Mono.Options.OptionValueCollection.Clear" />s out
520               <see cref="P:Mono.Options.OptionContext.OptionValues" />.
521             </para>
522           </block>
523         </remarks>
524         <altmember cref="M:Mono.Options.Option.OnParseComplete(Mono.Options.OptionContext)" />
525         <altmember cref="M:Mono.Options.OptionSet.Parse(System.String,Mono.Options.OptionContext)" />
526         <altmember cref="M:Mono.Options.OptionSet.Parse(System.Collections.Generic.IEnumerable{System.String})" />
527       </Docs>
528     </Member>
529     <Member MemberName="MaxValueCount">
530       <MemberSignature Language="C#" Value="public int MaxValueCount { get; }" />
531       <MemberSignature Language="ILAsm" Value=".property instance int32 MaxValueCount" />
532       <MemberType>Property</MemberType>
533       <AssemblyInfo>
534         <AssemblyVersion>0.2.0.0</AssemblyVersion>
535         <AssemblyVersion>0.2.1.0</AssemblyVersion>
536         <AssemblyVersion>0.2.2.0</AssemblyVersion>
537         <AssemblyVersion>0.2.3.0</AssemblyVersion>
538       </AssemblyInfo>
539       <ReturnValue>
540         <ReturnType>System.Int32</ReturnType>
541       </ReturnValue>
542       <Docs>
543         <summary>
544           A <see cref="T:System.Int32" /> containing the maximum number of
545           values this <see cref="T:Mono.Options.Option" /> accepts.
546         </summary>
547         <value>
548           A <see cref="T:System.Int32" /> containing the maximum number of
549           values this <see cref="T:Mono.Options.Option" /> accepts.
550         </value>
551         <remarks>
552           <para>
553             This is a maximum, and may not be the number of values present
554             within <see cref="P:Mono.Options.OptionContext.OptionValues" />
555             when 
556             <see cref="M:Mono.Options.Option.OnParseComplete(Mono.Options.OptionContext)" />
557             is invoked.  There will be 
558             <see cref="P:Mono.Options.Option.MaxValueCount" /> values if
559             <see cref="P:Mono.Options.Option.OptionValueType" /> is
560             <see cref="F:Mono.Options.OptionValueType.Required" />, but if
561             <see cref="P:Mono.Options.Option.OptionValueType" /> is
562             <see cref="F:Mono.Options.OptionValueType.Optional" /> then
563             <see cref="P:Mono.Options.OptionContext.OptionValues" /> may
564             contain fewer items.
565           </para>
566         </remarks>
567       </Docs>
568     </Member>
569     <Member MemberName="OnParseComplete">
570       <MemberSignature Language="C#" Value="protected abstract void OnParseComplete (Mono.Options.OptionContext c);" />
571       <MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void OnParseComplete(class Mono.Options.OptionContext c) cil managed" />
572       <MemberType>Method</MemberType>
573       <AssemblyInfo>
574         <AssemblyVersion>0.2.0.0</AssemblyVersion>
575         <AssemblyVersion>0.2.1.0</AssemblyVersion>
576         <AssemblyVersion>0.2.2.0</AssemblyVersion>
577         <AssemblyVersion>0.2.3.0</AssemblyVersion>
578       </AssemblyInfo>
579       <ReturnValue>
580         <ReturnType>System.Void</ReturnType>
581       </ReturnValue>
582       <Parameters>
583         <Parameter Name="c" Type="Mono.Options.OptionContext" />
584       </Parameters>
585       <Docs>
586         <param name="c">
587           An <see cref="T:Mono.Options.OptionContext" /> instance containing
588           information about the option that was parsed.
589         </param>
590         <summary>
591           Perform an action when an option is parsed.
592         </summary>
593         <remarks>
594           <para>
595             This method must be overridden by all subclasses, within which the
596             subclass can perform some custom per-option processing.
597           </para>
598           <para>
599             This method is invoked from within 
600             <see cref="M:Mono.Options.OptionSet.Parse(System.String,Mono.Options.OptionContext)" />
601             when an option with a name from
602             <see cref="M:Mono.Options.Option.GetNames" /> is encountered and
603             matches the required number of values governed by
604             <see cref="P:Mono.Options.Option.OptionValueType" /> and
605             <see cref="P:Mono.Options.Option.MaxValueCount" />.
606           </para>
607         </remarks>
608         <example>
609           <para>
610             The following example has a custom 
611             <see cref="T:Mono.Options.Option" /> subclass which overrides
612             <see cref="M:Mono.Options.Option.OnParseComplete(Mono.Options.OptionContext)" />:
613           </para>
614           <code lang="C#" src="examples/subclass.cs">// Case-Insensitive and Concatenating OptionSet
615 using System;
616 using System.Collections.Generic;
617 using Mono.Options;
618
619 class DemoOptionSet : OptionSet {
620         protected override void InsertItem (int index, Option item)
621         {
622                 if (item.Prototype.ToLower () != item.Prototype)
623                         throw new ArgumentException ("prototypes must be lower-case!");
624                 base.InsertItem (index, item);
625         }
626
627         protected override OptionContext CreateOptionContext ()
628         {
629                 return new OptionContext (this);
630         }
631
632         protected override bool Parse (string option, OptionContext c)
633         {
634                 string f, n, s, v;
635                 bool haveParts = GetOptionParts (option, out f, out n, out s, out v);
636                 Option nextOption = null;
637                 string newOption  = option;
638
639                 if (haveParts) {
640                         string nl = n.ToLower ();
641                         nextOption = Contains (nl) ? this [nl] : null;
642                         newOption = f + n.ToLower () + (v != null ? s + v : "");
643                 }
644
645                 if (c.Option != null) {
646                         // Prevent --a --b
647                         if (c.Option != null &amp;&amp; haveParts) {
648                                 if (nextOption == null) {
649                                         // ignore
650                                 }
651                                 else 
652                                         throw new OptionException (
653                                                 string.Format ("Found option `{0}' as value for option `{1}'.",
654                                                         option, c.OptionName), c.OptionName);
655                         }
656
657                         // have a option w/ required value; try to concat values.
658                         if (AppendValue (option, c)) {
659                                 if (!option.EndsWith ("\\") &amp;&amp; 
660                                                 c.Option.MaxValueCount == c.OptionValues.Count) {
661                                         c.Option.Invoke (c);
662                                 }
663                                 return true;
664                         }
665                         else
666                                 base.Parse (newOption, c);
667                 }
668
669                 if (!haveParts || v == null) {
670                         // Not an option; let base handle as a non-option argument.
671                         return base.Parse (newOption, c);
672                 }
673
674                 if (nextOption.OptionValueType != OptionValueType.None &amp;&amp; 
675                                 v.EndsWith ("\\")) {
676                         c.Option = nextOption;
677                         c.OptionValues.Add (v);
678                         c.OptionName = f + n;
679                         return true;
680                 }
681
682                 return base.Parse (newOption, c);
683         }
684
685         private bool AppendValue (string value, OptionContext c)
686         {
687                 bool added = false;
688                 string[] seps = c.Option.GetValueSeparators ();
689                 foreach (var o in seps.Length != 0
690                                 ? value.Split (seps, StringSplitOptions.None)
691                                 : new string[]{value}) {
692                         int idx = c.OptionValues.Count-1;
693                         if (idx == -1 || !c.OptionValues [idx].EndsWith ("\\")) {
694                                 c.OptionValues.Add (o);
695                                 added = true;
696                         }
697                         else {
698                                 c.OptionValues [idx] += value;
699                                 added = true;
700                         }
701                 }
702                 return added;
703         }
704 }
705
706 class Demo {
707         public static void Main (string[] args)
708         {
709                 List&lt;string&gt; names = new List&lt;string&gt; ();
710                 Dictionary&lt;string,string&gt; map = new Dictionary&lt;string,string&gt; ();
711                 int repeat = 1;
712
713                 OptionSet p = new DemoOptionSet () {
714                         { "n|name=",    v =&gt; names.Add (v) },
715                         { "r|repeat:",  (int v) =&gt; repeat = v },
716                         { "m|map=",     (k,v) =&gt; map.Add (k, v) },
717                 };
718
719                 List&lt;string&gt; extra;
720                 try {
721                         extra = p.Parse (args);
722                 }
723                 catch (OptionException e) {
724                         Console.Write ("subclass: ");
725                         Console.WriteLine (e.Message);
726                         return;
727                 }
728
729                 string message;
730                 if (extra.Count &gt; 0) {
731                         message = string.Join (" ", extra.ToArray ());
732                 }
733                 else {
734                         message = "Hello {0}!";
735                 }
736
737                 foreach (string name in names) {
738                         for (int i = 0; i &lt; repeat; ++i)
739                                 Console.WriteLine (message, name);
740                 }
741                 List&lt;string&gt; keys = new List&lt;string&gt;(map.Keys);
742                 keys.Sort ();
743                 foreach (string key in keys) {
744                         Console.WriteLine ("Key: {0}={1}", key, map [key]);
745                 }
746         }
747 }
748
749 </code>
750           <para>
751             See <see cref="T:Mono.Options.OptionSet" /> for more on this
752             example.
753           </para>
754         </example>
755         <altmember cref="M:Mono.Options.Option.Invoke(Mono.Options.OptionContext)" />
756       </Docs>
757     </Member>
758     <Member MemberName="OptionValueType">
759       <MemberSignature Language="C#" Value="public Mono.Options.OptionValueType OptionValueType { get; }" />
760       <MemberSignature Language="ILAsm" Value=".property instance valuetype Mono.Options.OptionValueType OptionValueType" />
761       <MemberType>Property</MemberType>
762       <AssemblyInfo>
763         <AssemblyVersion>0.2.0.0</AssemblyVersion>
764         <AssemblyVersion>0.2.1.0</AssemblyVersion>
765         <AssemblyVersion>0.2.2.0</AssemblyVersion>
766         <AssemblyVersion>0.2.3.0</AssemblyVersion>
767       </AssemblyInfo>
768       <ReturnValue>
769         <ReturnType>Mono.Options.OptionValueType</ReturnType>
770       </ReturnValue>
771       <Docs>
772         <summary>
773           An <see cref="T:Mono.Options.OptionValueType" /> instance
774           specifying whether this <see cref="T:Mono.Options.Option" /> takes
775           a value, and if so, whether it's required or optional.
776         </summary>
777         <value>
778           An <see cref="T:Mono.Options.OptionValueType" /> specifying whether
779           a value is required for this value.
780         </value>
781         <remarks>
782           <para>
783             This is initialized based on the presence of <c>=</c> or
784             <c>:</c> within <see cref="P:Mono.Options.Option.Prototype" />.
785           </para>
786         </remarks>
787       </Docs>
788     </Member>
789     <Member MemberName="Parse&lt;T&gt;">
790       <MemberSignature Language="C#" Value="protected static T Parse&lt;T&gt; (string value, Mono.Options.OptionContext c);" />
791       <MemberSignature Language="ILAsm" Value=".method familystatic hidebysig !!T Parse&lt;T&gt;(string value, class Mono.Options.OptionContext c) cil managed" />
792       <MemberType>Method</MemberType>
793       <AssemblyInfo>
794         <AssemblyVersion>0.2.0.0</AssemblyVersion>
795         <AssemblyVersion>0.2.1.0</AssemblyVersion>
796         <AssemblyVersion>0.2.2.0</AssemblyVersion>
797         <AssemblyVersion>0.2.3.0</AssemblyVersion>
798       </AssemblyInfo>
799       <ReturnValue>
800         <ReturnType>T</ReturnType>
801       </ReturnValue>
802       <TypeParameters>
803         <TypeParameter Name="T" />
804       </TypeParameters>
805       <Parameters>
806         <Parameter Name="value" Type="System.String" />
807         <Parameter Name="c" Type="Mono.Options.OptionContext" />
808       </Parameters>
809       <Docs>
810         <typeparam name="T">
811           The type to convert the string <paramref name="value" /> to.
812         </typeparam>
813         <param name="value">
814           A <see cref="T:System.String" /> containing a representation of the
815           type <typeparamref name="T" /> that should be converted into an
816           instance of type <typeparamref name="T" />.
817         </param>
818         <param name="c">
819           A <see cref="T:Mono.Options.OptionContext" /> containing additional
820           contextual information needed error handling.
821         </param>
822         <summary>
823           Converts the <see cref="T:System.String" /><paramref name="value" />
824           into an object of type <typeparamref name="T" />.
825         </summary>
826         <returns>
827           If <paramref name="value" /> is <see langword="null" />, then 
828           <see langword="default(T)" /> is returned.  Otherwise, 
829           <paramref name="value" /> is converted to a value of type 
830           <typeparamref name="T" />.
831         </returns>
832         <remarks>
833           <para>
834             <see cref="M:System.ComponentModel.TypeDescriptor.GetConverter" />
835             is used to get the 
836             <see cref="T:System.ComponentModel.TypeConverter" /> associated
837             with type <typeparamref name="T" />, and 
838             <see cref="M:System.ComponentModel.TypeConverter.ConvertFromString" />
839             is used to convert <paramref name="value" /> into a
840             <typeparamref name="T" />.
841           </para>
842         </remarks>
843         <exception cref="T:Mono.Options.OptionException">
844           If <paramref name="value" /> is not <see langword="null" /> and
845           <see cref="M:System.ComponentModel.TypeConverter.ConvertFromString" />
846           generated an exception while trying to convert 
847           <paramref name="value" />.
848         </exception>
849       </Docs>
850     </Member>
851     <Member MemberName="Prototype">
852       <MemberSignature Language="C#" Value="public string Prototype { get; }" />
853       <MemberSignature Language="ILAsm" Value=".property instance string Prototype" />
854       <MemberType>Property</MemberType>
855       <AssemblyInfo>
856         <AssemblyVersion>0.2.0.0</AssemblyVersion>
857         <AssemblyVersion>0.2.1.0</AssemblyVersion>
858         <AssemblyVersion>0.2.2.0</AssemblyVersion>
859         <AssemblyVersion>0.2.3.0</AssemblyVersion>
860       </AssemblyInfo>
861       <ReturnValue>
862         <ReturnType>System.String</ReturnType>
863       </ReturnValue>
864       <Docs>
865         <summary>
866           The <see cref="T:Mono.Options.Option" /> prototype, containing
867           option name aliases and the option value requirements.
868         </summary>
869         <value>
870           A <see cref="T:System.String" /> containing the prototype of this
871           <see cref="T:Mono.Options.Option" /> instance.
872         </value>
873         <remarks>
874           <para>
875             The prototype contains a <c>|</c>-separated list of all option name
876             aliases and a value specifier of <c>=</c> for required values and
877             <c>:</c> for optional values; if neither <c>=</c> nor <c>:</c> is
878             present, no value is taken.
879           </para>
880           <para>
881             If a value specifier is present, then a value separator list may
882             also be present after the value specifier.
883           </para>
884         </remarks>
885       </Docs>
886     </Member>
887     <Member MemberName="ToString">
888       <MemberSignature Language="C#" Value="public override string ToString ();" />
889       <MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance string ToString() cil managed" />
890       <MemberType>Method</MemberType>
891       <AssemblyInfo>
892         <AssemblyVersion>0.2.0.0</AssemblyVersion>
893         <AssemblyVersion>0.2.1.0</AssemblyVersion>
894         <AssemblyVersion>0.2.2.0</AssemblyVersion>
895         <AssemblyVersion>0.2.3.0</AssemblyVersion>
896       </AssemblyInfo>
897       <ReturnValue>
898         <ReturnType>System.String</ReturnType>
899       </ReturnValue>
900       <Parameters />
901       <Docs>
902         <summary>
903           Returns <see cref="P:Mono.Options.Option.Prototype" />.
904         </summary>
905         <returns>
906           A <see cref="T:System.String" /> containing
907           <see cref="P:Mono.Options.Option.Prototype" />.
908         </returns>
909         <remarks>
910         </remarks>
911       </Docs>
912     </Member>
913   </Members>
914 </Type>