Exemple #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Kind != global::Google.Protobuf.WellKnownTypes.Field.Types.Kind.TYPE_UNKNOWN)
            {
                hash ^= Kind.GetHashCode();
            }
            if (Cardinality != global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality.CARDINALITY_UNKNOWN)
            {
                hash ^= Cardinality.GetHashCode();
            }
            if (Number != 0)
            {
                hash ^= Number.GetHashCode();
            }
            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (TypeUrl.Length != 0)
            {
                hash ^= TypeUrl.GetHashCode();
            }
            if (OneofIndex != 0)
            {
                hash ^= OneofIndex.GetHashCode();
            }
            if (Packed != false)
            {
                hash ^= Packed.GetHashCode();
            }
            hash ^= options_.GetHashCode();
            return(hash);
        }
 protected override void ComputeHashCodeParts(ArrayBuilder <int> builder)
 {
     builder.Add(HashUtilities.Combine(Locations));
     builder.Add(HashUtilities.Combine(LValueCapturedOperations));
     builder.Add(Kind.GetHashCode());
     builder.Add(NullState.GetHashCode());
 }
Exemple #3
0
 public override int GetHashCode()
 {
     unchecked
     {
         return((Kind.GetHashCode() * 397) ^ Amount);
     }
 }
        public override int GetHashCode()
        {
            int hashcode = 157;

            unchecked {
                if (isset.is_agg)
                {
                    hashcode = (hashcode * 397) + Is_agg.GetHashCode();
                }
                if (isset.kind)
                {
                    hashcode = (hashcode * 397) + Kind.GetHashCode();
                }
                if (isset.type)
                {
                    hashcode = (hashcode * 397) + Type.GetHashCode();
                }
                if (isset.arg_type)
                {
                    hashcode = (hashcode * 397) + Arg_type.GetHashCode();
                }
                if (isset.skip_nulls)
                {
                    hashcode = (hashcode * 397) + Skip_nulls.GetHashCode();
                }
                if (isset.is_distinct)
                {
                    hashcode = (hashcode * 397) + Is_distinct.GetHashCode();
                }
            }
            return(hashcode);
        }
Exemple #5
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (Kind != 0)
            {
                hash ^= Kind.GetHashCode();
            }
            if (nodeId_ != null)
            {
                hash ^= NodeId.GetHashCode();
            }
            if (HasData != false)
            {
                hash ^= HasData.GetHashCode();
            }
            if (Data.Length != 0)
            {
                hash ^= Data.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
 protected override void ComputeHashCodeParts(Action <int> addPart)
 {
     addPart(HashUtilities.Combine(Locations));
     addPart(HashUtilities.Combine(LValueCapturedOperations));
     addPart(Kind.GetHashCode());
     addPart(NullState.GetHashCode());
 }
 /// <summary>
 /// Generates a hash code that is suitable for use when keying a dictionary.
 /// </summary>
 /// <returns>A hash code for the notification.</returns>
 public sealed override int GetHashCode()
 {
     return(Kind.GetHashCode()
            ^ (HasValue ? EqualityComparer <T> .Default.GetHashCode(Value) : 0)
            ^ (Kind == CollectionNotificationKind.OnReplaced ? EqualityComparer <T> .Default.GetHashCode(ReplacedValue) : 0)
            ^ (Kind == CollectionNotificationKind.Exists ? -ExistingValues.Count : 0));
 }
Exemple #8
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (ProjectId.Length != 0)
            {
                hash ^= ProjectId.GetHashCode();
            }
            if (IndexId.Length != 0)
            {
                hash ^= IndexId.GetHashCode();
            }
            if (Kind.Length != 0)
            {
                hash ^= Kind.GetHashCode();
            }
            if (Ancestor != global::Google.Cloud.Datastore.Admin.V1.Index.Types.AncestorMode.Unspecified)
            {
                hash ^= Ancestor.GetHashCode();
            }
            hash ^= properties_.GetHashCode();
            if (State != global::Google.Cloud.Datastore.Admin.V1.Index.Types.State.Unspecified)
            {
                hash ^= State.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
 public override int GetHashCode()
 {
     unchecked {
         var hashCode = TrackId;
         hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Artist != null ? Artist.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (AlbumArtist != null ? AlbumArtist.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Composer != null ? Composer.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Album != null ? Album.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Genre != null ? Genre.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Kind != null ? Kind.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Size.GetHashCode();
         hashCode = (hashCode * 397) ^ (PlayingTime != null ? PlayingTime.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ TrackNumber.GetHashCode();
         hashCode = (hashCode * 397) ^ Year.GetHashCode();
         hashCode = (hashCode * 397) ^ DateModified.GetHashCode();
         hashCode = (hashCode * 397) ^ DateAdded.GetHashCode();
         hashCode = (hashCode * 397) ^ BitRate.GetHashCode();
         hashCode = (hashCode * 397) ^ SampleRate.GetHashCode();
         hashCode = (hashCode * 397) ^ PlayCount.GetHashCode();
         hashCode = (hashCode * 397) ^ PlayDate.GetHashCode();
         hashCode = (hashCode * 397) ^ PartOfCompilation.GetHashCode();
         return(hashCode);
     }
 }
Exemple #10
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     unchecked
     {
         return(((Kind != null ? Kind.GetHashCode() : 0) * 397) ^ Location.GetHashCode());
     }
 }
Exemple #11
0
 public override int GetHashCode()
 {
     unchecked
     {
         return((Kind.GetHashCode() * 397) ^ (Name != null ? Name.GetHashCode() : 0));
     }
 }
Exemple #12
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Index != 0)
            {
                hash ^= Index.GetHashCode();
            }
            if (Kind != global::Google.Cloud.Spanner.V1.PlanNode.Types.Kind.Unspecified)
            {
                hash ^= Kind.GetHashCode();
            }
            if (DisplayName.Length != 0)
            {
                hash ^= DisplayName.GetHashCode();
            }
            hash ^= childLinks_.GetHashCode();
            if (shortRepresentation_ != null)
            {
                hash ^= ShortRepresentation.GetHashCode();
            }
            if (metadata_ != null)
            {
                hash ^= Metadata.GetHashCode();
            }
            if (executionStats_ != null)
            {
                hash ^= ExecutionStats.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Exemple #13
0
 public override int GetHashCode()
 {
     unchecked
     {
         return(Kind.GetHashCode() * 397 ^ Type.GetHashCode() * 397);
     }
 }
Exemple #14
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     unchecked
     {
         return((Label.GetHashCode() * 397) ^ (Kind != null ? Kind.GetHashCode() : 0));
     }
 }
 /// <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 (Id != null)
         {
             hashCode = hashCode * 59 + Id.GetHashCode();
         }
         if (Kind != null)
         {
             hashCode = hashCode * 59 + Kind.GetHashCode();
         }
         if (CreatedTime != null)
         {
             hashCode = hashCode * 59 + CreatedTime.GetHashCode();
         }
         if (ModifiedTime != null)
         {
             hashCode = hashCode * 59 + ModifiedTime.GetHashCode();
         }
         if (Author != null)
         {
             hashCode = hashCode * 59 + Author.GetHashCode();
         }
         if (Comments != null)
         {
             hashCode = hashCode * 59 + Comments.GetHashCode();
         }
         return(hashCode);
     }
 }
Exemple #16
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (header_ != null)
            {
                hash ^= Header.GetHashCode();
            }
            if (Body.Length != 0)
            {
                hash ^= Body.GetHashCode();
            }
            if (Kind != 0)
            {
                hash ^= Kind.GetHashCode();
            }
            if (Extra.Length != 0)
            {
                hash ^= Extra.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Exemple #17
0
        public override int GetHashCode()
        {
            int h = 1;

            h *= 1000003;
            h ^= TraceId.GetHashCode();
            h *= 1000003;
            h ^= (ParentId == null) ? 0 : ParentId.GetHashCode();
            h *= 1000003;
            h ^= Id.GetHashCode();
            h *= 1000003;
            h ^= Kind.GetHashCode();
            h *= 1000003;
            h ^= (Name == null) ? 0 : Name.GetHashCode();
            h *= 1000003;
            h ^= (int)(h ^ ((Timestamp >> 32) ^ Timestamp));
            h *= 1000003;
            h ^= (int)(h ^ ((Duration >> 32) ^ Duration));
            h *= 1000003;
            h ^= (LocalEndpoint == null) ? 0 : LocalEndpoint.GetHashCode();
            h *= 1000003;
            h ^= (RemoteEndpoint == null) ? 0 : RemoteEndpoint.GetHashCode();
            h *= 1000003;
            h ^= Annotations.GetHashCode();
            h *= 1000003;
            h ^= Tags.GetHashCode();
            h *= 1000003;
            return(h);
        }
Exemple #18
0
 public override int GetHashCode()
 {
     // The hash code cannot be based on the underlying exception or
     // value as some instances use a predicate for equality checks
     // instead of comparing based on properties.
     return(Kind.GetHashCode());
 }
        public override int GetHashCode()
        {
            int hash = 1;

            if (Index != 0)
            {
                hash ^= Index.GetHashCode();
            }
            if (Kind != 0)
            {
                hash ^= Kind.GetHashCode();
            }
            if (DisplayName.Length != 0)
            {
                hash ^= DisplayName.GetHashCode();
            }
            hash ^= childLinks_.GetHashCode();
            if (shortRepresentation_ != null)
            {
                hash ^= ShortRepresentation.GetHashCode();
            }
            if (metadata_ != null)
            {
                hash ^= Metadata.GetHashCode();
            }
            if (executionStats_ != null)
            {
                hash ^= ExecutionStats.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (Epoch != 0)
            {
                hash ^= Epoch.GetHashCode();
            }
            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (Revision.Length != 0)
            {
                hash ^= Revision.GetHashCode();
            }
            if (Kind != 0)
            {
                hash ^= Kind.GetHashCode();
            }
            if (FullName.Length != 0)
            {
                hash ^= FullName.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Exemple #21
0
        /// <summary>Calculates a hash code for this object.</summary>
        /// <returns>A hash code for this object.</returns>
        public override int GetHashCode()
        {
            int hashCode = 29;

            hashCode = hashCode * 31 + Kind.GetHashCode();
            hashCode = hashCode * 31 + ArrayRank.GetHashCode();
            return(hashCode);
        }
Exemple #22
0
        /// <summary>
        /// Serves as the default hash function.
        /// </summary>
        /// <returns>A hash code for the current object.</returns>
        public override int GetHashCode()
        {
            var hashCode = -1644527362;

            hashCode = (hashCode * -1521134295) + Kind.GetHashCode();
            hashCode = (hashCode * -1521134295) + MaxBlockingTime.GetHashCode();
            return(hashCode);
        }
 /// <summary>
 /// Serves as a hash function for a <see cref="FloatValueNode"/>
 /// object.
 /// </summary>
 /// <returns>
 /// A hash code for this instance that is suitable for use in
 /// hashing algorithms and data structures such as a hash table.
 /// </returns>
 public override int GetHashCode()
 {
     unchecked
     {
         return((Kind.GetHashCode() * 397)
                ^ (Value.GetHashCode() * 97));
     }
 }
Exemple #24
0
        /// <summary>
        /// Serves as the default hash function.
        /// </summary>
        /// <returns>A hash code for the current object.</returns>
        public override int GetHashCode()
        {
            var hashCode = 1464949012;

            hashCode = (hashCode * -1521134295) + Kind.GetHashCode();
            hashCode = (hashCode * -1521134295) + LeaseDuration.GetHashCode();
            return(hashCode);
        }
Exemple #25
0
        /// <summary>
        /// Serves as the default hash function.
        /// </summary>
        /// <returns>A hash code for the current object.</returns>
        public override int GetHashCode()
        {
            var hashCode = 1470823525;

            hashCode = (hashCode * -1521134295) + Kind.GetHashCode();
            hashCode = (hashCode * -1521134295) + Depth.GetHashCode();
            return(hashCode);
        }
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCode.Combine(
                Kind.GetHashCode(),
                BaseUri != null ? BaseUri.GetHashCode() : 0,
                ResourceType != null ? ResourceType.GetHashCode(StringComparison.OrdinalIgnoreCase) : 0,
                ResourceId != null ? ResourceId.GetHashCode(StringComparison.OrdinalIgnoreCase) : 0));
 }
Exemple #27
0
        public override int GetHashCode()
        {
            int result = 17;

            result = 31 * result + Kind.GetHashCode();
            result = 31 * result + Operator.GetHashCode();
            result = 31 * result + (Identifier ?? string.Empty).GetHashCode();
            return(result);
        }
Exemple #28
0
 public override int GetHashCode()
 {
     return(Target.FullName.GetHashCode()
            ^ Source.FullName.GetHashCode()
            ^ TargetMethod?.FullName?.GetHashCode() ?? 0
            ^ SourceMethod?.FullName?.GetHashCode() ?? 0
            ^ Kind.GetHashCode()
            ^ Offset.GetHashCode());
 }
 public override int GetHashCode()
 {
     unchecked
     {
         return(Type.GetHashCode() * 397 ^
                Nullability.GetHashCode() * 397 ^
                Kind.GetHashCode() * 397);
     }
 }
Exemple #30
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     unchecked
     {
         return(((Children.Any() ? Children.Select(f => f.GetHashCode()).Aggregate((e, f) => e ^ f) : 0) * 397) ^
                (ExpressionStart != null ? ExpressionStart.GetHashCode() : 0) ^
                Kind.GetHashCode());
     }
 }