public void Encode(General.Encoding.BinaryOutput stream) { stream.Write(Name); stream.Write(Actions.Count); ActionIO writer = new ActionIO(stream); foreach (IAction i in Actions) { writer.Write(i); } }
public IEncodable Decode(General.Encoding.BinaryInput stream) { name = stream.ReadString(); int c = stream.ReadInt32(); ActionIO reader = new ActionIO(stream); for (int i = 0; i < c; i++) { Actions.Add(reader.Read()); } return(this); }