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

            return(result);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
ファイル: JsonService.cs プロジェクト: yan1998/Diagrams
        public AssotiativeValuesTable DeserializeAssotiativeValuesTableArray(string json)
        {
            AssotiativeValuesTable result = JsonConvert.DeserializeObject <AssotiativeValuesTable>(json);

            return(result);
        }