mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-16 11:37:58 +02:00
minor cleanup
This commit is contained in:
parent
6af9b03d26
commit
3b087ba922
@ -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()
|
||||
{
|
||||
|
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using NetFwTypeLib;
|
||||
using NLog;
|
||||
using NzbDrone.Common.EnvironmentInfo;
|
||||
@ -14,10 +15,10 @@ public interface IFirewallAdapter
|
||||
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 @@ private bool IsNzbDronePortOpen(int port)
|
||||
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)
|
||||
{
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user