public static void Write(RiotArchiveFile archive, string fileName) { if (archive == null) { throw new ArgumentNullException("archive"); } if (fileName == null) { throw new ArgumentNullException("fileName"); } var writer = new RiotArchiveWriter(archive, fileName); writer.Write(); }
private RiotArchiveWriter(RiotArchiveFile archive, string fileName) { if (archive == null) { throw new ArgumentNullException("archive"); } if (fileName == null) { throw new ArgumentNullException("fileName"); } this.archive = archive; archiveStream = new FileStream(fileName, FileMode.Create); archiveWriter = new BinaryWriter(archiveStream); dataStream = new FileStream(fileName + ".dat", FileMode.Create); }