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; }
static extern IntPtr jsengine_new( KeepaliveRemoveDelegate keepaliveRemove, KeepAliveGetPropertyValueDelegate keepaliveGetPropertyValue, KeepAliveSetPropertyValueDelegate keepaliveSetPropertyValue, KeepAliveValueOfDelegate keepaliveValueOf, KeepAliveInvokeDelegate keepaliveInvoke, KeepAliveDeletePropertyDelegate keepaliveDeleteProperty, KeepAliveEnumeratePropertiesDelegate keepaliveEnumerateProperties, int maxYoungSpace, int maxOldSpace );
static extern IntPtr jsengine_registerManagedDels( IntPtr jsEngineNativePtr, KeepaliveRemoveDelegate keepaliveRemove, KeepAliveGetPropertyValueDelegate keepaliveGetPropertyValue, KeepAliveSetPropertyValueDelegate keepaliveSetPropertyValue, KeepAliveValueOfDelegate keepaliveValueOf, KeepAliveInvokeDelegate keepaliveInvoke, KeepAliveDeletePropertyDelegate keepaliveDeleteProperty, KeepAliveEnumeratePropertiesDelegate keepaliveEnumerateProperties );
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); }
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); }
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); }
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; }
static extern IntPtr jsengine_new( KeepaliveRemoveDelegate keepaliveRemove, KeepAliveGetPropertyValueDelegate keepaliveGetPropertyValue, KeepAliveSetPropertyValueDelegate keepaliveSetPropertyValue, KeepAliveInvokeDelegate keepaliveInvoke );