public HEMessageArrayList Filter(HEMessageType type) { HEMessageArrayList filtered = new HEMessageArrayList(); this.Where(type).Apply(msg => filtered.Add(msg)); return(filtered); }
/// <summary> /// It creates a new HEMessageArrayList with the same elements /// </summary> /// <returns> /// A HEMessageList converted to object /// </returns> public override object Clone() { HEMessageArrayList res = new HEMessageArrayList(); foreach (HEMessage msg in this) { res.Add(msg); } return(res); }
public HEMessageArrayList Filter(HEMessageType type) { HEMessageArrayList filtered = new HEMessageArrayList(); foreach (HEMessage msg in this) { if ((msg.Type & type) == type) { filtered.Add(msg); } } return(filtered); }