Adf.Base.Configuration.AssemblyQualifiedTypeNameConverter.ConvertFrom C# (CSharp) Method

ConvertFrom() public method

Returns a type based on the assembly qualified name passed in as data.
public ConvertFrom ( ITypeDescriptorContext context, System culture, object value ) : object
context ITypeDescriptorContext The container representing this System.ComponentModel.TypeDescriptor.
culture System Culture info for assembly.
value object Data to convert.
return object
        public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
        {
            string stringValue = (string)value;
            Type result = String.IsNullOrEmpty(stringValue) ? null : Type.GetType(stringValue, false);
            if (result == null)
            {
                throw new ArgumentException(string.Format(Properties.Resources.Culture, Properties.Resources.ExceptionInvalidType, stringValue));
            }

            return result;
        }
AssemblyQualifiedTypeNameConverter