Aqueduct.SitecoreLib.DataAccess.ValueResolvers.NullableResolver.GetObjectValue C# (CSharp) Method

GetObjectValue() private static method

private static GetObjectValue ( string value, Type type ) : object
value string
type System.Type
return object
        private static object GetObjectValue (string value, Type type)
        {
            if (type.IsEnum)
            {
                return GetEnumValue (type, value);
            }

            if (type.Equals ((typeof(bool))))
            {
                return GetBooleanValue (value);
            }

            if (type.Equals (typeof(DateTime)))
            {
                return GetDateTimeValue (value);
            }

            if (typeof(IConvertible).IsAssignableFrom (type))
            {
                return GetConvertibleValue (type, value);
            }

            string message = String.Format ("Unsupported type being used with NullableResolver: [{0}]", type.Name);
            throw new Exception(message);
        }