Пример #1
0
        public ActionResult ExportData()
        {
            string document = handler.ExportXMLDataAsync().Result;

            byte[] bytes = Encoding.Default.GetBytes(document);
            return(File(bytes, System.Net.Mime.MediaTypeNames.Application.Octet, ConfigurationManager.AppSettings["XMLFileName"]));
        }
Пример #2
0
 public void ExportXMLDataAsyncTest()
 {
     try
     {
         appiHandler = new APIHandler();
         CurvesData.LSTIndexInfo.Clear();
         CurvesData.LSTIndexInfo.Add(new CurveInfo()
         {
             Name = "A", MaxIndex = 123, MinIndex = 112
         });
         var t = appiHandler.ExportXMLDataAsync().Result;
     }
     catch (Exception ex)
     {
         Assert.Fail(ex.Message);
     }
 }