예제 #1
0
        void AddIPAddressToIPGroup(IPSubnetGroup group, ParserArgs args, StringBuilder commentBuilder)
        {
            var objectNetwork = GetObjectNetworkFromAliases(group.IPAlias, args.Results.ObjectNetworkResults);

            if (objectNetwork == null)
            {
                commentBuilder.AppendLine(string.Format("Unable to find IP address from alias '{0}'.", group.IPAlias));
                return;
            }

            if (objectNetwork.IPGroup.IP != null)
            {
                group.IP = objectNetwork.IPGroup.IP;
            }
            if (objectNetwork.IPGroup.Subnet != null)
            {
                group.Subnet = objectNetwork.IPGroup.Subnet;
            }
        }
예제 #2
0
 public AccessList()
 {
     SourceIPGroup      = new IPSubnetGroup();
     DestinationIPGroup = new IPSubnetGroup();
 }