System.Xml.Xsl.XsltOld.XsltCompileContext.GetExtentionMethod C# (CSharp) Method

GetExtentionMethod() private method

private GetExtentionMethod ( string ns, string name, XPathResultType argTypes, object &extension ) : IXsltContextFunction
ns string
name string
argTypes XPathResultType
extension object
return IXsltContextFunction
        private IXsltContextFunction GetExtentionMethod(string ns, string name, XPathResultType[] argTypes, out object extension) {
            FuncExtension result = null;
            extension = this.processor.GetScriptObject(ns);
            if (extension != null) {
                MethodInfo method = FindBestMethod(extension.GetType().GetMethods(bindingFlags), /*ignoreCase:*/true, /*publicOnly:*/false, name, argTypes);
                if (method != null) {
                    result = new FuncExtension(extension, method, /*permissions*/null);
                }
                return result;
            }

            extension = this.processor.GetExtensionObject(ns);
            if(extension != null) {
                MethodInfo method = FindBestMethod(extension.GetType().GetMethods(bindingFlags), /*ignoreCase:*/false, /*publicOnly:*/true, name, argTypes);
                if (method != null) {
                    result = new FuncExtension(extension, method, this.processor.permissions);
                }
                return result;
            }

            return null;
        }