Beispiel #1
0
 internal bool Match(IPAddress iPAddress)
 {
     if (this.subnetIPRange == null || !this.subnetIPRange.LowerBound.Equals(this.IPAddress) || (this.subnetIPRange.RangeFormat == IPRange.Format.CIDR && (int)this.subnetIPRange.CIDRLength != this.MaskBits))
     {
         this.subnetIPRange = IPRange.CreateIPAndCIDR(this.IPAddress, (short)this.MaskBits);
     }
     return(this.subnetIPRange.Contains(iPAddress));
 }