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

            if (Timestamp != 0L)
            {
                hash ^= Timestamp.GetHashCode();
            }
            if (SampleRate != 0)
            {
                hash ^= SampleRate.GetHashCode();
            }
            if (Channels != 0)
            {
                hash ^= Channels.GetHashCode();
            }
            if (BitsPerSample != 0)
            {
                hash ^= BitsPerSample.GetHashCode();
            }
            if (Data.Length != 0)
            {
                hash ^= Data.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
예제 #2
0
        public override int GetHashCode()
        {
            var hashCode = -1416147052;

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

            hashCode = (hashCode * -1521134295) + EqualityComparer <MediaType.Audio> .Default.GetHashCode(ContentType);

            hashCode = (hashCode * -1521134295) + SampleRate.GetHashCode();
            hashCode = (hashCode * -1521134295) + BitsPerSample.GetHashCode();
            hashCode = (hashCode * -1521134295) + Channels.GetHashCode();
            return(hashCode);
        }
예제 #3
0
 public override int GetHashCode()
 {
     unchecked
     {
         int result = SlotId;
         result = (result * 397) ^ (Name != null ? Name.GetHashCode() : 0);
         result = (result * 397) ^ ClockRate.GetHashCode();
         result = (result * 397) ^ ChannelCount.GetHashCode();
         result = (result * 397) ^ SamplesPerFrame.GetHashCode();
         result = (result * 397) ^ BitsPerSample.GetHashCode();
         return(result);
     }
 }