コード例 #1
0
        private ServiceActionCall WrapActionCall(ActionCall call)
        {
            var outerCall = new ServiceActionCall(call);
            call.ReplaceWith(outerCall);

            var validationType = typeof(ServiceValidationBehaviour<>).MakeGenericType(outerCall.InputType());
            outerCall.WrapWith(validationType);

            var jsonBehaviourType = typeof(ServiceOutputRenderBehaviour<>).MakeGenericType(typeof(ServiceCommandOutput));
            var outputNode = new OutputNode(jsonBehaviourType);
            outerCall.AddToEnd(outputNode);
            return outerCall;
        }