Exemplo n.º 1
0
 static Unit()
 {
     Converter.AddTypedConverter <Unit, decimal>(input => (decimal)input);
     Converter.AddTypedConverter <Unit, double>(input => (double)input);
     Converter.AddTypedConverter <decimal, Unit>(input => input);
     Converter.AddTypedConverter <int, Unit>(input => input);
     Converter.AddTypedConverter <double, Unit>(input => input);
 }
Exemplo n.º 2
0
 static Currency()
 {
     Converter.AddTypedConverter <Currency, decimal>(input => (decimal)input);
     Converter.AddTypedConverter <decimal, Currency>(input => input);
 }