private IDelegateAdapter GetDelgateAdapter(string _Function, int _pramcount, IType _classtype, object _target, out bool _isNeedReg) { _isNeedReg = false; if (_classtype == null || _target == null) { return(null); } ILMethod methodctor = GetLMethod(_classtype, _Function, _pramcount) as ILMethod; if (methodctor == null) { return(null); } if (!typeof(ILTypeInstance).IsInstanceOfType(_target)) { return(null); } ILTypeInstance tclrobj = _target as ILTypeInstance; _isNeedReg = !mApp.DelegateManager.IsRegToMethodDelegate(methodctor); if (_isNeedReg) { return(null); } IDelegateAdapter ret = tclrobj.GetDelegateAdapter(methodctor); if (ret == null) { ret = mApp.DelegateManager.FindDelegateAdapter(tclrobj, methodctor); } return(ret); }