コード例 #1
0
        public byte[] GetNodeData(out List <NodeInfo> nodeInfos)
        {
            byte[] uncompressedData;

            using (var ms = new MemoryStream())
            {
                using (var nw = new NodeWriter(ms, _parsers))
                {
                    foreach (var node in Nodes)
                    {
                        nw.Write(node);
                    }

                    nodeInfos = nw.GetFinalizedInfos();
                }
                uncompressedData = ms.ToArray();
            }

            return(uncompressedData);
        }
コード例 #2
0
ファイル: SaveFile.cs プロジェクト: watzlawek/CyberCAT
        public byte[] GetNodeData(out List <NodeInfo> nodeInfos)
        {
            byte[] uncompressedData;

            using (var ms = new MemoryStream())
            {
                using (var nw = new NodeWriter(ms, _parsers))
                {
                    foreach (var node in Nodes)
                    {
                        ReportProgress(new SaveProgressChangedEventArgs(0, 0, node.Name));
                        nw.Write(node);
                    }

                    nodeInfos = nw.GetFinalizedInfos();
                }
                uncompressedData = ms.ToArray();
            }

            return(uncompressedData);
        }