using IStation.Untity; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace IStation.DataProvider { internal class JsonStore { /// /// 获取当前记录 /// public static List GetCurrentRecord() { var testDataFolder = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, ConfigHelper.TestDataFolder); var index = new Random().Next(1,10); var filePath = Path.Combine(testDataFolder,index.ToString()+".txt"); var jsonString = FileHelper.ReadAllText(filePath); var debugRecord = JsonHelper.Json2Object(jsonString); var srcList = ConfigHelper.ObjectIds.Select(x => new SrcRecord(x, debugRecord)).ToList(); return srcList; } } }