Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="StreamedSequence"/> class, setting the <see cref="Sequence"/> and
        /// <see cref="DataInfo"/> properties.
        /// </summary>
        /// <param name="sequence">The sequence.</param>
        /// <param name="streamedSequenceInfo">An instance of <see cref="StreamedSequenceInfo"/> describing the sequence.</param>
        public StreamedSequence(IEnumerable sequence, StreamedSequenceInfo streamedSequenceInfo)
        {
            ArgumentUtility.CheckNotNull("streamedSequenceInfo", streamedSequenceInfo);
            ArgumentUtility.CheckNotNullAndType("sequence", sequence, streamedSequenceInfo.DataType);

            DataInfo = streamedSequenceInfo;
            Sequence = sequence;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="StreamedSequence"/> class, setting the <see cref="Sequence"/> and
        /// <see cref="DataInfo"/> properties.
        /// </summary>
        /// <param name="sequence">The sequence.</param>
        /// <param name="streamedSequenceInfo">An instance of <see cref="StreamedSequenceInfo"/> describing the sequence.</param>
        public StreamedSequence(IEnumerable sequence, StreamedSequenceInfo streamedSequenceInfo)
        {
            ArgumentUtility.CheckNotNull("sequence", sequence);
            ArgumentUtility.CheckNotNull("streamedSequenceInfo", streamedSequenceInfo);
            if (!streamedSequenceInfo.DataType.IsInstanceOfType(sequence))
            {
                throw new ArgumentTypeException("sequence", streamedSequenceInfo.DataType, sequence.GetType());
            }

            DataInfo = streamedSequenceInfo;
            Sequence = sequence;
        }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StreamedSequence"/> class, setting the <see cref="Sequence"/> and
 /// <see cref="DataInfo"/> properties.
 /// </summary>
 /// <param name="sequence">The sequence.</param>
 /// <param name="streamedSequenceInfo">An instance of <see cref="StreamedSequenceInfo"/> describing the sequence.</param>
 public StreamedSequence(IEnumerable sequence, StreamedSequenceInfo streamedSequenceInfo)
 {
     DataInfo = streamedSequenceInfo;
     Sequence = sequence;
 }