Esempio n. 1
0
 /// <summary>
 /// Splits the incoming ip string of the format "IP,IP" example "10.2.0.0,10.3.0.0" and adds the result to the IPList
 /// </summary>
 /// <param name="ips">The ips.</param>
 /// <param name="list">The list.</param>
 private void SplitAndAddSingleIPs(string ips, IPList list)
 {
     var splitSingleIPs = ips.Split(',');
     foreach (string ip in splitSingleIPs)
         list.Add(ip);
 }
Esempio n. 2
0
 /// <summary>
 /// Splits the incoming ip string of the format "IP;MASK,IP;MASK" example "10.2.0.0;255.255.0.0,10.3.0.0;255.255.0.0" and adds the result to the IPList
 /// </summary>
 /// <param name="ips">The ips.</param>
 /// <param name="list">The list.</param>
 private void SplitAndAddMaskedIPs(string ips, IPList list)
 {
     var splitMaskedIPs = ips.Split(',');
     foreach (string maskedIp in splitMaskedIPs)
     {
         var ipAndMask = maskedIp.Split(';');
         list.Add(ipAndMask[0], ipAndMask[1]); // IP;MASK
     }
 }