Пример #1
0
 private void ProcessOnCharEvent()
 {
     if (OnChar != null)
     {
         int count = InStream.Count;
         for (int i = 0; i < count; i++)
         {
             byte b    = InStream.Dequeue();
             char c    = (char)b;
             var  args = new OnReadCharArgs(c);
             OnChar(args);
             if (!args.Handled)
             {
                 InStream.Enqueue(b);
             }
         }
     }
 }
Пример #2
0
 private void ProcessOnCharEvent()
 {
     if (OnChar != null)
     {
         int count = InStream.Count;
         for (int i = 0; i < count; i++)
         {
             byte b = InStream.Dequeue();
             char c = (char)b;
             var args = new OnReadCharArgs(c);
             OnChar(args);
             if (!args.Handled)
                 InStream.Enqueue(b);
         }
     }
 }