public static CreateExternalObject ( |
||
data | External data that the object will represent. May be null | |
finalizer | JsObjectFinalizeCallback | The callback for when the object is finalized. May be null. |
Результат |
private EdgeJsValue CreateExternalObjectFromObject(object value) { GCHandle handle = GCHandle.Alloc(value); _externalObjects.Add(value); EdgeJsValue objValue = EdgeJsValue.CreateExternalObject( GCHandle.ToIntPtr(handle), _externalObjectFinalizeCallback); Type type = value.GetType(); ProjectFields(objValue, type, true); ProjectProperties(objValue, type, true); ProjectMethods(objValue, type, true); FreezeObject(objValue); return(objValue); }