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;
}