|
- using System.Collections.Concurrent;
-
- namespace BPASmartClient.DATABUS
- {
- /// <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>();
- 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
- }
- }
|