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
|
{
|
|
|
/// <summary>
|
/// 获取当前记录
|
/// </summary>
|
public static List<SrcRecord> 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<DebugRecord>(jsonString);
|
var srcList = ConfigHelper.ObjectIds.Select(x => new SrcRecord(x, debugRecord)).ToList();
|
return srcList;
|
}
|
|
|
}
|
}
|