Пример #1
0
        public static async Task <bool> SendComment(string commentContent, Tuple <string, string> replyTarget, string noteId)
        {
            UserContentProvider content = new UserContentProvider();
            var result = await content.AddComment(noteId, commentContent, GlobalValue.CurrentUserContext.UserId, GlobalValue.CurrentUserContext.MobileToken);

            if (result.Error == null || result.Error.Count == 0)
            {
                GalaSoft.MvvmLight.Messaging.Messenger.Default.Send(new ShowMessage()
                {
                    MessageContent = "评论成功!"
                });
                return(true);
            }
            else
            {
                GalaSoft.MvvmLight.Messaging.Messenger.Default.Send(new ShowMessage()
                {
                    MessageContent = "评论失败!"
                });
                return(false);
            }
        }