예제 #1
0
 public Task <IdentityResult> DeleteAsync(Models.IdentityModels.IdentityUser user, CancellationToken cancellationToken)
 {
     _userCommands.Enqueue(new DeleteUserCommandModel {
         UserId = user.Id
     });
     return(Task.FromResult(IdentityResult.Success));
 }
예제 #2
0
 public Task <IdentityResult> CreateAsync(Models.IdentityModels.IdentityUser user, CancellationToken cancellationToken)
 {
     if (_user.TryAdd(user.Id, null))
     {
         while (_userCommands.TryDequeue(out var result))
         {
             _userCommands.Enqueue(result);
         }
         return(Task.FromResult(IdentityResult.Success));
     }
     throw new UserIdNotUniqueException();
 }
예제 #3
0
 public Task <IdentityResult> UpdateAsync(Models.IdentityModels.IdentityUser user, CancellationToken cancellationToken)
 {
     return(Task.FromResult(IdentityResult.Success));
 }
예제 #4
0
 public Task SetUserNameAsync(Models.IdentityModels.IdentityUser user, string userName, CancellationToken cancellationToken)
 {
     throw new NotImplementedException();
 }
예제 #5
0
 public Task <string> GetUserIdAsync(Models.IdentityModels.IdentityUser user, CancellationToken cancellationToken)
 {
     return(Task.FromResult(user.Id.ToString()));
 }
예제 #6
0
 public Task <string> GetNormalizedUserNameAsync(Models.IdentityModels.IdentityUser user, CancellationToken cancellationToken)
 {
     throw new NotImplementedException();
 }