Interface IConversionService
Interface for the conversion service
public interface IConversionService
- Extension Methods
Methods
GetBoolean(object, bool)
Returns the boolean representation of an object or default value if not.
bool GetBoolean(object value, bool defaultValue)
Parameters
value
objectValue to convert
defaultValue
boolDefault value
Returns
- bool
GetCodeName(string)
Gets the code name created from the given string.
string GetCodeName(string name)
Parameters
name
stringDisplay name
Returns
- string
GetDateTime(object, DateTime, string)
Returns the DateTime representation of an object or default value if not.
DateTime GetDateTime(object value, DateTime defaultValue, string culture)
Parameters
value
objectValue to convert
defaultValue
DateTimeDefault value
culture
stringCulture
Returns
- DateTime
GetGuid(object, Guid)
Returns the Guid representation of an object or default value if not.
Guid GetGuid(object value, Guid defaultValue)
Parameters
value
objectValue to convert
defaultValue
GuidDefault value
Returns
- Guid
GetIdentifier(string)
Gets the identifier created from the given name
string GetIdentifier(string name)
Parameters
name
stringDisplay name
Returns
- string
GetInteger(object, int)
Returns the integer representation of an object or default value if not.
int GetInteger(object value, int defaultValue)
Parameters
value
objectValue to convert
defaultValue
intDefault value
Returns
- int
GetString(object, string)
Returns the string representation of an object or default value if not.
string GetString(object value, string defaultValue)
Parameters
value
objectValue to convert
defaultValue
stringDefault value
Returns
- string