Exemple #1
0
        private static void HandlePayload(Payload payload)
        {
            var action = payload.actions.Single();

            switch (action.value)
            {
            case "success":
                Task.Run(() =>
                {
                    var handler = new HandleSuccess(payload);
                    handler.Handle();
                });
                break;

            default:
                throw new Exception($"We have no spoon for {action.value}");
            }
        }
        private HttpResponseMessage HandlePayload(Payload payload)
        {
            var action = payload.actions.Single();

            switch (action.value)
            {
            case "success":
                Task.Run(() =>
                {
                    var handler = new HandleSuccess(payload);
                    handler.Handle();
                });
                break;

            default:
                throw new Exception($"We have no spoon for {action.value}");
            }
            return(Request.CreateResponse(HttpStatusCode.OK));
        }