Пример #1
0
    public override byte[] toBinary()
    {
        writer = new st.net.NetBase.ByteWriter();
        ushort lenmails = (ushort)mails.Count;

        writer.write_short(lenmails);
        for (int i_mails = 0; i_mails < lenmails; i_mails++)
        {
            st.net.NetBase.mail_list listData = mails[i_mails];
            listData.toBinary(writer);
        }
        return(writer.data);
    }
Пример #2
0
    public override void fromBinary(byte[] binary)
    {
        reader = new st.net.NetBase.ByteReader(binary);
        ushort lenmails = reader.Read_ushort();

        mails = new List <st.net.NetBase.mail_list>();
        for (int i_mails = 0; i_mails < lenmails; i_mails++)
        {
            st.net.NetBase.mail_list listData = new st.net.NetBase.mail_list();
            listData.fromBinary(reader);
            mails.Add(listData);
        }
    }