Use Compount Assignment to respect IDE0054 (#24202)

* Use Compount Assignment to respect IDE0054
This commit is contained in:
Youssef Victor 2020-07-24 22:54:58 +02:00 committed by GitHub
parent 990e639c08
commit 8b0f46c357
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -109,7 +109,7 @@ namespace Microsoft.AspNetCore.Identity.UI.V4.Pages.Account.Internal
ModelState.AddModelError(string.Empty, ErrorMessage);
}
returnUrl = returnUrl ?? Url.Content("~/");
returnUrl ??= Url.Content("~/");
// Clear the existing external cookie to ensure a clean login process
await HttpContext.SignOutAsync(IdentityConstants.ExternalScheme);
@ -121,7 +121,7 @@ namespace Microsoft.AspNetCore.Identity.UI.V4.Pages.Account.Internal
public override async Task<IActionResult> OnPostAsync(string returnUrl = null)
{
returnUrl = returnUrl ?? Url.Content("~/");
returnUrl ??= Url.Content("~/");
ExternalLogins = (await _signInManager.GetExternalAuthenticationSchemesAsync()).ToList();

View File

@ -126,7 +126,7 @@ namespace Microsoft.AspNetCore.Identity.UI.V4.Pages.Account.Internal
public override async Task<IActionResult> OnPostAsync(string returnUrl = null)
{
returnUrl = returnUrl ?? Url.Content("~/");
returnUrl ??= Url.Content("~/");
ExternalLogins = (await _signInManager.GetExternalAuthenticationSchemesAsync()).ToList();
if (ModelState.IsValid)
{