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