Move away from using Collection, simplify code, add proper ordering

This commit is contained in:
Shadowghost
2022-07-20 14:29:30 +02:00
parent a492082f4e
commit 2281b8c997
7 changed files with 42 additions and 47 deletions

View File

@@ -1,6 +1,6 @@
using Microsoft.AspNetCore.HttpOverrides;
using System;
using System.Collections.ObjectModel;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Net;
using System.Net.Sockets;
@@ -148,9 +148,9 @@ namespace MediaBrowser.Common.Net
/// <param name="result">Collection of <see cref="IPNetwork"/>.</param>
/// <param name="negated">Boolean signaling if negated or not negated values should be parsed.</param>
/// <returns><c>True</c> if parsing was successful.</returns>
public static bool TryParseSubnets(string[] values, out Collection<IPNetwork> result, bool negated = false)
public static bool TryParseSubnets(string[] values, out List<IPNetwork> result, bool negated = false)
{
result = new Collection<IPNetwork>();
result = new List<IPNetwork>();
if (values == null || values.Length == 0)
{