Beispiel #1
0
        public void OnNext(byte value)
        {
            if (IsInTextDataMode)
            {
                if (TextDataBlock.isPrintable(value))
                {
                    textDataBlock.Append(value);
                    if (textDataBlock.CurNoOfBytes == 16)
                    {
                        FlushTextDataAndLeaveTextDataMode();
                        EnterTextDataMode();
                    }
                }
                else
                {
                    FlushTextDataAndLeaveTextDataMode();
                    // recurse to processs value now
                    OnNext(value);
                }
            }
            else
            {
                if (instr == null)
                {
                    instr = new ConcreteInstruction(posStart, value);
                }
                else
                {
                    instr.Append(value);
                }

                if (instr.IsComplete)
                {
                    FlushInstruction();
                    if (instr.IsTextDataLabel)
                    {
                        EnterTextDataMode();
                    }
                    instr = null;
                }
            }
        }
Beispiel #2
0
 private void EnterTextDataMode()
 {
     textDataBlock = new TextDataBlock(posStart);
 }