resharper suggestions in common implementations

This commit is contained in:
Luke Pulverenti
2013-04-10 11:45:15 -04:00
parent 7806ccd42f
commit d8263c7057
11 changed files with 52 additions and 63 deletions

View File

@@ -308,11 +308,7 @@ namespace MediaBrowser.Common.Implementations.NetworkManagement
//check if we have an IPv6 or ports
if (values.Length <= 2) // ipv4 or hostname
{
if (values.Length == 1)
//no port is specified, default
port = defaultport;
else
port = GetPort(values[1]);
port = values.Length == 1 ? defaultport : GetPort(values[1]);
//try to use the address as IPv4, otherwise get hostname
if (!IPAddress.TryParse(values[0], out ipaddy))