12 if (!(sourceType == typeof(
string)) && !(sourceType == typeof(
Uri)))
14 return base.CanConvertFrom(context, sourceType);
23 return base.CanConvertTo(context, destinationType);
32 if (
string.IsNullOrEmpty(
text))
47 if (destinationType ==
null)
66 if (destinationType == typeof(
string))
68 return uri.OriginalString;
70 if (destinationType == typeof(
Uri))
80 if (
value is
string uriString)
Exception GetConvertToException(object? value, Type destinationType)
Exception GetConvertFromException(object? value)
override bool CanConvertTo(ITypeDescriptorContext? context, Type? destinationType)
override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType)
override bool IsValid(ITypeDescriptorContext? context, object? value)
static UriKind GetUriKind(Uri uri)
override object ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType)
override? object ConvertFrom(ITypeDescriptorContext? context, CultureInfo? culture, object? value)
static bool TryCreate([NotNullWhen(true)] string? uriString, UriKind uriKind, [NotNullWhen(true)] out Uri? result)