Exemplo n.º 1
0
        /// <summary>
        /// Creates an new abstract pipe using the given enumerable as element source.
        /// </summary>
        /// <param name="SourceEnumerable">An enumeration as element source.</param>
        /// <param name="SourceEnumerator">An enumerator as element source.</param>
        public AbstractPipe(IEnumerable <S> SourceEnumeration, IEnumerator <S> SourceEnumerator)
        {
            if (SourceEnumeration == null && SourceEnumerator == null)
            {
                throw new ArgumentNullException("The given sources must not both be null!");
            }

            if (SourceEnumeration != null)
            {
                this.SourcePipe = EndPipe.CreatePipe(SourceEnumeration);
            }

            if (SourceEnumerator != null)
            {
                this.SourcePipe = EndPipe.CreatePipe(SourceEnumerator);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Creates an new abstract pipe using the given single value as element source.
        /// </summary>
        /// <param name="SourceElement">A single value as element source.</param>
        public AbstractPipe(S SourceElement)
        {
            SourceElement.CheckNull("SourceElement");

            this.SourcePipe = EndPipe.CreatePipe(SourceElement);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Creates an new abstract pipe using the given enumerator as element source.
        /// </summary>
        /// <param name="SourceEnumerator">An enumerator as element source.</param>
        public AbstractPipe(IEnumerator <S> SourceEnumerator)
        {
            SourceEnumerator.CheckNull("SourceEnumerator");

            this.SourcePipe = EndPipe.CreatePipe(SourceEnumerator);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Creates an new abstract pipe using the given enumeration as element source.
        /// </summary>
        /// <param name="SourceEnumeration">An enumeration as element source.</param>
        public AbstractPipe(IEnumerable <S> SourceEnumeration)
        {
            SourceEnumeration.CheckNull("SourceEnumerable");

            this.SourcePipe = EndPipe.CreatePipe(SourceEnumeration);
        }