EarlyBoundFunctionExists() public method

Return true if the early bound object identified by "namespaceUri" contains a method that matches "name".
public EarlyBoundFunctionExists ( string name, string namespaceUri ) : bool
name string
namespaceUri string
return bool
示例#1
0
        private bool FunctionAvailableHelper(XmlQualifiedName name)
        {
            // Is this an XPath or an XSLT function?
            if (QilGenerator.IsFunctionAvailable(name.Name, name.Namespace))
            {
                return(true);
            }

            // Script blocks and extension objects cannot implement neither null nor XSLT namespace
            if (name.Namespace.Length == 0 || name.Namespace == XmlReservedNs.NsXslt)
            {
                return(false);
            }

            // Is this an extension object function?
            if (_runtime.ExternalContext.LateBoundFunctionExists(name.Name, name.Namespace))
            {
                return(true);
            }

            // Is this a script function?
            return(_runtime.EarlyBoundFunctionExists(name.Name, name.Namespace));
        }