コード例 #1
0
        public JsonPatchDocument <ApiLibraryVariableSetRequestModel> CreatePatch(ApiLibraryVariableSetRequestModel model)
        {
            var patch = new JsonPatchDocument <ApiLibraryVariableSetRequestModel>();

            patch.Replace(x => x.ContentType, model.ContentType);
            patch.Replace(x => x.JSON, model.JSON);
            patch.Replace(x => x.Name, model.Name);
            patch.Replace(x => x.VariableSetId, model.VariableSetId);
            return(patch);
        }
コード例 #2
0
        public virtual ApiLibraryVariableSetRequestModel MapResponseToRequest(
            ApiLibraryVariableSetResponseModel response)
        {
            var request = new ApiLibraryVariableSetRequestModel();

            request.SetProperties(
                response.ContentType,
                response.JSON,
                response.Name,
                response.VariableSetId);
            return(request);
        }
コード例 #3
0
        public virtual ApiLibraryVariableSetResponseModel MapRequestToResponse(
            string id,
            ApiLibraryVariableSetRequestModel request)
        {
            var response = new ApiLibraryVariableSetResponseModel();

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