public void FromByte(byte[] buffer, int index, out int length) { length = 0; try { Folder = buffer[index++]; ++length; Type = (FileType)BitConverter.ToInt32(buffer, index); index += 4; length += 4; Size = BitConverter.ToInt32(buffer, index); index += 4; length += 4; Time = KXTBitConvert.ToDateTime(buffer, index); index += 8; length += 8; Name = KXTBitConvert.ToString(buffer, index, out int count); length += count; } catch { } }
public void FromBytes(byte[] buffer, int index) { try { UserPicture = buffer[index++]; int length = 0; GroupID = KXTBitConvert.ToString(buffer, index, out length); index += length; GroupName = KXTBitConvert.ToString(buffer, index, out length); index += length; GroupDescribe = KXTBitConvert.ToString(buffer, index, out length); index += length; CreatorID = KXTBitConvert.ToString(buffer, index, out length); index += length; CreatorName = KXTBitConvert.ToString(buffer, index, out length); index += length; CreateTime = KXTBitConvert.ToDateTime(buffer, index); } catch { } }
public void FromBytes(byte[] buffer, int index) { try { UserPicture = buffer[index++]; int length = 0; UserID = KXTBitConvert.ToString(buffer, index, out length); index += length; UserName = KXTBitConvert.ToString(buffer, index, out length); index += length; UserDescribe = KXTBitConvert.ToString(buffer, index, out length); index += length; UserPhone = KXTBitConvert.ToString(buffer, index, out length); index += length; UserEmail = KXTBitConvert.ToString(buffer, index, out length); index += length; } catch { } }
public void FromBytes(byte[] buffer, ref int index) { try { TargetType = buffer[index++]; ApplierPicture = buffer[index++]; int length = 0; TargetID = KXTBitConvert.ToString(buffer, index, out length); index += length; ApplierID = KXTBitConvert.ToString(buffer, index, out length); index += length; ApplierName = KXTBitConvert.ToString(buffer, index, out length); index += length; ApplierDescribe = KXTBitConvert.ToString(buffer, index, out length); index += length; ApplyTime = KXTBitConvert.ToDateTime(buffer, index); index += 8; Message = KXTBitConvert.ToString(buffer, index, out length); index += length; } catch { } }
public byte[] ToByteArray() { List <byte> buffer = new List <byte>(); buffer.Add(ChatType); buffer.AddRange(KXTBitConvert.ToBytes(ID)); return(buffer.ToArray()); }
public byte[] ToByteArray() { List <byte> buffer = new List <byte>(); buffer.AddRange(KXTBitConvert.ToBytes(Sender)); buffer.AddRange(KXTBitConvert.ToBytes(Friend)); return(buffer.ToArray()); }
public byte[] ToByteArray() { List <byte> buffer = new List <byte>(); buffer.AddRange(NextLabel.ToByteArray()); buffer.AddRange(KXTBitConvert.ToBytes(Password)); return(buffer.ToArray()); }
public byte[] ToByteArray() { List <byte> buffer = new List <byte>(); buffer.Add(SearchType); buffer.AddRange(KXTBitConvert.ToBytes(SearchString)); return(buffer.ToArray()); }
public byte[] ToByteArray() { List <byte> buffer = new List <byte>(); buffer.AddRange(KXTBitConvert.ToBytes(GroupID)); buffer.AddRange(KXTBitConvert.ToBytes(GroupDescribe)); return(buffer.ToArray()); }
public byte[] ToByteArray() { List <byte> buffer = new List <byte>(); buffer.AddRange(KXTBitConvert.ToBytes(UserID)); buffer.AddRange(KXTBitConvert.ToBytes(UserEmail)); return(buffer.ToArray()); }
public byte[] ToByteArray() { List <byte> buffer = new List <byte>(); buffer.AddRange(KXTBitConvert.ToBytes(Name)); buffer.AddRange(KXTBitConvert.ToBytes(Path)); return(buffer.ToArray()); }
public byte[] ToByteArray() { List <byte> buffer = new List <byte>(); buffer.Add(ApplyResult); buffer.AddRange(KXTBitConvert.ToBytes(TargetID)); buffer.AddRange(KXTBitConvert.ToBytes(ApplierID)); return(buffer.ToArray()); }
public void FromBytes(byte[] buffer, int index) { try { UserID = KXTBitConvert.ToString(buffer, index); } catch { } }
public void FromBytes(byte[] buffer, int index) { try { UserID = KXTBitConvert.ToString(buffer, index, out int count); FriendID = KXTBitConvert.ToString(buffer, index + count); } catch { } }
public void FromBytes(byte[] buffer, int index) { try { ChatType = buffer[index++]; ID = KXTBitConvert.ToString(buffer, index); } catch { } }
public byte[] ToByteArray() { List <byte> buffer = new List <byte>(); buffer.Add(TargetType); buffer.AddRange(KXTBitConvert.ToBytes(TargetID)); buffer.AddRange(KXTBitConvert.ToBytes(ApplyTime)); buffer.AddRange(KXTBitConvert.ToBytes(Message)); return(buffer.ToArray()); }
public byte[] ToByteArray() { List <byte> buffer = new List <byte>(); buffer.AddRange(KXTBitConvert.ToBytes(Time)); buffer.AddRange(KXTBitConvert.ToBytes(Sender)); buffer.AddRange(KXTBitConvert.ToBytes(Target)); buffer.AddRange(KXTBitConvert.ToBytes(Message)); return(buffer.ToArray()); }
public void FromBytes(byte[] buffer, int index) { try { SearchType = buffer[index++]; SearchString = KXTBitConvert.ToString(buffer, index); } catch { } }
public byte[] ToByteArray() { List <byte> buffer = new List <byte>(); buffer.Add(Folder); buffer.AddRange(BitConverter.GetBytes((int)Type)); buffer.AddRange(BitConverter.GetBytes(Size)); buffer.AddRange(KXTBitConvert.ToBytes(Time)); buffer.AddRange(KXTBitConvert.ToBytes(Name)); return(buffer.ToArray()); }
public byte[] ToByteArray() { List <byte> buffer = new List <byte>(); buffer.AddRange(Sender.ToByteArray()); buffer.AddRange(BitConverter.GetBytes(PreRecorder)); buffer.AddRange(BitConverter.GetBytes(PreSize)); buffer.AddRange(KXTBitConvert.ToBytes(Time)); buffer.AddRange(KXTBitConvert.ToBytes(Message)); return(buffer.ToArray()); }
public void FromBytes(byte[] buffer, int index) { try { Name = KXTBitConvert.ToString(buffer, index, out int length); index += length; Path = KXTBitConvert.ToString(buffer, index); } catch { } }
public void FromBytes(byte[] buffer, int index) { try { Sender = KXTBitConvert.ToString(buffer, index, out int length); index += length; Friend = KXTBitConvert.ToString(buffer, index); } catch { } }
public byte[] ToByteArray() { List <byte> buffer = new List <byte>(); buffer.Add(UserPicture); buffer.AddRange(KXTBitConvert.ToBytes(UserID)); buffer.AddRange(KXTBitConvert.ToBytes(UserName)); buffer.AddRange(KXTBitConvert.ToBytes(UserDescribe)); buffer.AddRange(KXTBitConvert.ToBytes(UserPhone)); buffer.AddRange(KXTBitConvert.ToBytes(UserEmail)); return(buffer.ToArray()); }
public void FromBytes(byte[] buffer, int index) { try { GroupID = KXTBitConvert.ToString(buffer, index, out int length); index += length; GroupDescribe = KXTBitConvert.ToString(buffer, index); } catch { } }
public void FromBytes(byte[] buffer, int index) { try { UserID = KXTBitConvert.ToString(buffer, index, out int length); index += length; UserEmail = KXTBitConvert.ToString(buffer, index); } catch { } }
public byte[] ToByteArray() { List <byte> buffer = new List <byte>(); buffer.Add(UserPicture); buffer.AddRange(KXTBitConvert.ToBytes(GroupID)); buffer.AddRange(KXTBitConvert.ToBytes(GroupName)); buffer.AddRange(KXTBitConvert.ToBytes(GroupDescribe)); buffer.AddRange(KXTBitConvert.ToBytes(CreatorID)); buffer.AddRange(KXTBitConvert.ToBytes(CreatorName)); buffer.AddRange(KXTBitConvert.ToBytes(CreateTime)); return(buffer.ToArray()); }
public void FromBytes(byte[] buffer, int index) { try { TargetType = buffer[index++]; TargetID = KXTBitConvert.ToString(buffer, index, out int length); index += length; ApplyTime = KXTBitConvert.ToDateTime(buffer, index); index += 8; Message = KXTBitConvert.ToString(buffer, index); } catch { } }
public void FromBytes(byte[] buffer, int index) { try { ApplyResult = buffer[index++]; TargetID = KXTBitConvert.ToString(buffer, index, out int length); index += length; ApplierID = KXTBitConvert.ToString(buffer, index); } catch { } }
public void FromBytes(byte[] buffer, int index) { try { byte[] temp = new byte[16]; Array.Copy(buffer, index, temp, 0, temp.Length); NextLabel = new Guid(temp); index += temp.Length; Password = KXTBitConvert.ToString(buffer, index); } catch { } }
public byte[] ToByteArray() { int count = null == FriendsID ? 0 : FriendsID.Length > FriendsMaxCount ? FriendsMaxCount : FriendsID.Length; List <byte> buffer = new List <byte>(); for (int i = 0; i < count; ++i) { buffer.AddRange(KXTBitConvert.ToBytes(FriendsID[i])); } return(buffer.ToArray()); }