Beispiel #1
0
 public TableMailInfo ToProto()
 {
     m_TableMailInfo.SendDate    = m_SendDate.ToString("yyyyMMddHHmmss");
     m_TableMailInfo.ExpiryDate  = m_ExpiryDate.ToString("yyyyMMddHHmmss");
     m_TableMailInfo.ItemIds     = DataProtoUtility.JoinGeneralList(",", m_ItemIds);
     m_TableMailInfo.ItemNumbers = DataProtoUtility.JoinGeneralList(",", m_ItemNumbers);
     return(m_TableMailInfo);
 }
Beispiel #2
0
 public TableUserInfo ToProto()
 {
     m_TableUserInfo.CreateTime     = m_CreateTime.ToString("yyyyMMddHHmmss");
     m_TableUserInfo.LastLogoutTime = m_LastLogoutTime.ToString("yyyyMMddHHmmss");
     m_TableUserInfo.IntDatas       = DataProtoUtility.JoinGeneralDictionary(";", ",", m_IntDatas);
     m_TableUserInfo.FloatDatas     = DataProtoUtility.JoinGeneralDictionary(";", ",", m_FloatDatas);
     m_TableUserInfo.StringDatas    = DataProtoUtility.JoinGeneralDictionary(";", ",", m_StringDatas);
     return(m_TableUserInfo);
 }
Beispiel #3
0
 public void FromProto(TableMailInfo proto)
 {
     m_TableMailInfo = proto;
     UpdatePrimaryKeys();
     UpdateForeignKeys();
     m_SendDate    = DateTime.ParseExact(m_TableMailInfo.SendDate, "yyyyMMddHHmmss", null);
     m_ExpiryDate  = DateTime.ParseExact(m_TableMailInfo.ExpiryDate, "yyyyMMddHHmmss", null);
     m_ItemIds     = DataProtoUtility.SplitGeneralList <int>(new char[] { ',' }, m_TableMailInfo.ItemIds);
     m_ItemNumbers = DataProtoUtility.SplitGeneralList <int>(new char[] { ',' }, m_TableMailInfo.ItemNumbers);
 }
Beispiel #4
0
 public void FromProto(TableUserInfo proto)
 {
     m_TableUserInfo = proto;
     UpdatePrimaryKeys();
     UpdateForeignKeys();
     m_CreateTime     = DateTime.ParseExact(m_TableUserInfo.CreateTime, "yyyyMMddHHmmss", null);
     m_LastLogoutTime = DateTime.ParseExact(m_TableUserInfo.LastLogoutTime, "yyyyMMddHHmmss", null);
     m_IntDatas       = DataProtoUtility.SplitGeneralDictionary <string, int>(new char[] { ';' }, new char[] { ',' }, m_TableUserInfo.IntDatas);
     m_FloatDatas     = DataProtoUtility.SplitGeneralDictionary <string, float>(new char[] { ';' }, new char[] { ',' }, m_TableUserInfo.FloatDatas);
     m_StringDatas    = DataProtoUtility.SplitGeneralDictionary <string, string>(new char[] { ';' }, new char[] { ',' }, m_TableUserInfo.StringDatas);
 }