Class BooleanOptionSupport
- Namespace
- CENTREL.XIA.Configuration.Types
- Assembly
- CENTREL.XIA.Configuration.Types.dll
Provides boolean option support functions.
public static class BooleanOptionSupport
- Inheritance
-
BooleanOptionSupport
- Inherited Members
Methods
FromBool(bool)
Converts a System.Boolean value to a CENTREL.XIA.Configuration.Types.BooleanOption type.
public static BooleanOption FromBool(bool value)
Parameters
value
boolThe boolean value to evaluate.
Returns
- BooleanOption
A boolean option value from the specified boolean value.
FromBool(int)
Converts a System.Int32 value to a CENTREL.XIA.Configuration.Types.BooleanOption type treating any value greater than zero as true.
public static BooleanOption FromBool(int value)
Parameters
value
intThe System.Int32 value to convert.
Returns
- BooleanOption
A CENTREL.XIA.Configuration.Types.BooleanOption type.
FromBool(int, int, int)
Converts a System.Int32 value to a CENTREL.XIA.Configuration.Types.BooleanOption type.
public static BooleanOption FromBool(int value, int trueValue, int falseValue)
Parameters
value
intThe System.Int32 value to convert.
trueValue
intThe integer value that represents true.
falseValue
intThe integer value that represents false.
Returns
- BooleanOption
A CENTREL.XIA.Configuration.Types.BooleanOption type.
FromBool(bool?)
Converts a nullable System.Boolean value to a CENTREL.XIA.Configuration.Types.BooleanOption type.
public static BooleanOption FromBool(bool? value)
Parameters
value
bool?The nullable boolean value to evaluate.
Returns
- BooleanOption
A boolean option value from the specified nullable boolean value.
FromBool(bool?, BooleanOption)
Converts a nullable System.Boolean value to a CENTREL.XIA.Configuration.Types.BooleanOption type.
public static BooleanOption FromBool(bool? value, BooleanOption nullValue)
Parameters
value
bool?The nullable boolean value to evaluate.
nullValue
BooleanOptionThe value to return if the nullable boolean value is null.
Returns
- BooleanOption
A boolean option value from the specified nullable boolean value.
FromBool(uint)
Converts a System.UInt32 value to a CENTREL.XIA.Configuration.Types.BooleanOption type treating any value greater than zero as true.
public static BooleanOption FromBool(uint value)
Parameters
value
uintThe System.UInt32 value to convert.
Returns
- BooleanOption
A CENTREL.XIA.Configuration.Types.BooleanOption type.
InvertBooleanOption(BooleanOption)
Inverts the specified CENTREL.XIA.Configuration.Types.BooleanOption value.
public static BooleanOption InvertBooleanOption(BooleanOption value)
Parameters
value
BooleanOptionThe CENTREL.XIA.Configuration.Types.BooleanOption value to invert.
Returns
- BooleanOption
The inverted value of the specified CENTREL.XIA.Configuration.Types.BooleanOption value.