示例#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
        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);
        }