public object ReadObject( ) { var container = new AmfContainer(); string typeIdentifier = ReadString(); container.Name = typeIdentifier; container.Values = new List <AmfContainer>(); string key = ReadString(); var subContainer = new AmfContainer(); subContainer.Name = key; for (int typeCode = ReadByte(); typeCode != 9; typeCode = ReadByte()) { object value = ReadData(typeCode); subContainer.Value = value; container.Values.Add(subContainer); subContainer = new AmfContainer(); key = ReadString(); subContainer.Name = key; //Console.WriteLine("{0} - {1}", key, value); } return(container); }
public object ReadObject( ) { var container = new AmfContainer(); string typeIdentifier = ReadString(); container.Name = typeIdentifier; container.Values = new List<AmfContainer>(); string key = ReadString(); var subContainer = new AmfContainer(); subContainer.Name = key; for (int typeCode = ReadByte(); typeCode != 9; typeCode = ReadByte()) { object value = ReadData(typeCode); subContainer.Value = value; container.Values.Add(subContainer); subContainer = new AmfContainer(); key = ReadString(); subContainer.Name = key; //Console.WriteLine("{0} - {1}", key, value); } return container; }