BrightIdeasSoftware.TailFilter.Filter C# (CSharp) Метод

Filter() публичный Метод

Return the last N subset of the model objects
public Filter ( IEnumerable modelObjects ) : IEnumerable
modelObjects IEnumerable
Результат IEnumerable
        public override IEnumerable Filter(IEnumerable modelObjects)
        {
            if (this.Count <= 0)
                return modelObjects;

            ArrayList list = ObjectListView.EnumerableToArray(modelObjects, false);

            if (this.Count > list.Count)
                return list;

            object[] tail = new object[this.Count];
            list.CopyTo(list.Count - this.Count, tail, 0, this.Count);
            return new ArrayList(tail);
        }