IronPython.Runtime.Method.TryGetValue C# (CSharp) Method

TryGetValue() private method

private TryGetValue ( CodeContext context, object instance, IronPython.Runtime.Types.PythonType owner, object &value ) : bool
context CodeContext
instance object
owner IronPython.Runtime.Types.PythonType
value object
return bool
        internal override bool TryGetValue(CodeContext context, object instance, PythonType owner, out object value) {
            if (this.im_self == null) {
                if (owner == null || owner == im_class || PythonOps.IsSubClass(context, owner, im_class)) {
                    value = new Method(_func, instance, owner);
                    return true;
                }
            }
            value = this;
            return true;
        }