Exemple #1
0
 public void CopyTo(MastodonStatus to)
 {
     if (to.Id != this.Id)
     {
         throw new InvalidOperationException("コピーしようとするStatusのIDが違います");
     }
     to.Content     = this.Content;
     to.IsFavorited = this.IsFavorited;
     to.IsBoosted   = this.IsBoosted;
 }
Exemple #2
0
        internal MastodonStatus(int id, MastodonAccount account, string content,
                                bool reblogged, bool favorited, MastodonStatus reblog,
                                int?replyToId, int?replyToAccountId,
                                IEnumerable <MastodonAttachment> mediaAttachments, IEnumerable <MastodonTag> tags,
                                DateTime createdAt) : this(id, account)
        {
            if (reblog != null)
            {
                this.BoostedId = reblog.Id;
                this.IsBoost   = true;
            }

            this.Content          = content;
            this.IsFavorited      = favorited;
            this.IsBoosted        = reblogged;
            this.Boost            = reblog;
            this.Account          = account;
            this.IsReply          = replyToAccountId != null || replyToId != null;
            this.ReplyToId        = replyToId ?? 0;
            this.ReplyToAccountId = replyToAccountId ?? 0;
            this.MediaAttachments = mediaAttachments;
            this.Tags             = tags;
            this.CreatedAt        = createdAt;
        }