Beispiel #1
0
        // <summary>
        // This internal method ensures that the specified type is a scalar
        // type supported by the underlying provider by ensuring that scalar
        // metadata for this type is retrievable.
        // </summary>
        internal bool ValidateParameterType(ClrPerspective perspective)
        {
            TypeUsage type;

            // The parameter type metadata is only valid if it's scalar or enumeration type metadata.
            if ((perspective.TryGetType(_mappableType, out type)) &&
                (TypeSemantics.IsScalarType(type)))
            {
                return(true);
            }

            return(false);
        }
Beispiel #2
0
        internal bool ValidateParameterType(ClrPerspective perspective)
        {
            TypeUsage outTypeUsage;

            return(perspective.TryGetType(this._mappableType, out outTypeUsage) && TypeSemantics.IsScalarType(outTypeUsage));
        }