コード例 #1
0
        public MethodBinding(MethodObject m, PyObject?target, PyType?targetType = null)
        {
            this.target = target;

            this.targetType = targetType ?? target?.GetPythonType();

            this.info = null;
            this.m    = m;
        }
コード例 #2
0
        public MethodBinding(MethodObject m, IntPtr target, IntPtr targetType)
        {
            Runtime.XIncref(target);
            this.target = target;

            if (targetType == IntPtr.Zero)
            {
                targetType = Runtime.PyObject_Type(target);
            }
            else
            {
                Runtime.XIncref(targetType);
            }

            this.targetType = targetType;

            this.info = null;
            this.m    = m;
        }
コード例 #3
0
 public PropertyObject(PropertyInfo md)
 {
     getter = md.GetGetMethod(true);
     setter = md.GetSetMethod(true);
     info   = md;
 }