private SensorData CreateStatusUpdateObject(SensorData originalData) { SensorData clone = originalData.Clone(); clone.Status = SensorStatus.Warning; clone.TransactionType = TransactionType.Update; clone.ValidationError = ValidationConstants.SensorValueOutdated; return(clone); }
public void AddValue(string productName, SensorData sensorData) { lock (_syncRoot) { SortedList <string, SensorData> list; if (!_productSensorDictionary.ContainsKey(productName)) { list = new SortedList <string, SensorData>(); _productSensorDictionary[productName] = list; } else { list = _productSensorDictionary[productName]; } list[sensorData.Path] = sensorData.Clone(); } }