C# Class YAMP.Converter.ValueConverterAttribute

Abstract base class for any value converter.
Inheritance: System.Attribute
Mostra file Open project: FlorianRappl/YAMP

Public Methods

Method Description
CanConvertFrom ( Value argument ) : bool

Indicates if a given argument can be converted.

Convert ( Value argument ) : object

Converts the given value to a standard CLR type.

ValueConverterAttribute ( Type expected ) : System

Creates a new instance.

ValueConverterAttribute ( Type expected, object>.Func converter ) : System

Creates a new instance.

Method Details

CanConvertFrom() public method

Indicates if a given argument can be converted.
public CanConvertFrom ( Value argument ) : bool
argument Value The value to convert.
return bool

Convert() public method

Converts the given value to a standard CLR type.
public Convert ( Value argument ) : object
argument Value The value to convert.
return object

ValueConverterAttribute() public method

Creates a new instance.
public ValueConverterAttribute ( Type expected ) : System
expected System.Type The expected type (target)
return System

ValueConverterAttribute() public method

Creates a new instance.
public ValueConverterAttribute ( Type expected, object>.Func converter ) : System
expected System.Type The expected type (target).
converter object>.Func The conversion function.
return System