private bool SimpleCanConvertTo(ITypeDescriptorContext context, Type destinationType, CanConvertDel baseCanConvertTo) =>
     simpleTypeConverter == null
         ? baseCanConvertTo(context,destinationType)
         : simpleTypeConverter.CanConvertTo(context, destinationType);
 public bool CanConvertTo(ITypeDescriptorContext context, Type destinationType, CanConvertDel baseCanConvertTo) =>
     destinationType == simpleType ? true
   : destinationType == typeof(InstanceDescriptor) ? true
   : SimpleCanConvertTo(context, destinationType, baseCanConvertTo);
 public bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType, CanConvertDel baseCanConvertFrom) =>
     sourceType == simpleType ? true
   : simpleTypeConverter == null ? baseCanConvertFrom(context, sourceType)
   : simpleTypeConverter.CanConvertFrom(context, sourceType);
Example #4
0
 private bool SimpleCanConvertTo(ITypeDescriptorContext context, Type destinationType, CanConvertDel baseCanConvertTo) =>
 simpleTypeConverter == null
         ? baseCanConvertTo(context, destinationType)
         : simpleTypeConverter.CanConvertTo(context, destinationType);
Example #5
0
 public bool CanConvertTo(ITypeDescriptorContext context, Type destinationType, CanConvertDel baseCanConvertTo) =>
 destinationType == simpleType ? true
   : destinationType == typeof(InstanceDescriptor) ? true
   : SimpleCanConvertTo(context, destinationType, baseCanConvertTo);
Example #6
0
 public bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType, CanConvertDel baseCanConvertFrom) =>
 sourceType == simpleType ? true
   : simpleTypeConverter == null?baseCanConvertFrom(context, sourceType)
     : simpleTypeConverter.CanConvertFrom(context, sourceType);