/// <summary> /// true iff the GroupAddress, IsSuppressRouterSideProcessing, QueryRobustnessVariable and SourceAddresses fields are equal /// and the QueryInterval is similar. /// </summary> private bool EqualFields(IgmpQueryVersion3Layer other) { return(other != null && GroupAddress == other.GroupAddress && IsSuppressRouterSideProcessing == other.IsSuppressRouterSideProcessing && QueryRobustnessVariable == other.QueryRobustnessVariable && QueryInterval.Divide(2) <= other.QueryInterval && QueryInterval.Multiply(2) >= other.QueryInterval && SourceAddresses.SequenceEqual(other.SourceAddresses)); }
/// <summary> /// Two records are equal if the record type, multicast address, source addresses and auxiliary data are equal. /// </summary> public bool Equals(IgmpGroupRecord other) { if (other == null) { return(false); } return(RecordType == other.RecordType && MulticastAddress == other.MulticastAddress && SourceAddresses.SequenceEqual(other.SourceAddresses) && AuxiliaryData.Equals(other.AuxiliaryData)); }