aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Networking/IPNetwork/IPAddressCollection.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Implementations/Networking/IPNetwork/IPAddressCollection.cs')
-rw-r--r--Emby.Server.Implementations/Networking/IPNetwork/IPAddressCollection.cs26
1 files changed, 7 insertions, 19 deletions
diff --git a/Emby.Server.Implementations/Networking/IPNetwork/IPAddressCollection.cs b/Emby.Server.Implementations/Networking/IPNetwork/IPAddressCollection.cs
index 2b31a0a32..c5853135c 100644
--- a/Emby.Server.Implementations/Networking/IPNetwork/IPAddressCollection.cs
+++ b/Emby.Server.Implementations/Networking/IPNetwork/IPAddressCollection.cs
@@ -1,4 +1,4 @@
-using System.Collections;
+using System.Collections;
using System.Collections.Generic;
using System.Numerics;
@@ -19,13 +19,7 @@ namespace System.Net
#region Count, Array, Enumerator
- public BigInteger Count
- {
- get
- {
- return this._ipnetwork.Total;
- }
- }
+ public BigInteger Count => this._ipnetwork.Total;
public IPAddress this[BigInteger i]
{
@@ -33,10 +27,10 @@ namespace System.Net
{
if (i >= this.Count)
{
- throw new ArgumentOutOfRangeException("i");
+ throw new ArgumentOutOfRangeException(nameof(i));
}
byte width = this._ipnetwork.AddressFamily == Sockets.AddressFamily.InterNetwork ? (byte)32 : (byte)128;
- IPNetworkCollection ipn = this._ipnetwork.Subnet(width);
+ var ipn = this._ipnetwork.Subnet(width);
return ipn[i].Network;
}
}
@@ -57,10 +51,7 @@ namespace System.Net
#region IEnumerator<IPNetwork> Members
- public IPAddress Current
- {
- get { return this[this._enumerator]; }
- }
+ public IPAddress Current => this[this._enumerator];
#endregion
@@ -76,10 +67,7 @@ namespace System.Net
#region IEnumerator Members
- object IEnumerator.Current
- {
- get { return this.Current; }
- }
+ object IEnumerator.Current => this.Current;
public bool MoveNext()
{
@@ -101,4 +89,4 @@ namespace System.Net
#endregion
}
-} \ No newline at end of file
+}