/// <summary> /// Creates a <c>MultiEnumerator</c> that serially chains the two /// enumerators passed as arguments. /// </summary> public MultiEnumerator(IEnumerator ie1, IEnumerator ie2, EnumeratorFilter filter, object context) { this.filter = filter; this.context = context; ies = new IEnumerator[]{ie1, ie2}; ies[0].Reset(); ies[1].Reset(); }
/// <summary> /// Construct an enumerable that enumerators over ieable1, then ieable2. Each element /// is passed to the filter which can decide if the element should be returned by /// the enumerator or not. The filter can also change the element (map). /// </summary> /// <param name="filter">can be null</param> /// <param name="context">passed to filter</param> public CompoundEnumerable ( IEnumerable ieable1, IEnumerable ieable2, EnumeratorFilter filter, object context) { this.ieable1 = ieable1; this.ieable2 = ieable2; this.filter = filter; this.context = context; }