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.
 
 

48 lines
1.2 KiB

  1. namespace DataVAPI.ModelDataBus
  2. {
  3. /// <summary>
  4. /// 数据总线
  5. /// </summary>
  6. public class DataBus
  7. {
  8. #region 单例模式
  9. public static DataBus dataBus = null;
  10. public static DataBus GetInstance()
  11. {
  12. if (dataBus == null)
  13. {
  14. dataBus = new DataBus();
  15. }
  16. return dataBus;
  17. }
  18. /// <summary>
  19. /// 显示定义构造函数为私有,表示只允许自己实例化自己
  20. /// </summary>
  21. public DataBus()
  22. {
  23. }
  24. #endregion
  25. #region 公共函数
  26. #endregion
  27. #region 公共变量
  28. /// <summary>
  29. /// 数据库连接名称
  30. /// </summary>
  31. public static string connStr = "mongodb://root:cygadmin@192.168.1.224:27017";
  32. /// <summary>
  33. /// 数据库名称
  34. /// </summary>
  35. public static string dbName = "iotdb";
  36. public static string DeviceSecret = "c6a29788702b1146c7850adfbac0bc9a";
  37. public static string DeviceName = "Transit_Test";
  38. public static string ProductKey = "grgpECHSL7q";
  39. #endregion
  40. }
  41. }