コード例 #1
0
        public async Task <string> CheckinClaim([FromUri] int projectId,
                                                [FromBody] CheckInCommand command)
        {
            var claim = await ClaimsRepository.GetClaim(projectId, command.ClaimId);

            if (claim == null)
            {
                throw new HttpResponseException(HttpStatusCode.NotFound);
            }
            await ClaimsService.CheckInClaim(projectId, command.ClaimId, command.MoneyPaid);

            return("OK");
        }
コード例 #2
0
        public async Task <ActionResult <CheckOutActivityResponseObj> > CheckInBook([FromBody] EditCheckOutActivityRequestObj requestObj)
        {
            CheckInCommand command  = _mapper.Map <CheckInCommand>(requestObj);
            var            response = await _mediator.Send(command);

            if (response.CheckOutActivityId < 1 || !response.Status.IsSuccessful)
            {
                return(BadRequest(response));
            }
            var locatioUri = _uriService.GetBookUri(response.CheckOutActivityId.ToString());

            return(Created(locatioUri, response));
        }
コード例 #3
0
        public async Task <ActionResult <string> > CheckinClaim([FromQuery]
                                                                int projectId,
                                                                [FromBody]
                                                                CheckInCommand command)
        {
            var claim = await ClaimsRepository.GetClaim(projectId, command.ClaimId);

            if (claim == null)
            {
                return(NotFound());
            }

            await ClaimsService.CheckInClaim(projectId, command.ClaimId, command.MoneyPaid);

            return("OK");
        }
コード例 #4
0
        public async Task <IActionResult> CheckIn([FromBody] CheckInCommand command)
        {
            await mediator.Send(command);

            return((IActionResult)Ok());
        }
コード例 #5
0
        /// <summary>
        /// The Check In Command
        ///
        /// The Poll Control Cluster server sends out a Check-in command to the devices to which it is paired based on the server’s Check-inInterval
        /// attribute. It does this to find out if any of the Poll Control Cluster Clients with which it is paired are interested in having it enter fast
        /// poll mode so that it can be managed. This request is sent out based on either the Check-inInterval, or the next Check-in value in the Fast Poll
        /// Stop Request generated by the Poll Control Cluster Client.
        /// <br>
        /// The Check-in command expects a Check-in Response command to be sent back from the Poll Control Client. If the Poll Control Server does not
        /// receive a Check-in response back from the Poll Control Client up to 7.68 seconds it is free to return to polling according to the
        /// LongPollInterval.
        ///
        /// <returns>The Task<CommandResult> command result Task</returns>
        /// </summary>
        public Task <CommandResult> CheckInCommand()
        {
            CheckInCommand command = new CheckInCommand();

            return(Send(command));
        }
コード例 #6
0
 public void SetUp()
 {
     _logger          = new FakeLogger();
     _capacityService = new FakeCapacityService();
     _sut             = new CheckInCommand(_capacityService);
 }