private ItemValueCollection CreateTestCollection() { ItemValueCollection testCollection = new ItemValueCollection(); ItemValue testItemValue = new ItemValue(); testItemValue.ItemID = "SimulatedData.Random"; testItemValue.Timestamp = DateTime.Now; Random rnd = new Random(); testItemValue.Value = rnd.Next(900000); testCollection.Add(testItemValue); return testCollection; }
internal void AddNewValue(ItemValue newItemValue) { if (_valueCollection.Count == _maxValuesCount) _valueCollection.RemoveAt(0); _valueCollection.Add(newItemValue); }
private ItemValue CreateSingleItemValue(DataRow currentRow) { ItemValue itemValue = new ItemValue(); itemValue.ItemID = currentRow["item_name"].ToString(); itemValue.Value = currentRow["item_value"]; itemValue.Timestamp = Convert.ToDateTime(currentRow["timestamp"]); return itemValue; }