Exemple #1
0
        public JsonPatchDocument <ApiProxyRequestModel> CreatePatch(ApiProxyRequestModel model)
        {
            var patch = new JsonPatchDocument <ApiProxyRequestModel>();

            patch.Replace(x => x.JSON, model.JSON);
            patch.Replace(x => x.Name, model.Name);
            return(patch);
        }
Exemple #2
0
        public virtual ApiProxyRequestModel MapResponseToRequest(
            ApiProxyResponseModel response)
        {
            var request = new ApiProxyRequestModel();

            request.SetProperties(
                response.JSON,
                response.Name);
            return(request);
        }
Exemple #3
0
        public virtual ApiProxyResponseModel MapRequestToResponse(
            string id,
            ApiProxyRequestModel request)
        {
            var response = new ApiProxyResponseModel();

            response.SetProperties(id,
                                   request.JSON,
                                   request.Name);
            return(response);
        }