public TextPackage(string idReceiver, string idAuthor, DateTime time, string content) { this.IdReceiver = idReceiver; this.IdAuthor = idAuthor; this.Time = time; this.Content = content; this.RawData = PackageCreator.GetRawFormattedData( this.Type, this.IdReceiver, this.IdAuthor, PackageCreator.GetFormattedTime(this.Time), this.Content); }
public HistoryRequestPackage(string idReceiver, string idAuthor, string idRequest, DateTime timeUntil) { this.IdReceiver = idReceiver; this.IdAuthor = idAuthor; this.IdRequest = idRequest; this.TimeUntil = timeUntil; this.RawData = PackageCreator.GetRawFormattedData( this.Type, this.IdReceiver, this.IdAuthor, this.IdRequest, PackageCreator.GetFormattedTime(timeUntil)); }
public FilePackage(string idReceiver, string idAuthor, DateTime time, byte[] content) { this.IdReceiver = idReceiver; this.IdAuthor = idAuthor; this.Time = time; this.Content = content; this.RawData = PackageCreator.GetRawFormattedData( this.Type, new [] { this.IdReceiver, this.IdAuthor, PackageCreator.GetFormattedTime(this.Time) }, this.Content) .ToArray(); }