Пример #1
0
        public JsEngine(IntPtr nativeJsEnginePtr,
                        JsTypeDefinitionBuilder defaultTypeBuilder)
        {
            //native js engine is created from native side
            //for this managed object
            //so we add more managed function to handle
            _keepalive_remove               = new KeepaliveRemoveDelegate(KeepAliveRemove);
            _keepalive_get_property_value   = new KeepAliveGetPropertyValueDelegate(KeepAliveGetPropertyValue);
            _keepalive_set_property_value   = new KeepAliveSetPropertyValueDelegate(KeepAliveSetPropertyValue);
            _keepalive_valueof              = new KeepAliveValueOfDelegate(KeepAliveValueOf);
            _keepalive_invoke               = new KeepAliveInvokeDelegate(KeepAliveInvoke);
            _keepalive_delete_property      = new KeepAliveDeletePropertyDelegate(KeepAliveDeleteProperty);
            _keepalive_enumerate_properties = new KeepAliveEnumeratePropertiesDelegate(KeepAliveEnumerateProperties);

            jsengine_registerManagedDels(
                nativeJsEnginePtr,
                _keepalive_remove,
                _keepalive_get_property_value,
                _keepalive_set_property_value,
                _keepalive_valueof,
                _keepalive_invoke,
                _keepalive_delete_property,
                _keepalive_enumerate_properties
                );
            _engine = new HandleRef(this, nativeJsEnginePtr);
            this.defaultTypeBuilder = defaultTypeBuilder;
        }
Пример #2
0
        public JsEngine(IntPtr nativeJsEnginePtr,
            JsTypeDefinitionBuilder defaultTypeBuilder)
        {
            //native js engine is created from native side
            //for this managed object
            //so we add more managed function to handle
            _keepalive_remove = new KeepaliveRemoveDelegate(KeepAliveRemove);
            _keepalive_get_property_value = new KeepAliveGetPropertyValueDelegate(KeepAliveGetPropertyValue);
            _keepalive_set_property_value = new KeepAliveSetPropertyValueDelegate(KeepAliveSetPropertyValue);
            _keepalive_valueof = new KeepAliveValueOfDelegate(KeepAliveValueOf);
            _keepalive_invoke = new KeepAliveInvokeDelegate(KeepAliveInvoke);
            _keepalive_delete_property = new KeepAliveDeletePropertyDelegate(KeepAliveDeleteProperty);
            _keepalive_enumerate_properties = new KeepAliveEnumeratePropertiesDelegate(KeepAliveEnumerateProperties);

            jsengine_registerManagedDels(
                nativeJsEnginePtr,
                _keepalive_remove,
                _keepalive_get_property_value,
                _keepalive_set_property_value,
                _keepalive_valueof,
                _keepalive_invoke,
                _keepalive_delete_property,
                _keepalive_enumerate_properties
                );
            _engine = new HandleRef(this, nativeJsEnginePtr);
            this.defaultTypeBuilder = defaultTypeBuilder;
        }
Пример #3
0
 static extern IntPtr jsengine_new(
     KeepaliveRemoveDelegate keepaliveRemove,
     KeepAliveGetPropertyValueDelegate keepaliveGetPropertyValue,
     KeepAliveSetPropertyValueDelegate keepaliveSetPropertyValue,
     KeepAliveValueOfDelegate keepaliveValueOf,
     KeepAliveInvokeDelegate keepaliveInvoke,
     KeepAliveDeletePropertyDelegate keepaliveDeleteProperty,
     KeepAliveEnumeratePropertiesDelegate keepaliveEnumerateProperties,
     int maxYoungSpace, int maxOldSpace
     );
Пример #4
0
 static extern IntPtr jsengine_registerManagedDels(
     IntPtr jsEngineNativePtr,
     KeepaliveRemoveDelegate keepaliveRemove,
     KeepAliveGetPropertyValueDelegate keepaliveGetPropertyValue,
     KeepAliveSetPropertyValueDelegate keepaliveSetPropertyValue,
     KeepAliveValueOfDelegate keepaliveValueOf,
     KeepAliveInvokeDelegate keepaliveInvoke,
     KeepAliveDeletePropertyDelegate keepaliveDeleteProperty,
     KeepAliveEnumeratePropertiesDelegate keepaliveEnumerateProperties
     );
Пример #5
0
 static extern IntPtr jsengine_new(
     KeepaliveRemoveDelegate keepaliveRemove,
     KeepAliveGetPropertyValueDelegate keepaliveGetPropertyValue,
     KeepAliveSetPropertyValueDelegate keepaliveSetPropertyValue,
     KeepAliveValueOfDelegate keepaliveValueOf,
     KeepAliveInvokeDelegate keepaliveInvoke,
     KeepAliveDeletePropertyDelegate keepaliveDeleteProperty,
     KeepAliveEnumeratePropertiesDelegate keepaliveEnumerateProperties,
     int maxYoungSpace,
     int maxOldSpace
     );
Пример #6
0
        public JsEngine()
        {
            _keepalives = new KeepAliveDictionaryStore();

            _keepalive_remove = new KeepaliveRemoveDelegate(KeepAliveRemove);
            _keepalive_get_property_value = new KeepAliveGetPropertyValueDelegate(KeepAliveGetPropertyValue);
            _keepalive_set_property_value = new KeepAliveSetPropertyValueDelegate(KeepAliveSetPropertyValue);
            _keepalive_invoke = new KeepAliveInvokeDelegate(KeepAliveInvoke);

            _engine = new HandleRef(this, jsengine_new(
                _keepalive_remove,
                _keepalive_get_property_value, _keepalive_set_property_value,
                _keepalive_invoke));

            _convert = new JsConvert(this);
        }
Пример #7
0
        public JsEngine()
        {
            _keepalives = new KeepAliveDictionaryStore();

            _keepalive_remove             = new KeepaliveRemoveDelegate(KeepAliveRemove);
            _keepalive_get_property_value = new KeepAliveGetPropertyValueDelegate(KeepAliveGetPropertyValue);
            _keepalive_set_property_value = new KeepAliveSetPropertyValueDelegate(KeepAliveSetPropertyValue);
            _keepalive_invoke             = new KeepAliveInvokeDelegate(KeepAliveInvoke);

            _engine = new HandleRef(this, jsengine_new(
                                        _keepalive_remove,
                                        _keepalive_get_property_value, _keepalive_set_property_value,
                                        _keepalive_invoke));

            _convert = new JsConvert(this);
        }
Пример #8
0
        public JsEngine(int maxYoungSpace = -1, int maxOldSpace = -1)
        {
            _keepalive_remove               = new KeepaliveRemoveDelegate(KeepAliveRemove);
            _keepalive_get_property_value   = new KeepAliveGetPropertyValueDelegate(KeepAliveGetPropertyValue);
            _keepalive_set_property_value   = new KeepAliveSetPropertyValueDelegate(KeepAliveSetPropertyValue);
            _keepalive_valueof              = new KeepAliveValueOfDelegate(KeepAliveValueOf);
            _keepalive_invoke               = new KeepAliveInvokeDelegate(KeepAliveInvoke);
            _keepalive_delete_property      = new KeepAliveDeletePropertyDelegate(KeepAliveDeleteProperty);
            _keepalive_enumerate_properties = new KeepAliveEnumeratePropertiesDelegate(KeepAliveEnumerateProperties);

            _engine = jsengine_new(
                _keepalive_remove,
                _keepalive_get_property_value,
                _keepalive_set_property_value,
                _keepalive_valueof,
                _keepalive_invoke,
                _keepalive_delete_property,
                _keepalive_enumerate_properties,
                maxYoungSpace,
                maxOldSpace);
        }
Пример #9
0
        public JsEngine(int maxYoungSpace = -1, int maxOldSpace = -1)
        {
            _keepalive_remove = new KeepaliveRemoveDelegate(KeepAliveRemove);
            _keepalive_get_property_value = new KeepAliveGetPropertyValueDelegate(KeepAliveGetPropertyValue);
            _keepalive_set_property_value = new KeepAliveSetPropertyValueDelegate(KeepAliveSetPropertyValue);
            _keepalive_valueof = new KeepAliveValueOfDelegate(KeepAliveValueOf);
            _keepalive_invoke = new KeepAliveInvokeDelegate(KeepAliveInvoke);
            _keepalive_delete_property = new KeepAliveDeletePropertyDelegate(KeepAliveDeleteProperty);
            _keepalive_enumerate_properties = new KeepAliveEnumeratePropertiesDelegate(KeepAliveEnumerateProperties);

            _engine = jsengine_new(
                _keepalive_remove,
                _keepalive_get_property_value,
                _keepalive_set_property_value,
                _keepalive_valueof,
                _keepalive_invoke,
                _keepalive_delete_property,
                _keepalive_enumerate_properties,
                maxYoungSpace,
                maxOldSpace);
        }
Пример #10
0
        public JsEngine(int maxYoungSpace = -1, int maxOldSpace = -1)
        {
            _keepalive_remove               = KeepAliveRemove;
            _keepalive_get_property_value   = KeepAliveGetPropertyValue;
            _keepalive_set_property_value   = KeepAliveSetPropertyValue;
            _keepalive_valueof              = KeepAliveValueOf;
            _keepalive_invoke               = KeepAliveInvoke;
            _keepalive_delete_property      = KeepAliveDeleteProperty;
            _keepalive_enumerate_properties = KeepAliveEnumerateProperties;

            _engine = jsengine_new(
                _keepalive_remove,
                _keepalive_get_property_value,
                _keepalive_set_property_value,
                _keepalive_valueof,
                _keepalive_invoke,
                _keepalive_delete_property,
                _keepalive_enumerate_properties,
                maxYoungSpace,
                maxOldSpace);
        }
Пример #11
0
        public JsEngine(JsTypeDefinitionBuilder defaultTypeBuilder, int maxYoungSpace, int maxOldSpace)
        {
            _keepalive_remove               = new KeepaliveRemoveDelegate(KeepAliveRemove);
            _keepalive_get_property_value   = new KeepAliveGetPropertyValueDelegate(KeepAliveGetPropertyValue);
            _keepalive_set_property_value   = new KeepAliveSetPropertyValueDelegate(KeepAliveSetPropertyValue);
            _keepalive_valueof              = new KeepAliveValueOfDelegate(KeepAliveValueOf);
            _keepalive_invoke               = new KeepAliveInvokeDelegate(KeepAliveInvoke);
            _keepalive_delete_property      = new KeepAliveDeletePropertyDelegate(KeepAliveDeleteProperty);
            _keepalive_enumerate_properties = new KeepAliveEnumeratePropertiesDelegate(KeepAliveEnumerateProperties);

            _engine = new HandleRef(this, jsengine_new(
                                        _keepalive_remove,
                                        _keepalive_get_property_value,
                                        _keepalive_set_property_value,
                                        _keepalive_valueof,
                                        _keepalive_invoke,
                                        _keepalive_delete_property,
                                        _keepalive_enumerate_properties,
                                        maxYoungSpace,
                                        maxOldSpace));
            this.defaultTypeBuilder = defaultTypeBuilder;
        }
Пример #12
0
        public JsEngine(JsTypeDefinitionBuilder defaultTypeBuilder, int maxYoungSpace, int maxOldSpace)
        {
            _keepalive_remove = new KeepaliveRemoveDelegate(KeepAliveRemove);
            _keepalive_get_property_value = new KeepAliveGetPropertyValueDelegate(KeepAliveGetPropertyValue);
            _keepalive_set_property_value = new KeepAliveSetPropertyValueDelegate(KeepAliveSetPropertyValue);
            _keepalive_valueof = new KeepAliveValueOfDelegate(KeepAliveValueOf);
            _keepalive_invoke = new KeepAliveInvokeDelegate(KeepAliveInvoke);
            _keepalive_delete_property = new KeepAliveDeletePropertyDelegate(KeepAliveDeleteProperty);
            _keepalive_enumerate_properties = new KeepAliveEnumeratePropertiesDelegate(KeepAliveEnumerateProperties);

            _engine = new HandleRef(this, jsengine_new(
                _keepalive_remove,
                _keepalive_get_property_value,
                _keepalive_set_property_value,
                _keepalive_valueof,
                _keepalive_invoke,
                _keepalive_delete_property,
                _keepalive_enumerate_properties,
                maxYoungSpace,
                maxOldSpace));
            this.defaultTypeBuilder = defaultTypeBuilder;
        }
Пример #13
0
 static extern IntPtr jsengine_new(
     KeepaliveRemoveDelegate keepaliveRemove,
     KeepAliveGetPropertyValueDelegate keepaliveGetPropertyValue,
     KeepAliveSetPropertyValueDelegate keepaliveSetPropertyValue,
     KeepAliveInvokeDelegate keepaliveInvoke
 );
Пример #14
0
 static extern IntPtr jsengine_new(
     KeepaliveRemoveDelegate keepaliveRemove,
     KeepAliveGetPropertyValueDelegate keepaliveGetPropertyValue,
     KeepAliveSetPropertyValueDelegate keepaliveSetPropertyValue,
     KeepAliveInvokeDelegate keepaliveInvoke
     );
Пример #15
0
  static extern IntPtr jsengine_registerManagedDels(
     IntPtr jsEngineNativePtr,
     KeepaliveRemoveDelegate keepaliveRemove,
     KeepAliveGetPropertyValueDelegate keepaliveGetPropertyValue,
     KeepAliveSetPropertyValueDelegate keepaliveSetPropertyValue,
     KeepAliveValueOfDelegate keepaliveValueOf,
     KeepAliveInvokeDelegate keepaliveInvoke,
     KeepAliveDeletePropertyDelegate keepaliveDeleteProperty,
     KeepAliveEnumeratePropertiesDelegate keepaliveEnumerateProperties
 );