/// <summary>Creates a new cursor for queue represented by the <paramref name="reader"/>.</summary>
        public QueueCursor(QueueReader reader)
        {
            Contract.Requires(reader != null);
            _reader = reader;

            int res = Native.CreateCursor(reader._handle, out _cursorHandle);

            if (Native.IsError(res))
            {
                throw new QueueException(res);
            }
        }