Exemple #1
0
        public IEnumerable <CsvHeader> ReadAllHeaders()
        {
            while (!Reader.EndOfStream)
            {
                var line = ReadLine();

                if (line.StartsWith("\"No.\""))
                {
                    yield return(CsvHeader.Parse(LineNumber - 1, line.AsMemory()));
                }
            }
        }
Exemple #2
0
        public IEnumerable <(DateTime Time, Memory <(string Variant, int Data)> Values)> ReadNextBlock()
        {
            while (!Reader.EndOfStream && _CurrentHeader == null)
            {
                var line = ReadLine();

                if (line.StartsWith("\"No.\""))
                {
                    _CurrentHeader = CsvHeader.Parse(LineNumber - 1, line.AsMemory());
                }
            }

            if (_CurrentHeader == null)
            {
                yield break;
            }

            (string, int)[] row = new (string, int)[_CurrentHeader.Columns.Length - 2];