예제 #1
0
        public HEMessageArrayList Filter(HEMessageType type)
        {
            HEMessageArrayList filtered = new HEMessageArrayList();

            this.Where(type).Apply(msg => filtered.Add(msg));
            return(filtered);
        }
예제 #2
0
        /// <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);
        }
예제 #3
0
        public HEMessageArrayList Filter(HEMessageType type)
        {
            HEMessageArrayList filtered = new HEMessageArrayList();

            foreach (HEMessage msg in this)
            {
                if ((msg.Type & type) == type)
                {
                    filtered.Add(msg);
                }
            }

            return(filtered);
        }