namespace DataVAPI.ModelDataBus { /// /// 数据总线 /// public class DataBus { #region 单例模式 public static DataBus dataBus = null; public static DataBus GetInstance() { if (dataBus == null) { dataBus = new DataBus(); } return dataBus; } /// /// 显示定义构造函数为私有,表示只允许自己实例化自己 /// public DataBus() { } #endregion #region 公共函数 #endregion #region 公共变量 /// /// 数据库连接名称 /// public static string connStr = "mongodb://root:cygadmin@192.168.1.224:27017"; /// /// 数据库名称 /// public static string dbName = "iotdb"; public static string DeviceSecret = "c6a29788702b1146c7850adfbac0bc9a"; public static string DeviceName = "Transit_Test"; public static string ProductKey = "grgpECHSL7q"; #endregion } }