Пример #1
0
 private void CancelComment()
 {
     NewComment = null;
     NewCommentCommand.RaiseCanExecuteChanged();
     PostCommentCommand.RaiseCanExecuteChanged();
     CancelCommentCommand.RaiseCanExecuteChanged();
 }
Пример #2
0
        public async Task <ActionResult <PostViewModel> > PostComment([FromBody] PostCommentCommand postCommentCommand, CancellationToken cancellationToken)//(int postId, [FromBody]string postText)
        {
            var result = await mediator.Send(postCommentCommand, cancellationToken);

            return(Ok(result));

            //var result = await tiriritPostService
            //    .AddOrModifyPost(postText, BullBearLevel.Neutral, null, postId);
            //return Ok(result.ToViewModel(this.currentPrincipal));
        }
Пример #3
0
        private void CreateComment()
        {
            CommentInfo info = new CommentInfo()
            {
                ProfileId = ApplicationStateService.CurrentUser.ProfileId.Value,
                Creator   = ApplicationStateService.CurrentUser.Nickname,
                Online    = true,
                MediaUri  = mediaUri,
                Creation  = DateTime.Now
            };

            NewComment = new PictureCommentViewModel(ProfileUriPattern, info);

            NewCommentCommand.RaiseCanExecuteChanged();
            PostCommentCommand.RaiseCanExecuteChanged();
            CancelCommentCommand.RaiseCanExecuteChanged();
        }