diff --git a/7.0/BlazorSample_Server/Pages/call-js-from-dotnet/CallJsExample10.razor b/7.0/BlazorSample_Server/Pages/call-js-from-dotnet/CallJsExample10.razor deleted file mode 100644 index 442e893f2..000000000 --- a/7.0/BlazorSample_Server/Pages/call-js-from-dotnet/CallJsExample10.razor +++ /dev/null @@ -1,80 +0,0 @@ -@page "/call-js-example-10" -@using System.Runtime.InteropServices -@using Microsoft.JSInterop -@inject IJSRuntime JS - -

Call JS Example 10

- -@if (callResultForBoolean) -{ -

JS interop was successful!

-} - -@if (!string.IsNullOrEmpty(callResultForString)) -{ -

@callResultForString

-} - -

- - -

- -

- Doctor Who - is a registered trademark of the BBC. -

- -@code { - private bool callResultForBoolean; - private string? callResultForString; - - private void CallJSUnmarshalledForBoolean() - { - var unmarshalledRuntime = (IJSUnmarshalledRuntime)JS; - - var jsUnmarshalledReference = unmarshalledRuntime - .InvokeUnmarshalled( - "returnObjectReference"); - - callResultForBoolean = - jsUnmarshalledReference.InvokeUnmarshalled( - "unmarshalledFunctionReturnBoolean", GetStruct()); - } - - private void CallJSUnmarshalledForString() - { - var unmarshalledRuntime = (IJSUnmarshalledRuntime)JS; - - var jsUnmarshalledReference = unmarshalledRuntime - .InvokeUnmarshalled( - "returnObjectReference"); - - callResultForString = - jsUnmarshalledReference.InvokeUnmarshalled( - "unmarshalledFunctionReturnString", GetStruct()); - } - - private InteropStruct GetStruct() - { - return new InteropStruct - { - Name = "Brigadier Alistair Gordon Lethbridge-Stewart", - Year = 1968, - }; - } - - [StructLayout(LayoutKind.Explicit)] - public struct InteropStruct - { - [FieldOffset(0)] - public string Name; - - [FieldOffset(8)] - public int Year; - } -} diff --git a/7.0/BlazorSample_WebAssembly/Pages/call-js-from-dotnet/CallJsExample10.razor b/7.0/BlazorSample_WebAssembly/Pages/call-js-from-dotnet/CallJsExample10.razor deleted file mode 100644 index 442e893f2..000000000 --- a/7.0/BlazorSample_WebAssembly/Pages/call-js-from-dotnet/CallJsExample10.razor +++ /dev/null @@ -1,80 +0,0 @@ -@page "/call-js-example-10" -@using System.Runtime.InteropServices -@using Microsoft.JSInterop -@inject IJSRuntime JS - -

Call JS Example 10

- -@if (callResultForBoolean) -{ -

JS interop was successful!

-} - -@if (!string.IsNullOrEmpty(callResultForString)) -{ -

@callResultForString

-} - -

- - -

- -

- Doctor Who - is a registered trademark of the BBC. -

- -@code { - private bool callResultForBoolean; - private string? callResultForString; - - private void CallJSUnmarshalledForBoolean() - { - var unmarshalledRuntime = (IJSUnmarshalledRuntime)JS; - - var jsUnmarshalledReference = unmarshalledRuntime - .InvokeUnmarshalled( - "returnObjectReference"); - - callResultForBoolean = - jsUnmarshalledReference.InvokeUnmarshalled( - "unmarshalledFunctionReturnBoolean", GetStruct()); - } - - private void CallJSUnmarshalledForString() - { - var unmarshalledRuntime = (IJSUnmarshalledRuntime)JS; - - var jsUnmarshalledReference = unmarshalledRuntime - .InvokeUnmarshalled( - "returnObjectReference"); - - callResultForString = - jsUnmarshalledReference.InvokeUnmarshalled( - "unmarshalledFunctionReturnString", GetStruct()); - } - - private InteropStruct GetStruct() - { - return new InteropStruct - { - Name = "Brigadier Alistair Gordon Lethbridge-Stewart", - Year = 1968, - }; - } - - [StructLayout(LayoutKind.Explicit)] - public struct InteropStruct - { - [FieldOffset(0)] - public string Name; - - [FieldOffset(8)] - public int Year; - } -}