/// <summary> /// Returns the hash code for this object. /// </summary> /// <returns>A hash code for the current object.</returns> public override int GetHashCode() { int hashCode = -1182503711; hashCode = hashCode * -1521134295 + base.GetHashCode(); hashCode = hashCode * -1521134295 + OrdinalPosition.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(ColumnDefault); hashCode = hashCode * -1521134295 + IsNullable.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(DataType); hashCode = hashCode * -1521134295 + MaxLength.GetHashCode(); hashCode = hashCode * -1521134295 + NumericPrecision.GetHashCode(); return(hashCode); }
/// <summary> /// Serves as a hash function for a particular type. /// </summary> /// <returns> /// A hash code for the current <see cref="T:System.Object"/>. /// </returns> public override int GetHashCode() { unchecked { var hashCode = Type.GetHashCode(); hashCode = (hashCode * 397) ^ (Id?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (Schema?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (Comment?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (Title?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (Description?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (Default?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ MultipleOf.GetHashCode(); hashCode = (hashCode * 397) ^ Maximum.GetHashCode(); hashCode = (hashCode * 397) ^ ExclusiveMaximum.GetHashCode(); hashCode = (hashCode * 397) ^ Minimum.GetHashCode(); hashCode = (hashCode * 397) ^ ExclusiveMinimum.GetHashCode(); hashCode = (hashCode * 397) ^ (MaxLength?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (MinLength?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (Pattern?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (AdditionalItems?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (Items?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (MaxItems?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (MinItems?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (UniqueItems?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (Contains?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (AdditionalProperties?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (Definitions?.GetCollectionHashCode().GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (Properties?.GetCollectionHashCode() ?? 0); hashCode = (hashCode * 397) ^ (PatternProperties?.GetCollectionHashCode() ?? 0); hashCode = (hashCode * 397) ^ (Dependencies?.GetCollectionHashCode() ?? 0); hashCode = (hashCode * 397) ^ (Const?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (Enum?.GetCollectionHashCode() ?? 0); hashCode = (hashCode * 397) ^ (Format?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (ContentMediaType?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (ContentEncoding?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (If?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (Then?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (Else?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (AllOf?.GetCollectionHashCode() ?? 0); hashCode = (hashCode * 397) ^ (AnyOf?.GetCollectionHashCode() ?? 0); hashCode = (hashCode * 397) ^ (OneOf?.GetCollectionHashCode() ?? 0); hashCode = (hashCode * 397) ^ (Not?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (Required?.GetCollectionHashCode() ?? 0); hashCode = (hashCode * 397) ^ (Examples?.GetCollectionHashCode() ?? 0); return(hashCode); } }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (MaxLength != null) { hashCode = hashCode * 59 + MaxLength.GetHashCode(); } if (MinLength != null) { hashCode = hashCode * 59 + MinLength.GetHashCode(); } return(hashCode); } }
/// <summary> /// Serves as a hash function for the objects of <see cref="DumpAttribute"/> and its derived types. /// </summary> /// <returns>A hash code for the current <see cref="DumpAttribute"/> instance.</returns> public override int GetHashCode() { var hashCode = Constants.HashInitializer; unchecked { hashCode = Constants.HashMultiplier * hashCode + Order.GetHashCode(); hashCode = Constants.HashMultiplier * hashCode + DumpNullValues.GetHashCode(); hashCode = Constants.HashMultiplier * hashCode + Skip.GetHashCode(); hashCode = Constants.HashMultiplier * hashCode + RecurseDump.GetHashCode(); hashCode = Constants.HashMultiplier * hashCode + (DefaultProperty?.GetHashCode() ?? 0); hashCode = Constants.HashMultiplier * hashCode + Mask.GetHashCode(); hashCode = Constants.HashMultiplier * hashCode + MaskValue.GetHashCode(); hashCode = Constants.HashMultiplier * hashCode + MaxLength.GetHashCode(); hashCode = Constants.HashMultiplier * hashCode + MaxDepth.GetHashCode(); hashCode = Constants.HashMultiplier * hashCode + LabelFormat.GetHashCode(); hashCode = Constants.HashMultiplier * hashCode + ValueFormat.GetHashCode(); } return(hashCode); }
/// <summary> /// Serves as a hash function for a particular type. /// </summary> /// <returns>A hash code for the current object.</returns> public override int GetHashCode() { unchecked { int result = 17; result = result * 23 + base.GetHashCode(); result = result * 23 + ((Name != null) ? Name.GetHashCode() : 0); result = result * 23 + Type.GetHashCode(); result = result * 23 + Editable.GetHashCode(); result = result * 23 + Mandatory.GetHashCode(); result = result * 23 + Hidden.GetHashCode(); result = result * 23 + Hideable.GetHashCode(); result = result * 23 + Width.GetHashCode(); result = result * 23 + ((Text != null) ? Text.GetHashCode() : 0); result = result * 23 + Xtype.GetHashCode(); result = result * 23 + Align.GetHashCode(); result = result * 23 + ((Tooltip != null) ? Tooltip.GetHashCode() : 0); result = result * 23 + Sortable.GetHashCode(); result = result * 23 + SortDirection.GetHashCode(); result = result * 23 + ((Format != null) ? Format.GetHashCode() : 0); result = result * 23 + DecimalPlaces.GetHashCode(); result = result * 23 + ((DataUrl != null) ? DataUrl.GetHashCode() : 0); result = result * 23 + ((DefaultValue != null) ? DefaultValue.GetHashCode() : 0); result = result * 23 + ((Description != null) ? Description.GetHashCode() : 0); result = result * 23 + Rank.GetHashCode(); result = result * 23 + ReadOnly.GetHashCode(); result = result * 23 + MaxLength.GetHashCode(); result = result * 23 + ((Validator != null) ? Validator.GetHashCode() : 0); result = result * 23 + ((SearchFieldDefinition != null) ? SearchFieldDefinition.GetHashCode() : 0); result = result * 23 + SingleComboFilter.GetHashCode(); result = result * 23 + AllowComboCustomValue.GetHashCode(); result = result * 23 + SearchComboFromLeft.GetHashCode(); result = result * 23 + LoadWhenVisible.GetHashCode(); result = result * 23 + Nullable.GetHashCode(); result = result * 23 + ((Tpl != null) ? Tpl.GetHashCode() : 0); result = result * 23 + MinCharSearch.GetHashCode(); result = result * 23 + ((AdditionalWhereSqlTemp != null) ? AdditionalWhereSqlTemp.GetHashCode() : 0); return(result); } }
public override int GetHashCode() { int hash = 1; if (Name.Length != 0) { hash ^= Name.GetHashCode(); } if (Type != global::Google.Cloud.BigQuery.Storage.V1.TableFieldSchema.Types.Type.Unspecified) { hash ^= Type.GetHashCode(); } if (Mode != global::Google.Cloud.BigQuery.Storage.V1.TableFieldSchema.Types.Mode.Unspecified) { hash ^= Mode.GetHashCode(); } hash ^= fields_.GetHashCode(); if (Description.Length != 0) { hash ^= Description.GetHashCode(); } if (MaxLength != 0L) { hash ^= MaxLength.GetHashCode(); } if (Precision != 0L) { hash ^= Precision.GetHashCode(); } if (Scale != 0L) { hash ^= Scale.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }