/// <summary> /// Dump the contents of an SRecord file. Mostly intended for development use. /// </summary> private static bool TryDumpSRecordFile(string path) { bool result = true; SRecord record; SRecordReader reader = new SRecordReader(path); reader.Open(); BlobList list = new BlobList(); while (reader.TryReadNextRecord(out record)) { if (!record.IsValid) { Trace.WriteLine(record.ToString()); result = false; continue; } list.ProcessRecord(record); Trace.WriteLine(record.ToString()); } Trace.WriteLine("Aggregated:"); foreach (Blob blob in list.Blobs) { Trace.WriteLine(blob.ToString()); } return(result); }
/// <summary> /// Dump the contents of an SRecord file. Mostly intended for development use. /// </summary> private static bool TryDumpSRecordFile(string path) { bool result = true; SRecord record; SRecordReader reader = new SRecordReader(path); reader.Open(); BlobList list = new BlobList(); while (reader.TryReadNextRecord(out record)) { if (!record.IsValid) { Trace.WriteLine(record.ToString()); result = false; continue; } list.ProcessRecord(record); Trace.WriteLine(record.ToString()); } Trace.WriteLine("Aggregated:"); foreach (Blob blob in list.Blobs) { Trace.WriteLine(blob.ToString()); } return result; }