Beispiel #1
0
 /// <summary>
 /// Gets the next user entry.
 /// </summary>
 /// <param name="index">the index in the data field</param>
 /// <param name="entry">the entry that will be returned</param>
 /// <returns>the new index in the data field</returns>
 private int GetNextUserListEntry(int index, ref UserListEntry entry)
 {
     int unameLen = _data[index];
     entry.UserName = AMessageData.ToString(_data, index + 1, unameLen);
     index += unameLen + 1;
     return index;
 }
Beispiel #2
0
 protected override void Deserialize()
 {
     _groupCount = _data[0];
     int index = 1;
     _groupsList = new GroupEntry[_groupCount];
     for (int i = 0; i < _groupCount; i++)
     {
         string name = AMessageData.ToString(_data, index + 1, _data[index]);
         index += _data[index] + 1;
         GroupEntry entry = new GroupEntry(name);
         int userCnt = _data[index++];
         for (int j = 0; j < userCnt; j++)
         {
             UserListEntry userEntry = new UserListEntry();
             index = GetNextUserListEntry(index, ref userEntry);
             entry.Users.Add(userEntry);
         }
         _groupsList[i] = entry;
     }
     index = GetUserAvailabilities(index, ref _groupsList);
     index = GetUserStatuses(index, ref _groupsList);
 }