public static bool IsPrimary(this SensorConfig config, string path, bool primary) { return(config.PrimarySensors.GetOrAdd(path, primary)); }
public static void AddOrUpdatePrimary(this SensorConfig config, string path, bool primary) { config.PrimarySensors.AddOrUpdate(path, primary, (key, oldval) => { return(primary); }); }
public static bool IsHidden(this SensorConfig config, string path, bool hidden) { return(config.SensorHidden.GetOrAdd(path, hidden)); }
public static void AddOrUpdateHidden(this SensorConfig config, string path, bool hidden) { config.SensorHidden.AddOrUpdate(path, hidden, (key, oldval) => { return(hidden); }); }
public static string GetName(this SensorConfig config, string path, string name) { return(config.SensorNames.GetOrAdd(path, name)); }
public static void AddOrUpdateName(this SensorConfig config, string path, string name) { config.SensorNames.AddOrUpdate(path, name, (key, oldval) => { return(name); }); }