コード例 #1
0
ファイル: ActivityPost.cs プロジェクト: lsmolic/hangoutsrc
 /// <summary>
 /// Initializes a ActivityPost object
 /// </summary>
 /// <param name="post"></param>
 internal ActivityPost(FacebookStreamPost post)
 {
     CreatedTime       = post.CreatedTime;
     UpdatedTime       = post.UpdatedTime;
     Message           = post.Message;
     ActorUserId       = post.ActorId;
     TargetUserId      = !string.IsNullOrEmpty(post.TargetId) ? long.Parse(post.TargetId) : new Nullable <long>();
     CanLike           = post.Likes.CanLikes;
     HasLiked          = post.Likes.UserLikes;
     Likes             = new ActivityPostLikes(post.Likes);
     CanComment        = post.StreamComments != null ? post.StreamComments.CanPost : false;
     CanRemoveComments = post.StreamComments != null ? post.StreamComments.CanRemove : false;
     CommentCount      = post.StreamComments != null ? post.StreamComments.Count : 0;
     PostId            = post.PostId;
     Type        = post.Type;
     Attribution = post.Attribution;
     AppId       = post.AppId;
     Attachment  = new ActivityPostAttachment(post.Attachment);
     if (post.StreamComments != null)
     {
         _comments = new ActivityCommentCollection(post.StreamComments.Comments);
     }
     Likes.ProfileInfoChangeEvent += new EventHandler <EventArgs>(Likes_ProfileInfoChangeEvent);
     //FilterKey = post.FilterKey;
     //Permalink = post.Permalink;
 }
コード例 #2
0
ファイル: ActivityPost.cs プロジェクト: lsmolic/hangoutsrc
 /// <summary>
 /// Initializes a ActivityPost object
 /// </summary>
 /// <param name="post"></param>
 internal ActivityPost(stream_post post)
 {
     CreatedTime       = DateHelper.ConvertDoubleToDate(post.created_time); // TODO: Test conversion?
     UpdatedTime       = DateHelper.ConvertDoubleToDate(post.updated_time); // TODO: Test conversion?
     Message           = post.message;
     ActorUserId       = post.actor_id;
     TargetUserId      = post.target_id;
     CanLike           = post.likes.user_likes;
     HasLiked          = post.likes.user_likes;
     Likes             = new ActivityPostLikes(post.likes);
     CanComment        = post.comments.can_post;
     CanRemoveComments = post.comments.can_remove;
     CommentCount      = post.comments.count;
     PostId            = post.post_id;
     Type        = post.type;
     Attribution = post.attribution;
     AppId       = post.app_id;
     Attachment  = new ActivityPostAttachment(post.attachment);
     _comments   = new ActivityCommentCollection(post.comments.comment_list.comment);
     Likes.ProfileInfoChangeEvent += new EventHandler <EventArgs>(Likes_ProfileInfoChangeEvent);
     //FilterKey = post.filterkey;
     //Permalink = post.permalink;
 }