8 instantiations of IPNetwork
Microsoft.AspNetCore.HttpOverrides (3)
ForwardedHeadersOptions.cs (1)
86
public IList<IPNetwork> KnownNetworks { get; } = new List<IPNetwork>() { new
IPNetwork
(IPAddress.Loopback, 8) };
IPNetwork.cs (2)
134
return new
IPNetwork
(prefix, prefixLength, false);
167
network = new
IPNetwork
(prefix, prefixLength, false);
Microsoft.AspNetCore.HttpOverrides.Tests (5)
ForwardedHeadersMiddlewareTest.cs (1)
1022
options.KnownNetworks.Add(new
IPNetwork
(networkIp, prefixLength));
IPNetworkTest.cs (4)
25
var network = new
IPNetwork
(IPAddress.Parse(prefixText), length);
39
var network = new
IPNetwork
(IPAddress.Parse(prefixText), length);
54
var network = new
IPNetwork
(address, prefixLength);
72
var ex = Assert.Throws<ArgumentOutOfRangeException>(() => new
IPNetwork
(address, prefixLength));
21 references to IPNetwork
Microsoft.AspNetCore.HttpOverrides (10)
ForwardedHeadersMiddleware.cs (1)
402
foreach (
var
network in _options.KnownNetworks)
ForwardedHeadersOptions.cs (2)
86
public 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"/>.
122
public 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
153
public static bool TryParse(ReadOnlySpan<char> networkSpan, [NotNullWhen(true)] out
IPNetwork
? network)
Microsoft.AspNetCore.HttpOverrides.Tests (11)
IPNetworkTest.cs (11)
25
var
network = new IPNetwork(IPAddress.Parse(prefixText), length);
39
var
network = new IPNetwork(IPAddress.Parse(prefixText), length);
54
var
network = new IPNetwork(address, prefixLength);
83
var
network =
IPNetwork
.Parse(input);
96
var ex = Assert.Throws<FormatException>(() =>
IPNetwork
.Parse(input));
105
var ex = Assert.Throws<ArgumentOutOfRangeException>(() =>
IPNetwork
.Parse(input));
114
var result =
IPNetwork
.TryParse(input, out
var
network);
130
var result =
IPNetwork
.TryParse(input, out
var
network);