1 <Type Name="OptionContext" FullName="Mono.Options.OptionContext">
2 <TypeSignature Language="C#" Value="public class OptionContext" />
4 <AssemblyName>Mono.Options</AssemblyName>
5 <AssemblyVersion>0.2.0.0</AssemblyVersion>
6 <AssemblyVersion>0.2.1.0</AssemblyVersion>
9 <BaseTypeName>System.Object</BaseTypeName>
13 <summary>Provides additional context information about the current
14 <see cref="T:Mono.Options.Option" /> which is being parsed.</summary>
16 An instance of this class is provided via the registered callback when you
18 <see cref="M:Mono.Options.Option.OnParseComplete(Mono.Options.OptionContext)" />
23 <Member MemberName=".ctor">
24 <MemberSignature Language="C#" Value="public OptionContext (Mono.Options.OptionSet set);" />
25 <MemberType>Constructor</MemberType>
27 <AssemblyVersion>0.2.0.0</AssemblyVersion>
28 <AssemblyVersion>0.2.1.0</AssemblyVersion>
31 <Parameter Name="set" Type="Mono.Options.OptionSet" />
35 The <see cref="T:Mono.Options.OptionSet" /> instance to use for
36 message localization purposes.
38 <summary>Constructs and initializes a new instance of the
39 <see cref="T:Mono.Options.OptionContext" /> class.</summary>
41 This constructor initializes the
42 <see cref="P:Mono.Options.OptionContext.OptionSet" /> property of
43 the new instance using <paramref name="set" />.
47 <Member MemberName="Option">
48 <MemberSignature Language="C#" Value="public Mono.Options.Option Option { set; get; }" />
49 <MemberType>Property</MemberType>
51 <AssemblyVersion>0.2.0.0</AssemblyVersion>
52 <AssemblyVersion>0.2.1.0</AssemblyVersion>
55 <ReturnType>Mono.Options.Option</ReturnType>
58 <summary>The <see cref="T:Mono.Options.Option" /> being parsed.</summary>
59 <value>The <see cref="T:Mono.Options.Option" /> being parsed.</value>
64 <Member MemberName="OptionIndex">
65 <MemberSignature Language="C#" Value="public int OptionIndex { set; get; }" />
66 <MemberType>Property</MemberType>
68 <AssemblyVersion>0.2.0.0</AssemblyVersion>
69 <AssemblyVersion>0.2.1.0</AssemblyVersion>
72 <ReturnType>System.Int32</ReturnType>
76 The index within the options list of the last value within
77 <see cref="P:Mono.Options.OptionContext.OptionValues" />.
80 A <see cref="T:System.Int32" /> containing the index within the
81 options list of the last value within
82 <see cref="P:Mono.Options.OptionContext.OptionValues" />.
86 <altmember cref="M:Mono.Options.OptionSet.Parse(System.Collections.Generic.IEnumerable<System.String>)" />
89 <Member MemberName="OptionName">
90 <MemberSignature Language="C#" Value="public string OptionName { set; get; }" />
91 <MemberType>Property</MemberType>
93 <AssemblyVersion>0.2.0.0</AssemblyVersion>
94 <AssemblyVersion>0.2.1.0</AssemblyVersion>
97 <ReturnType>System.String</ReturnType>
100 <summary>The actual option name used.</summary>
101 <value>A <see cref="T:System.String" /> containing the actual option name used.</value>
103 A <see cref="P:Mono.Options.Option.Prototype" /> can contain multiple
104 <c>|</c>-delimited aliases, e.g. <c>h|help</c>. This property
105 contains the actual option name specified, e.g. <c>-h</c> vs.
110 <Member MemberName="OptionSet">
111 <MemberSignature Language="C#" Value="public Mono.Options.OptionSet OptionSet { get; }" />
112 <MemberType>Property</MemberType>
114 <AssemblyVersion>0.2.0.0</AssemblyVersion>
115 <AssemblyVersion>0.2.1.0</AssemblyVersion>
118 <ReturnType>Mono.Options.OptionSet</ReturnType>
122 The <see cref="T:Mono.Options.OptionSet" /> to use for message
126 The <see cref="T:Mono.Options.OptionSet" /> to use for message
131 This property is initialized in the
132 <see cref="C:Mono.Options.OptionContext(Mono.Options.OptionSet)" />
138 <Member MemberName="OptionValues">
139 <MemberSignature Language="C#" Value="public Mono.Options.OptionValueCollection OptionValues { get; }" />
140 <MemberType>Property</MemberType>
142 <AssemblyVersion>0.2.0.0</AssemblyVersion>
143 <AssemblyVersion>0.2.1.0</AssemblyVersion>
146 <ReturnType>Mono.Options.OptionValueCollection</ReturnType>
150 A collection of <see cref="T:System.String" /> values to provide to
151 <see cref="P:Mono.Options.OptionContext.Option" />.
154 A <see cref="T:Mono.Options.OptionValueCollection" /> containing
155 <see cref="T:System.String" /> values to provide to
156 <see cref="P:Mono.Options.OptionContext.Option" />.
160 The <see cref="T:Mono.Options.OptionValueCollection" /> indexer
162 <see cref="P:Mono.Options.Option.OptionValueType" />
163 and <see cref="P:Mono.Options.Option.MaxValueCount" /> properties.
164 If the index does not have a value, the index is less than
165 <see cref="P:Mono.Options.Option.MaxValueCount" />, and the
166 <see cref="P:Mono.Options.OptionContext.Option" /> has a value
167 type of <see cref="F:Mono.Options.OptionValueType.Optional" />,
168 <see langword="null" /> is returned; otherwise an
169 <see cref="T:Mono.Options.OptionException" /> is thrown.