コード例 #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = (Name != null ? Name.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ValueType != null ? ValueType.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (int)FieldType;
         hashCode = (hashCode * 397) ^ (int)SortOrder;
         hashCode = (hashCode * 397) ^ (SortBy != null ? SortBy.GetHashCode() : 0);
         return(hashCode);
     }
 }
コード例 #2
0
 public override int GetHashCode()
 {
     return(DatesInUtc ? 1 : 0
            ^ (!string.IsNullOrEmpty(FolderPath) ? FolderPath.GetHashCode() : 0)
            ^ RowLimit
            ^ (int)Scope
            ^ (!string.IsNullOrEmpty(SortBy) ? SortBy.GetHashCode() : 0)
            ^ (int)SortOrder
            ^ (!string.IsNullOrEmpty(GroupBy) ? GroupBy.GetHashCode() : 0)
            ^ (int)GroupOrder
            ^ (ViewFields != null && ViewFields.Length > 0 ? String.Join(",", ViewFields).GetHashCode() : 0)
            ^ (!string.IsNullOrEmpty(Where) ? Where.GetHashCode() : 0));
 }
コード例 #3
0
        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            // credit: http://stackoverflow.com/a/263416/677735
            unchecked // Overflow is fine, just wrap
            {
                int hash = base.GetHashCode();

                if (Outline != null)
                {
                    hash = hash * 59 + Outline.GetHashCode();
                }

                if (VendorId != null)
                {
                    hash = hash * 59 + VendorId.GetHashCode();
                }

                if (Currency != null)
                {
                    hash = hash * 59 + Currency.Code.GetHashCode();
                }

                if (Language != null)
                {
                    hash = hash * 59 + Language.CultureName.GetHashCode();
                }

                if (Keyword != null)
                {
                    hash = hash * 59 + Keyword.GetHashCode();
                }

                if (SortBy != null)
                {
                    hash = hash * 59 + SortBy.GetHashCode();
                }

                return(hash);
            }
        }
コード例 #4
0
ファイル: StoryQuest.cs プロジェクト: Sinzu1906/ReMasters
        public override int GetHashCode()
        {
            int hash = 1;

            if (StoryQuestId != 0UL)
            {
                hash ^= StoryQuestId.GetHashCode();
            }
            if (QuestNameId.Length != 0)
            {
                hash ^= QuestNameId.GetHashCode();
            }
            if (FieldId != 0UL)
            {
                hash ^= FieldId.GetHashCode();
            }
            if (RequiredConditionId != 0L)
            {
                hash ^= RequiredConditionId.GetHashCode();
            }
            if (SortBy != 0UL)
            {
                hash ^= SortBy.GetHashCode();
            }
            if (AreaSpotId != 0UL)
            {
                hash ^= AreaSpotId.GetHashCode();
            }
            if (ItemSetId != 0UL)
            {
                hash ^= ItemSetId.GetHashCode();
            }
            if (QuestGroupId != 0UL)
            {
                hash ^= QuestGroupId.GetHashCode();
            }
            if (FieldType != 0)
            {
                hash ^= FieldType.GetHashCode();
            }
            if (ScheduleId.Length != 0)
            {
                hash ^= ScheduleId.GetHashCode();
            }
            if (PlayCountLimit != 0L)
            {
                hash ^= PlayCountLimit.GetHashCode();
            }
            if (ChapterOpenAnimation != false)
            {
                hash ^= ChapterOpenAnimation.GetHashCode();
            }
            if (Difficulty != 0)
            {
                hash ^= Difficulty.GetHashCode();
            }
            if (WeekScheduleKeyword.Length != 0)
            {
                hash ^= WeekScheduleKeyword.GetHashCode();
            }
            if (Debug != false)
            {
                hash ^= Debug.GetHashCode();
            }
            if (DebugCategory != 0L)
            {
                hash ^= DebugCategory.GetHashCode();
            }
            if (RewardType != 0)
            {
                hash ^= RewardType.GetHashCode();
            }
            if (ShowcasedItemId != 0L)
            {
                hash ^= ShowcasedItemId.GetHashCode();
            }
            if (CharaQuestListItemId != 0L)
            {
                hash ^= CharaQuestListItemId.GetHashCode();
            }
            if (IsEvolutionQuest != false)
            {
                hash ^= IsEvolutionQuest.GetHashCode();
            }
            if (QuestType != 0)
            {
                hash ^= QuestType.GetHashCode();
            }
            if (IsSearchQuest != false)
            {
                hash ^= IsSearchQuest.GetHashCode();
            }
            if (NextQuestId != 0UL)
            {
                hash ^= NextQuestId.GetHashCode();
            }
            if (U24 != 0UL)
            {
                hash ^= U24.GetHashCode();
            }
            if (U25 != 0UL)
            {
                hash ^= U25.GetHashCode();
            }
            if (U26 != 0UL)
            {
                hash ^= U26.GetHashCode();
            }
            if (U27 != 0UL)
            {
                hash ^= U27.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
コード例 #5
0
ファイル: QueryOptions.cs プロジェクト: linven/TypeLess
 // override object.GetHashCode
 public override int GetHashCode()
 {
     return(SortBy.GetHashCode());
 }
コード例 #6
0
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 /// <returns>
 /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
 /// </returns>
 public override int GetHashCode()
 {
     return(TotalRecords ^ PageNum ^ PageSize ^ SortDescending.GetHashCode() ^ SortBy.GetHashCode());
 }