Inheritance: MethodBinder
Beispiel #1
0
 public ConstructorBinding(Type type, IntPtr pyTypeHndl, ConstructorBinder ctorBinder) : base() {
     this.type = type;
     Runtime.Incref(pyTypeHndl);
     this.pyTypeHndl = pyTypeHndl;
     this.ctorBinder = ctorBinder;
     repr = IntPtr.Zero;
 }
 public ConstructorBinding(Type type, IntPtr pyTypeHndl, ConstructorBinder ctorBinder)
 {
     this.type       = type;
     this.pyTypeHndl = pyTypeHndl; // steal a type reference
     this.ctorBinder = ctorBinder;
     repr            = IntPtr.Zero;
 }
Beispiel #3
0
 public ConstructorBinding(Type type, PyType typeToCreate, ConstructorBinder ctorBinder)
 {
     this.type         = type;
     this.typeToCreate = typeToCreate;
     this.ctorBinder   = ctorBinder;
     repr = IntPtr.Zero;
 }
Beispiel #4
0
        internal ClassObject(Type tp) : base(tp) {
            ctors = type.GetConstructors();
            binder = new ConstructorBinder(type);

            for (int i = 0; i < ctors.Length; i++) {
                binder.AddMethod(ctors[i]);
            }
        }
Beispiel #5
0
 public ConstructorBinding(Type type, IntPtr pyTypeHndl, ConstructorBinder ctorBinder)
 {
     this.type = type;
     Runtime.XIncref(pyTypeHndl);
     this.pyTypeHndl = pyTypeHndl;
     this.ctorBinder = ctorBinder;
     repr            = IntPtr.Zero;
 }
 public BoundContructor(Type type, IntPtr pyTypeHndl, ConstructorBinder ctorBinder, ConstructorInfo ci)
 {
     this.type       = type;
     this.pyTypeHndl = pyTypeHndl; // steal a type reference
     this.ctorBinder = ctorBinder;
     ctorInfo        = ci;
     repr            = IntPtr.Zero;
 }
Beispiel #7
0
 public BoundContructor(Type type, PyType typeToCreate, ConstructorBinder ctorBinder, ConstructorInfo ci)
 {
     this.type         = type;
     this.typeToCreate = typeToCreate;
     this.ctorBinder   = ctorBinder;
     ctorInfo          = ci;
     repr = IntPtr.Zero;
 }
Beispiel #8
0
 public BoundContructor(Type type, IntPtr pyTypeHndl, ConstructorBinder ctorBinder, ConstructorInfo ci)
 {
     this.type = type;
     Runtime.XIncref(pyTypeHndl);
     this.pyTypeHndl = pyTypeHndl;
     this.ctorBinder = ctorBinder;
     ctorInfo        = ci;
     repr            = IntPtr.Zero;
 }
Beispiel #9
0
        internal ClassObject(Type tp) : base(tp)
        {
            ctors  = type.GetConstructors();
            binder = new ConstructorBinder(type);

            foreach (ConstructorInfo t in ctors)
            {
                binder.AddMethod(t);
            }
        }
Beispiel #10
0
        internal ClassObject(Type tp) : base(tp)
        {
            ctors  = type.GetConstructors();
            binder = new ConstructorBinder(type);

            for (int i = 0; i < ctors.Length; i++)
            {
                binder.AddMethod(ctors[i]);
            }
        }
        Type type; // The managed Type being wrapped in a ClassObject

        #endregion Fields

        #region Constructors

        public BoundContructor(Type type, IntPtr pyTypeHndl, ConstructorBinder ctorBinder, ConstructorInfo ci)
            : base()
        {
            this.type = type;
            Runtime.XIncref(pyTypeHndl);
            this.pyTypeHndl = pyTypeHndl;
            this.ctorBinder = ctorBinder;
            ctorInfo = ci;
            repr = IntPtr.Zero;
        }
Beispiel #12
0
        internal ClassObject(Type tp) : base(tp)
        {
            var _ctors = type.Value.GetConstructors();

            NumCtors = _ctors.Length;
            binder   = new ConstructorBinder(type.Value);
            foreach (ConstructorInfo t in _ctors)
            {
                binder.AddMethod(t);
            }
        }