Exemple #1
0
        public void Add(ComputerData computerData)
        {
            var history = computerDataHistories.FirstOrDefault(p => p.ComputerName == computerData.ComputerName);

            if (history != null && history.ComputerName == computerData.ComputerName)
            {
                var historyElement = new ComputerDataHistoryElement(computerData);
                history.Add(historyElement);
            }
            else
            {
                var newHistory     = new ComputerDataHistory(computerData.ComputerName);
                var historyElement = new ComputerDataHistoryElement(computerData);
                newHistory.Add(historyElement);
                computerDataHistories.Add(newHistory);
            }
        }
 public void Add(ComputerDataHistoryElement element)
 {
     computerDataHistoryElements.Add(element);
 }