Skip to content

Commit 1c2b21f

Browse files
authored
refactor: remove the implicit convert for obsolete IPNetwork
1 parent 4f63a58 commit 1c2b21f

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

src/Middleware/HttpOverrides/src/IPNetwork.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,11 @@ public static bool TryParse(ReadOnlySpan<char> networkSpan, [NotNullWhen(true)]
5252
{
5353
if (System.Net.IPNetwork.TryParse(networkSpan, out var ipNetwork))
5454
{
55-
network = ipNetwork;
55+
network = new(ipNetwork);
5656
return true;
5757
}
5858

5959
network = null;
6060
return false;
6161
}
62-
63-
/// <summary>
64-
/// Convert <see cref="System.Net.IPNetwork" /> to <see cref="Microsoft.AspNetCore.HttpOverrides.IPNetwork" /> implicitly
65-
/// </summary>
66-
public static implicit operator IPNetwork(System.Net.IPNetwork ipNetwork) => new IPNetwork(ipNetwork);
6762
}
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
#nullable enable
22
*REMOVED*Microsoft.AspNetCore.Builder.ForwardedHeadersOptions.KnownNetworks.get -> System.Collections.Generic.IList<Microsoft.AspNetCore.HttpOverrides.IPNetwork!>!
33
Microsoft.AspNetCore.Builder.ForwardedHeadersOptions.KnownNetworks.get -> System.Collections.Generic.IList<System.Net.IPNetwork>!
4-
static Microsoft.AspNetCore.HttpOverrides.IPNetwork.implicit operator Microsoft.AspNetCore.HttpOverrides.IPNetwork!(System.Net.IPNetwork ipNetwork) -> Microsoft.AspNetCore.HttpOverrides.IPNetwork!

0 commit comments

Comments
 (0)