终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

56 lines
1.6 KiB

  1. using System.Collections.Concurrent;
  2. namespace BPASmartClient.DATABUS
  3. {
  4. /// <summary>
  5. /// 数据总线
  6. /// </summary>
  7. public class Class_DataBus
  8. {
  9. #region 单例模式
  10. public static Class_DataBus dataBus = null;
  11. public static Class_DataBus GetInstance()
  12. {
  13. if (dataBus == null)
  14. {
  15. dataBus = new Class_DataBus();
  16. }
  17. return dataBus;
  18. }
  19. #endregion
  20. #region 基础配置
  21. #endregion
  22. #region 实时数据->大数据量
  23. public EventHandler BindingAction { get; set; }
  24. /// <summary>
  25. /// 绑定数据
  26. /// </summary>
  27. public Dictionary<string, object> Dic_RedisDataBinding=new Dictionary<string, object>();
  28. public void refreshDataAction(string Name)
  29. {
  30. BindingAction?.Invoke(Name,null);
  31. }
  32. /// <summary>
  33. /// 缓存Redis数据
  34. /// </summary>
  35. public ConcurrentDictionary<string, Dictionary<string, object>> Dic_RedisData = new ConcurrentDictionary<string, Dictionary<string, object>>();
  36. /// <summary>
  37. /// 缓存Redis数据相关类型
  38. /// </summary>
  39. public ConcurrentDictionary<string, Dictionary<string, string>> Dic_RedisDataType = new ConcurrentDictionary<string, Dictionary<string, string>>();
  40. /// <summary>
  41. /// API数据
  42. /// </summary>
  43. public ConcurrentDictionary<string,string> Dic_APIData = new ConcurrentDictionary<string,string>();
  44. #endregion
  45. #region 配置数据
  46. #endregion
  47. }
  48. }