public bool FinishArrayItem() { if (ContentTable.Count > 1) { return(Program.ReportFailure("Unexpected failure")); } Debug.Assert(ContentTypeTable.Count == ContentTable.Count); foreach (KeyValuePair <string, object> Entry in ContentTable) { string Key = Entry.Key; Debug.Assert(ContentTypeTable.ContainsKey(Key)); if (ItemCollection.Count > 0) { if (ContentTypeTable[Key] != LastItemType) { return(Program.ReportFailure("Mixed array types")); } } ItemCollection.Add(Entry.Value); LastItemType = ContentTypeTable[Key]; } ContentTable.Clear(); ContentTypeTable.Clear(); return(true); }