コード例 #1
0
ファイル: Poll.cs プロジェクト: Eptagone/Telegram.BotAPI
        public override int GetHashCode()
        {
            int hashCode = -1529620533;

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Id);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Question);

            hashCode = hashCode * -1521134295 + EqualityComparer <IEnumerable <PollOption> > .Default.GetHashCode(Options);

            hashCode = hashCode * -1521134295 + TotalVoterCount.GetHashCode();
            hashCode = hashCode * -1521134295 + IsClosed.GetHashCode();
            hashCode = hashCode * -1521134295 + IsAnonymous.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Type);

            hashCode = hashCode * -1521134295 + AllowsMultipleAnswers.GetHashCode();
            hashCode = hashCode * -1521134295 + CorrectOptionId.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Explanation);

            hashCode = hashCode * -1521134295 + EqualityComparer <IEnumerable <MessageEntity> > .Default.GetHashCode(ExplanationEntities);

            hashCode = hashCode * -1521134295 + OpenPeriod.GetHashCode();
            hashCode = hashCode * -1521134295 + CloseDate.GetHashCode();
            return(hashCode);
        }
コード例 #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Id;
         hashCode = (hashCode * 397) ^ Number;
         hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ IsClosed.GetHashCode();
         hashCode = (hashCode * 397) ^ EventId;
         return(hashCode);
     }
 }
コード例 #3
0
ファイル: BlockToken{T}.cs プロジェクト: wizofaus/Stubble
        /// <summary>
        /// Gets the hashcode for the block
        /// </summary>
        /// <returns>The hash code</returns>
        public override int GetHashCode()
        {
            unchecked
            {
                var hash = 27;
                foreach (var item in Children)
                {
                    hash = (13 * hash) + item.GetHashCode();
                }

                hash = (13 * hash) + IsClosed.GetHashCode();
                return(hash);
            }
        }
コード例 #4
0
ファイル: PartialToken.cs プロジェクト: wizofaus/Stubble
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     unchecked
     {
         var hash = 27;
         hash = (13 * hash) + TagStartPosition.GetHashCode();
         hash = (13 * hash) + TagEndPosition.GetHashCode();
         hash = (13 * hash) + ContentStartPosition.GetHashCode();
         hash = (13 * hash) + ContentEndPosition.GetHashCode();
         hash = (13 * hash) + Content.GetHashCode();
         hash = (13 * hash) + IsClosed.GetHashCode();
         return(hash);
     }
 }
コード例 #5
0
ファイル: LiteralToken.cs プロジェクト: nexmart/Stubble
        /// <inheritdoc/>
        public override int GetHashCode()
        {
            unchecked
            {
                var hash = 27;
                hash = (13 * hash) + ContentStartPosition.GetHashCode();
                hash = (13 * hash) + ContentEndPosition.GetHashCode();
                foreach (var item in Content)
                {
                    hash = (13 * hash) + item.GetHashCode();
                }

                hash = (13 * hash) + IsClosed.GetHashCode();
                return(hash);
            }
        }