minor cleanup

pull/3113/head
Keivan Beigi 10 years ago
parent 6af9b03d26
commit 3b087ba922

@ -5,8 +5,8 @@ namespace NzbDrone.Common.Processes
{ {
public class ProcessOutput public class ProcessOutput
{ {
public List<String> Standard { get; set; } public List<String> Standard { get; private set; }
public List<String> Error { get; set; } public List<String> Error { get; private set; }
public ProcessOutput() public ProcessOutput()
{ {

@ -1,4 +1,5 @@
using System; using System;
using System.Linq;
using NetFwTypeLib; using NetFwTypeLib;
using NLog; using NLog;
using NzbDrone.Common.EnvironmentInfo; using NzbDrone.Common.EnvironmentInfo;
@ -51,11 +52,7 @@ namespace NzbDrone.Host.AccessControl
var mgr = (INetFwMgr)Activator.CreateInstance(netFwMgrType); var mgr = (INetFwMgr)Activator.CreateInstance(netFwMgrType);
var ports = mgr.LocalPolicy.GetProfileByType(FIREWALL_PROFILE).GloballyOpenPorts; var ports = mgr.LocalPolicy.GetProfileByType(FIREWALL_PROFILE).GloballyOpenPorts;
foreach (INetFwOpenPort p in ports) return ports.Cast<INetFwOpenPort>().Any(p => p.Port == port);
{
if (p.Port == port)
return true;
}
} }
catch (Exception ex) catch (Exception ex)
{ {

@ -6,11 +6,11 @@ namespace NzbDrone.Host.Owin
{ {
public class OwinTraceOutputFactory : ITraceOutputFactory public class OwinTraceOutputFactory : ITraceOutputFactory
{ {
private readonly Logger logger = LogManager.GetLogger("Owin"); private readonly Logger _logger = LogManager.GetLogger("Owin");
public TextWriter Create(string outputFile) public TextWriter Create(string outputFile)
{ {
return new NlogTextWriter(logger); return new NlogTextWriter(_logger);
} }
} }
} }
Loading…
Cancel
Save