using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ToolsClassLibrary { /// /// 传输数据 配置文件管理 /// /// [Serializable] public class SocketData { /// /// 文件名 /// public string FileKey { get; set; } /// /// string 测点ID /// double 测点数据 /// public Dictionary FileData { get; set; } /// /// 创建类本身 /// /// CSV文件名 /// 测点ID /// 测点数据 /// public static SocketData CreateUpdData(string fileName, string[] key, T[] val) { SocketData date = new SocketData(); if (key.Length == val.Length) { date.FileKey = fileName; date.FileData = new Dictionary(); for (int i = 0; i < key.Length; i++) { date.FileData.Add(key[i], val[i]); } } return date; } } }