|
@@ -123,15 +123,13 @@ namespace Electric.Domain.Manager.Identity
|
|
|
/// <param name="user"></param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public Task<string?> GetPasswordHashAsync(EleUser user, CancellationToken cancellationToken)
|
|
|
+ public Task<string> GetPasswordHashAsync(EleUser user, CancellationToken cancellationToken)
|
|
|
{
|
|
|
cancellationToken.ThrowIfCancellationRequested();
|
|
|
|
|
|
Check.NotNull(user, nameof(user));
|
|
|
|
|
|
-#pragma warning disable CS8619 // 值中的引用类型的为 Null 性与目标类型不匹配。
|
|
|
return Task.FromResult(user.PasswordHash);
|
|
|
-#pragma warning restore CS8619 // 值中的引用类型的为 Null 性与目标类型不匹配。
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -155,10 +153,8 @@ namespace Electric.Domain.Manager.Identity
|
|
|
/// <param name="user"></param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
-#pragma warning disable CS8613 // 返回类型中引用类型的为 Null 性与隐式实现的成员不匹配。
|
|
|
|
|
|
public Task<string> GetUserNameAsync(EleUser user, CancellationToken cancellationToken)
|
|
|
-#pragma warning restore CS8613 // 返回类型中引用类型的为 Null 性与隐式实现的成员不匹配。
|
|
|
{
|
|
|
cancellationToken.ThrowIfCancellationRequested();
|
|
|
|
|
@@ -189,7 +185,7 @@ namespace Electric.Domain.Manager.Identity
|
|
|
/// <param name="normalizedName"></param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public Task SetNormalizedUserNameAsync(EleUser user, string? normalizedName, CancellationToken cancellationToken)
|
|
|
+ public Task SetNormalizedUserNameAsync(EleUser user, string normalizedName, CancellationToken cancellationToken)
|
|
|
{
|
|
|
cancellationToken.ThrowIfCancellationRequested();
|
|
|
|
|
@@ -207,14 +203,12 @@ namespace Electric.Domain.Manager.Identity
|
|
|
/// <param name="passwordHash"></param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public Task SetPasswordHashAsync(EleUser user, string? passwordHash, CancellationToken cancellationToken)
|
|
|
+ public Task SetPasswordHashAsync(EleUser user, string passwordHash, CancellationToken cancellationToken)
|
|
|
{
|
|
|
cancellationToken.ThrowIfCancellationRequested();
|
|
|
|
|
|
Check.NotNull(user, nameof(user));
|
|
|
-#pragma warning disable CS8604 // 引用类型参数可能为 null。
|
|
|
user.SetPasswordHash(passwordHash);
|
|
|
-#pragma warning restore CS8604 // 引用类型参数可能为 null。
|
|
|
|
|
|
return Task.CompletedTask;
|
|
|
}
|
|
@@ -226,7 +220,7 @@ namespace Electric.Domain.Manager.Identity
|
|
|
/// <param name="userName"></param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public Task SetUserNameAsync(EleUser user, string? userName, CancellationToken cancellationToken)
|
|
|
+ public Task SetUserNameAsync(EleUser user, string userName, CancellationToken cancellationToken)
|
|
|
{
|
|
|
cancellationToken.ThrowIfCancellationRequested();
|
|
|
|