--- id: aliases: [] tags: - destiny/fleeting - topic/automation - topic/estimating - topic/software - type/idea title: Assembly Objects --- # Assembly Objects ```cs public class GangableReceptacle : IGangableDevice, IUtilizationEquipment { public int Gangs { get; } ... } public class GangableSwitch : IGangableDevice ... public class DeviceBox : IOutletBox { private List _contents; public void Add(IGangableDevice device) { _contents.Add(device); } public int GetGangs() { int gangs = 0; foreach (device in _contents) { gangs += device.Gangs } return gangs } public List Resolve() { // Check content types and resolve by specifications // or raise error if not possible // (e.g. incompatible devices) } } ``` ```yaml - type: switchboard parents: 1 children: 0.. primary-rating: amperes - type: transfer-switch parents: 2 children: 1 primary-rating: amperes - type: transformer parents: 1 children: 1.. primary-rating: volt-amperes - type: generator parents: 0 children: 1.. primary-rating: watts ```