示例#1
0
 /// <summary>
 /// True iff the two objects are equal Layers.
 /// </summary>
 public bool Equals(GreLayer other)
 {
     return(other != null &&
            Version.Equals(other.Version) &&
            ProtocolType.Equals(other.ProtocolType) &&
            RecursionControl.Equals(other.RecursionControl) &&
            FutureUseBits.Equals(other.FutureUseBits) &&
            ChecksumPresent.Equals(other.ChecksumPresent) &&
            (Checksum == null ? other.Checksum == null : Checksum.Equals(other.Checksum)) &&
            (Key == null ? other.Key == null : Key.Equals(other.Key)) &&
            (SequenceNumber == null ? other.SequenceNumber == null : SequenceNumber.Equals(other.SequenceNumber)) &&
            (AcknowledgmentSequenceNumber == null ? other.AcknowledgmentSequenceNumber == null : AcknowledgmentSequenceNumber.Equals(other.AcknowledgmentSequenceNumber)) &&
            (RoutingOffset == null ? other.RoutingOffset == null : RoutingOffset.Equals(other.RoutingOffset)) &&
            (Routing == null ? other.Routing == null : Routing.SequenceEqual(other.Routing)) &&
            StrictSourceRoute.Equals(other.StrictSourceRoute));
 }
示例#2
0
 public bool Equals(Connection other)
 {
     return(Protocol.Equals(other.Protocol) && Source.Equals(other.Source) && Destination.Equals(other.Destination));
 }