SharpTune.RomMod.SRecordReader.Open C# (CSharp) Method

Open() public method

Open the file reader.
public Open ( ) : void
return void
        public void Open()
        {
            if(!isResource)
                this.reader = new StreamReader(path, Encoding.ASCII);
        }

Usage Example

Ejemplo n.º 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);
        }
All Usage Examples Of SharpTune.RomMod.SRecordReader::Open