//protected abstract Task<(bool eof, FrequencyParametersPair matrix)> ReadNextMatrixAsync();

            public static TouchstoneReaderCore Create(TouchstoneReader tsReader)
            {
                TouchstoneReaderCore readerCore = null;
                string firstLine = default;

                if (tsReader.MoveToNextValidLine())
                {
                    firstLine = tsReader.ReadLineAndCount();
                }
                else
                {
                    tsReader.ThrowHelper("Header", "No valid information contained in file.");
                }

                firstLine = firstLine.Trim();
                if (firstLine[0] == Constants.OptionChar)
                {
                    readerCore = new TouchstoneReaderCoreV1(tsReader);
                }
                else if (firstLine[0] == Constants.KeywordOpenChar)
                {
                    readerCore = new TouchstoneReaderCoreV2(tsReader);
                }
                else
                {
                    tsReader.ThrowHelper("Header", "The Option Line (Touchstone format 1.0) or Version Keyword (Touchstone format 2.0) must be the first" +
                                         "non-comment and non-blank line in the file.");
                }
                readerCore.ReadHeader(firstLine);
                return(readerCore);
            }
        private TouchstoneReader(TextReader reader, TouchstoneReaderSettings settings)
        {
            this.settings = settings ?? new TouchstoneReaderSettings();
            this.reader   = reader;
            Options       = new TouchstoneOptions();
            Keywords      = new TouchstoneKeywords();

            coreReader = TouchstoneReaderCore.Create(this);
        }