Skip to content

Commit a68395e

Browse files
Fixes
1 parent 4fb201b commit a68395e

File tree

5 files changed

+9
-3
lines changed

5 files changed

+9
-3
lines changed

src/Components/Server/src/Circuits/RemoteNavigationManager.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

44
using System;
5+
using System.Diagnostics.CodeAnalysis;
56
using Microsoft.AspNetCore.Components.Routing;
67
using Microsoft.Extensions.Logging;
78
using Microsoft.JSInterop;
@@ -65,6 +66,7 @@ public void NotifyLocationChanged(string uri, bool intercepted)
6566
}
6667

6768
/// <inheritdoc />
69+
[DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties, typeof(NavigationOptions))]
6870
protected override void NavigateToCore(string uri, NavigationOptions options)
6971
{
7072
Log.RequestingNavigation(_logger, uri, options);

src/Components/Web.JS/src/GlobalExports.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { navigateTo, internalFunctions as navigationManagerInternalFunctions } from './Services/NavigationManager';
1+
import { navigateTo, internalFunctions as navigationManagerInternalFunctions, NavigationOptions } from './Services/NavigationManager';
22
import { domFunctions } from './DomWrapper';
33
import { Virtualize } from './Virtualize';
44
import { registerCustomEventType, EventTypeOptions } from './Rendering/Events/EventTypes';
@@ -10,7 +10,7 @@ import { WebAssemblyStartOptions } from './Platform/WebAssemblyStartOptions';
1010
import { Platform, Pointer, System_String, System_Array, System_Object, System_Boolean, System_Byte, System_Int } from './Platform/Platform';
1111

1212
interface IBlazor {
13-
navigateTo: (uri: string, forceLoad: boolean, replace: boolean) => void;
13+
navigateTo: (uri: string, options: NavigationOptions) => void;
1414
registerCustomEventType: (eventName: string, options: EventTypeOptions) => void;
1515

1616
disconnect?: () => void;

src/Components/Web.JS/src/Services/NavigationManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ function canProcessAnchor(anchorTarget: HTMLAnchorElement) {
186186
}
187187

188188
// Keep in sync with Components/src/NavigationOptions.cs
189-
interface NavigationOptions {
189+
export interface NavigationOptions {
190190
forceLoad: boolean;
191191
replaceHistoryEntry: boolean;
192192
}

src/Components/WebAssembly/WebAssembly/src/Services/WebAssemblyNavigationManager.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

44
using System;
5+
using System.Diagnostics.CodeAnalysis;
56
using Microsoft.JSInterop;
67
using Interop = Microsoft.AspNetCore.Components.Web.BrowserNavigationManagerInterop;
78

@@ -29,6 +30,7 @@ public void SetLocation(string uri, bool isInterceptedLink)
2930
}
3031

3132
/// <inheritdoc />
33+
[DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties, typeof(NavigationOptions))]
3234
protected override void NavigateToCore(string uri, NavigationOptions options)
3335
{
3436
if (uri == null)

src/Components/WebView/WebView/src/IpcSender.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

44
using System;
5+
using System.Diagnostics.CodeAnalysis;
56
using System.Threading.Tasks;
67
using Microsoft.AspNetCore.Components.RenderTree;
78
using Microsoft.JSInterop;
@@ -33,6 +34,7 @@ public void ApplyRenderBatch(long batchId, RenderBatch renderBatch)
3334
DispatchMessageWithErrorHandling(message);
3435
}
3536

37+
[DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties, typeof(NavigationOptions))]
3638
public void Navigate(string uri, NavigationOptions options)
3739
{
3840
DispatchMessageWithErrorHandling(IpcCommon.Serialize(IpcCommon.OutgoingMessageType.Navigate, uri, options));

0 commit comments

Comments
 (0)