/// <summary> /// List of roles to get IPs from for this rule /// </summary> /// <param name="roles"></param> /// <param name="filteringType"></param> public IPAddressRoleFilterAttribute(string roles, IPAddressFilteringAction filteringType = IPAddressFilteringAction.Allow) { _core.IPAddressRanges = new IPAddressRange[] { }; _core.FilteringType = filteringType; //set roles list _core.IPRoles.AddRange(roles.Split(new [] { ',', ';' }, StringSplitOptions.RemoveEmptyEntries).Select(x => x.Trim())); }
private bool CheckIPAddress(string requestIP, IPAddressFilteringAction action) { IPAddressFilterAttribute attribute = new IPAddressFilterAttribute( new IPAddressRange[] { new IPAddressRange("94.123.252.5", "94.130.252.100"), new IPAddressRange("94.201.252.5", "94.201.252.90"), new IPAddressRange("94.201.242.1", "94.201.242.101"), new IPAddressRange("34.201.232.5", "54.201.242.200"), }, action); return Common.IsIPAddressAllowed(attribute, requestIP); }
private bool CheckIPAddress(string requestIP, IPAddressFilteringAction action) { IPAddressFilterAttribute attribute = new IPAddressFilterAttribute( new IPAddressRange[] { new IPAddressRange("94.123.252.5", "94.130.252.100"), new IPAddressRange("94.201.252.5", "94.201.252.90"), new IPAddressRange("94.201.242.1", "94.201.242.101"), new IPAddressRange("34.201.232.5", "54.201.242.200"), }, action); return(Common.IsIPAddressAllowed(attribute, requestIP)); }
private bool CheckIPAddress(string requestIP, IPAddressFilteringAction action) { IPAddressFilterAttribute attribute = new IPAddressFilterAttribute(new string[] { "94.201.252.21", "94.201.252.22", "94.201.252.23", "94.201.252.24", "94.201.252.25", //Matching IP "94.201.252.26", "94.201.252.27" }, action); return Common.IsIPAddressAllowed(attribute, requestIP); }
private bool CheckIPAddress(string requestIP, IPAddressFilteringAction action) { IPAddressFilterAttribute attribute = new IPAddressFilterAttribute(new string[] { "94.201.252.21", "94.201.252.22", "94.201.252.23", "94.201.252.24", "94.201.252.25", //Matching IP "94.201.252.26", "94.201.252.27" }, action); return(Common.IsIPAddressAllowed(attribute, requestIP)); }
public IPAddressFilterAttribute(IPAddress ipAddress, IPAddressFilteringAction filteringType) : this(new IPAddress[] { ipAddress }, filteringType) { }
public IPAddressFilterAttribute(string ipAddress, IPAddressFilteringAction filteringType) : this(new IPAddress[] { IPAddress.Parse(ipAddress) }, filteringType) { }
public IPAddressFilterAttribute(IEnumerable <IPAddressRange> ipAddressRanges, IPAddressFilteringAction filteringType) { _core.IPAddressRanges = ipAddressRanges; _core.FilteringType = filteringType; }
private bool CheckIPAddress(string requestIP, IPAddressFilteringAction action) { IPAddressFilterAttribute attribute = new IPAddressFilterAttribute("94.201.252.25", action); return Common.IsIPAddressAllowed(attribute, requestIP); }
public IPAddressFilterAttribute(IPAddressRange ipAddressRange, IPAddressFilteringAction filteringType) : this(new IPAddressRange[] { ipAddressRange }, filteringType) { }
public IPAddressFilterAttribute(string ipAddressRangeStart, string ipAddressRangeEnd, IPAddressFilteringAction filteringType) : this(new IPAddressRange[] { new IPAddressRange(ipAddressRangeStart, ipAddressRangeEnd) }, filteringType) { }
public IPAddressFilterAttribute(IEnumerable<string> ipAddresses, IPAddressFilteringAction filteringType) : this(ipAddresses.Select(a => IPAddress.Parse(a)), filteringType) { }
public IPAddressFilterAttribute(IPAddress ipAddress, IPAddressFilteringAction filteringType) : this(new IPAddress[] { ipAddress }, filteringType) { }
public IPAddressFilterAttribute(string ipAddress, IPAddressFilteringAction filteringType) : this(new IPAddress[] { IPAddress.Parse(ipAddress) }, filteringType) { }
private bool CheckIPAddress(string requestIP, IPAddressFilteringAction action) { IPAddressFilterAttribute attribute = new IPAddressFilterAttribute(new IPAddressRange("94.201.252.5", "94.201.252.90"), action); return(Common.IsIPAddressAllowed(attribute, requestIP)); }
public IPAddressFilterAttribute(IEnumerable <string> ipAddresses, IPAddressFilteringAction filteringType) : this(ipAddresses.Select(a => IPAddress.Parse(a)), filteringType) { }
public IPAddressFilterAttribute(string ipAddressRangeStart, string ipAddressRangeEnd, IPAddressFilteringAction filteringType) : this(new IPAddressRange[] { new IPAddressRange(ipAddressRangeStart, ipAddressRangeEnd) }, filteringType) { }
public IPAddressFilterAttribute(IPAddressRange ipAddressRange, IPAddressFilteringAction filteringType) : this(new IPAddressRange[] { ipAddressRange }, filteringType) { }
public IPAddressFilterAttribute(IEnumerable <IPAddressRange> ipAddressRanges, IPAddressFilteringAction filteringType) { this.ipAddressRanges = ipAddressRanges; this.filteringType = filteringType; }
public IPAddressFilterAttribute(IEnumerable<IPAddressRange> ipAddressRanges, IPAddressFilteringAction filteringType) { this.ipAddressRanges = ipAddressRanges; this.filteringType = filteringType; }