Esempio n. 1
0
 /// <summary>
 /// Reads the papyrus assembly.
 /// </summary>
 /// <param name="pexFile">The pex file.</param>
 /// <param name="settings">The settings.</param>
 /// <returns></returns>
 public static PapyrusAssemblyDefinition ReadAssembly(string pexFile, PapyrusReaderSettings settings)
 {
     // bool throwsException
     using (var reader = new PapyrusAssemblyReader(new PapyrusAssemblyDefinition(), pexFile, settings))
     {
         var def = reader.Read();
         def.filePath    = pexFile;
         def.IsCorrupted = reader.IsCorrupted;
         return(def);
     }
 }
Esempio n. 2
0
        /// <summary>
        ///     Reads the papyrus assembly.
        /// </summary>
        /// <param name="pexFile">The pex file.</param>
        /// <returns></returns>
        public static PapyrusAssemblyDefinition ReadAssembly(string pexFile)
        {
            var asm = new PapyrusAssemblyDefinition();

            asm.filePath = pexFile;
            using (var reader = new PapyrusAssemblyReader(asm, pexFile, PapyrusReaderSettings.Default))
            {
                var def = reader.Read();
                def.IsCorrupted = reader.IsCorrupted;
                return(def);
            }
        }