Owneat Technical Guide main Help

Class CreateUserCommandHandler

Namespace: Identity.Application.Requests.Handlers.User
Assembly: Identity.Application.dll

Handler that execute the updating request.

public sealed class CreateUserCommandHandler : IRequestHandler<CreateUserCommand, Result<UserResponse>>

Inheritance

object ← CreateUserCommandHandler

Implements

IRequestHandler<CreateUserCommand, Result<UserResponse\>\>

Inherited Members

object.Equals\(object?\), object.Equals\(object?, object?\), object.GetHashCode\(\), object.GetType\(\), object.ReferenceEquals\(object?, object?\), object.ToString\(\)

Constructors

CreateUserCommandHandler\(IUserRepository, IPasswordHasher<User\>, IAuthorizationService, IUnitOfWork, IHttpContextAccessor\)

public CreateUserCommandHandler(IUserRepository userRepository, IPasswordHasher<User> passwordHasher, IAuthorizationService authorizationService, IUnitOfWork unitOfWork, IHttpContextAccessor httpContextAccessor)

Parameters

userRepository IUserRepository

passwordHasher IPasswordHasher < User \>

authorizationService IAuthorizationService

unitOfWork IUnitOfWork

httpContextAccessor IHttpContextAccessor

Methods

Handle\(CreateUserCommand, CancellationToken\)

Handles a request

public Task<Result<UserResponse>> Handle(CreateUserCommand command, CancellationToken cancellationToken)

Parameters

command CreateUserCommand

cancellationToken CancellationToken

Cancellation token

Returns

Task <Result< UserResponse \>\>

Response from the request

Last modified: 21 May 2024