コード例 #1
0
        /// <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));
        }
コード例 #2
0
 /// <summary>
 /// Returns the number of wires connected to the provided pin.
 /// </summary>
 public int GetPinWireCount(Pin pin)
 {
     return(GetWires(pin).Count());
 }