public void ReadFrom(IXdrReader reader) { ReplyStatus = (ReplyStatus)reader.ReadInt(); switch (ReplyStatus) { case ReplyStatus.Accepted: AcceptedReply = new AcceptedReply(reader); break; case ReplyStatus.Denied: RejectedReply = new RejectedReply(reader); break; } }
public void WriteTo(IXdrWriter writer) { writer.Write((int)ReplyStatus); switch (ReplyStatus) { case ReplyStatus.Accepted: AcceptedReply?.WriteTo(writer); break; case ReplyStatus.Denied: RejectedReply?.WriteTo(writer); break; } }