public void Deserialize(ByteArray buffer) { int countroles = buffer.DeserializeInt(); for (int i = 0; i < countroles; ++i) { RoleBasicInfoMsg instroles = new RoleBasicInfoMsg(); instroles.Deserialize(buffer); roles.Add(instroles); } testClass.Deserialize(buffer); }
public void Serialize(ByteArray buffer) { int countroles = roles.Count; buffer.SerializeInt(countroles); for (int i = 0; i < countroles; ++i) { RoleBasicInfoMsg instroles = roles[i]; instroles.Serialize(buffer); } testClass.Serialize(buffer); }