/// <summary> /// Returns all wires attached to the provided pin. /// </summary> public IEnumerable <Wire> GetWires(Pin pin) { string id = pin.FullId; return(wires.Where(x => x.P1.FullId == id || x.P2.FullId == id)); }
/// <summary> /// Returns the number of wires connected to the provided pin. /// </summary> public int GetPinWireCount(Pin pin) { return(GetWires(pin).Count()); }