public AssotiativeValuesTable UploadXmlFile()
        {
            string str = this._helperService.ConvertStreamToString(Request.Form.Files[0].OpenReadStream());
            AssotiativeValuesTable result = this._xmlService.DeserializeAssotiativeValuesTableArray(str);

            return(result);
        }
        public ContentResult SaveXmlFile([FromBody] AssotiativeValuesTable request)
        {
            string        xmlString = this._xmlService.SerializeToXml(request);
            ContentResult result    = new ContentResult();

            result.Content     = xmlString;
            result.ContentType = "application/xml";
            result.StatusCode  = 200;
            return(result);
        }
        public ContentResult Index([FromBody] AssotiativeValuesTable request)
        {
            string        jsonString = this._jsonService.SerializeToJson(request);
            ContentResult result     = new ContentResult();

            result.Content     = jsonString;
            result.ContentType = "application/json";
            result.StatusCode  = 200;
            return(result);
        }
Exemplo n.º 4
0
        public AssotiativeValuesTable DeserializeAssotiativeValuesTableArray(string json)
        {
            AssotiativeValuesTable result = JsonConvert.DeserializeObject <AssotiativeValuesTable>(json);

            return(result);
        }