1 <Type Name="OptionValueType" FullName="Mono.Options.OptionValueType">
2 <TypeSignature Language="C#" Value="public enum OptionValueType" />
3 <TypeSignature Language="ILAsm" Value=".class public auto ansi sealed OptionValueType extends System.Enum" />
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>
11 <BaseTypeName>System.Enum</BaseTypeName>
15 Specifies whether or not a <see cref="T:Mono.Options.Option" />
16 takes a value, and if it does, whether it's optional or required.
20 <altmember cref="P:Mono.Options.Option.OptionValueType" />
23 <Member MemberName="None">
24 <MemberSignature Language="C#" Value="None" />
25 <MemberSignature Language="ILAsm" Value=".field public static literal valuetype Mono.Options.OptionValueType None = int32(0)" />
26 <MemberType>Field</MemberType>
28 <AssemblyVersion>0.2.0.0</AssemblyVersion>
29 <AssemblyVersion>0.2.1.0</AssemblyVersion>
30 <AssemblyVersion>0.2.2.0</AssemblyVersion>
33 <ReturnType>Mono.Options.OptionValueType</ReturnType>
37 <para>No value is taken.</para>
38 <para>If an option takes no value, then the callback function will
39 receive <see langword="null" /> if the value is
40 <see langword="false" /> (e.g. <c>-optionName-</c> was used) and
41 non-<see langword="null" /> if the value is <see langword="true" />
42 (e.g. <c>-optionName</c>, <c>-optionName+</c>).</para>
46 <Member MemberName="Optional">
47 <MemberSignature Language="C#" Value="Optional" />
48 <MemberSignature Language="ILAsm" Value=".field public static literal valuetype Mono.Options.OptionValueType Optional = int32(1)" />
49 <MemberType>Field</MemberType>
51 <AssemblyVersion>0.2.0.0</AssemblyVersion>
52 <AssemblyVersion>0.2.1.0</AssemblyVersion>
53 <AssemblyVersion>0.2.2.0</AssemblyVersion>
56 <ReturnType>Mono.Options.OptionValueType</ReturnType>
60 <para>A value is optional.</para>
61 <para>This is specified by providing <c>:</c> after the option name
62 within <see cref="P:Mono.Options.Option.Prototype" />.</para>
63 <para>If a value is optional, the callback function will receive
64 <see langword="null" /> value if no value is provided, and will
65 otherwise receive a non-<see langword="null" /> value.</para>
66 <para>Options with optional values are not "greedy" -- the value
67 must be part of the current argument, e.g. <c>-opt:foo</c> will
68 pass <c>"foo"</c> as the value to <c>-opt</c>, but <c>-opt foo</c>
69 will pass <see langword="null" /> as the value to <c>-opt</c>.
74 <Member MemberName="Required">
75 <MemberSignature Language="C#" Value="Required" />
76 <MemberSignature Language="ILAsm" Value=".field public static literal valuetype Mono.Options.OptionValueType Required = int32(2)" />
77 <MemberType>Field</MemberType>
79 <AssemblyVersion>0.2.0.0</AssemblyVersion>
80 <AssemblyVersion>0.2.1.0</AssemblyVersion>
81 <AssemblyVersion>0.2.2.0</AssemblyVersion>
84 <ReturnType>Mono.Options.OptionValueType</ReturnType>
88 <para>A value is required.</para>
89 <para>This is specified by providing <c>=</c> after the option name
90 within <see cref="P:Mono.Options.Option.Prototype" />.</para>
91 <para>Options with required values are "greedy" -- if the current
92 argument does not contain a value, the next argument will be used
93 as the value, e.g. both <c>-opt:foo</c> and <c>-opt foo</c> will
94 pass <c>"foo"</c> as the value to <c>-opt</c>.</para>