/// <summary> /// Read the file /// </summary> public void Read() { if (this.ReaderStrategy == null) { throw new ArgumentNullException("ReaderStrategy"); } if (this.ReaderProperty == null) { throw new ArgumentNullException("ReaderProperty"); } // Open this.ReaderStrategy.Open(); // Get file type this.TypeOfCOFF = this.FindCOFFFileType(); // Check if this is a PE/COFF file; if not then return if (this.TypeOfCOFF == EnumCOFFFileType.NONE) { throw new NotSupportedException("This is not COFF file"); } this.FileLayoutBrowse = FactoryCOFFFileBrowse.Browser(this.TypeOfCOFF, this.ReaderStrategy); this.FileLayoutBrowse.Read(this.ReaderStrategy); // Close file this.ReaderStrategy.Close(); }
internal void ReadCOFFFile(EnumCOFFFileType fileType) { ICOFFFileLayoutBrowse browser = FactoryCOFFFileBrowse.Browser(fileType); browser.Read(this.ReaderStrategy); }