public IronPythonConstructorFunction(IronPythonInterpreter interpreter, ObjectIdentityHandle[] infos, IPythonType type) {
     _interpreter = interpreter;
     _interpreter.UnloadingDomain += Interpreter_UnloadingDomain;
     _remote = _interpreter.Remote;
     _infos = infos;
     _type = type;
 }
 public IronPythonConstructorFunctionTarget(IronPythonInterpreter interpreter, ObjectIdentityHandle overload, IronPythonType declType) {
     Debug.Assert(interpreter.Remote.TypeIs<MethodBase>(overload));
     _interpreter = interpreter;
     _interpreter.UnloadingDomain += Interpreter_UnloadingDomain;
     _remote = _interpreter.Remote;
     _overload = overload;
     _declaringType = declType;
 }
Example #3
0
 public IronPythonEvent(IronPythonInterpreter interpreter, ObjectIdentityHandle eventObj)
     : base(interpreter, eventObj)
 {
 }
Example #4
0
 internal ObjectKind GetObjectKind(ObjectIdentityHandle obj)
 {
     return(_remoteInterpreter.GetObjectKind(obj));
 }
Example #5
0
 public PythonObject(IronPythonInterpreter interpreter, ObjectIdentityHandle obj) {
     _interpreter = interpreter;
     _interpreter.UnloadingDomain += Interpreter_UnloadingDomain;
     _remote = _interpreter.Remote;
     _obj = obj;
 }
Example #6
0
        private static readonly string _noDefaultValue = "<No Default Value>";  // sentinel value to mark when an object doesn't have a default value

        public IronPythonParameterInfo(IronPythonInterpreter interpreter, ObjectIdentityHandle parameterInfo) {
            _interpreter = interpreter;
            _interpreter.UnloadingDomain += Interpreter_UnloadingDomain;
            _remote = _interpreter.Remote;
            _parameterInfo = parameterInfo;
        }
Example #7
0
 public IronPythonConstant(IronPythonInterpreter interpreter, ObjectIdentityHandle value)
     : base(interpreter, value) {
 }
Example #8
0
 public IronPythonGenericMember(IronPythonInterpreter interpreter, ObjectIdentityHandle obj, PythonMemberType type)
     : base(interpreter, obj) {
     _type = type;
 }
Example #9
0
 internal ObjectIdentityHandle GetPythonTypeElementType(ObjectIdentityHandle value)
 {
     return(_remoteInterpreter.GetPythonTypeElementType(value));
 }
Example #10
0
 internal bool IsPythonTypeArray(ObjectIdentityHandle value)
 {
     return(_remoteInterpreter.IsPythonTypeArray(value));
 }
Example #11
0
 internal string GetTypeDeclaringModule(ObjectIdentityHandle value)
 {
     return(_remoteInterpreter.GetTypeDeclaringModule(value));
 }
Example #12
0
 internal ObjectIdentityHandle[] GetPythonTypeMro(ObjectIdentityHandle value)
 {
     return(_remoteInterpreter.GetPythonTypeMro(value));
 }
Example #13
0
 internal BuiltinTypeId PythonTypeGetBuiltinTypeId(ObjectIdentityHandle value)
 {
     return(_remoteInterpreter.PythonTypeGetBuiltinTypeId(value));
 }
Example #14
0
 internal ObjectIdentityHandle[] GetPythonTypeConstructors(ObjectIdentityHandle value)
 {
     return(_remoteInterpreter.GetPythonTypeConstructors(value));
 }
Example #15
0
 internal bool PythonTypeHasNewOrInitMethods(ObjectIdentityHandle value)
 {
     return(_remoteInterpreter.PythonTypeHasNewOrInitMethods(value));
 }
Example #16
0
 public IronPythonEvent(IronPythonInterpreter interpreter, ObjectIdentityHandle eventObj)
     : base(interpreter, eventObj) {
 }
Example #17
0
 public IronPythonBuiltinModule(IronPythonInterpreter interpreter, ObjectIdentityHandle mod, string name)
     : base(interpreter, mod, name) {
 }
Example #18
0
 internal bool IsDelegateType(ObjectIdentityHandle value)
 {
     return(_remoteInterpreter.IsDelegateType(value));
 }
 public IronPythonBuiltinFunctionTarget(IronPythonInterpreter interpreter, ObjectIdentityHandle overload, IronPythonType declType) {
     Debug.Assert(interpreter.Remote.TypeIs<MethodBase>(overload));
     _interpreter = interpreter;
     _overload = overload;
     _declaringType = declType;
 }
Example #20
0
 internal bool IsPythonTypeGenericTypeDefinition(ObjectIdentityHandle value)
 {
     return(_remoteInterpreter.IsPythonTypeGenericTypeDefinition(value));
 }
Example #21
0
        internal IMember MakeObject(ObjectIdentityHandle obj) {
            if (obj.IsNull) {
                return null;
            }

            lock (this) {
                IMember res;
                if (_members.TryGetValue(obj, out res)) {
                    return res;
                }

                switch (_remote.GetObjectKind(obj)) {
                    case ObjectKind.Module: res = new IronPythonModule(this, obj); break;
                    case ObjectKind.Type: res = new IronPythonType(this, obj); break;
                    case ObjectKind.BuiltinFunction: res = new IronPythonBuiltinFunction(this, obj); break;
                    case ObjectKind.BuiltinMethodDesc: res = new IronPythonBuiltinMethodDescriptor(this, obj); break;
                    case ObjectKind.ReflectedEvent: res = new IronPythonEvent(this, obj); break;
                    case ObjectKind.ReflectedExtensionProperty: res = new IronPythonExtensionProperty(this, obj); break;
                    case ObjectKind.ReflectedField: res = new IronPythonField(this, obj); break;
                    case ObjectKind.ReflectedProperty: res = new IronPythonProperty(this, obj); break;
                    case ObjectKind.TypeGroup: res = new IronPythonTypeGroup(this, obj); break;
                    case ObjectKind.NamespaceTracker: res = new IronPythonNamespace(this, obj); break;
                    case ObjectKind.Constant: res = new IronPythonConstant(this, obj); break;
                    case ObjectKind.ClassMethod: res = new IronPythonGenericMember(this, obj, PythonMemberType.Method); break;
                    case ObjectKind.Method: res = res = new IronPythonGenericMember(this, obj, PythonMemberType.Method); break;
                    case ObjectKind.PythonTypeSlot: res = new IronPythonGenericMember(this, obj, PythonMemberType.Property); break;
                    case ObjectKind.PythonTypeTypeSlot: res = new IronPythonGenericMember(this, obj, PythonMemberType.Property); break;
                    case ObjectKind.Unknown: res = new PythonObject(this, obj); break;
                    default:
                        throw new InvalidOperationException();
                }
                _members[obj] = res;
                return res;
            }
        }
Example #22
0
 internal string GetBuiltinFunctionDocumentation(ObjectIdentityHandle value)
 {
     return(_remoteInterpreter.GetBuiltinFunctionDocumentation(value));
 }
Example #23
0
 public IronPythonModule(IronPythonInterpreter interpreter, ObjectIdentityHandle mod, string name = null)
     : base(interpreter, mod) {
     _name = name;
 }
Example #24
0
 internal ObjectIdentityHandle[] GetBuiltinFunctionOverloads(ObjectIdentityHandle value)
 {
     return(_remoteInterpreter.GetBuiltinFunctionOverloads(value));
 }
Example #25
0
 public IronPythonTypeGroup(IronPythonInterpreter interpreter, ObjectIdentityHandle type)
     : base(interpreter, type) {
 }
Example #26
0
 internal ObjectIdentityHandle[] GetConstructorFunctionTargets(ObjectIdentityHandle function)
 {
     return(_remoteInterpreter.GetConstructorFunctionTargets(function));
 }
Example #27
0
 internal string GetFieldDocumentation(ObjectIdentityHandle value)
 {
     return(_remoteInterpreter.GetFieldDocumentation(value));
 }
Example #28
0
 internal ObjectIdentityHandle GetConstructorFunctionDeclaringType(ObjectIdentityHandle function)
 {
     return(_remoteInterpreter.GetConstructorFunctionDeclaringType(function));
 }
 public IronPythonBuiltinFunction(IronPythonInterpreter interpreter, ObjectIdentityHandle function)
     : base(interpreter, function)
 {
 }
Example #30
0
 internal ObjectIdentityHandle GetBuiltinFunctionDeclaringPythonType(ObjectIdentityHandle value)
 {
     return(_remoteInterpreter.GetBuiltinFunctionDeclaringPythonType(value));
 }
Example #31
0
 public IronPythonNamespace(IronPythonInterpreter interpreter, ObjectIdentityHandle ns)
     : base(interpreter, ns)
 {
 }
Example #32
0
 internal string GetBuiltinFunctionModule(ObjectIdentityHandle value)
 {
     return(_remoteInterpreter.GetBuiltinFunctionModule(value));
 }
Example #33
0
 public PythonObject(IronPythonInterpreter interpreter, ObjectIdentityHandle obj) {
     _interpreter = interpreter;
     _obj = obj;
 }
Example #34
0
 internal string GetTypeGroupName(ObjectIdentityHandle value)
 {
     return(_remoteInterpreter.GetTypeGroupName(value));
 }
Example #35
0
 public IronPythonBuiltinFunction(IronPythonInterpreter interpreter, ObjectIdentityHandle function)
     : base(interpreter, function) {
 }
Example #36
0
 internal PythonMemberType GetTypeGroupMemberType(ObjectIdentityHandle value)
 {
     return(_remoteInterpreter.GetTypeGroupMemberType(value));
 }
Example #37
0
 public IronPythonProperty(IronPythonInterpreter interpreter, ObjectIdentityHandle property)
     : base(interpreter, property) {
 }
Example #38
0
 internal ObjectIdentityHandle[] GetTypeGroupEventInvokeArgs(ObjectIdentityHandle value)
 {
     return(_remoteInterpreter.GetTypeGroupEventInvokeArgs(value));
 }
Example #39
0
 internal ObjectIdentityHandle PythonTypeMakeGenericType(ObjectIdentityHandle value, ObjectIdentityHandle[] types)
 {
     return(_remoteInterpreter.PythonTypeMakeGenericType(value, types));
 }
Example #40
0
 internal ObjectIdentityHandle[] GetTypeGroupConstructors(ObjectIdentityHandle value, out ObjectIdentityHandle declType)
 {
     return(_remoteInterpreter.GetTypeGroupConstructors(value, out declType));
 }
Example #41
0
        internal IPythonType GetTypeFromType(ObjectIdentityHandle type) {
            if (type.IsNull) {
                return null;
            }

            lock (this) {
                IMember res;
                if (!_members.TryGetValue(type, out res)) {
                    _members[type] = res = new IronPythonType(this, type);
                }
                return res as IPythonType;
            }
        }
Example #42
0
 internal ObjectIdentityHandle TypeGroupMakeGenericType(ObjectIdentityHandle value, ObjectIdentityHandle[] types)
 {
     return(_remoteInterpreter.TypeGroupMakeGenericType(value, types));
 }
Example #43
0
 public IronPythonNamespace(IronPythonInterpreter interpreter, ObjectIdentityHandle ns)
     : base(interpreter, ns) {
 }
Example #44
0
 internal bool?TypeGroupIsGenericTypeDefinition(ObjectIdentityHandle value)
 {
     return(_remoteInterpreter.TypeGroupIsGenericTypeDefinition(value));
 }
 public IronPythonConstructorFunction(IronPythonInterpreter interpreter, ObjectIdentityHandle[] infos, IPythonType type) {
     _interpreter = interpreter;
     _infos = infos;
     _type = type;
 }
Example #46
0
 internal IEnumerable <string> GetNamespaceChildren(ObjectIdentityHandle value)
 {
     return(_remoteInterpreter.GetNamespaceChildren(value));
 }
 public IronPythonBuiltinMethodDescriptor(IronPythonInterpreter interpreter, ObjectIdentityHandle desc)
     : base(interpreter, desc) {
 }
Example #48
0
 internal ObjectIdentityHandle[] GetEventParameterPythonTypes(ObjectIdentityHandle value)
 {
     return(_remoteInterpreter.GetEventParameterPythonTypes(value));
 }
Example #49
0
        public IPythonType MakeGenericType(IPythonType[] indexTypes) {
            // TODO: Caching?
            ObjectIdentityHandle[] types = new ObjectIdentityHandle[indexTypes.Length];
            for (int i = 0; i < types.Length; i++) {
                types[i] = ((IronPythonType)indexTypes[i]).Value;
            }

            var ri = RemoteInterpreter;
            return ri != null ? Interpreter.GetTypeFromType(ri.TypeGroupMakeGenericType(Value, types)) : null;
        }
Example #50
0
 internal bool IsFieldStatic(ObjectIdentityHandle value)
 {
     return(_remoteInterpreter.IsFieldStatic(value));
 }
Example #51
0
 public IronPythonField(IronPythonInterpreter interpreter, ObjectIdentityHandle field)
     : base(interpreter, field) {
 }
Example #52
0
        private static readonly string _noDefaultValue = "<No Default Value>";  // sentinel value to mark when an object doesn't have a default value

        public IronPythonParameterInfo(IronPythonInterpreter interpreter, ObjectIdentityHandle parameterInfo) {
            _interpreter = interpreter;
            _parameterInfo = parameterInfo;
        }