lixiaojun
2022-08-17 d3024a7b50b35a8f24c1bfe0f13f4f86cc63a253
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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;
        }
 
 
    }
}