diff --git a/src/SamplesApp/SamplesApp.Wasm/WasmScripts/TestRunner.js b/src/SamplesApp/SamplesApp.Wasm/WasmScripts/TestRunner.js index 1cde8cd69a00..fd7a79689a6a 100644 --- a/src/SamplesApp/SamplesApp.Wasm/WasmScripts/TestRunner.js +++ b/src/SamplesApp/SamplesApp.Wasm/WasmScripts/TestRunner.js @@ -1,23 +1,15 @@ class SampleRunner { - static init() { + static async init() { if (!this._getAllTests) { - this._getAllTests = this.getMethod("[SamplesApp.Wasm] SamplesApp.App:GetAllTests"); - this._runTest = this.getMethod("[SamplesApp.Wasm] SamplesApp.App:RunTest"); - this._isTestDone = this.getMethod("[SamplesApp.Wasm] SamplesApp.App:IsTestDone"); - this._getDisplayScreenScaling = this.getMethod("[SamplesApp.Wasm] SamplesApp.App:GetDisplayScreenScaling"); - } - } + const sampleAppExports = await Module.getAssemblyExports("SamplesApp.Wasm"); - static getMethod(methodName) { - var method = Module.mono_bind_static_method(methodName); - - if (!method) { - throw new `Method ${methodName} does not exist`; + this._getAllTests = sampleAppExports.SamplesApp.App.GetAllTests; + this._runTest = sampleAppExports.SamplesApp.App.RunTest; + this._isTestDone = sampleAppExports.SamplesApp.App.IsTestDone; + this._getDisplayScreenScaling = sampleAppExports.SamplesApp.App.GetDisplayScreenScaling; } - - return method; } static IsTestDone(test) { diff --git a/src/Uno.UI/ts/Clipboard.ts b/src/Uno.UI/ts/Clipboard.ts index 691384c85cd1..792eca15b710 100644 --- a/src/Uno.UI/ts/Clipboard.ts +++ b/src/Uno.UI/ts/Clipboard.ts @@ -63,9 +63,7 @@ namespace Uno.Utils { if ((globalThis).DotnetExports !== undefined) { Clipboard.dispatchContentChanged = (globalThis).DotnetExports.Uno.Windows.ApplicationModel.DataTransfer.Clipboard.DispatchContentChanged; } else { - Clipboard.dispatchContentChanged = - (Module).mono_bind_static_method( - "[Uno] Windows.ApplicationModel.DataTransfer.Clipboard:DispatchContentChanged"); + throw `Unable to find dotnet exports`; } } Clipboard.dispatchContentChanged(); diff --git a/src/Uno.UI/ts/Interop/ManagedObject.ts b/src/Uno.UI/ts/Interop/ManagedObject.ts index 7493a31637ac..be798ea0fbfe 100644 --- a/src/Uno.UI/ts/Interop/ManagedObject.ts +++ b/src/Uno.UI/ts/Interop/ManagedObject.ts @@ -9,7 +9,7 @@ if (exports !== undefined) { ManagedObject.dispatchMethod = exports.Dispatch; } else { - ManagedObject.dispatchMethod = (Module).mono_bind_static_method("[Uno.Foundation.Runtime.WebAssembly] Uno.Foundation.Interop.JSObject:Dispatch"); + throw `Unable to find dotnet exports`; } } diff --git a/src/Uno.UI/ts/WindowManager.ts b/src/Uno.UI/ts/WindowManager.ts index dcecfe5dc850..74d1303ff7d4 100644 --- a/src/Uno.UI/ts/WindowManager.ts +++ b/src/Uno.UI/ts/WindowManager.ts @@ -1395,7 +1395,7 @@ namespace Uno.UI { if ((globalThis).DotnetExports !== undefined) { WindowManager.setDependencyPropertyValueMethod = (globalThis).DotnetExports.UnoUI.Uno.UI.Helpers.Automation.SetDependencyPropertyValue; } else { - WindowManager.setDependencyPropertyValueMethod = (Module).mono_bind_static_method("[Uno.UI] Uno.UI.Helpers.Automation:SetDependencyPropertyValue"); + throw `Unable to find dotnet exports`; } } @@ -1438,21 +1438,7 @@ namespace Uno.UI { WindowManager.focusInMethod = exports.Microsoft.UI.Xaml.Input.FocusManager.ReceiveFocusNative; WindowManager.dispatchSuspendingMethod = exports.Microsoft.UI.Xaml.Application.DispatchSuspending; } else { - if (!WindowManager.resizeMethod) { - WindowManager.resizeMethod = (Module).mono_bind_static_method("[Uno.UI] Microsoft.UI.Xaml.Window:Resize"); - } - - if (!WindowManager.dispatchEventMethod) { - WindowManager.dispatchEventMethod = (Module).mono_bind_static_method("[Uno.UI] Microsoft.UI.Xaml.UIElement:DispatchEvent"); - } - - if (!WindowManager.focusInMethod) { - WindowManager.focusInMethod = (Module).mono_bind_static_method("[Uno.UI] Microsoft.UI.Xaml.Input.FocusManager:ReceiveFocusNative"); - } - - if (!WindowManager.dispatchSuspendingMethod) { - WindowManager.dispatchSuspendingMethod = (Module).mono_bind_static_method("[Uno.UI] Microsoft.UI.Xaml.Application:DispatchSuspending"); - } + throw `Unable to find dotnet exports`; } } diff --git a/src/Uno.UI/ts/Windows/ApplicationModel/DataTransfer/DragAndDropExtension.ts b/src/Uno.UI/ts/Windows/ApplicationModel/DataTransfer/DragAndDropExtension.ts index e2699ffbb2ef..422217207683 100644 --- a/src/Uno.UI/ts/Windows/ApplicationModel/DataTransfer/DragAndDropExtension.ts +++ b/src/Uno.UI/ts/Windows/ApplicationModel/DataTransfer/DragAndDropExtension.ts @@ -18,7 +18,7 @@ if ((globalThis).DotnetExports !== undefined) { DragDropExtension._dispatchDropEventMethod = (globalThis).DotnetExports.UnoUI.Windows.ApplicationModel.DataTransfer.DragDrop.Core.DragDropExtension.OnNativeDropEvent; } else { - DragDropExtension._dispatchDropEventMethod = (Module).mono_bind_static_method("[Uno.UI] Windows.ApplicationModel.DataTransfer.DragDrop.Core.DragDropExtension:OnNativeDropEvent"); + throw `Unable to find dotnet exports`; } } diff --git a/src/Uno.UI/ts/Windows/Devices/Enumeration/Internal/Providers/Midi/MidiDeviceConnectionWatcher.ts b/src/Uno.UI/ts/Windows/Devices/Enumeration/Internal/Providers/Midi/MidiDeviceConnectionWatcher.ts index 1551b3a4908e..7c88c08a4fc5 100644 --- a/src/Uno.UI/ts/Windows/Devices/Enumeration/Internal/Providers/Midi/MidiDeviceConnectionWatcher.ts +++ b/src/Uno.UI/ts/Windows/Devices/Enumeration/Internal/Providers/Midi/MidiDeviceConnectionWatcher.ts @@ -17,9 +17,7 @@ if ((globalThis).DotnetExports !== undefined) { MidiDeviceConnectionWatcher.dispatchStateChanged = (globalThis).DotnetExports.Uno.Uno.Devices.Enumeration.Internal.Providers.Midi.MidiDeviceConnectionWatcher.DispatchStateChanged; } else { - MidiDeviceConnectionWatcher.dispatchStateChanged = - (Module).mono_bind_static_method( - "[Uno] Uno.Devices.Enumeration.Internal.Providers.Midi.MidiDeviceConnectionWatcher:DispatchStateChanged"); + throw `Unable to find dotnet exports`; } } diff --git a/src/Uno.UI/ts/Windows/Devices/Geolocation/Geolocator.ts b/src/Uno.UI/ts/Windows/Devices/Geolocation/Geolocator.ts index b2a30c80cbf3..40cc967d4498 100644 --- a/src/Uno.UI/ts/Windows/Devices/Geolocation/Geolocator.ts +++ b/src/Uno.UI/ts/Windows/Devices/Geolocation/Geolocator.ts @@ -37,9 +37,7 @@ Geolocator.dispatchGeoposition = exports.DispatchGeoposition; } else { - Geolocator.dispatchAccessRequest = (Module).mono_bind_static_method("[Uno] Uno.Devices.Geolocation.Geolocator:DispatchAccessRequest"); - Geolocator.dispatchError = (Module).mono_bind_static_method("[Uno] Uno.Devices.Geolocation.Geolocator:DispatchError"); - Geolocator.dispatchGeoposition = (Module).mono_bind_static_method("[Uno] Uno.Devices.Geolocation.Geolocator:DispatchGeoposition"); + throw `Unable to find dotnet exports`; } Geolocator.interopInitialized = true; diff --git a/src/Uno.UI/ts/Windows/Devices/Midi/MidiInPort.ts b/src/Uno.UI/ts/Windows/Devices/Midi/MidiInPort.ts index a936a24978c5..ce1dcb2b09c2 100644 --- a/src/Uno.UI/ts/Windows/Devices/Midi/MidiInPort.ts +++ b/src/Uno.UI/ts/Windows/Devices/Midi/MidiInPort.ts @@ -30,8 +30,7 @@ if ((globalThis).DotnetExports !== undefined) { MidiInPort.dispatchMessage = (globalThis).DotnetExports.Uno.Windows.Devices.Midi.MidiInPort.DispatchMessage; } else { - MidiInPort.dispatchMessage = (Module).mono_bind_static_method( - "[Uno] Windows.Devices.Midi.MidiInPort:DispatchMessage"); + throw `Unable to find dotnet exports`; } } diff --git a/src/Uno.UI/ts/Windows/Devices/Sensors/Accelerometer.ts b/src/Uno.UI/ts/Windows/Devices/Sensors/Accelerometer.ts index 4dfb7c70dca3..1ee74b899f0f 100644 --- a/src/Uno.UI/ts/Windows/Devices/Sensors/Accelerometer.ts +++ b/src/Uno.UI/ts/Windows/Devices/Sensors/Accelerometer.ts @@ -16,7 +16,7 @@ namespace Windows.Devices.Sensors { Accelerometer.dispatchReading = exports.DispatchReading; } else { - this.dispatchReading = (Module).mono_bind_static_method("[Uno] Uno.Devices.Sensors.Accelerometer:DispatchReading"); + throw `Unable to find dotnet exports`; } return true; diff --git a/src/Uno.UI/ts/Windows/Devices/Sensors/Gyrometer.ts b/src/Uno.UI/ts/Windows/Devices/Sensors/Gyrometer.ts index dbbbc418ab6b..f634e605bb23 100644 --- a/src/Uno.UI/ts/Windows/Devices/Sensors/Gyrometer.ts +++ b/src/Uno.UI/ts/Windows/Devices/Sensors/Gyrometer.ts @@ -20,7 +20,7 @@ namespace Windows.Devices.Sensors { if ((globalThis).DotnetExports !== undefined) { this.dispatchReading = (globalThis).DotnetExports.Uno.Windows.Devices.Sensors.Gyrometer.DispatchReading; } else { - this.dispatchReading = (Module).mono_bind_static_method("[Uno] Windows.Devices.Sensors.Gyrometer:DispatchReading"); + throw `Unable to find dotnet exports`; } let GyroscopeClass: any = window.Gyroscope; this.gyroscope = new GyroscopeClass({ referenceFrame: "device" }); diff --git a/src/Uno.UI/ts/Windows/Devices/Sensors/LightSensor.ts b/src/Uno.UI/ts/Windows/Devices/Sensors/LightSensor.ts index 4e32cbf8a312..6746f1eee0b2 100644 --- a/src/Uno.UI/ts/Windows/Devices/Sensors/LightSensor.ts +++ b/src/Uno.UI/ts/Windows/Devices/Sensors/LightSensor.ts @@ -24,8 +24,7 @@ namespace Windows.Devices.Sensors { if ((globalThis).DotnetExports !== undefined) { LightSensor.dispatchReading = (globalThis).DotnetExports.Uno.Windows.Devices.Sensors.LightSensor.DispatchReading; } else { - LightSensor.dispatchReading = (Module).mono_bind_static_method( - "[Uno] Windows.Devices.Sensors.LightSensor:DispatchReading"); + throw `Unable to find dotnet exports`; } const AmbientLightSensorClass: any = window.AmbientLightSensor; LightSensor.ambientLightSensor = new AmbientLightSensorClass(); diff --git a/src/Uno.UI/ts/Windows/Devices/Sensors/Magnetometer.ts b/src/Uno.UI/ts/Windows/Devices/Sensors/Magnetometer.ts index 5d6ec5919159..0f8395bee26f 100644 --- a/src/Uno.UI/ts/Windows/Devices/Sensors/Magnetometer.ts +++ b/src/Uno.UI/ts/Windows/Devices/Sensors/Magnetometer.ts @@ -20,7 +20,7 @@ namespace Windows.Devices.Sensors { if ((globalThis).DotnetExports !== undefined) { this.dispatchReading = (globalThis).DotnetExports.Uno.Windows.Devices.Sensors.Magnetometer.DispatchReading; } else { - this.dispatchReading = (Module).mono_bind_static_method("[Uno] Windows.Devices.Sensors.Magnetometer:DispatchReading"); + throw `Unable to find dotnet exports`; } let MagnetometerClass: any = window.Magnetometer; this.magnetometer = new MagnetometerClass({ referenceFrame: 'device' }); diff --git a/src/Uno.UI/ts/Windows/Gaming/Input/Gamepad.ts b/src/Uno.UI/ts/Windows/Gaming/Input/Gamepad.ts index af6186ddb0ce..e619c2640a98 100644 --- a/src/Uno.UI/ts/Windows/Gaming/Input/Gamepad.ts +++ b/src/Uno.UI/ts/Windows/Gaming/Input/Gamepad.ts @@ -68,8 +68,7 @@ if ((globalThis).DotnetExports !== undefined) { Gamepad.dispatchGamepadAdded = (globalThis).DotnetExports.Uno.Windows.Gaming.Input.Gamepad.DispatchGamepadAdded; } else { - Gamepad.dispatchGamepadAdded = (Module).mono_bind_static_method( - "[Uno] Windows.Gaming.Input.Gamepad:DispatchGamepadAdded"); + throw `Unable to find dotnet exports`; } } Gamepad.dispatchGamepadAdded(e.gamepad.index); @@ -80,8 +79,7 @@ if ((globalThis).DotnetExports !== undefined) { Gamepad.dispatchGamepadRemoved = (globalThis).DotnetExports.Uno.Windows.Gaming.Input.Gamepad.DispatchGamepadRemoved; } else { - Gamepad.dispatchGamepadRemoved = (Module).mono_bind_static_method( - "[Uno] Windows.Gaming.Input.Gamepad:DispatchGamepadRemoved"); + throw `Unable to find dotnet exports`; } } Gamepad.dispatchGamepadRemoved(e.gamepad.index); diff --git a/src/Uno.UI/ts/Windows/Graphics/Display/DisplayInformation.ts b/src/Uno.UI/ts/Windows/Graphics/Display/DisplayInformation.ts index 435d28bd02da..9aab5002c274 100644 --- a/src/Uno.UI/ts/Windows/Graphics/Display/DisplayInformation.ts +++ b/src/Uno.UI/ts/Windows/Graphics/Display/DisplayInformation.ts @@ -145,9 +145,7 @@ if ((globalThis).DotnetExports !== undefined) { DisplayInformation.dispatchDpiChanged = (globalThis).DotnetExports.Uno.Windows.Graphics.Display.DisplayInformation.DispatchDpiChanged; } else { - DisplayInformation.dispatchDpiChanged = - (Module).mono_bind_static_method( - "[Uno] Windows.Graphics.Display.DisplayInformation:DispatchDpiChanged"); + throw `Unable to find dotnet exports`; } } DisplayInformation.dispatchDpiChanged(currentDpi); @@ -160,9 +158,7 @@ if ((globalThis).DotnetExports !== undefined) { DisplayInformation.dispatchOrientationChanged = (globalThis).DotnetExports.Uno.Windows.Graphics.Display.DisplayInformation.DispatchOrientationChanged; } else { - DisplayInformation.dispatchOrientationChanged = - (Module).mono_bind_static_method( - "[Uno] Windows.Graphics.Display.DisplayInformation:DispatchOrientationChanged"); + throw `Unable to find dotnet exports`; } } DisplayInformation.dispatchOrientationChanged(window.screen.orientation.type); diff --git a/src/Uno.UI/ts/Windows/Helpers/Theming/SystemThemeHelper.ts b/src/Uno.UI/ts/Windows/Helpers/Theming/SystemThemeHelper.ts index 3e9d8cfcad5d..1686e2e91494 100644 --- a/src/Uno.UI/ts/Windows/Helpers/Theming/SystemThemeHelper.ts +++ b/src/Uno.UI/ts/Windows/Helpers/Theming/SystemThemeHelper.ts @@ -20,7 +20,7 @@ namespace Uno.Helpers.Theming { if ((globalThis).DotnetExports !== undefined) { SystemThemeHelper.dispatchThemeChange = (globalThis).DotnetExports.Uno.Uno.Helpers.Theming.SystemThemeHelper.DispatchSystemThemeChange; } else { - SystemThemeHelper.dispatchThemeChange = (Module).mono_bind_static_method("[Uno] Uno.Helpers.Theming.SystemThemeHelper:DispatchSystemThemeChange"); + throw `Unable to find dotnet exports`; } } diff --git a/src/Uno.UI/ts/Windows/Media/SpeechRecognizer.ts b/src/Uno.UI/ts/Windows/Media/SpeechRecognizer.ts index 0e00ada75811..006c6cabd2ae 100644 --- a/src/Uno.UI/ts/Windows/Media/SpeechRecognizer.ts +++ b/src/Uno.UI/ts/Windows/Media/SpeechRecognizer.ts @@ -69,8 +69,7 @@ namespace Windows.Media { if ((globalThis).DotnetExports !== undefined) { SpeechRecognizer.dispatchResult = (globalThis).DotnetExports.Uno.Windows.Media.SpeechRecognition.SpeechRecognizer.DispatchResult; } else { - SpeechRecognizer.dispatchResult = (Module).mono_bind_static_method( - "[Uno] Windows.Media.SpeechRecognition.SpeechRecognizer:DispatchResult"); + throw `Unable to find dotnet exports`; } } SpeechRecognizer.dispatchResult(this.managedId, event.results[0][0].transcript, event.results[0][0].confidence); @@ -79,8 +78,7 @@ namespace Windows.Media { if ((globalThis).DotnetExports !== undefined) { SpeechRecognizer.dispatchHypothesis = (globalThis).DotnetExports.Uno.Windows.Media.SpeechRecognition.SpeechRecognizer.DispatchHypothesis; } else { - SpeechRecognizer.dispatchHypothesis = (Module).mono_bind_static_method( - "[Uno] Windows.Media.SpeechRecognition.SpeechRecognizer:DispatchHypothesis"); + throw `Unable to find dotnet exports`; } } SpeechRecognizer.dispatchHypothesis(this.managedId, event.results[0][0].transcript); @@ -92,8 +90,7 @@ namespace Windows.Media { if ((globalThis).DotnetExports !== undefined) { SpeechRecognizer.dispatchStatus = (globalThis).DotnetExports.Uno.Windows.Media.SpeechRecognition.SpeechRecognizer.DispatchStatus; } else { - SpeechRecognizer.dispatchStatus = (Module).mono_bind_static_method( - "[Uno] Windows.Media.SpeechRecognition.SpeechRecognizer:DispatchStatus"); + throw `Unable to find dotnet exports`; } } SpeechRecognizer.dispatchStatus(this.managedId, "SpeechDetected") @@ -104,8 +101,7 @@ namespace Windows.Media { if ((globalThis).DotnetExports !== undefined) { SpeechRecognizer.dispatchError = (globalThis).DotnetExports.Uno.Windows.Media.SpeechRecognition.SpeechRecognizer.DispatchError; } else { - SpeechRecognizer.dispatchError = (Module).mono_bind_static_method( - "[Uno] Windows.Media.SpeechRecognition.SpeechRecognizer:DispatchError"); + throw `Unable to find dotnet exports`; } } SpeechRecognizer.dispatchError(this.managedId, event.error); diff --git a/src/Uno.UI/ts/Windows/Networking/Connectivity/NetworkInformation.ts b/src/Uno.UI/ts/Windows/Networking/Connectivity/NetworkInformation.ts index ff3b59d4f2ad..c71214070bc7 100644 --- a/src/Uno.UI/ts/Windows/Networking/Connectivity/NetworkInformation.ts +++ b/src/Uno.UI/ts/Windows/Networking/Connectivity/NetworkInformation.ts @@ -18,9 +18,7 @@ if ((globalThis).DotnetExports !== undefined) { NetworkInformation.dispatchStatusChanged = (globalThis).DotnetExports.Uno.Windows.Networking.Connectivity.NetworkInformation.DispatchStatusChanged; } else { - NetworkInformation.dispatchStatusChanged = - (Module).mono_bind_static_method( - "[Uno] Windows.Networking.Connectivity.NetworkInformation:DispatchStatusChanged"); + throw `Unable to find dotnet exports`; } } NetworkInformation.dispatchStatusChanged(); diff --git a/src/Uno.UI/ts/Windows/Storage/NativeStorageItem.ts b/src/Uno.UI/ts/Windows/Storage/NativeStorageItem.ts index 78851b35bb8b..3f11b2a89915 100644 --- a/src/Uno.UI/ts/Windows/Storage/NativeStorageItem.ts +++ b/src/Uno.UI/ts/Windows/Storage/NativeStorageItem.ts @@ -78,7 +78,7 @@ if ((globalThis).DotnetExports !== undefined) { NativeStorageItem.generateGuidBinding = (globalThis).DotnetExports.Uno.Uno.Storage.NativeStorageItem.GenerateGuids; } else { - NativeStorageItem.generateGuidBinding = (Module).mono_bind_static_method("[Uno] Uno.Storage.NativeStorageItem:GenerateGuids"); + throw `Unable to find dotnet exports`; } } diff --git a/src/Uno.UI/ts/Windows/Storage/StorageFolder.ts b/src/Uno.UI/ts/Windows/Storage/StorageFolder.ts index 6e888b4fbeab..0cffda479e58 100644 --- a/src/Uno.UI/ts/Windows/Storage/StorageFolder.ts +++ b/src/Uno.UI/ts/Windows/Storage/StorageFolder.ts @@ -70,9 +70,7 @@ namespace Windows.Storage { if ((globalThis).DotnetExports !== undefined) { StorageFolder.dispatchStorageInitialized = (globalThis).DotnetExports.Uno.Windows.Storage.StorageFolder.DispatchStorageInitialized; } else { - StorageFolder.dispatchStorageInitialized = - (Module).mono_bind_static_method( - "[Uno] Windows.Storage.StorageFolder:DispatchStorageInitialized"); + throw `Unable to find dotnet exports`; } } StorageFolder.dispatchStorageInitialized(); diff --git a/src/Uno.UI/ts/Windows/UI/Core/SystemNavigationManager.ts b/src/Uno.UI/ts/Windows/UI/Core/SystemNavigationManager.ts index 4a4b950f8ddc..ac595471bf6a 100644 --- a/src/Uno.UI/ts/Windows/UI/Core/SystemNavigationManager.ts +++ b/src/Uno.UI/ts/Windows/UI/Core/SystemNavigationManager.ts @@ -14,9 +14,7 @@ constructor() { var that = this; - var dispatchBackRequest = (globalThis).DotnetExports !== undefined ? - (globalThis).DotnetExports.Uno.Windows.UI.Core.SystemNavigationManager.DispatchBackRequest : - (Module).mono_bind_static_method("[Uno] Windows.UI.Core.SystemNavigationManager:DispatchBackRequest"); + var dispatchBackRequest = (globalThis).DotnetExports.Uno.Windows.UI.Core.SystemNavigationManager.DispatchBackRequest; window.history.replaceState(0, document.title, null); window.addEventListener("popstate", function (evt) { diff --git a/src/Uno.UI/ts/Windows/UI/Xaml/Application.ts b/src/Uno.UI/ts/Windows/UI/Xaml/Application.ts index c88b7aff863b..7d422ec8b0f9 100644 --- a/src/Uno.UI/ts/Windows/UI/Xaml/Application.ts +++ b/src/Uno.UI/ts/Windows/UI/Xaml/Application.ts @@ -8,7 +8,7 @@ if ((globalThis).DotnetExports !== undefined) { Application.dispatchVisibilityChange = (globalThis).DotnetExports.UnoUI.Microsoft.UI.Xaml.Application.DispatchVisibilityChange; } else { - Application.dispatchVisibilityChange = (Module).mono_bind_static_method("[Uno.UI] Microsoft.UI.Xaml.Application:DispatchVisibilityChange"); + throw `Unable to find dotnet exports`; } } diff --git a/src/Uno.UI/ts/Windows/UI/Xaml/Input/FocusVisual.ts b/src/Uno.UI/ts/Windows/UI/Xaml/Input/FocusVisual.ts index 5f307f1d43fb..81e15e7049cf 100644 --- a/src/Uno.UI/ts/Windows/UI/Xaml/Input/FocusVisual.ts +++ b/src/Uno.UI/ts/Windows/UI/Xaml/Input/FocusVisual.ts @@ -28,8 +28,7 @@ if ((globalThis).DotnetExports !== undefined) { FocusVisual.dispatchPositionChange = (globalThis).DotnetExports.UnoUI.Uno.UI.Xaml.Controls.SystemFocusVisual.DispatchNativePositionChange; } else { - FocusVisual.dispatchPositionChange = (Module).mono_bind_static_method( - "[Uno.UI] Uno.UI.Xaml.Controls.SystemFocusVisual:DispatchNativePositionChange"); + throw `Unable to find dotnet exports`; } } diff --git a/src/Uno.UI/ts/Windows/UI/Xaml/Media/FontFamily.ts b/src/Uno.UI/ts/Windows/UI/Xaml/Media/FontFamily.ts index 7188e606701f..39598a90c6b7 100644 --- a/src/Uno.UI/ts/Windows/UI/Xaml/Media/FontFamily.ts +++ b/src/Uno.UI/ts/Windows/UI/Xaml/Media/FontFamily.ts @@ -52,8 +52,7 @@ if ((globalThis).DotnetExports !== undefined) { FontFamily.managedNotifyFontLoaded = (globalThis).DotnetExports.UnoUI.Microsoft.UI.Xaml.Media.FontFamilyLoader.NotifyFontLoaded; } else { - FontFamily.managedNotifyFontLoaded = - (Module).mono_bind_static_method("[Uno.UI] Microsoft.UI.Xaml.Media.FontFamilyLoader:NotifyFontLoaded"); + throw `Unable to find dotnet exports`; } } @@ -66,8 +65,7 @@ if ((globalThis).DotnetExports !== undefined) { FontFamily.managedNotifyFontLoadFailed = (globalThis).DotnetExports.UnoUI.Microsoft.UI.Xaml.Media.FontFamilyLoader.NotifyFontLoadFailed; } else { - FontFamily.managedNotifyFontLoadFailed = - (Module).mono_bind_static_method("[Uno.UI] Microsoft.UI.Xaml.Media.FontFamilyLoader:NotifyFontLoadFailed"); + throw `Unable to find dotnet exports`; } }