コード例 #1
0
        public IActionResult SendWarning()
        {
            var messageProcessor = new Logic.MessageProcessor();
            var response = messageProcessor.SendMessage("warning", "This is a warning");
            if (response == StatusCodes.Status200OK)
                return Ok("Message Sent");

            return BadRequest("Message Not Sent");
        }
コード例 #2
0
        public IActionResult SendError()
        {
            var messageProcessor = new Logic.MessageProcessor();
            var response = messageProcessor.SendMessage("error", "This is a error message");
            if (response == StatusCodes.Status200OK)
                return Ok("Message sent");

            return BadRequest("Message Not Sent");
        }