public UserMessageContract(UserMessage message, IUserIconFactory iconFactory, bool includeBody = false) { ParamIs.NotNull(() => message); Body = (includeBody ? message.Message : string.Empty); Created = message.Created; CreatedFormatted = Created.ToUniversalTime().ToString("g"); HighPriority = message.HighPriority; Id = message.Id; Read = message.Read; Receiver = new UserWithIconContract(message.Receiver, iconFactory); Sender = (message.Sender != null ? new UserWithIconContract(message.Sender, iconFactory) : null); Subject = message.Subject; }