Пример #1
0
 public static Vk.Model.Message GetMessageItem(this Message message)
 {
     var result = new Vk.Model.Message
                      {
                          Title = message.Title,
                          Uid = message.Uid,
                          Body = message.Body,
                          Date = UnixTimeConvertor.ConvertFromUnixTimestamp(message.Date),
                          Mid = message.Mid,
                          IsNewMessage = message.ReadState == "0",
                          IsOut = message.Out == "1",
                      };
     return result;
 }
Пример #2
0
 public static Vk.Model.Message GetMessageItem(this MessageHistory message,
                                                                    string currentUid)
 {
     var result = new Vk.Model.Message
                      {
                          Title = message.Body,
                          Uid = message.Uid,
                          Body = message.Body,
                          Date = UnixTimeConvertor.ConvertFromUnixTimestamp(message.Date),
                          Mid = message.Mid,
                          IsNewMessage = message.ReadState == "0",
                          IsOut = message.Uid == currentUid,
                      };
     return result;
 }