Property | Type | Description | |
---|---|---|---|
IFinalizable | void | ||
_MakeWeak | void | ||
_OnNativeGCRequested | bool | ||
_TryDisposeNativeHandle | void |
Method | Description | |
---|---|---|
AsHandle ( ) : Handle | ||
Call ( InternalHandle _this ) : InternalHandle |
Calls the underlying object as a function. The '_this' parameter is the "this" reference within the function when called.
|
|
Call ( string functionName, InternalHandle _this ) : InternalHandle |
Calls an object property with a given name on a specified object as a function and returns the result. The '_this' property is the "this" object within the function when called.
|
|
DeleteProperty ( |
Calls the V8 'Delete()' function on the underlying native object. Returns true if the property was deleted.
|
|
DeleteProperty ( string name ) : bool |
Calls the V8 'Delete()' function on the underlying native object. Returns true if the property was deleted.
|
|
Dispose ( ) : void |
Called when there are no more references (on either the managed or native side) and the object is ready to be deleted from the V8.NET system. You should never call this from code directly unless you need to force the release of native resources associated with a custom implementation (and if so, a custom internal flag should be kept indicating whether or not the resources have been disposed). You should always override/implement this if you need to dispose of any native resources in custom implementations. DO NOT rely on the destructor (finalizer) - the object can still survive it. Note: This can be triggered either by the worker thread, or on the call-back from the V8 garbage collector. In either case, tread it as if it was called from the GC finalizer (not on the main thread). *** If overriding, DON'T call back to this method, otherwise it will call back and end up in a cyclical call (and a stack overflow!). ***
|
|
GetMetaObject ( |
||
GetOwnPropertyNames ( ) : string[] |
Returns a list of all property names for this object (excluding the prototype chain).
|
|
GetProperty ( |
Calls the V8 'Get()' function on the underlying native object. If the property doesn't exist, the 'IsUndefined' property will be true.
|
|
GetProperty ( string name ) : InternalHandle |
Calls the V8 'Get()' function on the underlying native object. If the property doesn't exist, the 'IsUndefined' property will be true.
|
|
GetPropertyAttributes ( string name ) : V8PropertyAttributes |
Get the attribute flags for a property of this object. If a property doesn't exist, then 'V8PropertyAttributes.None' is returned (Note: only V8 returns 'None'. The value 'Undefined' has an internal proxy meaning for property interception).
|
|
GetPropertyNames ( ) : string[] |
Returns a list of all property names for this object (including all objects in the prototype chain).
|
|
Initialize ( bool isConstructCall ) : ObjectHandle |
Called immediately after creating an object instance and setting the V8Engine property. Derived objects should override this for construction instead of using the constructor, and be sure to call back to this base method just before exiting (not at the beginning). In the constructor, the object only exists as an empty shell. It's ok to setup non-v8 values in constructors, but be careful not to trigger any calls into the V8Engine itself. Note: Because this method is virtual, it does not guarantee that 'IsInitialized' will be considered. Implementations should check against the 'IsInitilized' property.
|
|
Initialize ( |
(Exists only to support the 'IV8NativeInterface' interface and should not be called directly - call 'Initialize(isConstructCall, args)' instead.)
|
|
SetAccessor ( string name, V8NativeObjectPropertyGetter getter, V8NativeObjectPropertySetter setter, V8PropertyAttributes attributes = V8PropertyAttributes.None, V8AccessControl access = V8AccessControl.Default ) : void |
Calls the V8 'SetAccessor()' function on the underlying native object to create a property that is controlled by "getter" and "setter" callbacks.
|
|
SetProperty ( |
Calls the V8 'Set()' function on the underlying native object. Returns true if successful.
|
|
SetProperty ( |
Binds a 'V8Function' object to the specified type and associates the type name (or custom script name) with the underlying object. Returns true if successful.
|
|
SetProperty ( string name, InternalHandle value, V8PropertyAttributes attributes = V8PropertyAttributes.None ) : bool |
Calls the V8 'Set()' function on the underlying native object. Returns true if successful.
|
|
SetProperty ( string name, object obj, string className = null, bool recursive = null, ScriptMemberSecurity memberSecurity = null ) : bool |
Sets a property to a given object. If the object is not V8.NET related, then the system will attempt to bind the instance and all public members to the specified property name. Returns true if successful.
|
|
StaticCall ( ) : InternalHandle |
Calls the underlying object as a function. The 'this' property will not be specified, which will default to the global scope as expected.
|
|
StaticCall ( string functionName ) : InternalHandle |
Calls an object property with a given name on a specified object as a function and returns the result.
|
|
ToString ( ) : string | ||
V8NativeObject ( ) : System.Dynamic | ||
V8NativeObject ( IV8NativeObject proxy ) : System.Dynamic | ||
this ( int index ) : InternalHandle | ||
this ( string propertyName ) : InternalHandle |
Method | Description | |
---|---|---|
IFinalizable ( ) : void | ||
_MakeWeak ( ) : void |
Called by the worker thread to make the native handle weak. Once the native GC attempts to collect the underlying native object, then '_OnNativeGCRequested()' will get called to finalize the disposal of the managed object.
|
|
_OnNativeGCRequested ( ) : bool | ||
_TryDisposeNativeHandle ( ) : void |
This is called automatically when both the handle AND reference for the managed object are weak [no longer in use], in which case this object info instance is ready to be removed.
|
public Call ( InternalHandle _this ) : InternalHandle | ||
_this | InternalHandle | |
return | InternalHandle |
public Call ( string functionName, InternalHandle _this ) : InternalHandle | ||
functionName | string | |
_this | InternalHandle | |
return | InternalHandle |
public DeleteProperty ( |
||
index | ||
return | bool |
public GetMetaObject ( |
||
parameter | ||
return |
public GetProperty ( |
||
index | ||
return | InternalHandle |
public GetProperty ( string name ) : InternalHandle | ||
name | string | |
return | InternalHandle |
public GetPropertyAttributes ( string name ) : V8PropertyAttributes | ||
name | string | |
return | V8PropertyAttributes |
public Initialize ( bool isConstructCall ) : ObjectHandle | ||
isConstructCall | bool | |
return | ObjectHandle |
public Initialize ( |
||
owner | ||
isConstructCall | bool | |
return | void |
public SetAccessor ( string name, V8NativeObjectPropertyGetter getter, V8NativeObjectPropertySetter setter, V8PropertyAttributes attributes = V8PropertyAttributes.None, V8AccessControl access = V8AccessControl.Default ) : void | ||
name | string | |
getter | V8NativeObjectPropertyGetter | |
setter | V8NativeObjectPropertySetter | |
attributes | V8PropertyAttributes | |
access | V8AccessControl | |
return | void |
public SetProperty ( |
||
index | ||
value | InternalHandle | |
return | bool |
public SetProperty ( |
||
type | The type to wrap. | |
propertyAttributes | V8PropertyAttributes | Flags that describe the property behavior. They must be 'OR'd together as needed. |
className | string | A custom in-script function name for the specified type, or 'null' to use either the type name as is (the default) or any existing 'ScriptObject' attribute name. |
recursive | bool | For object types, if true, then object reference members are included, otherwise only the object itself is bound and returned. /// For security reasons, public members that point to object instances will be ignored. This must be true to included those as well, effectively allowing /// in-script traversal of the object reference tree (so make sure this doesn't expose sensitive methods/properties/fields). |
memberSecurity | ScriptMemberSecurity | For object instances, these are default flags that describe JavaScript properties for all object instance members that /// don't have any 'ScriptMember' attribute. The flags should be 'OR'd together as needed. |
return | bool |
public SetProperty ( string name, InternalHandle value, V8PropertyAttributes attributes = V8PropertyAttributes.None ) : bool | ||
name | string | |
value | InternalHandle | |
attributes | V8PropertyAttributes | Flags that describe the property behavior. They must be 'OR'd together as needed. |
return | bool |
public SetProperty ( string name, object obj, string className = null, bool recursive = null, ScriptMemberSecurity memberSecurity = null ) : bool | ||
name | string | The property name. |
obj | object | Some value or object instance. 'Engine.CreateValue()' will be used to convert value types. |
className | string | A custom in-script function name for the specified object type, or 'null' to use either the type name as is (the default) or any existing 'ScriptObject' attribute name. |
recursive | bool | For object instances, if true, then object reference members are included, otherwise only the object itself is bound and returned. /// For security reasons, public members that point to object instances will be ignored. This must be true to included those as well, effectively allowing /// in-script traversal of the object reference tree (so make sure this doesn't expose sensitive methods/properties/fields). |
memberSecurity | ScriptMemberSecurity | For object instances, these are default flags that describe JavaScript properties for all object instance members that /// don't have any 'ScriptMember' attribute. The flags should be 'OR'd together as needed. |
return | bool |
public StaticCall ( string functionName ) : InternalHandle | ||
functionName | string | |
return | InternalHandle |
public V8NativeObject ( IV8NativeObject proxy ) : System.Dynamic | ||
proxy | IV8NativeObject | |
return | System.Dynamic |
public this ( string propertyName ) : InternalHandle | ||
propertyName | string | |
return | InternalHandle |