ningshuxia
2022-11-14 e4680615a852b2eb115b32c8bcbc3b788c3f9ef4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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;
        }
 
 
    }
}