Exemple #1
0
 public bool IsConvertible(ConversionContext conversion)
 {
     return(conversion.HasValue &&
            conversion.ValueType.IsOneOf(dateTimeTypes) &&
            conversion.DestinationPropertyType.IsOneOf(dateTimeTypes));
 }
Exemple #2
0
 public bool IsConvertible(ConversionContext conversion)
 {
     return(conversion.HasValue &&
            conversion.DestinationPropertyType is IConvertible &&
            conversion.ValueType != conversion.DestinationPropertyType);
 }
Exemple #3
0
 public bool IsConvertible(ConversionContext conversion)
 {
     return(conversion.HasValue == false);
 }
Exemple #4
0
 public ConversionResult Convert(ConversionContext conversion)
 {
     return(conversion.Result(conversion.DestinationPropertyType.DefaultValue()));
 }
Exemple #5
0
 public ConversionResult Convert(ConversionContext conversion)
 {
     return(conversion.Unconverted());
 }
 private static ConversionResult TrySystemConversion(ConversionContext context)
 {
     return(new SystemConverter().Convert(context));
 }