From 5dc54045705772efe7183b570f5b3eb47976ef8f Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Thu, 24 May 2018 13:51:30 +0100 Subject: [PATCH] Add notes on how to upgrade Mono, plus modify some files to make future upgrades simpler --- samples/MonoSanityClient/Examples.cs | 8 ++++---- .../Interop/RegisteredFunction.cs | 4 ++-- .../Interop/WebAssembly.Runtime.cs | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/samples/MonoSanityClient/Examples.cs b/samples/MonoSanityClient/Examples.cs index 23179361c4..c04c0d69e3 100644 --- a/samples/MonoSanityClient/Examples.cs +++ b/samples/MonoSanityClient/Examples.cs @@ -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(out var exceptionMessage, "evaluateJsExpression", expression, null, null); + // For tests that call this method, we'll exercise the 'BlazorInvokeJSArray' code path + var result = Runtime.BlazorInvokeJSArray(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(out var exceptionMessage, "divideNumbersUnmarshalled", numberA, numberB, null); + var result = Runtime.BlazorInvokeJS(out var exceptionMessage, "divideNumbersUnmarshalled", numberA, numberB, null); if (exceptionMessage != null) { return $".NET got exception: {exceptionMessage}"; diff --git a/src/Microsoft.AspNetCore.Blazor.Browser/Interop/RegisteredFunction.cs b/src/Microsoft.AspNetCore.Blazor.Browser/Interop/RegisteredFunction.cs index 6aae64af93..ccac02f6c0 100644 --- a/src/Microsoft.AspNetCore.Blazor.Browser/Interop/RegisteredFunction.cs +++ b/src/Microsoft.AspNetCore.Blazor.Browser/Interop/RegisteredFunction.cs @@ -43,7 +43,7 @@ namespace Microsoft.AspNetCore.Blazor.Browser.Interop /// The result of the function invocation. public static TRes InvokeUnmarshalled(string identifier, params object[] args) { - var result = Runtime.InvokeJSArray(out var exception, identifier, args); + var result = Runtime.BlazorInvokeJSArray(out var exception, identifier, args); return exception != null ? throw new JavaScriptException(exception) : result; @@ -96,7 +96,7 @@ namespace Microsoft.AspNetCore.Blazor.Browser.Interop /// The result of the function invocation. public static TRes InvokeUnmarshalled(string identifier, T0 arg0, T1 arg1, T2 arg2) { - var result = Runtime.InvokeJS(out var exception, identifier, arg0, arg1, arg2); + var result = Runtime.BlazorInvokeJS(out var exception, identifier, arg0, arg1, arg2); return exception != null ? throw new JavaScriptException(exception) : result; diff --git a/src/Microsoft.AspNetCore.Blazor.Browser/Interop/WebAssembly.Runtime.cs b/src/Microsoft.AspNetCore.Blazor.Browser/Interop/WebAssembly.Runtime.cs index 61fbab3071..9a40bb65b0 100644 --- a/src/Microsoft.AspNetCore.Blazor.Browser/Interop/WebAssembly.Runtime.cs +++ b/src/Microsoft.AspNetCore.Blazor.Browser/Interop/WebAssembly.Runtime.cs @@ -11,9 +11,9 @@ namespace WebAssembly // driver.c in the Mono distribution [MethodImpl(MethodImplOptions.InternalCall)] - public static extern TRes InvokeJS(out string exception, string funcName, T0 arg0, T1 arg1, T2 arg2); + public static extern TRes BlazorInvokeJS(out string exception, string funcName, T0 arg0, T1 arg1, T2 arg2); [MethodImpl(MethodImplOptions.InternalCall)] - public static extern TRes InvokeJSArray(out string exception, string funcName, params object[] args); + public static extern TRes BlazorInvokeJSArray(out string exception, string funcName, params object[] args); } }