Aqueduct.SitecoreLib.DataAccess.ValueResolvers.ConvertibleValueResolver.CanResolve C# (CSharp) Method

CanResolve() public method

public CanResolve ( Type type ) : bool
type System.Type
return bool
        public virtual bool CanResolve (Type type)
        {
            // Can resolve any type which implements IConvertible, except DateTime, 
            // Boolean or Enum, which are more explicitly handled by other value 
            // resolvers
            if (type.Equals (typeof (DateTime)) || type.Equals (typeof (Boolean)) || type.IsEnum)
            {
                return false;
            }

            return typeof (IConvertible).IsAssignableFrom (type);
        }