Пример #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;
 }
Пример #2
0
 public ConstructorBinding(Type type, IntPtr pyTypeHndl, ConstructorBinder ctorBinder)
 {
     this.type       = type;
     this.pyTypeHndl = pyTypeHndl; // steal a type reference
     this.ctorBinder = ctorBinder;
     repr            = IntPtr.Zero;
 }
Пример #3
0
 public ConstructorBinding(Type type, PyType typeToCreate, ConstructorBinder ctorBinder)
 {
     this.type         = type;
     this.typeToCreate = typeToCreate;
     this.ctorBinder   = ctorBinder;
     repr = IntPtr.Zero;
 }
Пример #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]);
            }
        }
Пример #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;
 }
Пример #6
0
 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;
 }
Пример #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;
 }
Пример #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;
 }
Пример #9
0
        internal ClassObject(Type tp) : base(tp)
        {
            ctors  = type.GetConstructors();
            binder = new ConstructorBinder(type);

            foreach (ConstructorInfo t in ctors)
            {
                binder.AddMethod(t);
            }
        }
Пример #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]);
            }
        }
Пример #11
0
        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;
        }
Пример #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);
            }
        }