Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
        public override bool DraftEquals(TLDraftMessageBase draft)
        {
            var emptyDraft = draft as TLDraftMessageEmpty;

            return(draft == null || emptyDraft != null);
        }
Ejemplo n.º 3
0
 public abstract bool DraftEquals(TLDraftMessageBase draft);
Ejemplo n.º 4
0
 public override bool DraftEquals(TLDraftMessageBase draft)
 {
     return(draft == null || draft is TLDraftMessageEmpty);
 }