示例#1
0
 public static bool IsPrimary(this SensorConfig config, string path, bool primary)
 {
     return(config.PrimarySensors.GetOrAdd(path, primary));
 }
示例#2
0
 public static void AddOrUpdatePrimary(this SensorConfig config, string path, bool primary)
 {
     config.PrimarySensors.AddOrUpdate(path, primary, (key, oldval) => { return(primary); });
 }
示例#3
0
 public static bool IsHidden(this SensorConfig config, string path, bool hidden)
 {
     return(config.SensorHidden.GetOrAdd(path, hidden));
 }
示例#4
0
 public static void AddOrUpdateHidden(this SensorConfig config, string path, bool hidden)
 {
     config.SensorHidden.AddOrUpdate(path, hidden, (key, oldval) => { return(hidden); });
 }
示例#5
0
 public static string GetName(this SensorConfig config, string path, string name)
 {
     return(config.SensorNames.GetOrAdd(path, name));
 }
示例#6
0
 public static void AddOrUpdateName(this SensorConfig config, string path, string name)
 {
     config.SensorNames.AddOrUpdate(path, name, (key, oldval) => { return(name); });
 }