Beispiel #1
0
        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);
        }
Beispiel #2
0
        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));
        }
Beispiel #3
0
        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();
        }