Beispiel #1
0
 /// <summary>
 /// 自己单独处理保存数据接口
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="t"></param>
 /// <param name="fileName"></param>
 public void WriteFile <T>(T t, string fileName)
 {
     JsonHelper.SerializeFile(fileName, t);
 }
Beispiel #2
0
 /// <summary>
 /// 自己单独处理读取数据接口
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="fileName"></param>
 /// <returns></returns>
 public T ReadFile <T>(string fileName)
 {
     return(JsonHelper.DeserializeFile <T>(fileName));
 }