Esempio n. 1
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()
        {
            var hashCode = -16010822;

            hashCode = hashCode * -1521134295 + BlockSize.GetHashCode();
            hashCode = hashCode * -1521134295 + Encoding.GetHashCode();
            hashCode = hashCode * -1521134295 + ExtraSize.GetHashCode();
            hashCode = hashCode * -1521134295 + Channels.GetHashCode();
            hashCode = hashCode * -1521134295 + SampleRate.GetHashCode();
            hashCode = hashCode * -1521134295 + BitDepth.GetHashCode();
            return(hashCode);
        }
Esempio n. 2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Id.Length != 0)
            {
                hash ^= Id.GetHashCode();
            }
            if (FolderId.Length != 0)
            {
                hash ^= FolderId.GetHashCode();
            }
            if (createdAt_ != null)
            {
                hash ^= CreatedAt.GetHashCode();
            }
            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (Description.Length != 0)
            {
                hash ^= Description.GetHashCode();
            }
            hash ^= Labels.GetHashCode();
            if (TypeId.Length != 0)
            {
                hash ^= TypeId.GetHashCode();
            }
            if (ZoneId.Length != 0)
            {
                hash ^= ZoneId.GetHashCode();
            }
            if (Size != 0L)
            {
                hash ^= Size.GetHashCode();
            }
            if (BlockSize != 0L)
            {
                hash ^= BlockSize.GetHashCode();
            }
            hash ^= productIds_.GetHashCode();
            if (Status != global::Yandex.Cloud.Compute.V1.Disk.Types.Status.Unspecified)
            {
                hash ^= Status.GetHashCode();
            }
            if (sourceCase_ == SourceOneofCase.SourceImageId)
            {
                hash ^= SourceImageId.GetHashCode();
            }
            if (sourceCase_ == SourceOneofCase.SourceSnapshotId)
            {
                hash ^= SourceSnapshotId.GetHashCode();
            }
            hash ^= instanceIds_.GetHashCode();
            if (diskPlacementPolicy_ != null)
            {
                hash ^= DiskPlacementPolicy.GetHashCode();
            }
            hash ^= (int)sourceCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }