8000 Merge pull request #61925 from vseanreesermsft/internal-merge-9.0-202… · dotnet/aspnetcore@90dc083 · GitHub
[go: up one dir, main page]

Skip to content

Commit 90dc083

Browse files
authored
Merge pull request #61925 from vseanreesermsft/internal-merge-9.0-2025-05-13-1503
Merging internal commits for release/9.0
2 parents fe77a32 + 3d6c910 commit 90dc083

File tree

9 files changed

+768
-738
lines changed

9 files changed

+768
-738
lines changed

NuGet.config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
<clear />
55
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
66
<!-- Begin: Package sources from dotnet-runtime -->
7+
<add key="darc-int-dotnet-runtime-e36e4d1" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-runtime-e36e4d1a/nuget/v3/index.json" />
78
<!-- End: Package sources from dotnet-runtime -->
89
<!-- Begin: Package sources from dotnet-efcore -->
10+
<add key="darc-int-dotnet-efcore-6765359" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-efcore-67653595/nuget/v3/index.json" />
911
<!-- End: Package sources from dotnet-efcore -->
1012
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
1113
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
@@ -28,8 +30,10 @@
2830
<clear />
2931
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
3032
<!-- Begin: Package sources from dotnet-efcore -->
33+
<add key="darc-int-dotnet-efcore-6765359" value="true" />
3134
<!-- End: Package sources from dotnet-efcore -->
3235
<!-- Begin: Package sources from dotnet-runtime -->
36+
<add key="darc-int-dotnet-runtime-e36e4d1" value="true" />
3337
<!-- End: Package sources from dotnet-runtime -->
3438
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
3539
</disabledPackageSources>

eng/Baseline.Designer.props

Lines changed: 388 additions & 388 deletions
Large diffs are not rendered by default.

eng/Baseline.xml

Lines changed: 106 additions & 106 deletions
Large diffs are not rendered by default.

eng/Version.Details.xml

Lines changed: 160 additions & 160 deletions
Large diffs are not rendered by default.

eng/Versions.props

Lines changed: 81 additions & 81 deletions
Large diffs are not rendered by default.

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"sdk": {
3-
"version": "9.0.105"
3+
"version": "9.0.106"
44
},
55
"tools": {
6-
"dotnet": "9.0.105",
6+
"dotnet": "9.0.106",
77
"runtimes": {
88
"dotnet/x86": [
99
"$(MicrosoftNETCoreBrowserDebugHostTransportVersion)"

src/Identity/EntityFrameworkCore/test/EF.Test/UserStoreTest.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ await Assert.ThrowsAsync<ArgumentNullException>("user",
144144
await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.GetTwoFactorEnabledAsync(null));
145145
await Assert.ThrowsAsync<ArgumentNullException>("user",
146146
async () => await store.SetTwoFactorEnabledAsync(null, true));
147+
await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.RedeemCodeAsync(user: null, code: "fake", default));
148+
await Assert.ThrowsAsync<ArgumentNullException>("code", async () => await store.RedeemCodeAsync(new IdentityUser("fake"), code: null, default));
149+
await Assert.ThrowsAsync<ArgumentException>("code", async () => await store.RedeemCodeAsync(new IdentityUser("fake"), code: "", default));
147150
await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.GetAccessFailedCountAsync(null));
148151
await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.GetLockoutEnabledAsync(null));
149152
await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.SetLockoutEnabledAsync(null, false));

src/Identity/Extensions.Stores/src/UserStoreBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,7 @@ public virtual async Task<bool> RedeemCodeAsync(TUser user, string code, Cancell
969969
ThrowIfDisposed();
970970

971971
ArgumentNullThrowHelper.ThrowIfNull(user);
972-
ArgumentNullThrowHelper.ThrowIfNull(code);
972+
ArgumentNullThrowHelper.ThrowIfNullOrEmpty(code);
973973

974974
var mergedCodes = await GetTokenAsync(user, InternalLoginProvider, RecoveryCodeTokenName, cancellationToken).ConfigureAwait(false) ?? "";
975975
var splitCodes = mergedCodes.Split(';');

src/Shared/ThrowHelpers/ArgumentNullThrowHelper.cs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,29 @@ public static void ThrowIfNull(
3030
#endif
3131
}
3232

33+
/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary>
34+
/// <param name="argument">The <see cref="string"/> argument to validate as non-null and non-empty.</param>
35+
/// <param name="paramName">The name of the parameter with which <paramref name="argument"/> corresponds.</param&g 341A t;
36+
public static void ThrowIfNullOrEmpty(
37+
#if INTERNAL_NULLABLE_ATTRIBUTES || NETSTANDARD2_1_OR_GREATER || NET5_0_OR_GREATER
38+
[NotNull]
39+
#endif
40+
string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
41+
{
42+
#if !NET7_0_OR_GREATER || NETSTANDARD || NETFRAMEWORK
43+
if (argument is null)
44< 8B67 /td>+
{
45+
Throw(paramName);
46+
}
47+
else if (argument.Length == 0)
48+
{
49+
throw new ArgumentException("Must not be null or empty", paramName);
50+
}
51+
#else
52+
ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
53+
#endif
54+
}
55+
3356
#if !NET7_0_OR_GREATER || NETSTANDARD || NETFRAMEWORK
3457
#if INTERNAL_NULLABLE_ATTRIBUTES || NETSTANDARD2_1_OR_GREATER || NET5_0_OR_GREATER
3558
[DoesNotReturn]

0 commit comments

Comments
 (0)
0