Mono.MoonlightTypeConverter.CanConvertFrom C# (CSharp) Метод

CanConvertFrom() публичный Метод

public CanConvertFrom ( ITypeDescriptorContext context, Type sourceType ) : bool
context ITypeDescriptorContext
sourceType System.Type
Результат bool
		public override bool CanConvertFrom (ITypeDescriptorContext context, Type sourceType)
		{
			if (sourceType == typeof(string))
				return true;

			// allow specifying SolidColorBrushes using color literals
			if (sourceType == typeof(Color) && destinationType.IsAssignableFrom(typeof(SolidColorBrush)))
				return true;

			if (IsAssignableToIConvertible (sourceType) && IsAssignableToIConvertible (destinationType))
				return true;

			if (destinationType.IsAssignableFrom (sourceType))
				return true;

			return base.CanConvertFrom (context, sourceType);
		}