public LMInstrument MatchByPort(int Port) { return((LMInstrument)this.Find(i => { if (i is LMInstrument) { LMInstrument lm = (LMInstrument)i; return lm.port == Port; } else { return false; } } )); }
// get the LM ranking position (0, 1, 2, etc) public int RankPositionInList(LMInstrument inst) { int idx = 0; for (int i = 0; i < this.Count; i++) { if (this[i] is LMInstrument) { if (this[i].Equals(inst)) { return(idx); } else { idx++; } } } return(-1); }
public static bool SocketBased(this LMInstrument lm) { return(lm.id.SRType.IsSocketBasedLM()); }