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
valueboolThe 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
valueintThe 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
valueintThe System.Int32 value to convert.
trueValueintThe integer value that represents true.
falseValueintThe 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
valuebool?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
valuebool?The nullable boolean value to evaluate.
nullValueBooleanOptionThe 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
valueuintThe 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
valueBooleanOptionThe CENTREL.XIA.Configuration.Types.BooleanOption value to invert.
Returns
- BooleanOption
The inverted value of the specified CENTREL.XIA.Configuration.Types.BooleanOption value.