private bool GetNextPage() { _reader.Lock(); try { while (_reader.ReadNextPage() && _packetIndex == _packetCount) { // no-op } } finally { _reader.Release(); } return(_packetIndex < _packetCount); }
/// <summary> /// Finds the next new stream in the container. /// </summary> /// <returns><c>True</c> if a new stream was found, otherwise <c>False</c>.</returns> public bool FindNextStream() { _reader.Lock(); try { var cnt = _reader.FoundStreams; while (_reader.ReadNextPage()) { if (cnt < _reader.FoundStreams) { return(true); } } return(false); } finally { _reader.Release(); } }