4 using System.ComponentModel;
5 using System.Globalization;
7 namespace SiliconStudio.Core.IO
20 protected abstract T
Convert(
string value);
23 public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
25 return sourceType == typeof(
string) || base.CanConvertFrom(context, sourceType);
29 public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture,
object value)
31 var stringPath = value as string;
32 return stringPath != null ?
Convert(stringPath) : base.ConvertFrom(context, culture, value);
override UFile Convert(string value)
Performs the actual string conversion.
override UDirectory Convert(string value)
Performs the actual string conversion.
Defines a normalized directory path. See UPath for details. This class cannot be inherited.
The implementation of TypeConverter for UFile that implements conversion from strings.
HRESULT Convert(_In_ const Image &srcImage, _In_ DXGI_FORMAT format, _In_ DWORD filter, _In_ float threshold, _Out_ ScratchImage &image)
override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
The implementation of TypeConverter for UDirectory that implements conversion from strings...
override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
Defines a normalized file path. See UPath for details. This class cannot be inherited.