Exemple #1
0
                public bool MoveNext()
                {
                    ThrowIfDisposed();
                    int start = source.Position + 1;
                    int len   = source.Source.length + 1;

                    for (int i = start; i < len; i++)
                    {
                        if (!source.MoveNext())
                        {
                            current = source.Source.Substring(start, i - start);
                            return(true);
                        }
                        for (int j = 0; j < separators.Length; j++)
                        {
                            source.Position = i - 1;
                            separators[j].Reset();
                            int slen = separators[j].Source.length;
                            if (EqualsChunk(ref source, ref separators[j], slen))
                            {
                                i      += slen;
                                current = source.Source.Substring(start, i - start - slen);
                                return(true);
                            }
                            else
                            {
                                source.Position = i - slen + 2;
                            }
                        }
                    }
                    return(false);
                }
Exemple #2
0
                public bool MoveNext()
                {
                    ThrowIfDisposed();
                    int start = source.Position + 1;
                    int len   = source.Source.length + 1;

                    for (int i = start; i < len; i++)
                    {
                        if (!source.MoveNext())
                        {
                            current = source.Source.Substring(start, i - start);
                            return(true);
                        }
                        if (separators.Contains(source.Current))
                        {
                            current = source.Source.Substring(start, i - start);
                            return(true);
                        }
                    }
                    return(false);
                }