public void Write(string fileName, WriterParameters parameters) { using (Stream fileStream = ModuleDefinition.GetFileStream(fileName, FileMode.Create, FileAccess.ReadWrite, FileShare.None)) { this.Write(fileStream, parameters); } }
public static ModuleDefinition ReadModule(string fileName, ReaderParameters parameters) { ModuleDefinition result; using (Stream fileStream = ModuleDefinition.GetFileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read)) { result = ModuleDefinition.ReadModule(fileStream, parameters); } return(result); }