public static IpAddressRangeWithWildcard ConvertToIpRange(this string ipAddressesStr) { if (ipAddressesStr.Equals("*")) { return(IpAddressRangeWithWildcard.GetWildcardRange()); } else { return(IpAddressRangeWithWildcard.Parse(ipAddressesStr)); } }
public Task <IpRule[]> GetIpRules() { return(Task.FromResult(new List <IpRule>() { // blacklist new IpRule(IpAddressRangeWithWildcard.Parse("127.0.0.4"), IpRuleType.Blacklist), new IpRule(IpAddressRangeWithWildcard.Parse("127.0.0.4"), IpRuleType.Blacklist), // whitelist new IpRule(IpAddressRangeWithWildcard.GetWildcardRange(), IpRuleType.Whitelist) }.ToArray())); }
public IpRule(IpAddressRangeWithWildcard addressRange, IpRuleType type) { AddressRange = addressRange; Type = type; }