Skip to content

Commit 8da7b81

Browse files
wtgodbedotnet-maestro[bot]github-actions[bot]BrennanConroyJamesNK
authored
[automated] Merge branch 'release/6.0-rc1' => 'release/6.0' (#35646)
* Update dependencies from https://github.com/dotnet/efcore build 20210821.6 (#35617) Microsoft.EntityFrameworkCore.Tools , dotnet-ef , Microsoft.EntityFrameworkCore , Microsoft.EntityFrameworkCore.SqlServer , Microsoft.EntityFrameworkCore.InMemory , Microsoft.EntityFrameworkCore.Relational , Microsoft.EntityFrameworkCore.Sqlite , Microsoft.EntityFrameworkCore.Design From Version 6.0.0-rc.1.21420.45 -> To Version 6.0.0-rc.1.21421.6 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Update docker container to mcr (#35630) Co-authored-by: Brennan <[email protected]> * [release/6.0-rc1] Update dependencies from dotnet/runtime dotnet/efcore (#35634) [release/6.0-rc1] Update dependencies from dotnet/runtime dotnet/efcore * [release/6.0-rc1] HTTP/3: Response drain timeout (#35492) - backport of #35322 to release/6.0-rc1 * [release/6.0-rc1] Reliability improvement for input date E2E tests (#35616) * Reliability improvement for input date E2E tests * Avoid "collection was modified" error in CircuitGracefulTerminationTests * Avoid timing issues in CanFocusDuringOnAfterRenderAsyncWithFocusInEvent * Update src/Components/test/E2ETest/Tests/FormsTest.cs Co-authored-by: Tanay Parikh <[email protected]> * Remove notes from earlier Co-authored-by: Steve Sanderson <[email protected]> Co-authored-by: Tanay Parikh <[email protected]> * Minimal APIs naming cleanup * Add Support for `DateOnly` & `TimeOnly` for `SupplyParameterFromQuery` Fixes: #35525 API Proposal: #35567 * Add FailureReasons (#35425) * Add support for Results extension point 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: Brennan <[email protected]> Co-authored-by: James Newton-King <[email protected]> Co-authored-by: Steve Sanderson <[email protected]> Co-authored-by: Tanay Parikh <[email protected]> Co-authored-by: Stephen Halter <[email protected]> Co-authored-by: Tanay Parikh <[email protected]> Co-authored-by: Hao Kung <[email protected]> Co-authored-by: Safia Abdalla <[email protected]> Co-authored-by: Doug Bunting <[email protected]>
2 parents 057ed19 + debe91c commit 8da7b81

File tree

68 files changed

+837
-312
lines changed

Some content is hidden

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

68 files changed

+837
-312
lines changed

eng/docker/bionic.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM microsoft/dotnet:2.1-runtime-deps-bionic
1+
FROM mcr.microsoft.com/dotnet/runtime-deps:2.1-bionic
22

33
ARG USER
44
ARG USER_ID

src/Components/Components/src/NavigationManagerExtensions.cs

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ public static class NavigationManagerExtensions
2828
[typeof(string)] = value => Format((string)value)!,
2929
[typeof(bool)] = value => Format((bool)value),
3030
[typeof(DateTime)] = value => Format((DateTime)value),
31+
[typeof(DateOnly)] = value => Format((DateOnly)value),
32+
[typeof(TimeOnly)] = value => Format((TimeOnly)value),
3133
[typeof(decimal)] = value => Format((decimal)value),
3234
[typeof(double)] = value => Format((double)value),
3335
[typeof(float)] = value => Format((float)value),
@@ -51,6 +53,18 @@ private static string Format(DateTime value)
5153
private static string? Format(DateTime? value)
5254
=> value?.ToString(CultureInfo.InvariantCulture);
5355

56+
private static string Format(DateOnly value)
57+
=> value.ToString(CultureInfo.InvariantCulture);
58+
59+
private static string? Format(DateOnly? value)
60+
=> value?.ToString(CultureInfo.InvariantCulture);
61+
62+
private static string Format(TimeOnly value)
63+
=> value.ToString(CultureInfo.InvariantCulture);
64+
65+
private static string? Format(TimeOnly? value)
66+
=> value?.ToString(CultureInfo.InvariantCulture);
67+
5468
private static string Format(decimal value)
5569
=> value.ToString(CultureInfo.InvariantCulture);
5670

@@ -289,6 +303,54 @@ public static string GetUriWithQueryParameter(this NavigationManager navigationM
289303
public static string GetUriWithQueryParameter(this NavigationManager navigationManager, string name, DateTime? value)
290304
=> GetUriWithQueryParameter(navigationManager, name, Format(value));
291305

306+
/// <summary>
307+
/// Returns a URI that is constructed by updating <see cref="NavigationManager.Uri"/> with a single parameter
308+
/// added or updated.
309+
/// </summary>
310+
/// <param name="navigationManager">The <see cref="NavigationManager"/>.</param>
311+
/// <param name="name">The name of the parameter to add or update.</param>
312+
/// <param name="value">The value of the parameter to add or update.</param>
313+
public static string GetUriWithQueryParameter(this NavigationManager navigationManager, string name, DateOnly value)
314+
=> GetUriWithQueryParameter(navigationManager, name, Format(value));
315+
316+
/// <summary>
317+
/// Returns a URI that is constructed by updating <see cref="NavigationManager.Uri"/> with a single parameter
318+
/// added, updated, or removed.
319+
/// </summary>
320+
/// <param name="navigationManager">The <see cref="NavigationManager"/>.</param>
321+
/// <param name="name">The name of the parameter to add or update.</param>
322+
/// <param name="value">The value of the parameter to add or update.</param>
323+
/// <remarks>
324+
/// If <paramref name="value"/> is <c>null</c>, the parameter will be removed if it exists in the URI.
325+
/// Otherwise, it will be added or updated.
326+
/// </remarks>
327+
public static string GetUriWithQueryParameter(this NavigationManager navigationManager, string name, DateOnly? value)
328+
=> GetUriWithQueryParameter(navigationManager, name, Format(value));
329+
330+
/// <summary>
331+
/// Returns a URI that is constructed by updating <see cref="NavigationManager.Uri"/> with a single parameter
332+
/// added or updated.
333+
/// </summary>
334+
/// <param name="navigationManager">The <see cref="NavigationManager"/>.</param>
335+
/// <param name="name">The name of the parameter to add or update.</param>
336+
/// <param name="value">The value of the parameter to add or update.</param>
337+
public static string GetUriWithQueryParameter(this NavigationManager navigationManager, string name, TimeOnly value)
338+
=> GetUriWithQueryParameter(navigationManager, name, Format(value));
339+
340+
/// <summary>
341+
/// Returns a URI that is constructed by updating <see cref="NavigationManager.Uri"/> with a single parameter
342+
/// added, updated, or removed.
343+
/// </summary>
344+
/// <param name="navigationManager">The <see cref="NavigationManager"/>.</param>
345+
/// <param name="name">The name of the parameter to add or update.</param>
346+
/// <param name="value">The value of the parameter to add or update.</param>
347+
/// <remarks>
348+
/// If <paramref name="value"/> is <c>null</c>, the parameter will be removed if it exists in the URI.
349+
/// Otherwise, it will be added or updated.
350+
/// </remarks>
351+
public static string GetUriWithQueryParameter(this NavigationManager navigationManager, string name, TimeOnly? value)
352+
=> GetUriWithQueryParameter(navigationManager, name, Format(value));
353+
292354
/// <summary>
293355
/// Returns a URI that is constructed by updating <see cref="NavigationManager.Uri"/> with a single parameter
294356
/// added or updated.

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ static Microsoft.AspNetCore.Components.EventCallbackFactoryBinderExtensions.Crea
9191
static Microsoft.AspNetCore.Components.EventCallbackFactoryBinderExtensions.CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory! factory, object! receiver, System.Action<System.TimeOnly?>! setter, System.TimeOnly? existingValue, string! format, System.Globalization.CultureInfo? culture = null) -> Microsoft.AspNetCore.Components.EventCallback<Microsoft.AspNetCore.Components.ChangeEventArgs!>
9292
static Microsoft.AspNetCore.Components.NavigationManagerExtensions.GetUriWithQueryParameter(this Microsoft.AspNetCore.Components.NavigationManager! navigationManager, string! name, System.DateTime value) -> string!
9393
static Microsoft.AspNetCore.Components.NavigationManagerExtensions.GetUriWithQueryParameter(this Microsoft.AspNetCore.Components.NavigationManager! navigationManager, string! name, System.DateTime? value) -> string!
94+
static Microsoft.AspNetCore.Components.NavigationManagerExtensions.GetUriWithQueryParameter(this Microsoft.AspNetCore.Components.NavigationManager! navigationManager, string! name, System.DateOnly value) -> string!
95+
static Microsoft.AspNetCore.Components.NavigationManagerExtensions.GetUriWithQueryParameter(this Microsoft.AspNetCore.Components.NavigationManager! navigationManager, string! name, System.DateOnly? value) -> string!
96+
static Microsoft.AspNetCore.Components.NavigationManagerExtensions.GetUriWithQueryParameter(this Microsoft.AspNetCore.Components.NavigationManager! navigationManager, string! name, System.TimeOnly value) -> string!
97+
static Microsoft.AspNetCore.Components.NavigationManagerExtensions.GetUriWithQueryParameter(this Microsoft.AspNetCore.Components.NavigationManager! navigationManager, string! name, System.TimeOnly? value) -> string!
9498
static Microsoft.AspNetCore.Components.NavigationManagerExtensions.GetUriWithQueryParameter(this Microsoft.AspNetCore.Components.NavigationManager! navigationManager, string! name, System.Guid value) -> string!
9599
static Microsoft.AspNetCore.Components.NavigationManagerExtensions.GetUriWithQueryParameter(this Microsoft.AspNetCore.Components.NavigationManager! navigationManager, string! name, System.Guid? value) -> string!
96100
static Microsoft.AspNetCore.Components.NavigationManagerExtensions.GetUriWithQueryParameter(this Microsoft.AspNetCore.Components.NavigationManager! navigationManager, string! name, bool value) -> string!

src/Components/Components/src/Routing/UrlValueConstraint.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ private static bool TryParse(ReadOnlySpan<char> str, out string result)
4343
private static bool TryParse(ReadOnlySpan<char> str, out DateTime result)
4444
=> DateTime.TryParse(str, CultureInfo.InvariantCulture, DateTimeStyles.None, out result);
4545

46+
private static bool TryParse(ReadOnlySpan<char> str, out DateOnly result)
47+
=> DateOnly.TryParse(str, CultureInfo.InvariantCulture, DateTimeStyles.None, out result);
48+
49+
private static bool TryParse(ReadOnlySpan<char> str, out TimeOnly result)
50+
=> TimeOnly.TryParse(str, CultureInfo.InvariantCulture, DateTimeStyles.None, out result);
51+
4652
private static bool TryParse(ReadOnlySpan<char> str, out decimal result)
4753
=> decimal.TryParse(str, NumberStyles.Number, CultureInfo.InvariantCulture, out result);
4854

@@ -65,6 +71,10 @@ private static bool TryParse(ReadOnlySpan<char> str, out long result)
6571
var x when x == typeof(bool?) => new NullableTypedUrlValueConstraint<bool>(bool.TryParse),
6672
var x when x == typeof(DateTime) => new TypedUrlValueConstraint<DateTime>(TryParse),
6773
var x when x == typeof(DateTime?) => new NullableTypedUrlValueConstraint<DateTime>(TryParse),
74+
var x when x == typeof(DateOnly) => new TypedUrlValueConstraint<DateOnly>(TryParse),
75+
var x when x == typeof(DateOnly?) => new NullableTypedUrlValueConstraint<DateOnly>(TryParse),
76+
var x when x == typeof(TimeOnly) => new TypedUrlValueConstraint<TimeOnly>(TryParse),
77+
var x when x == typeof(TimeOnly?) => new NullableTypedUrlValueConstraint<TimeOnly>(TryParse),
6878
var x when x == typeof(decimal) => new TypedUrlValueConstraint<decimal>(TryParse),
6979
var x when x == typeof(decimal?) => new NullableTypedUrlValueConstraint<decimal>(TryParse),
7080
var x when x == typeof(double) => new TypedUrlValueConstraint<double>(TryParse),

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/test/E2ETest/ServerExecutionTests/CircuitGracefulTerminationTests.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ public async Task ReloadingThePage_GracefullyDisconnects_TheCurrentCircuit()
6363
await Task.WhenAny(Task.Delay(10000), GracefulDisconnectCompletionSource.Task);
6464

6565
// Assert
66-
Assert.Contains((Extensions.Logging.LogLevel.Debug, "CircuitTerminatedGracefully"), Messages);
67-
Assert.Contains((Extensions.Logging.LogLevel.Debug, "CircuitDisconnectedPermanently"), Messages);
66+
Assert.Contains((Extensions.Logging.LogLevel.Debug, "CircuitTerminatedGracefully"), Messages.ToArray());
67+
Assert.Contains((Extensions.Logging.LogLevel.Debug, "CircuitDisconnectedPermanently"), Messages.ToArray());
6868
}
6969

7070
[Fact]
@@ -76,8 +76,8 @@ public async Task ClosingTheBrowserWindow_GracefullyDisconnects_TheCurrentCircui
7676

7777
// Assert
7878
Assert.True(GracefulDisconnectCompletionSource.Task.IsCompletedSuccessfully);
79-
Assert.Contains((Extensions.Logging.LogLevel.Debug, "CircuitTerminatedGracefully"), Messages);
80-
Assert.Contains((Extensions.Logging.LogLevel.Debug, "CircuitDisconnectedPermanently"), Messages);
79+
Assert.Contains((Extensions.Logging.LogLevel.Debug, "CircuitTerminatedGracefully"), Messages.ToArray());
80+
Assert.Contains((Extensions.Logging.LogLevel.Debug, "CircuitDisconnectedPermanently"), Messages.ToArray());
8181
}
8282

8383
[Fact]
@@ -90,8 +90,8 @@ public async Task ClosingTheBrowserWindow_GracefullyDisconnects_WhenNavigatingAw
9090

9191
// Assert
9292
Assert.Equal(GracefulDisconnectCompletionSource.Task, task);
93-
Assert.Contains((Extensions.Logging.LogLevel.Debug, "CircuitTerminatedGracefully"), Messages);
94-
Assert.Contains((Extensions.Logging.LogLevel.Debug, "CircuitDisconnectedPermanently"), Messages);
93+
Assert.Contains((Extensions.Logging.LogLevel.Debug, "CircuitTerminatedGracefully"), Messages.ToArray());
94+
Assert.Contains((Extensions.Logging.LogLevel.Debug, "CircuitDisconnectedPermanently"), Messages.ToArray());
9595
}
9696

9797
[Fact]
@@ -103,8 +103,8 @@ public async Task NavigatingToProtocolLink_DoesNotGracefullyDisconnect_TheCurren
103103
await Task.WhenAny(Task.Delay(10000), GracefulDisconnectCompletionSource.Task);
104104

105105
// Assert
106-
Assert.DoesNotContain((Extensions.Logging.LogLevel.Debug, "CircuitTerminatedGracefully"), Messages);
107-
Assert.DoesNotContain((Extensions.Logging.LogLevel.Debug, "CircuitDisconnectedPermanently"), Messages);
106+
Assert.DoesNotContain((Extensions.Logging.LogLevel.Debug, "CircuitTerminatedGracefully"), Messages.ToArray());
107+
Assert.DoesNotContain((Extensions.Logging.LogLevel.Debug, "CircuitDisconnectedPermanently"), Messages.ToArray());
108108
}
109109

110110
[Fact]
@@ -116,8 +116,8 @@ public async Task DownloadAction_DoesNotGracefullyDisconnect_TheCurrentCircuit()
116116
await Task.WhenAny(Task.Delay(10000), GracefulDisconnectCompletionSource.Task);
117117

118118
// Assert
119-
Assert.DoesNotContain((Extensions.Logging.LogLevel.Debug, "CircuitTerminatedGracefully"), Messages);
120-
Assert.DoesNotContain((Extensions.Logging.LogLevel.Debug, "CircuitDisconnectedPermanently"), Messages);
119+
Assert.DoesNotContain((Extensions.Logging.LogLevel.Debug, "CircuitTerminatedGracefully"), Messages.ToArray());
120+
Assert.DoesNotContain((Extensions.Logging.LogLevel.Debug, "CircuitDisconnectedPermanently"), Messages.ToArray());
121121
}
122122

123123
[Fact]
@@ -129,8 +129,8 @@ public async Task DownloadHref_DoesNotGracefullyDisconnect_TheCurrentCircuit()
129129
await Task.WhenAny(Task.Delay(10000), GracefulDisconnectCompletionSource.Task);
130130

131131
// Assert
132-
Assert.DoesNotContain((Extensions.Logging.LogLevel.Debug, "CircuitTerminatedGracefully"), Messages);
133-
Assert.DoesNotContain((Extensions.Logging.LogLevel.Debug, "CircuitDisconnectedPermanently"), Messages);
132+
Assert.DoesNotContain((Extensions.Logging.LogLevel.Debug, "CircuitTerminatedGracefully"), Messages.ToArray());
133+
Assert.DoesNotContain((Extensions.Logging.LogLevel.Debug, "CircuitDisconnectedPermanently"), Messages.ToArray());
134134
}
135135

136136
private void Log(WriteContext wc)

src/Components/test/E2ETest/Tests/ComponentRenderingTestBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ public void CanFocusDuringOnAfterRenderAsyncWithFocusInEvent(string triggerButto
485485
Browser.Equal("focus-input-onafterrender", () => Browser.SwitchTo().ActiveElement().GetAttribute("id"));
486486

487487
// As well as actually focusing and triggering the onfocusin event, we should not be seeing any errors
488-
var log = Browser.Manage().Logs.GetLog(LogType.Browser);
488+
var log = Browser.Manage().Logs.GetLog(LogType.Browser).ToArray();
489489
Assert.DoesNotContain(log, entry => entry.Level == LogLevel.Severe);
490490
}
491491

0 commit comments

Comments
 (0)