Ejemplo n.º 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();
        }
Ejemplo n.º 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);
        }