public static IPAddress ParseSubnetMask(String ipAddress)
        {
            var subnetMask       = ipAddress.Split('/').Last();
            var subnetMaskNumber = 0;

            if (!Int32.TryParse(subnetMask, out subnetMaskNumber))
            {
                return(IPAddress.Parse(subnetMask));
            }
            else
            {
                return(SubnetMask.CreateByNetBitLength(subnetMaskNumber));
            }
        }
Exemplo n.º 2
0
 public IPTenantIdentifierStrategy Add(IPAddress ipAddress, Int32 netmaskBits, String name)
 {
     return(this.Add(ipAddress, SubnetMask.CreateByNetBitLength(netmaskBits), name));
 }