Update NetworkExtensions.cs

changed description
pull/5416/head
BaronGreenback 4 years ago committed by GitHub
parent 2fe26ef136
commit b1f0c5eb49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -27,10 +27,11 @@ namespace MediaBrowser.Common.Net
/// </summary>
/// <param name="source">The <see cref="Collection{IPObject}"/>.</param>
/// <param name="item">Item to add.</param>
/// <param name="unique"><c>True</c> if subnets that overlap should be merged (default).</param>
public static void AddItem(this Collection<IPObject> source, IPObject item, bool unique = true)
/// <param name="itemsAreNetworks">If <c>true</c> the values are treated as subnets.
/// If <b>false</b> items are addresses.</param>
public static void AddItem(this Collection<IPObject> source, IPObject item, bool itemsAreNetworks = true)
{
if (!source.ContainsAddress(item) || !unique)
if (!source.ContainsAddress(item) || !itemsAreNetworks)
{
source.Add(item);
}

Loading…
Cancel
Save