コード例 #1
0
        public override bool DraftEquals(TLDraftMessageBase draftBase)
        {
            var draftEmpty = draftBase as TLDraftMessageEmpty;

            if (draftEmpty != null)
            {
                return(IsEmpty());
            }

            var draft = draftBase as TLDraftMessage;

            if (draft != null)
            {
                if (Flags.Value != draft.Flags.Value)
                {
                    return(false);
                }

                if (!TLString.Equals(Message, draft.Message, StringComparison.Ordinal))
                {
                    return(false);
                }

                if (ReplyToMsgId != null && draft.ReplyToMsgId != null && ReplyToMsgId.Value != draft.ReplyToMsgId.Value)
                {
                    return(false);
                }

                if (Entities != null && draft.Entities != null && Entities.Count != draft.Entities.Count)
                {
                    return(false);
                }
            }
            else
            {
                return(false);
            }

            return(true);
        }
コード例 #2
0
        public override bool DraftEquals(TLDraftMessageBase draft)
        {
            var emptyDraft = draft as TLDraftMessageEmpty;

            return(draft == null || emptyDraft != null);
        }
コード例 #3
0
 public abstract bool DraftEquals(TLDraftMessageBase draft);
コード例 #4
0
 public override bool DraftEquals(TLDraftMessageBase draft)
 {
     return(draft == null || draft is TLDraftMessageEmpty);
 }