public override void Deserialize(MemoryStream ms) { this.stream = ms; var tag = 0; while (reader.BaseStream.Position < reader.BaseStream.Length && (tag = reader.ReadInt32()) != 0) { switch (tag) { case 1: { id = reader.ReadInt32(); break; } case 2: { var count = reader.ReadInt32(); for (var i = 0; i < count; i++) { var __item = new PData(); var c = reader.ReadInt32(); __item.Deserialize(new MemoryStream(reader.ReadBytes(c))); lDatas.Add(__item); } break; } } } }
public override void Deserialize(MemoryStream ms) { this.stream = ms; var tag = 0; while (reader.BaseStream.Position < reader.BaseStream.Length && (tag = reader.ReadInt32()) != 0) { switch (tag) { case 1: { method = reader.ReadInt32(); break; } case 2: { pData = new PData(); var c = reader.ReadInt32(); pData.Deserialize(new MemoryStream(reader.ReadBytes(c))); break; } } } }