コード例 #1
0
        public bool Equals(RecentModule other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            if (!Mask.Equals(other.Mask))
            {
                if (other.Mask == null || Mask == null)
                {
                    return(false);
                }

                if (!(Equals(other.Mask, IPAddress.Parse("255.255.255.255")) ||
                      Equals(other.Mask, IPAddress.Parse("ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"))
                      ) && !(Equals(Mask, IPAddress.Parse("255.255.255.255")) ||
                             Equals(Mask, IPAddress.Parse("ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"))
                             )
                    )
                {
                    return(false);
                }
            }

            return(Mode.Equals(other.Mode) && string.Equals(Name, other.Name) && Rsource.Equals(other.Rsource) &&
                   Seconds == other.Seconds && Reap.Equals(other.Reap) && HitCount == other.HitCount &&
                   Rttl.Equals(other.Rttl));
        }
コード例 #2
0
 public bool Equals(DevgroupModule other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(SrcGroup.Equals(other.SrcGroup) && DstGroup.Equals(other.DstGroup));
 }
コード例 #3
0
ファイル: HelperModule.cs プロジェクト: a1binos/IPTables.Net
 public bool Equals(HelperModule other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Helper.Equals(other.Helper));
 }
コード例 #4
0
 public bool Equals(TcpMssMatchModule other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(MssRange.Equals(other.MssRange));
 }
コード例 #5
0
 public bool Equals(SetTargetModule other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(MatchSet.Equals(other.MatchSet) && string.Equals(MatchSetFlags, other.MatchSetFlags) && MatchSetMode == other.MatchSetMode && Exist == other.Exist && Timeout == other.Timeout);
 }
コード例 #6
0
 public bool Equals(StatisticModule other)
 {
     if (Mode != other.Mode)
     {
         return(false);
     }
     if (Mode == Modes.Nth)
     {
         return(Every.Equals(other.Every));
     }
     return(Packet.Equals(other.Packet));
 }
コード例 #7
0
 public bool Equals(LengthModule other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Length.Equals(other.Length));
 }
コード例 #8
0
ファイル: CoreModule.cs プロジェクト: justscribe/IPTables.Net
 public bool Equals(CoreModule other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Destination.Equals(other.Destination) && Fragmented.Equals(other.Fragmented) &&
            InInterface.Equals(other.InInterface) && OutInterface.Equals(other.OutInterface) &&
            Protocol.Equals(other.Protocol) && SetCounters.Equals(other.SetCounters) &&
            Source.Equals(other.Source) && string.Equals(Target, other.Target) && TargetMode == other.TargetMode);
 }
コード例 #9
0
 public bool Equals(StatisticModule other)
 {
     return(Mode == other.Mode && Every.Equals(other.Every) && Packet == other.Packet);
 }