/// <summary>
 /// Creates a clone of this instance
 /// </summary>
 /// <returns>A clone of this instance</returns>
 public object Clone()
 {
     return(new ExpansionBoard
     {
         Name = (Name != null) ? string.Copy(Name) : null,
         Revision = (Revision != null) ? string.Copy(Revision) : null,
         Firmware = (Firmware)Firmware.Clone(),
         VIn = (MinMaxCurrent <float?>)VIn.Clone(),
         McuTemp = (MinMaxCurrent <float?>)McuTemp.Clone(),
         MaxHeaters = MaxHeaters,
         MaxMotors = MaxMotors
     });
 }
Exemplo n.º 2
0
 /// <summary>
 /// Creates a clone of this instance
 /// </summary>
 /// <returns>A clone of this instance</returns>
 public object Clone()
 {
     return(new Electronics
     {
         Type = (Type != null) ? string.Copy(Type) : null,
         Name = (Name != null) ? string.Copy(Name) : null,
         Revision = (Revision != null) ? string.Copy(Revision) : null,
         Firmware = (Firmware)Firmware.Clone(),
         ProcessorID = (ProcessorID != null) ? string.Copy(ProcessorID) : null,
         VIn = (MinMaxCurrent <float?>)VIn.Clone(),
         McuTemp = (MinMaxCurrent <float?>)McuTemp.Clone(),
         ExpansionBoards = ExpansionBoards.Select(board => (ExpansionBoard)board.Clone()).ToList()
     });
 }