C# Class YAMP.Converter.ValueConverterAttribute

Abstract base class for any value converter.
Inheritance: System.Attribute
Afficher le fichier Open project: FlorianRappl/YAMP

Méthodes publiques

Méthode 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 méthode

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

Convert() public méthode

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

ValueConverterAttribute() public méthode

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

ValueConverterAttribute() public méthode

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.
Résultat System