コード例 #1
0
 protected override void ProcessRecord()
 {
     if (!string.IsNullOrEmpty(SubnetMask))
     {
         WriteObject(new AddressConfig(IPAddress, SubnetMask), true);
     }
     else if (string.IsNullOrEmpty(SubnetMask) && PrefixLength != null)
     {
         WriteObject(new AddressConfig(IPAddress, (int)PrefixLength), true);
     }
     else if (IPAddress.Contains("/"))
     {
         WriteObject(new AddressConfig(IPAddress), true);
     }
 }