Skip to content

Commit f4b6e5b

Browse files
committed
Remove extra test file and update Router
1 parent a888bef commit f4b6e5b

File tree

3 files changed

+5
-180
lines changed

3 files changed

+5
-180
lines changed

src/Components/Components/ref/Microsoft.AspNetCore.Components.netcoreapp.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ public LocationChangedEventArgs(string location, bool isNavigationIntercepted) {
556556
public bool IsNavigationIntercepted { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
557557
public string Location { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
558558
}
559-
public partial class NavigationContext
559+
public sealed partial class NavigationContext
560560
{
561561
internal NavigationContext() { }
562562
public System.Threading.CancellationToken CancellationToken { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }

src/Components/Components/src/Routing/Router.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,13 +206,14 @@ private async Task RunOnNavigateAsync(string path)
206206
// Create a new cancellation token source for this instance
207207
_onNavigateCts = new CancellationTokenSource();
208208
var navigateContext = new NavigationContext(path, _onNavigateCts.Token);
209-
var task = OnNavigateAsync.InvokeAsync(navigateContext);
210209

211210
// Create a cancellation task based on the cancellation token
212211
// associated with the current running task.
213212
var cancellationTaskSource = new TaskCompletionSource();
214-
navigateContext.CancellationToken.Register(() =>
215-
cancellationTaskSource.SetResult());
213+
navigateContext.CancellationToken.Register(state =>
214+
((TaskCompletionSource)state).SetResult(), cancellationTaskSource);
215+
216+
var task = OnNavigateAsync.InvokeAsync(navigateContext);
216217

217218
// If the user provided a Navigating render fragment, then show it.
218219
if (Navigating != null && task.Status != TaskStatus.RanToCompletion)

src/Components/WebAssembly/Build/test/BuildIntegrationTests/BuildLazyLoadTest.cs

Lines changed: 0 additions & 176 deletions
This file was deleted.

0 commit comments

Comments
 (0)