public SignedDocument(UserInboxMessage <InboxMessageSignedDocument> message) : this() { this.Id = message.Message.IdObjeto; this.MessageId = message.Message.Id; this.Title = message.Message.Description; this.Status = message.Message.Status; this.Read = message.Read; this.Date = this.LastUpdate = message.Message.LastUpdate; this.Author = message.Message.Properties.Author?.Sector?.Name; //mensagens resumidas para celular if (!string.IsNullOrEmpty(message.Message.Properties.Description)) { this.Description = HtmlHelper.ToPlainText(message.Message.Properties.Description); } if (!string.IsNullOrEmpty(message.Message.Properties.Title)) { this.Title = message.Message.Properties.Title; } this.Documents = message.Message.Properties.Documents.Select(d => new Document(d)).ToList(); this.Actions = message.Actions.Select(a => new InboxMessageAction(a)).ToList(); }
public SignatureRequest(UserInboxMessage <InboxMessageSignatureRequest> message) : this() { this.Id = message.Message.IdObjeto; this.MessageId = message.Message.Id; this.Title = message.Message.Description; this.Status = message.Message.Status; this.Read = message.Read; this.Date = message.Message.Properties.RequestDate; this.LastUpdate = message.Message.LastUpdate; this.Author = message.Message.Properties.Requester?.Name; this.Documents = message.Message.Properties.Documents.Select(d => new Document(d)).ToList(); this.Archived = message.ArchivedDate != null; if (message.Actions != null) { this.Actions = message.Actions.Select(a => new InboxMessageAction(a)).ToList(); } if (Documents.Count() == 1) { this.Description = HtmlHelper.ToPlainText(Documents.First().Description); } else { this.Description = ""; } }