Add notes on how to upgrade Mono, plus modify some files to make future
upgrades simpler
This commit is contained in:
parent
353da42cce
commit
5dc5404570
|
|
@ -32,8 +32,8 @@ namespace MonoSanityClient
|
|||
|
||||
public static string EvaluateJavaScript(string expression)
|
||||
{
|
||||
// For tests that call this method, we'll exercise the 'InvokeJSArray' code path
|
||||
var result = Runtime.InvokeJSArray<string>(out var exceptionMessage, "evaluateJsExpression", expression, null, null);
|
||||
// For tests that call this method, we'll exercise the 'BlazorInvokeJSArray' code path
|
||||
var result = Runtime.BlazorInvokeJSArray<string>(out var exceptionMessage, "evaluateJsExpression", expression, null, null);
|
||||
if (exceptionMessage != null)
|
||||
{
|
||||
return $".NET got exception: {exceptionMessage}";
|
||||
|
|
@ -44,9 +44,9 @@ namespace MonoSanityClient
|
|||
|
||||
public static string CallJsNoBoxing(int numberA, int numberB)
|
||||
{
|
||||
// For tests that call this method, we'll exercise the 'InvokeJS' code path
|
||||
// For tests that call this method, we'll exercise the 'BlazorInvokeJS' code path
|
||||
// since that doesn't box the params
|
||||
var result = Runtime.InvokeJS<int, int, object, int>(out var exceptionMessage, "divideNumbersUnmarshalled", numberA, numberB, null);
|
||||
var result = Runtime.BlazorInvokeJS<int, int, object, int>(out var exceptionMessage, "divideNumbersUnmarshalled", numberA, numberB, null);
|
||||
if (exceptionMessage != null)
|
||||
{
|
||||
return $".NET got exception: {exceptionMessage}";
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ namespace Microsoft.AspNetCore.Blazor.Browser.Interop
|
|||
/// <returns>The result of the function invocation.</returns>
|
||||
public static TRes InvokeUnmarshalled<TRes>(string identifier, params object[] args)
|
||||
{
|
||||
var result = Runtime.InvokeJSArray<TRes>(out var exception, identifier, args);
|
||||
var result = Runtime.BlazorInvokeJSArray<TRes>(out var exception, identifier, args);
|
||||
return exception != null
|
||||
? throw new JavaScriptException(exception)
|
||||
: result;
|
||||
|
|
@ -96,7 +96,7 @@ namespace Microsoft.AspNetCore.Blazor.Browser.Interop
|
|||
/// <returns>The result of the function invocation.</returns>
|
||||
public static TRes InvokeUnmarshalled<T0, T1, T2, TRes>(string identifier, T0 arg0, T1 arg1, T2 arg2)
|
||||
{
|
||||
var result = Runtime.InvokeJS<T0, T1, T2, TRes>(out var exception, identifier, arg0, arg1, arg2);
|
||||
var result = Runtime.BlazorInvokeJS<T0, T1, T2, TRes>(out var exception, identifier, arg0, arg1, arg2);
|
||||
return exception != null
|
||||
? throw new JavaScriptException(exception)
|
||||
: result;
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@ namespace WebAssembly
|
|||
// driver.c in the Mono distribution
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
public static extern TRes InvokeJS<T0, T1, T2, TRes>(out string exception, string funcName, T0 arg0, T1 arg1, T2 arg2);
|
||||
public static extern TRes BlazorInvokeJS<T0, T1, T2, TRes>(out string exception, string funcName, T0 arg0, T1 arg1, T2 arg2);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
public static extern TRes InvokeJSArray<TRes>(out string exception, string funcName, params object[] args);
|
||||
public static extern TRes BlazorInvokeJSArray<TRes>(out string exception, string funcName, params object[] args);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue