public void SetResultObj(object result) { JsValue output = new JsValue(); this.context.Converter.AnyToJsValue(result, ref output); NativeV8JsInterOp.ResultSetValue(metArgsPtr, ref output); }
public void SetResultAutoWrap <T>(T result) where T : class, new() { Type actualType = result.GetType(); JsTypeDefinition jsTypeDef = this.context.GetJsTypeDefinition(actualType); INativeScriptable proxy = this.context.CreateWrapper(result, jsTypeDef); JsValue output = new JsValue(); this.context.Converter.ToJsValue(proxy, ref output); NativeV8JsInterOp.ResultSetValue(metArgsPtr, ref output); }
public void SetResultObj(object result, JsTypeDefinition jsTypeDef) { if (!jsTypeDef.IsRegisterd) { this.context.RegisterTypeDefinition(jsTypeDef); } INativeScriptable proxy = this.context.CreateWrapper(result, jsTypeDef); JsValue output = new JsValue(); this.context.Converter.ToJsValue(proxy, ref output); NativeV8JsInterOp.ResultSetValue(metArgsPtr, ref output); }