コード例 #1
0
ファイル: ApiService.cs プロジェクト: alexandragiit/dotNET
        public override Task <Response> AddPost(Post post, ServerCallContext context)
        {
            Response output = new Response();

            PostComment.Comment c = new PostComment.Comment();
            PostComment.Post    p = new PostComment.Post();
            p.PostId      = post.PostId;
            p.Description = post.Description;
            p.Domain      = post.Domain;
            p.Date        = post.Date;

            List <PostComment.Comment> cList = new List <PostComment.Comment>();

            foreach (var i in post.Comments)
            {
                c.Text       = i.Text;
                c.PostPostId = i.PostPostId;
                c.CommentId  = i.CommentId;
                //c.Post = i.Post;

                cList.Add(c);
            }

            bool resp = API.AddPost(p);

            output.Resp = resp;

            return(Task.FromResult(output));
        }
コード例 #2
0
ファイル: proxy.cs プロジェクト: Eruvisu/TSNET2020
 public System.Threading.Tasks.Task <PostComment.Comment> UpdateCommentAsync(PostComment.Comment newComment)
 {
     return(base.Channel.UpdateCommentAsync(newComment));
 }
コード例 #3
0
ファイル: proxy.cs プロジェクト: Eruvisu/TSNET2020
 public PostComment.Comment UpdateComment(PostComment.Comment newComment)
 {
     return(base.Channel.UpdateComment(newComment));
 }
コード例 #4
0
ファイル: proxy.cs プロジェクト: Eruvisu/TSNET2020
 public System.Threading.Tasks.Task <bool> AddCommentAsync(PostComment.Comment comment)
 {
     return(base.Channel.AddCommentAsync(comment));
 }
コード例 #5
0
ファイル: proxy.cs プロジェクト: Eruvisu/TSNET2020
 public bool AddComment(PostComment.Comment comment)
 {
     return(base.Channel.AddComment(comment));
 }
コード例 #6
0
 public Task <Comment> UpdateCommentAsync(PostComment.Comment newComment)
 {
     throw new NotImplementedException();
 }