public static void CommentToPost(CommentItem comment) { if (comment != null) { ChatClient.SendComment(comment); } }
public Task SendComment(CommentItem message) { try{ _proxy.Invoke("SendComentsToClients", message); } catch (InvalidOperationException ie) { UserDialogs.Instance.Alert("Not yet connected to server"); } return(null); }
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); * }*/ } }
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); } }