C# Class Serialize.Linq.Internals.ValueConverter

ファイルを表示 Open project: esskar/Serialize.Linq

Public Methods

Method Description
AddCustomConverter ( Func converter ) : void

Adds the custom converter.

AddCustomConverter ( Type convertTo, Func converter ) : void

Adds the custom converter.

AddCustomConverter ( Type convertTo, object>.Func converter ) : void

Adds the custom converter.

ClearCustomConverters ( ) : void

Clears the custom converters.

Convert ( object value, Type convertTo ) : object

Converts the specified value.

Private Methods

Method Description
TryConvertToDateTime ( object value, System.DateTime &dateTime ) : bool

Tries the convert to date time.

TryCustomConvert ( object value, Type convertTo, object &convertedValue ) : bool

Tries the custom convert.

ValueConverter ( ) : System

Initializes the ValueConverter class.

Method Details

AddCustomConverter() public static method

Adds the custom converter.
public static AddCustomConverter ( Func converter ) : void
converter Func The converter.
return void

AddCustomConverter() public static method

Adds the custom converter.
/// convertTo /// or /// converter /// Failed to add converter.
public static AddCustomConverter ( Type convertTo, Func converter ) : void
convertTo System.Type The convert to.
converter Func The converter.
return void

AddCustomConverter() public static method

Adds the custom converter.
public static AddCustomConverter ( Type convertTo, object>.Func converter ) : void
convertTo System.Type The convert to.
converter object>.Func The converter.
return void

ClearCustomConverters() public static method

Clears the custom converters.
public static ClearCustomConverters ( ) : void
return void

Convert() public static method

Converts the specified value.
public static Convert ( object value, Type convertTo ) : object
value object The value.
convertTo System.Type The convert to.
return object