using System; using System.Linq; using System.Runtime.Serialization; namespace WCS.Entity.Protocol.DataStructure { /// /// 设备数据 /// /// [DataContract] public class DeviceDataCollection where T : DeviceData { /// /// 确认时间 /// [DataMember(Order = 3)] public DateTime Frame { get; set; } /// /// 数据集 /// [DataMember(Order = 4)] public T[] Datas { get; set; } /// /// 默认构造函数 /// public DeviceDataCollection() { } /// /// 构造函数 /// /// /// public DeviceDataCollection(DateTime frame, object[] datas) { this.Frame = frame; this.Datas = datas.OfType().ToArray(); } } }