Ejemplo n.º 1
0
        protected virtual void Notify()
        {
            int size = Queue.Count;

            if (Position + size >= Length)
            {
                return;
            }

            if (size <= _notify)
            {
                BufferEventArgs <T> e = new BufferEventArgs <T>(0, Capacity - size, Filters);
                FillBuffer?.Invoke(this, e);

                for (int i = 0; e.ActualWrite > i; i++)
                {
                    Queue.Enqueue(e.Buffer[i]);
                }
            }
        }
Ejemplo n.º 2
0
 public int Read(byte[] buffer, int offset, int count)
 {
     fb.Invoke(buffer);
     return(count);
 }
Ejemplo n.º 3
0
 protected void OnFillBuffer(BufferEventArgs <T> e)
 {
     FillBuffer?.Invoke(this, e);
 }