1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-30 19:56:54 +00:00

minor cleanup

This commit is contained in:
Keivan Beigi 2014-12-06 22:08:51 -08:00
parent 6af9b03d26
commit 3b087ba922
3 changed files with 8 additions and 11 deletions

View file

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

View file

@ -1,4 +1,5 @@
using System;
using System.Linq;
using NetFwTypeLib;
using NLog;
using NzbDrone.Common.EnvironmentInfo;
@ -14,10 +15,10 @@ namespace NzbDrone.Host.AccessControl
public class FirewallAdapter : IFirewallAdapter
{
private const NET_FW_PROFILE_TYPE_ FIREWALL_PROFILE = NET_FW_PROFILE_TYPE_.NET_FW_PROFILE_STANDARD;
private readonly IConfigFileProvider _configFileProvider;
private readonly Logger _logger;
public FirewallAdapter(IConfigFileProvider configFileProvider, Logger logger)
{
_configFileProvider = configFileProvider;
@ -51,11 +52,7 @@ namespace NzbDrone.Host.AccessControl
var mgr = (INetFwMgr)Activator.CreateInstance(netFwMgrType);
var ports = mgr.LocalPolicy.GetProfileByType(FIREWALL_PROFILE).GloballyOpenPorts;
foreach (INetFwOpenPort p in ports)
{
if (p.Port == port)
return true;
}
return ports.Cast<INetFwOpenPort>().Any(p => p.Port == port);
}
catch (Exception ex)
{

View file

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