Skip to content

Commit 1a1a423

Browse files
dotnet-maestro-botdotnet-maestro[bot]github-actions[bot]MackinnonBuckcaptainsafia
authored
[automated] Merge branch 'release/8.0-rc1' => 'release/8.0' (#50150)
* Update dependencies from https://github.com/dotnet/arcade build 20230815.4 (#50113) Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.RemoteExecutor From Version 8.0.0-beta.23411.1 -> To Version 8.0.0-beta.23415.4 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * [release/8.0-rc1] [Blazor] Add APIs for "enhanced refresh" (#50124) * Add NavigationManager.Refresh() + tests * PR feedback * Add `forceReload` parameter --------- Co-authored-by: Mackinnon Buck <[email protected]> * Support resolving keyed services from DI in RDF and RDG (#50095) * Support resolving keyed services from DI in RDF and RDG * Address feedback from peer review * Support keyed services with different keys but same arg name --------- Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Mackinnon Buck <[email protected]> Co-authored-by: Safia Abdalla <[email protected]>
1 parent 2d23609 commit 1a1a423

File tree

77 files changed

+648
-122
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+648
-122
lines changed

eng/Version.Details.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -372,26 +372,26 @@
372372
<Uri>https://github.com/dotnet/winforms</Uri>
373373
<Sha>5954c5fae2b4c0df34c3be658294b9289d02ac76</Sha>
374374
</Dependency>
375-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.23411.1">
375+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.23415.4">
376376
<Uri>https://github.com/dotnet/arcade</Uri>
377-
<Sha>9b2af35a6702526dc8a7c5fcadcc44efd0dca170</Sha>
377+
<Sha>46ff142f43e887d5f9a4d87ef39d72166f61db8d</Sha>
378378
<SourceBuild RepoName="arcade" ManagedOnly="true" />
379379
</Dependency>
380-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="8.0.0-beta.23411.1">
380+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="8.0.0-beta.23415.4">
381381
<Uri>https://github.com/dotnet/arcade</Uri>
382-
<Sha>9b2af35a6702526dc8a7c5fcadcc44efd0dca170</Sha>
382+
<Sha>46ff142f43e887d5f9a4d87ef39d72166f61db8d</Sha>
383383
</Dependency>
384-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="8.0.0-beta.23411.1">
384+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="8.0.0-beta.23415.4">
385385
<Uri>https://github.com/dotnet/arcade</Uri>
386-
<Sha>9b2af35a6702526dc8a7c5fcadcc44efd0dca170</Sha>
386+
<Sha>46ff142f43e887d5f9a4d87ef39d72166f61db8d</Sha>
387387
</Dependency>
388-
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="8.0.0-beta.23411.1">
388+
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="8.0.0-beta.23415.4">
389389
<Uri>https://github.com/dotnet/arcade</Uri>
390-
<Sha>9b2af35a6702526dc8a7c5fcadcc44efd0dca170</Sha>
390+
<Sha>46ff142f43e887d5f9a4d87ef39d72166f61db8d</Sha>
391391
</Dependency>
392-
<Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="8.0.0-beta.23411.1">
392+
<Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="8.0.0-beta.23415.4">
393393
<Uri>https://github.com/dotnet/arcade</Uri>
394-
<Sha>9b2af35a6702526dc8a7c5fcadcc44efd0dca170</Sha>
394+
<Sha>46ff142f43e887d5f9a4d87ef39d72166f61db8d</Sha>
395395
</Dependency>
396396
<Dependency Name="Microsoft.Extensions.Telemetry.Testing" Version="9.0.0-alpha.1.23416.6">
397397
<Uri>https://github.com/dotnet/extensions</Uri>

eng/Versions.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,9 @@
158158
<NuGetVersioningVersion>6.2.4</NuGetVersioningVersion>
159159
<NuGetFrameworksVersion>6.2.4</NuGetFrameworksVersion>
160160
<!-- Packages from dotnet/arcade -->
161-
<MicrosoftDotNetBuildTasksInstallersVersion>8.0.0-beta.23411.1</MicrosoftDotNetBuildTasksInstallersVersion>
162-
<MicrosoftDotNetBuildTasksTemplatingVersion>8.0.0-beta.23411.1</MicrosoftDotNetBuildTasksTemplatingVersion>
163-
<MicrosoftDotNetRemoteExecutorVersion>8.0.0-beta.23411.1</MicrosoftDotNetRemoteExecutorVersion>
161+
<MicrosoftDotNetBuildTasksInstallersVersion>8.0.0-beta.23415.4</MicrosoftDotNetBuildTasksInstallersVersion>
162+
<MicrosoftDotNetBuildTasksTemplatingVersion>8.0.0-beta.23415.4</MicrosoftDotNetBuildTasksTemplatingVersion>
163+
<MicrosoftDotNetRemoteExecutorVersion>8.0.0-beta.23415.4</MicrosoftDotNetRemoteExecutorVersion>
164164
<!-- Packages from dotnet/source-build-externals -->
165165
<MicrosoftSourceBuildIntermediatesourcebuildexternalsVersion>8.0.0-alpha.1.23410.1</MicrosoftSourceBuildIntermediatesourcebuildexternalsVersion>
166166
<!-- Packages from dotnet/source-build-reference-packages -->

eng/common/SetupNugetSources.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ if ($dotnet31Source -ne $null) {
153153
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
154154
}
155155

156-
$dotnetVersions = @('5','6','7')
156+
$dotnetVersions = @('5','6','7','8')
157157

158158
foreach ($dotnetVersion in $dotnetVersions) {
159159
$feedPrefix = "dotnet" + $dotnetVersion;

eng/common/SetupNugetSources.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ if [ "$?" == "0" ]; then
105105
PackageSources+=('dotnet3.1-internal-transport')
106106
fi
107107

108-
DotNetVersions=('5' '6' '7')
108+
DotNetVersions=('5' '6' '7' '8')
109109

110110
for DotNetVersion in ${DotNetVersions[@]} ; do
111111
FeedPrefix="dotnet${DotNetVersion}";

eng/common/native/init-distro-rid.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ getNonPortableDistroRid()
7979
# Input:
8080
# os: (str)
8181
# arch: (str)
82-
# isPortable: (int)
8382
# rootfsDir?: (nullable:string)
8483
#
8584
# Return:
@@ -97,10 +96,9 @@ initDistroRidGlobal()
9796
{
9897
local targetOs="$1"
9998
local targetArch="$2"
100-
local isPortable="$3"
10199
local rootfsDir=""
102-
if [ "$#" -ge 4 ]; then
103-
rootfsDir="$4"
100+
if [ "$#" -ge 3 ]; then
101+
rootfsDir="$3"
104102
fi
105103

106104
if [ -n "${rootfsDir}" ]; then
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<#
2+
.SYNOPSIS
3+
Install and run the 'Microsoft.DotNet.VersionTools.Cli' tool with the 'trim-artifacts-version' command to trim the version from the NuGet assets file name.
4+
5+
.PARAMETER InputPath
6+
Full path to directory where artifact packages are stored
7+
8+
.PARAMETER Recursive
9+
Search for NuGet packages recursively
10+
11+
#>
12+
13+
Param(
14+
[string] $InputPath,
15+
[bool] $Recursive = $true
16+
)
17+
18+
$CliToolName = "Microsoft.DotNet.VersionTools.Cli"
19+
20+
function Install-VersionTools-Cli {
21+
param(
22+
[Parameter(Mandatory=$true)][string]$Version
23+
)
24+
25+
Write-Host "Installing the package '$CliToolName' with a version of '$version' ..."
26+
$feed = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json"
27+
28+
$argumentList = @("tool", "install", "--local", "$CliToolName", "--add-source $feed", "--no-cache", "--version $Version")
29+
Start-Process "$dotnet" -Verbose -ArgumentList $argumentList -NoNewWindow -Wait
30+
}
31+
32+
# -------------------------------------------------------------------
33+
34+
if (!(Test-Path $InputPath)) {
35+
Write-Host "Input Path '$InputPath' does not exist"
36+
ExitWithExitCode 1
37+
}
38+
39+
$ErrorActionPreference = 'Stop'
40+
Set-StrictMode -Version 2.0
41+
42+
$disableConfigureToolsetImport = $true
43+
$global:LASTEXITCODE = 0
44+
45+
# `tools.ps1` checks $ci to perform some actions. Since the SDL
46+
# scripts don't necessarily execute in the same agent that run the
47+
# build.ps1/sh script this variable isn't automatically set.
48+
$ci = $true
49+
. $PSScriptRoot\..\tools.ps1
50+
51+
try {
52+
$dotnetRoot = InitializeDotNetCli -install:$true
53+
$dotnet = "$dotnetRoot\dotnet.exe"
54+
55+
$toolsetVersion = Read-ArcadeSdkVersion
56+
Install-VersionTools-Cli -Version $toolsetVersion
57+
58+
$cliToolFound = (& "$dotnet" tool list --local | Where-Object {$_.Split(' ')[0] -eq $CliToolName})
59+
if ($null -eq $cliToolFound) {
60+
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "The '$CliToolName' tool is not installed."
61+
ExitWithExitCode 1
62+
}
63+
64+
Exec-BlockVerbosely {
65+
& "$dotnet" $CliToolName trim-assets-version `
66+
--assets-path $InputPath `
67+
--recursive $Recursive
68+
Exit-IfNZEC "Sdl"
69+
}
70+
}
71+
catch {
72+
Write-Host $_
73+
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_
74+
ExitWithExitCode 1
75+
}

eng/common/tools.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,14 +671,18 @@ function InitializeNativeTools() {
671671
}
672672
}
673673

674+
function Read-ArcadeSdkVersion() {
675+
return $GlobalJson.'msbuild-sdks'.'Microsoft.DotNet.Arcade.Sdk'
676+
}
677+
674678
function InitializeToolset() {
675679
if (Test-Path variable:global:_ToolsetBuildProj) {
676680
return $global:_ToolsetBuildProj
677681
}
678682

679683
$nugetCache = GetNuGetPackageCachePath
680684

681-
$toolsetVersion = $GlobalJson.'msbuild-sdks'.'Microsoft.DotNet.Arcade.Sdk'
685+
$toolsetVersion = Read-ArcadeSdkVersion
682686
$toolsetLocationFile = Join-Path $ToolsetDir "$toolsetVersion.txt"
683687

684688
if (Test-Path $toolsetLocationFile) {

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
},
2828
"msbuild-sdks": {
2929
"Yarn.MSBuild": "1.22.10",
30-
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23411.1",
31-
"Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23411.1"
30+
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23415.4",
31+
"Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23415.4"
3232
}
3333
}

src/Components/Components/src/NavigationManager.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,17 @@ protected virtual void NavigateToCore([StringSyntax(StringSyntaxAttribute.Uri)]
166166
protected virtual void NavigateToCore([StringSyntax(StringSyntaxAttribute.Uri)] string uri, NavigationOptions options) =>
167167
throw new NotImplementedException($"The type {GetType().FullName} does not support supplying {nameof(NavigationOptions)}. To add support, that type should override {nameof(NavigateToCore)}(string uri, {nameof(NavigationOptions)} options).");
168168

169+
/// <summary>
170+
/// Refreshes the current page via request to the server.
171+
/// </summary>
172+
/// <remarks>
173+
/// If <paramref name="forceReload"/> is <c>true</c>, a full page reload will always be performed.
174+
/// Otherwise, the response HTML may be merged with the document's existing HTML to preserve client-side state,
175+
/// falling back on a full page reload if necessary.
176+
/// </remarks>
177+
public virtual void Refresh(bool forceReload = false)
178+
=> NavigateTo(Uri, forceLoad: true, replace: true);
179+
169180
/// <summary>
170181
/// Called to initialize BaseURI and current URI before these values are used for the first time.
171182
/// Override <see cref="EnsureInitialized" /> and call this method to dynamically calculate these values.

src/Components/Components/src/PublicAPI.Unshipped.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ static Microsoft.AspNetCore.Components.SupplyParameterFromQueryProviderServiceCo
101101
static Microsoft.Extensions.DependencyInjection.CascadingValueServiceCollectionExtensions.AddCascadingValue<TValue>(this Microsoft.Extensions.DependencyInjection.IServiceCollection! serviceCollection, string! name, System.Func<System.IServiceProvider!, TValue>! valueFactory) -> Microsoft.Extensions.DependencyInjection.IServiceCollection!
102102
static Microsoft.Extensions.DependencyInjection.CascadingValueServiceCollectionExtensions.AddCascadingValue<TValue>(this Microsoft.Extensions.DependencyInjection.IServiceCollection! serviceCollection, System.Func<System.IServiceProvider!, Microsoft.AspNetCore.Components.CascadingValueSource<TValue>!>! sourceFactory) -> Microsoft.Extensions.DependencyInjection.IServiceCollection!
103103
static Microsoft.Extensions.DependencyInjection.CascadingValueServiceCollectionExtensions.AddCascadingValue<TValue>(this Microsoft.Extensions.DependencyInjection.IServiceCollection! serviceCollection, System.Func<System.IServiceProvider!, TValue>! valueFactory) -> Microsoft.Extensions.DependencyInjection.IServiceCollection!
104+
virtual Microsoft.AspNetCore.Components.NavigationManager.Refresh(bool forceReload = false) -> void
104105
virtual Microsoft.AspNetCore.Components.Rendering.ComponentState.DisposeAsync() -> System.Threading.Tasks.ValueTask
105106
virtual Microsoft.AspNetCore.Components.RenderTree.Renderer.AddPendingTask(Microsoft.AspNetCore.Components.Rendering.ComponentState? componentState, System.Threading.Tasks.Task! task) -> void
106107
virtual Microsoft.AspNetCore.Components.RenderTree.Renderer.CreateComponentState(int componentId, Microsoft.AspNetCore.Components.IComponent! component, Microsoft.AspNetCore.Components.Rendering.ComponentState? parentComponentState) -> Microsoft.AspNetCore.Components.Rendering.ComponentState!

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,25 @@ async Task PerformNavigationAsync()
117117
}
118118
}
119119

120+
/// <inheritdoc />
121+
public override void Refresh(bool forceReload = false)
122+
{
123+
_ = RefreshAsync();
124+
125+
async Task RefreshAsync()
126+
{
127+
try
128+
{
129+
await _jsRuntime.InvokeVoidAsync(Interop.Refresh, forceReload);
130+
}
131+
catch (Exception ex)
132+
{
133+
Log.RefreshFailed(_logger, ex);
134+
UnhandledException?.Invoke(this, ex);
135+
}
136+
}
137+
}
138+
120139
protected override void HandleLocationChangingHandlerException(Exception ex, LocationChangingContext context)
121140
{
122141
Log.NavigationFailed(_logger, context.TargetLocation, ex);
@@ -162,5 +181,8 @@ public static void RequestingNavigation(ILogger logger, string uri, NavigationOp
162181

163182
[LoggerMessage(4, LogLevel.Error, "Navigation failed when changing the location to {Uri}", EventName = "NavigationFailed")]
164183
public static partial void NavigationFailed(ILogger logger, string uri, Exception exception);
184+
185+
[LoggerMessage(5, LogLevel.Error, "Failed to refresh", EventName = "RefreshFailed")]
186+
public static partial void RefreshFailed(ILogger logger, Exception exception);
165187
}
166188
}

src/Components/Shared/src/BrowserNavigationManagerInterop.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ internal static class BrowserNavigationManagerInterop
1616

1717
public const string NavigateTo = Prefix + "navigateTo";
1818

19+
public const string Refresh = Prefix + "refresh";
20+
1921
public const string SetHasLocationChangingListeners = Prefix + "setHasLocationChangingListeners";
2022

2123
public const string ScrollToElement = Prefix + "scrollToElement";

src/Components/Web.JS/dist/Release/blazor.server.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Components/Web.JS/dist/Release/blazor.web.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Components/Web.JS/dist/Release/blazor.webview.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Components/Web.JS/src/Platform/WebView/WebViewIpcReceiver.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ export function startIpcReceiver(): void {
4141

4242
'Navigate': navigationManagerFunctions.navigateTo,
4343

44+
'Refresh': navigationManagerFunctions.refresh,
45+
4446
'SetHasLocationChangingListeners': navigationManagerFunctions.setHasLocationChangingListeners,
4547

4648
'EndLocationChanging': navigationManagerFunctions.endLocationChanging,

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ export function attachProgressivelyEnhancedNavigationListener(callbacks: Navigat
4848
document.addEventListener('click', onDocumentClick);
4949
document.addEventListener('submit', onDocumentSubmit);
5050
window.addEventListener('popstate', onPopState);
51+
52+
attachProgrammaticEnhancedNavigationHandler(performProgrammaticEnhancedNavigation);
5153
}
5254

5355
export function detachProgressivelyEnhancedNavigationListener() {
@@ -57,10 +59,6 @@ export function detachProgressivelyEnhancedNavigationListener() {
5759
}
5860

5961
function performProgrammaticEnhancedNavigation(absoluteInternalHref: string, replace: boolean) {
60-
if (hasInteractiveRouter()) {
61-
return;
62-
}
63-
6462
if (replace) {
6563
history.replaceState(null, /* ignored title */ '', absoluteInternalHref);
6664
} else {
@@ -70,8 +68,6 @@ function performProgrammaticEnhancedNavigation(absoluteInternalHref: string, rep
7068
performEnhancedPageLoad(absoluteInternalHref);
7169
}
7270

73-
attachProgrammaticEnhancedNavigationHandler(performProgrammaticEnhancedNavigation);
74-
7571
function onDocumentClick(event: MouseEvent) {
7672
if (hasInteractiveRouter()) {
7773
return;

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export const internalFunctions = {
2525
setHasLocationChangingListeners,
2626
endLocationChanging,
2727
navigateTo: navigateToFromDotNet,
28+
refresh,
2829
getBaseURI: (): string => document.baseURI,
2930
getLocationHref: (): string => location.href,
3031
scrollToElement,
@@ -93,6 +94,14 @@ function performScrollToElementOnTheSamePage(absoluteHref : string, replace: boo
9394
scrollToElement(identifier);
9495
}
9596

97+
function refresh(forceReload: boolean): void {
98+
if (!forceReload && hasProgrammaticEnhancedNavigationHandler()) {
99+
performProgrammaticEnhancedNavigation(location.href, /* replace */ true);
100+
} else {
101+
location.reload();
102+
}
103+
}
104+
96105
// For back-compat, we need to accept multiple overloads
97106
export function navigateTo(uri: string, options: NavigationOptions): void;
98107
export function navigateTo(uri: string, forceLoad: boolean): void;

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ async Task PerformNavigationAsync()
7979
}
8080
}
8181

82+
/// <inheritdoc />
83+
public override void Refresh(bool forceReload = false)
84+
{
85+
DefaultWebAssemblyJSRuntime.Instance.InvokeVoid(Interop.Refresh, forceReload);
86+
}
87+
8288
protected override void HandleLocationChangingHandlerException(Exception ex, LocationChangingContext context)
8389
{
8490
Log.NavigationFailed(_logger, context.TargetLocation, ex);

src/Components/WebView/WebView/src/IpcCommon.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,6 @@ public enum OutgoingMessageType
7676
SendByteArrayToJS,
7777
SetHasLocationChangingListeners,
7878
EndLocationChanging,
79+
Refresh,
7980
}
8081
}

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
namespace Microsoft.AspNetCore.Components.WebView;
1010

11-
// Handles comunication between the component abstractions (Renderer, NavigationManager, JSInterop, etc.)
11+
// Handles communication between the component abstractions (Renderer, NavigationManager, JSInterop, etc.)
1212
// and the underlying transport channel
1313
internal sealed class IpcSender
1414
{
@@ -39,6 +39,11 @@ public void Navigate(string uri, NavigationOptions options)
3939
DispatchMessageWithErrorHandling(IpcCommon.Serialize(IpcCommon.OutgoingMessageType.Navigate, uri, options));
4040
}
4141

42+
public void Refresh(bool forceReload)
43+
{
44+
DispatchMessageWithErrorHandling(IpcCommon.Serialize(IpcCommon.OutgoingMessageType.Refresh, forceReload));
45+
}
46+
4247
public void AttachToDocument(int componentId, string selector)
4348
{
4449
DispatchMessageWithErrorHandling(IpcCommon.Serialize(IpcCommon.OutgoingMessageType.AttachToDocument, componentId, selector));

src/Components/WebView/WebView/src/Services/WebViewNavigationManager.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ async Task PerformNavigationAsync()
8484
}
8585
}
8686

87+
/// <inheritdoc />
88+
public override void Refresh(bool forceReload = false)
89+
{
90+
_ipcSender.Refresh(forceReload);
91+
}
92+
8793
protected override void HandleLocationChangingHandlerException(Exception ex, LocationChangingContext context)
8894
{
8995
Log.NavigationFailed(_logger, context.TargetLocation, ex);

0 commit comments

Comments
 (0)