cross-platform-generator
Public Member Functions
cpg.EnumToIntConverter Class Reference

Converts an enum value to its integer representation. More...

Inheritance diagram for cpg.EnumToIntConverter:

Public Member Functions

object Convert (object value, Type targetType, object parameter, CultureInfo culture)
 Converts an enum to integer. More...
 
object ConvertBack (object value, Type targetType, object parameter, CultureInfo culture)
 Converts an int to enum value. More...
 

Detailed Description

Converts an enum value to its integer representation.

cog.EnumToIntConverter : IValueConverter

Author
Stan Pepels

Member Function Documentation

◆ Convert()

object cpg.EnumToIntConverter.Convert ( object  value,
Type  targetType,
object  parameter,
CultureInfo  culture 
)
inline

Converts an enum to integer.

Parameters
[in]value(object) The value to convert
[in]targetType(Type) The Expected type that is returned.
[in]parameter(object) An optional parameter that can be used to adjust the conversion behaviour
[in]culture(CultureInfo) Culture info about the locale of the system
Returns
(object) the integer representation of the enum.

◆ ConvertBack()

object cpg.EnumToIntConverter.ConvertBack ( object  value,
Type  targetType,
object  parameter,
CultureInfo  culture 
)
inline

Converts an int to enum value.

Parameters
[in]value(object) The value to convert
[in]targetType(Type) The Expected type that is returned.
[in]parameter(object) An optional parameter that can be used to adjust the conversion behaviour
[in]culture(CultureInfo) Culture info about the locale of the system
Returns
(object) The enum value of the int.

The documentation for this class was generated from the following file: