示例#1
0
 public void Write(string fileName, WriterParameters parameters)
 {
     using (Stream fileStream = ModuleDefinition.GetFileStream(fileName, FileMode.Create, FileAccess.ReadWrite, FileShare.None))
     {
         this.Write(fileStream, parameters);
     }
 }
示例#2
0
        public static ModuleDefinition ReadModule(string fileName, ReaderParameters parameters)
        {
            ModuleDefinition moduleDefinition;

            using (Stream fileStream = ModuleDefinition.GetFileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read))
            {
                moduleDefinition = ModuleDefinition.ReadModule(fileStream, parameters);
            }
            return(moduleDefinition);
        }