/// <inheritdoc /> public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { if (destinationType == typeof(string) && value is IHash hash) { return(HashStringRepresentation.Process(hash)); } return(base.ConvertTo(context, culture, value, destinationType)); }
/// <inheritdoc /> public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { return(value is string inputString ? HashStringRepresentation.Retrieve(inputString) : base.ConvertFrom(context, culture, value)); }
/// <inheritdoc /> public override string ToString() => HashStringRepresentation.Process(this);