/// <summary>
        /// Function called to handle the reading of the stream
        /// </summary>
        /// <param name="stm">The reading stream</param>
        protected override void OnRead(PipelineStream stm)
        {
            try
            {
                while (!stm.Eof)
                {
                    DynamicStreamDataKey2 key = new DynamicStreamDataKey2("Root", Container, Graph.Logger, State);

                    DataReader reader = new DataReader(stm);

                    key.FromReader(reader);

                    // Only fill in the frame if we read something, should this exit if it continues to read nothing?
                    if (reader.ByteCount > 0)
                    {
                        WriteOutput(new DataFrame(key));
                    }
                }
            }
            catch (ThreadAbortException)
            {
                throw;
            }
            catch (EndOfStreamException)
            {
                // End of stream, do nothing
            }
            catch (Exception e)
            {
                LogException(e);
            }
        }
예제 #2
0
 /// <summary>
 /// Default constructor
 /// </summary>
 protected BaseStreamPipelineNode()
 {
     _input = new PipelineStream();
     _lockObject = new object();
 }
예제 #3
0
 /// <summary>
 /// Function called by the thread
 /// </summary>
 /// <param name="stm">Reading stream</param>
 protected abstract void OnRead(PipelineStream stm);