コード例 #1
0
        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;
            }
        }
コード例 #2
0
        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;
            }
        }