コード例 #1
0
 public void Remove(WallPost post)
 {
     if (Contains(post))
     {
         OwnedPosts.Remove(Find(post));
     }
 }
コード例 #2
0
        public void Add(WallPost post)
        {
            var model = DatabaseContext.Shared.PostReferences.Create();

            model.PostId = post.PostId;
            model.Post   = post;
            OwnedPosts.Add(model);
        }
コード例 #3
0
        private UserPostReference Find(WallPost model)
        {
            foreach (var wall in OwnedPosts)
            {
                if (wall.PostId == model.PostId)
                {
                    return(wall);
                }
            }

            return(null);
        }
コード例 #4
0
 public void RemovePost(WallPost post)
 {
     Posts.Remove(post);
     post.Wall   = null;
     post.WallId = null;
 }
コード例 #5
0
 public void AddPost(WallPost post)
 {
     post.Wall   = this;
     post.WallId = this.WallUrl;
     Posts.Add(post);
 }
コード例 #6
0
 public bool Contains(WallPost post)
 {
     return(Find(post) != null);
 }