using System; using System.Collections.Generic; using System.Linq; using DB.Entity; using DB.Service; using NewLife.Caching; namespace RfidWeb { public class BaseManager { protected AlarmDataService alarmDataService = new AlarmDataService(); protected ICache cache = Cache.Default; protected readonly int Max = 31; protected readonly TimeSpan timeOut = TimeSpan.FromSeconds(5); protected Dictionary GetDic(List list, string plcAb, string address) { var dicCha = list.Where(x => x.PlcAb == plcAb && x.Address == address && !string.IsNullOrEmpty(x.Msg)) .ToDictionary(x => x.No, x => x.Msg); return dicCha; } } }