Roblox-File-Format/BinaryFormat/Chunks/META.cs

26 lines
695 B
C#
Raw Normal View History

using System.Collections.Generic;
namespace RobloxFiles.BinaryFormat.Chunks
{
public class META
{
public int NumEntries;
public Dictionary<string, string> Data = new Dictionary<string, string>();
2019-05-19 04:44:51 +00:00
public META(BinaryRobloxFileChunk chunk)
{
2019-05-19 04:44:51 +00:00
using (BinaryRobloxFileReader reader = chunk.GetDataReader())
{
NumEntries = reader.ReadInt32();
for (int i = 0; i < NumEntries; i++)
{
string key = reader.ReadString();
string value = reader.ReadString();
Data.Add(key, value);
}
}
}
}
}