private bool CanConvertValue(Type sourceType, Type targetType) { return(ConversionUtils.CanConvertElements( ConversionUtils.GetDictionaryValueType(sourceType), ConversionUtils.GetDictionaryValueType(targetType), _conversionService)); }
public override bool Matches(Type sourceType, Type targetType) { if (sourceType == typeof(string) && ConversionUtils.CanCreateCompatListFor(targetType)) { return(ConversionUtils.CanConvertElements(sourceType, ConversionUtils.GetElementType(targetType), _conversionService)); } return(false); }
public override bool Matches(Type sourceType, Type targetType) { if (!targetType.IsArray || sourceType.IsArray) { return(false); } return(ConversionUtils.CanConvertElements( ConversionUtils.GetElementType(sourceType), ConversionUtils.GetElementType(targetType), _conversionService)); }
public override bool Matches(Type sourceType, Type targetType) { // NO OP check Arrays already implement IList, etc. if (targetType.IsAssignableFrom(sourceType)) { return(false); } if (sourceType.IsArray && ConversionUtils.CanCreateCompatListFor(targetType)) { return(ConversionUtils.CanConvertElements( ConversionUtils.GetElementType(sourceType), ConversionUtils.GetElementType(targetType), _conversionService)); } return(false); }