public TextPackage(byte[] bytes) { List <byte[]> listParsed = PackageCreator.Parse(bytes); this.IdReceiver = PackageCreator.Encoding.GetString(listParsed[0]); this.IdAuthor = PackageCreator.Encoding.GetString(listParsed[1]); this.Time = PackageCreator.ParseTime(listParsed[2]); this.Content = PackageCreator.Encoding.GetString(listParsed[3]); this.RawData = bytes; }
public HistoryRequestPackage(byte[] bytes) { List <byte[]> listParsed = PackageCreator.Parse(bytes); this.IdReceiver = PackageCreator.Encoding.GetString(listParsed[0]); this.IdAuthor = PackageCreator.Encoding.GetString(listParsed[1]); this.IdRequest = PackageCreator.Encoding.GetString(listParsed[2]); this.TimeUntil = PackageCreator.ParseTime(listParsed[3]); this.RawData = bytes; }