123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- using Newtonsoft.Json;
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace HTEXScan.Models
- {
- /**处理器**/
- class Processer
- {
- /**获取模板**/
- public static Template ReadTemplate(string path)
- {
- string s = System.IO.File.ReadAllText(path);
- try
- {
- return JsonConvert.DeserializeObject<Template>(s);
- }
- catch(Exception e)
- {
- }
- return null;
- }
- /**获得答案**/
- public static void GetResult(Data data)
- {
- File stream = new File();
- stream.Bind(data);
- stream.Read();
- }
- /**获得答案集合**/
- public static void GetResults(List<Data> datas)
- {
- for (int i = 0; i < datas.Count; i++)
- Processer.GetResult(datas[i]);
- }
- }
- }
|