public void AddComponent(string name, DateTime startDate, double consumption)
 {
     if (_currentItem >= MaxItems)
     {
         Console.WriteLine("Components size is full.");
     }
     else
     {
         var component = new SensorComponent(name, startDate, consumption);
         _sensors[_currentItem] = component;
         _currentItem++;
     }
 }
        public void AddComponent(string name, DateTime startDate, double consumption)
        {
            var component = new SensorComponent(name, startDate, consumption);

            _sensors.Add(component);
        }