8 instantiations of IPNetwork
Microsoft.AspNetCore.HttpOverrides (3)
ForwardedHeadersOptions.cs (1)
86public IList<IPNetwork> KnownNetworks { get; } = new List<IPNetwork>() { new IPNetwork(IPAddress.Loopback, 8) };
IPNetwork.cs (2)
134return new IPNetwork(prefix, prefixLength, false); 167network = new IPNetwork(prefix, prefixLength, false);
Microsoft.AspNetCore.HttpOverrides.Tests (5)
ForwardedHeadersMiddlewareTest.cs (1)
1022options.KnownNetworks.Add(new IPNetwork(networkIp, prefixLength));
IPNetworkTest.cs (4)
25var network = new IPNetwork(IPAddress.Parse(prefixText), length); 39var network = new IPNetwork(IPAddress.Parse(prefixText), length); 54var network = new IPNetwork(address, prefixLength); 72var ex = Assert.Throws<ArgumentOutOfRangeException>(() => new IPNetwork(address, prefixLength));
21 references to IPNetwork
Microsoft.AspNetCore.HttpOverrides (10)
ForwardedHeadersMiddleware.cs (1)
402foreach (var network in _options.KnownNetworks)
ForwardedHeadersOptions.cs (2)
86public IList<IPNetwork> KnownNetworks { get; } = new List<IPNetwork>() { new IPNetwork(IPAddress.Loopback, 8) };
IPNetwork.cs (7)
16/// Create a new <see cref="IPNetwork"/> with the specified <see cref="IPAddress"/> and prefix length. 113/// an IP address and a prefix length to its <see cref="IPNetwork"/> equivalent. 117///The <see cref="IPNetwork"/> equivalent to the IP address and prefix length contained in <paramref name="networkSpan"/>. 122public static IPNetwork Parse(ReadOnlySpan<char> networkSpan) 139/// an IP address and a prefix length to its <see cref="IPNetwork"/> equivalent, and returns a value 144/// When this method returns, contains the <see cref="IPNetwork"/> equivalent to the IP Address 153public static bool TryParse(ReadOnlySpan<char> networkSpan, [NotNullWhen(true)] out IPNetwork? network)
Microsoft.AspNetCore.HttpOverrides.Tests (11)
IPNetworkTest.cs (11)
25var network = new IPNetwork(IPAddress.Parse(prefixText), length); 39var network = new IPNetwork(IPAddress.Parse(prefixText), length); 54var network = new IPNetwork(address, prefixLength); 83var network = IPNetwork.Parse(input); 96var ex = Assert.Throws<FormatException>(() => IPNetwork.Parse(input)); 105var ex = Assert.Throws<ArgumentOutOfRangeException>(() => IPNetwork.Parse(input)); 114var result = IPNetwork.TryParse(input, out var network); 130var result = IPNetwork.TryParse(input, out var network);