Пример #1
0
 public static void CommentToPost(CommentItem comment)
 {
     if (comment != null)
     {
         ChatClient.SendComment(comment);
     }
 }
Пример #2
0
 public Task SendComment(CommentItem message)
 {
     try{
         _proxy.Invoke("SendComentsToClients", message);
     }
     catch (InvalidOperationException ie)
     {
         UserDialogs.Instance.Alert("Not yet connected to server");
     }
     return(null);
 }
Пример #3
0
        static void HandleComment(CommentItem commentMessage)
        {
            if (commentMessage is CommentItem)
            {
                Console.WriteLine("Recieved Comment from SignalR: comment by {0}, comment body: {1}, in group {2}, in post {3}",
                                  commentMessage.UserCommentName, commentMessage.CommentText, commentMessage.GroupID, commentMessage.PostID);

                /*if (string.Equals(message.PostID, post.ID))
                 * {
                 *      Console.WriteLine("Found post where comment was typed, adding it in");
                 *      //post comment
                 *      //UIBuilder.ReplaceTransparentCommentOrAdd(container, message, parentPost, post);
                 * }*/
            }
        }
Пример #4
0
 public async Task SaveCommentItemsTaskAsync(CommentItem item)
 {
     try
     {
         if (item.ID == null)
         {
             await commentTable.InsertAsync(item);
         }
         else
         {
             await commentTable.UpdateAsync(item);
         }
     }
     catch (Exception e)
     {
         Console.WriteLine("CommentItem Save error: " + e.Message);
     }
 }