//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); }
internal TouchstoneReaderCoreV2(TouchstoneReader reader) : base(reader) { }
protected TouchstoneReaderCore(TouchstoneReader reader) { this.tsReader = reader; }