Example #1
0
        private static bool CompareKeybord(IReplyMarkup replyMarkup, IReplyMarkup otherReplyMarkup)
        {
            if (replyMarkup == null && otherReplyMarkup == null)
            {
                return(true);
            }

            if (replyMarkup == null || otherReplyMarkup == null)
            {
                return(false);
            }

            if (replyMarkup.GetType() != otherReplyMarkup.GetType())
            {
                return(false);
            }


            var firstButtonStringList  = GetButtonStringListFromKeybord(replyMarkup);
            var secondButtonStringList = GetButtonStringListFromKeybord(otherReplyMarkup);


            return(firstButtonStringList.SequenceEqual(secondButtonStringList));
        }