public List <Meter> FindByPortTypeAndFlow( string portType, int flow = -1) { List <string> portTypes; List <Meter> meters; bool isNumeric = MeterAux.GetPortTypes(portType, out portTypes); if (isNumeric) { // portType match and no flow match required // OR // portType match and flow match meters = Meters.FindAll(m => portTypes.Contains(m.Id.ToString()) && ((flow <= -1) || m.Flow.Equals(flow))); } else { // portType match and no flow match required // OR // portType match and flow match meters = Meters.FindAll(m => MatchMeterTypes(portTypes, m) && ((flow <= -1) || m.Flow.Equals(flow))); } return(meters); }
public List <string> GetPortTypes(out bool isNumeric) { List <string> types; isNumeric = MeterAux.GetPortTypes(this.Type, out types); return(types); }