Exemplo n.º 1
0
 private string CheckUserName(string userName)
 {
     if (string.IsNullOrWhiteSpace(userName))
     {
         //get from current loggied in user
         var userId = _apiIdentity.GetUserName();
         userName = string.IsNullOrWhiteSpace(userId) ? throw new ArgumentNullException(nameof(userName)) : userId;
     }
     return(userName);
 }
Exemplo n.º 2
0
 public ApproveRejectAdoProjectAccessIdsCommandHandler
 (
     IProjectAdoServices projectAdoServices,
     IAdoProjectAccessRepository adoProjectAccessRepository,
     IMapper mapper,
     IApiIdentity apiIdentity,
     ILogger <ApproveRejectAdoProjectAccessIdsCommandHandler> logger
 )
 {
     _projectAdoServices         = projectAdoServices;
     _adoProjectAccessRepository = adoProjectAccessRepository;
     _mapper = mapper;
     _userId = apiIdentity.GetUserName();
     _logger = logger;
     //com 5 06
 }
Exemplo n.º 3
0
 public VmOperationExecuteCommandHandler(
     IConfiguration configuration,
     IApiIdentity apiIdentity,
     IVmSdkService vmSdkService,
     IMessageBus messageBus,
     IVmTicketRepository repository,
     IVmTicketHistoryRepository vmTicketHistoryRepository,
     ILogger <VmOperationExecuteCommandHandler> logger)
 {
     _userId       = apiIdentity.GetUserName();
     _vmSdkService = vmSdkService;
     _messageBus   = messageBus;
     _repository   = repository;
     _vmTicketHistoryRepository = vmTicketHistoryRepository;
     _logger           = logger;
     _serviceBusConfig = configuration.GetSection(nameof(ServiceBusConfig)).Get <ServiceBusConfig>();
 }