FSO.Vitaboy.Animation.ReadPropertyList C# (CSharp) Method

ReadPropertyList() private method

Reads a property list from a stream.
private ReadPropertyList ( IoBuffer io ) : PropertyList
io FSO.Files.Utils.IoBuffer IOBuffer instance used to read an animation.
return PropertyList
        private PropertyList ReadPropertyList(IoBuffer io)
        {
            var propsCount = io.ReadUInt32();
            var result = new PropertyListItem[propsCount];

            for (var y = 0; y < propsCount; y++)
            {
                var item = new PropertyListItem();
                var pairsCount = io.ReadUInt32();
                for (var z = 0; z < pairsCount; z++)
                {
                    item.KeyPairs.Add(new KeyValuePair<string, string>(
                        io.ReadPascalString(),
                        io.ReadPascalString()
                    ));
                }
                result[y] = item;
            }

            return new PropertyList {
                Items = result
            };
        }