public static CreateExternalObject ( |
||
data | External data that the object will represent. May be null. | |
finalizer | JsObjectFinalizeCallback | A callback for when the object is finalized. May be null. |
return |
private IeJsValue CreateExternalObjectFromObject(object value) { GCHandle handle = GCHandle.Alloc(value); _externalObjects.Add(value); IeJsValue objValue = IeJsValue.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); }