Blazor API Review: IUriHelper (#12425)
* Rename IUriHelper -> NavigationManager
- Remove IUriHelper interface
- Rename to NavigationManager
- Remove all traces of old naming
There's no functional or design change in this commit - just removing
all traces of the old name. The next few iterations will try to improve
the design.
* Minor API tweaks to NavigationManager
Making Initialize protected causes problems because right now the
server-side code needs to deal with one of two different
implementations, hence an exchange type is used. I followed the same
pattern that was used for auth for symmetry but I have some *cool*
thoughts.
- We can remove this when we remove stateful prerendering
- I have another idea to banish this pattern to the land of wind and
ghosts
If this ends up sticking around longer than a week in the code, lets
discuss other ideas and try to improve the pattern.
* Use hub method for server-side navigation
* Get rid of async local
* Add hub method test
* Misc bikeshedding
* Update src/Components/Server/src/Circuits/DefaultCircuitFactory.cs
Co-Authored-By:
campersau <buchholz.bastian@googlemail.com>
* PR feedback
显示
- src/Components/Blazor/Blazor/ref/Microsoft.AspNetCore.Blazor.netstandard2.0.cs 9 个添加, 12 个删除.../Blazor/ref/Microsoft.AspNetCore.Blazor.netstandard2.0.cs
- src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostBuilder.cs 3 个添加, 3 个删除...nents/Blazor/Blazor/src/Hosting/WebAssemblyHostBuilder.cs
- src/Components/Blazor/Blazor/src/JSInteropMethods.cs 26 个添加, 0 个删除src/Components/Blazor/Blazor/src/JSInteropMethods.cs
- src/Components/Blazor/Blazor/src/Services/WebAssemblyNavigationInterception.cs 1 个添加, 1 个删除.../Blazor/src/Services/WebAssemblyNavigationInterception.cs
- src/Components/Blazor/Blazor/src/Services/WebAssemblyNavigationManager.cs 53 个添加, 0 个删除...lazor/Blazor/src/Services/WebAssemblyNavigationManager.cs
- src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs 20 个添加, 32 个删除...nts/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs
- src/Components/Components/src/IUriHelper.cs 0 个添加, 64 个删除src/Components/Components/src/IUriHelper.cs
- src/Components/Components/src/NavigationException.cs 1 个添加, 1 个删除src/Components/Components/src/NavigationException.cs
- src/Components/Components/src/NavigationManager.cs 262 个添加, 0 个删除src/Components/Components/src/NavigationManager.cs
- src/Components/Components/src/Routing/IHostEnvironmentNavigationManager.cs 19 个添加, 0 个删除...mponents/src/Routing/IHostEnvironmentNavigationManager.cs
- src/Components/Components/src/Routing/LocationChangedEventArgs.cs 2 个添加, 2 个删除...onents/Components/src/Routing/LocationChangedEventArgs.cs
- src/Components/Components/src/Routing/Router.cs 7 个添加, 7 个删除src/Components/Components/src/Routing/Router.cs
- src/Components/Components/test/NavigationManagerTest.cs 42 个添加, 9 个删除src/Components/Components/test/NavigationManagerTest.cs
- src/Components/Server/ref/Microsoft.AspNetCore.Components.Server.netcoreapp3.0.cs 0 个添加, 9 个删除...f/Microsoft.AspNetCore.Components.Server.netcoreapp3.0.cs
- src/Components/Server/src/Circuits/CircuitFactory.cs 2 个添加, 2 个删除src/Components/Server/src/Circuits/CircuitFactory.cs
- src/Components/Server/src/Circuits/CircuitHost.cs 66 个添加, 11 个删除src/Components/Server/src/Circuits/CircuitHost.cs
- src/Components/Server/src/Circuits/DefaultCircuitFactory.cs 14 个添加, 8 个删除src/Components/Server/src/Circuits/DefaultCircuitFactory.cs
- src/Components/Server/src/Circuits/RemoteNavigationInterception.cs 1 个添加, 1 个删除...nents/Server/src/Circuits/RemoteNavigationInterception.cs
- src/Components/Server/src/Circuits/RemoteNavigationManager.cs 19 个添加, 36 个删除...Components/Server/src/Circuits/RemoteNavigationManager.cs
- src/Components/Server/src/ComponentHub.cs 17 个添加, 5 个删除src/Components/Server/src/ComponentHub.cs
加载中
想要评论请 注册 或 登录