aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Networking/IPNetwork/IPAddressCollection.cs
diff options
context:
space:
mode:
authorJoshua M. Boniface <joshua@boniface.me>2019-01-13 12:14:53 -0500
committerGitHub <noreply@github.com>2019-01-13 12:14:53 -0500
commit9dcaafe700b7130b49bafbadf0d47b37c6ecf53b (patch)
tree6ca1b2b3decac1a86b886dafd2645954a13601fd /Emby.Server.Implementations/Networking/IPNetwork/IPAddressCollection.cs
parent17d8de4962ea9d78f6ddb557fe26465be1944b38 (diff)
parentb936c439321b55bf89c99dac96fc78cefe752e84 (diff)
Merge pull request #458 from EraYaN/code-cleanup
Clean up several minor issues and add TODOs
Diffstat (limited to 'Emby.Server.Implementations/Networking/IPNetwork/IPAddressCollection.cs')
-rw-r--r--Emby.Server.Implementations/Networking/IPNetwork/IPAddressCollection.cs20
1 files changed, 4 insertions, 16 deletions
diff --git a/Emby.Server.Implementations/Networking/IPNetwork/IPAddressCollection.cs b/Emby.Server.Implementations/Networking/IPNetwork/IPAddressCollection.cs
index 2b31a0a32..7fe6a8d3d 100644
--- a/Emby.Server.Implementations/Networking/IPNetwork/IPAddressCollection.cs
+++ b/Emby.Server.Implementations/Networking/IPNetwork/IPAddressCollection.cs
@@ -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,7 +27,7 @@ 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);
@@ -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()
{