Ejemplo n.º 1
0
        public IActionResult CrispForIt(string @event, CrispRequestData data)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            _logger.LogInformation(
                0,
                $"{nameof(CrispController)} / 'It' received event '{{EventName}}'.",
                @event);

            // foreach (var keyValuePair in data)
            // {
            //     if (string.Equals(
            //         CrispConstants.EventBodyPropertyPath,
            //         keyValuePair.Key,
            //         StringComparison.OrdinalIgnoreCase))
            //     {
            //         continue;
            //     }

            //     _logger.LogInformation(
            //         1,
            //         "{FieldName}: {FieldValue}",
            //         keyValuePair.Key,
            //         keyValuePair.Value.ToString());
            // }

            return(Ok());
        }
Ejemplo n.º 2
0
        public IActionResult Crisp(string id, string @event, CrispRequestData data)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            _logger.LogInformation(
                2,
                $"{nameof(CrispController)} / '{{ReceiverId}}' received event " +
                "'{EventName}'.",
                id,
                @event);


            return(Ok());
        }