internal MetaType GetMetaType(object value)
        {
            MetaType metaTypeForObject = this._metaType;

            if (metaTypeForObject == null)
            {
                if ((value != null) && !Convert.IsDBNull(value))
                {
                    metaTypeForObject = MetaType.GetMetaTypeForObject(value);
                }
                else
                {
                    metaTypeForObject = MetaType.GetDefaultMetaType();
                }
                this._metaType = metaTypeForObject;
            }
            return(metaTypeForObject);
        }
Exemplo n.º 2
0
        ////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////
        //
        // Methods
        //
        ////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////

        internal MetaType GetMetaType()
        {
            // if the user specifed a type, then return it's meta data
            if (null != _metaType)
            {
                return(_metaType);
            }

            object parameterValue = Value;

            // if the didn't specify a type, but they specified a value, then
            // return the meta data for the value they specified
            if (null != parameterValue && !Convert.IsDBNull(parameterValue))
            {
                return(MetaType.GetMetaTypeForObject(parameterValue));
            }

            // if they haven't specified anything, then return the default
            // meta data information
            return(MetaType.GetDefaultMetaType());
        }