Пример #1
0
 /// <summary>
 /// Inititializes a new <see cref="JSInProcessObjectReference"/> instance.
 /// </summary>
 /// <param name="jsRuntime">The <see cref="JSInProcessRuntime"/> used for invoking JS interop calls.</param>
 /// <param name="id">The unique identifier.</param>
 protected internal JSInProcessObjectReference(JSInProcessRuntime jsRuntime, long id) : base(jsRuntime, id)
 {
     _jsRuntime = jsRuntime;
 }
Пример #2
0
 public static void Initialize(JSInProcessRuntime jSRuntime)
 {
     _jSRuntime             = jSRuntime;
     InvokeJS               = (identifier, argsJson) => (string)_invokeJSMethInfo.Invoke(jSRuntime, new object[] { identifier, argsJson });
     _jsonSerializerOptions = (JsonSerializerOptions)_jsonSerializerOptionsPropInfo.GetValue(jSRuntime, new object[0]);
 }