Esempio n. 1
0
        public bool MoveNext()
        {
            ReadOnlySpan <char> remaining = _remaining.Span;

            if (remaining.Length == 0)
            {
                return(false);
            }
            int nextSeparator = remaining.IndexOf('/');

            (int curLen, int remStart, bool isLast) = nextSeparator >= 0
                ? (nextSeparator, nextSeparator + 1, false)
                : (remaining.Length, remaining.Length, true);
            int consumed = _queryLength - (_remaining.Length - remStart);

            _current   = new EntityQueryPart(_remaining[..curLen], consumed, isLast);
Esempio n. 2
0
 public EntityQueryEnumerator(ReadOnlyMemory <char> query)
 {
     _current     = default;
     _remaining   = query;
     _queryLength = query.Length;
 }