|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- using System;
- using System.Collections.Concurrent;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
-
- namespace BPASmartClient.SCADAControl
- {
- /// <summary>
- /// 数据总线
- /// </summary>
- public class Class_DataBus
- {
- #region 单例模式
- public static Class_DataBus dataBus = null;
-
- public static Class_DataBus GetInstance()
- {
- if (dataBus == null)
- {
- dataBus = new Class_DataBus();
- }
- return dataBus;
- }
- #endregion
-
- #region 基础配置
-
- #endregion
-
- #region 实时数据->大数据量
- public EventHandler BindingAction { get; set; }
- /// <summary>
- /// 绑定数据
- /// </summary>
- public Dictionary<string, object> Dic_RedisDataBinding = new Dictionary<string, object>();
- /// <summary>
- /// 刷新数据
- /// </summary>
- /// <param name="Name"></param>
- public void refreshDataAction(string Name)
- {
- BindingAction?.Invoke(Name, null);
- }
- /// <summary>
- /// 缓存Redis数据
- /// </summary>
- public ConcurrentDictionary<string, Dictionary<string, object>> Dic_RedisData = new ConcurrentDictionary<string, Dictionary<string, object>>();
- /// <summary>
- /// 缓存Redis数据相关类型
- /// </summary>
- public ConcurrentDictionary<string, Dictionary<string, string>> Dic_RedisDataType = new ConcurrentDictionary<string, Dictionary<string, string>>();
- /// <summary>
- /// API数据
- /// </summary>
- public ConcurrentDictionary<string, string> Dic_APIData = new ConcurrentDictionary<string, string>();
- #endregion
-
- #region 配置数据
-
- #endregion
- }
- }
|