public ConvertTo ( ITypeDescriptorContext context, |
||
context | ITypeDescriptorContext | ${WP_core_GeoPointConverter_method_ConvertTo_param_context} |
culture | ${WP_core_GeoPointConverter_method_ConvertTo_param_culture} | |
value | object | ${WP_core_GeoPointConverter_method_ConvertTo_param_value} |
destinationType | ${WP_core_GeoPointConverter_method_ConvertTo_param_destinationType} | |
리턴 | object |
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
{
if (destinationType == null)
{
//TODO:资源
//throw new ArgumentNullException("destinationType");
throw new ArgumentNullException(ExceptionStrings.DestinationTypeIsNull);
}
if ((destinationType == typeof(string)) && (value is GeoPoint))
{
return convertToString((GeoPoint)value);
}
return base.ConvertTo(context, culture, value, destinationType);
}