public virtual void CollectIDs(CollectIdContext context, IPredicate4 predicate) { ITraverseAspectCommand command = new _MarshallingInfoTraverseAspectCommand_311(predicate , context, EnsureFieldList(context)); TraverseAllAspects(context, command); }
public virtual object NextMatching(IPredicate4 condition) { if (null == condition) { throw new ArgumentNullException(); } List4 current = _next; List4 previous = null; while (null != current) { object element = ((object)current._element); if (condition.Match(element)) { if (previous == null) { RemoveNext(); } else { previous._next = ((List4)current._next); } return element; } previous = current; current = ((List4)current._next); } return null; }
public virtual object NextMatching(IPredicate4 condition) { if (null == condition) { throw new ArgumentNullException(); } List4 current = _next; List4 previous = null; while (null != current) { object element = ((object)current._element); if (condition.Match(element)) { if (previous == null) { RemoveNext(); } else { previous._next = ((List4)current._next); } return(element); } previous = current; current = ((List4)current._next); } return(null); }
public static bool Any(IEnumerator iterator, IPredicate4 condition) { while (iterator.MoveNext()) { if (condition.Match(iterator.Current)) { return true; } } return false; }
public static void All(IEnumerable values, IPredicate4 condition) { IEnumerator iterator = values.GetEnumerator(); while (iterator.MoveNext()) { if (!condition.Match(iterator.Current)) { Assert.Fail("Condition does not hold for for value '" + iterator.Current + "'."); } } }
public static bool Any(IEnumerator iterator, IPredicate4 condition) { while (iterator.MoveNext()) { if (condition.Match(iterator.Current)) { return(true); } } return(false); }
public static IList Filter(IList items, IPredicate4 predicate) { IList filtered = new ArrayList(); for (IEnumerator itemIter = items.GetEnumerator(); itemIter.MoveNext(); ) { object item = itemIter.Current; if (predicate.Match(item)) { filtered.Add(item); } } return filtered; }
public static IList Filter(IList items, IPredicate4 predicate) { IList filtered = new ArrayList(); for (IEnumerator itemIter = items.GetEnumerator(); itemIter.MoveNext();) { object item = itemIter.Current; if (predicate.Match(item)) { filtered.Add(item); } } return(filtered); }
public Tree Filter(IPredicate4 a_filter) { if (_preceding != null) { _preceding = _preceding.Filter(a_filter); } if (_subsequent != null) { _subsequent = _subsequent.Filter(a_filter); } if (!a_filter.Match(this)) { return(Remove()); } return(this); }
private void AssertFilter(string[] expected, string[] actual, IPredicate4 filter) { Iterator4Assert.AreEqual(expected, Iterators.Filter(actual, filter)); }
public virtual void CollectIDs(CollectIdContext context, IPredicate4 predicate) { }
public _MarshallingInfoTraverseAspectCommand_311(IPredicate4 predicate, CollectIdContext context, IMarshallingInfo baseArg1) : base(baseArg1) { this.predicate = predicate; this.context = context; }
public static IEnumerator Filter(IEnumerator iterator, IPredicate4 predicate) { return(new FilteredIterator(iterator, predicate)); }
private void CollectIDs(CollectIdContext context, IPredicate4 predicate) { if (!StandardReferenceTypeHandlerIsUsed()) { throw new InvalidOperationException(); } ((StandardReferenceTypeHandler) CorrectHandlerVersion(context)).CollectIDs(context , predicate); }
public _IClosure4_95(BlockingQueue _enclosing, IPredicate4 condition) { this._enclosing = _enclosing; this.condition = condition; }
public static IEnumerable Filter(IEnumerable source, IPredicate4 predicate) { return new _IEnumerable_112(source, predicate); }
public FilteredIterator(IEnumerator iterator, IPredicate4 filter) : base(iterator ) { _filter = filter; }
public static IEnumerator Filter(IEnumerator iterator, IPredicate4 predicate) { return new FilteredIterator(iterator, predicate); }
public virtual object NextMatching(IPredicate4 condition) { return(_lock.Run(new _IClosure4_95(this, condition))); }
public virtual object NextMatching(IPredicate4 condition) { return(queue.NextMatching(condition)); }
public _IEnumerable_112(IEnumerable source, IPredicate4 predicate) { this.source = source; this.predicate = predicate; }
public static IEnumerator Filter(object[] array, IPredicate4 predicate) { return Filter(new ArrayIterator4(array), predicate); }
public virtual object NextMatching(IPredicate4 condition) { return queue.NextMatching(condition); }
public static IEnumerator Filter(object[] array, IPredicate4 predicate) { return(Filter(new ArrayIterator4(array), predicate)); }
public static IEnumerable Filter(IEnumerable source, IPredicate4 predicate) { return(new _IEnumerable_112(source, predicate)); }
public Tree Filter(IPredicate4 a_filter) { if (_preceding != null) { _preceding = _preceding.Filter(a_filter); } if (_subsequent != null) { _subsequent = _subsequent.Filter(a_filter); } if (!a_filter.Match(this)) { return Remove(); } return this; }
public virtual object NextMatching(IPredicate4 condition) { return _lock.Run(new _IClosure4_95(this, condition)); }