Ext.Net.ToolConverter.ConvertFrom C# (CSharp) Method

ConvertFrom() private method

private ConvertFrom ( ITypeDescriptorContext context, CultureInfo culture, object value ) : object
context ITypeDescriptorContext
culture System.Globalization.CultureInfo
value object
return object
        public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
        {
            if (((string)value).IsNotEmpty())
            {
                return new Tool((ToolType)Enum.Parse(typeof(ToolType), (string)value));
            }
            else
            {
                return new Tool();
            }
        }