using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
|
namespace IStation.Server
|
{
|
/// <summary>
|
/// 常规实时测点缓存辅助类
|
/// </summary>
|
public class GeneralRealMonitorPointCacheHelper
|
{
|
|
private static List<GeneralRealMonitorPointModel> _cache = new List<GeneralRealMonitorPointModel>();
|
|
/// <summary>
|
/// 设置
|
/// </summary>
|
public static void Set(List<GeneralRealMonitorPointModel> list)
|
{
|
if (list == null || list.Count < 1)
|
{
|
_cache = new List<GeneralRealMonitorPointModel>();
|
return;
|
}
|
_cache = list;
|
}
|
|
|
/// <summary>
|
/// 获取
|
/// </summary>
|
public static List<GeneralRealMonitorPointModel> Get()
|
{
|
if (_cache == null)
|
{
|
_cache = new List<GeneralRealMonitorPointModel>();
|
}
|
return _cache;
|
}
|
|
|
}
|
}
|