示例#1
0
 /// <summary>
 /// String that is used for synchronization through network.
 /// </summary>
 /// <returns>String, where data values are delimited by ';' and newlines anre repleced with '^'</returns>
 public string GetSynchronizationString()
 {
     return
         ("" + Hash.ToString() + ";"
          + "" + Name.ToString() + ";"
          + "" + Description.Replace('\n', '^').ToString() + ";"
          + "" + StartDate.ToString(Constants.DateTimeFormat) + ";"
          + "" + EndDate.ToString(Constants.DateTimeFormat) + ";"
          + "" + Notification.ToString() + ";"
          + "" + NotificationDate.ToString(Constants.DateTimeFormat) + "");
 }
        public ConnectNotification(XmlNode node)
        {
            // throw new NotImplementedException();
            if (node != null)
            {
                Type             = Common.Constants.NotificationElements.NotificationType.Connection;
                UserName         = node.SelectSingleNode("Actors/RestNotificationActor/User/DisplayName").InnerText;
                NotificationDate = Convert.ToDateTime(node.SelectSingleNode("CreatedDate").InnerText);

                TimeStamp = NotificationDate.ToString("hh:mm:tt");
            }
        }
示例#3
0
 public CommentNotification(XmlNode node)
 {
     if (node != null)
     {
         Type             = Constants.NotificationElements.NotificationType.Comment;
         BlogTitle        = node.SelectSingleNode("Content/Application/HtmlName").InnerText;
         Text             = "";                                                                                       //TODO: grab comment text using filter comment REST API by contentID,UserName and lastUpdatedDate of notification = CreatedDate of Comment
         UserName         = node.SelectSingleNode("Actors/RestNotificationActor[last()]/User/DisplayName").InnerText; // Multiple actors so sort and get lastest based on notificatoin lastupdatedDate
         NotificationDate = Convert.ToDateTime(node.SelectSingleNode("LastUpdatedDate").InnerText);
         TimeStamp        = NotificationDate.ToString("hh:mm:tt");
     }
 }