public IEnumerator GetEnumerator() { while (true) { string key = reader.ReadPropertyName(); if (key == null) { yield break; } Type type = reader.ReadKeyPrefix(); byte[] bytes = reader.ReadElement(); reader.ReadKeySuffix(); yield return(new KeyValuePair <string, ES3Data>(key, new ES3Data(type, bytes))); } }