Table of Contents

Interface IConversionService

Namespace
CMS.Core
Assembly
CMS.Core.dll

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 object

Value to convert

defaultValue bool

Default value

Returns

bool

GetCodeName(string)

Gets the code name created from the given string.

string GetCodeName(string name)

Parameters

name string

Display 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 object

Value to convert

defaultValue DateTime

Default value

culture string

Culture

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 object

Value to convert

defaultValue Guid

Default value

Returns

Guid

GetIdentifier(string)

Gets the identifier created from the given name

string GetIdentifier(string name)

Parameters

name string

Display 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 object

Value to convert

defaultValue int

Default 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 object

Value to convert

defaultValue string

Default value

Returns

string