Пример #1
0
 public static IPAddressRange fromString(System.String range)
 {
     if (IPUtil.IsRange(range))
     {
         try
         {
             return(new IPSubnet(IPUtil.ExtractIp(range), IPUtil.ExtractMaskBits(range)));
         }
         catch (System.Exception e)
         {
             SupportClass.WriteStackTrace(e, Console.Error);
         }
     }
     return(new IPAddressRange(range, range));
 }
Пример #2
0
 public IPSubnet(System.String ipAndMaskBits) : this(IPUtil.ExtractIp(ipAndMaskBits), IPUtil.ExtractMaskBits(ipAndMaskBits))
 {
 }
Пример #3
0
 public IPSubnet(System.String dottedNet, System.String dottedMask) : this(IPUtil.IpToLong(dottedNet), IPUtil.MaskToLong(dottedMask))
 {
 }
Пример #4
0
 public IPSubnet(System.String net, int maskBits) : this(IPUtil.IpToLong(net), IPUtil.MaskToLong(maskBits))
 {
 }
Пример #5
0
 public IPSubnet(long net, int maskBits) : this(net, IPUtil.MaskToLong(maskBits))
 {
 }
Пример #6
0
 public override long nextNumber()
 {
     return(IPUtil.IpToLong(nextIPAddress()));
 }
Пример #7
0
 protected internal IPAddressRange(System.String min, System.String max, bool isRandom, long totalMin, long totalMax) : this(IPUtil.IpToLong(min), IPUtil.IpToLong(max), isRandom, totalMin, totalMax)
 {
 }
Пример #8
0
 public virtual System.String nextIPAddress()
 {
     return(IPUtil.IpToString(nextNumber()));
 }