コード例 #1
0
        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();
        }
コード例 #2
0
        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);
        }