コード例 #1
0
 /// <summary>
 /// The hash code of a record is the xor of the hash code of the record type, multicast address, source addresses and auxiliary data.
 /// </summary>
 public override int GetHashCode()
 {
     return(Sequence.GetHashCode(RecordType, MulticastAddress) ^ SourceAddresses.SequenceGetHashCode() ^ AuxiliaryData.BytesSequenceGetHashCode());
 }
コード例 #2
0
 /// <summary>
 /// Xor of the combination of the IsSuppressRouterSideProcessing and QueryRobustnessVariable fields with
 /// the hash codes of the layer length, datalink, message type, query version, group address and all the source addresses.
 /// </summary>
 public override int GetHashCode()
 {
     return(base.GetHashCode() ^
            Sequence.GetHashCode(GroupAddress, BitSequence.Merge(IsSuppressRouterSideProcessing.ToByte(), QueryRobustnessVariable)) ^
            SourceAddresses.SequenceGetHashCode());
 }