Open() 공개 메소드

Open the file reader.
public Open ( ) : void
리턴 void
예제 #1
0
        /// <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);
        }
예제 #2
0
파일: RomMod.cs 프로젝트: Merp/SharpTune
        /// <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;
        }