Fix code issues (naming, unused stuff)

This commit is contained in:
Flamefire committed 2014-03-12 09:41:34 +01:00
1 parent 424cb826ed
commit 898819fcf5
34 files changed
+128 -141

No files matched your search

+2 -13
View File
@@ -15,7 +15,6 @@
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System.Diagnostics;
using System.Security.Authentication;
using System.Security.Principal;
using Security.Cryptography;
@@ -166,12 +165,7 @@ namespace WebserverInitalConfig
{
if (!profile.FirewallEnabled)
return true;
foreach (INetFwAuthorizedApplication a in profile.AuthorizedApplications)
{
if (a.ProcessImageFileName == _ExePath)
return true;
}
return false;
return profile.AuthorizedApplications.Cast<INetFwAuthorizedApplication>().Any(a => a.ProcessImageFileName == _ExePath);
}
private bool _IsPortOpen(INetFwProfile profile)
@@ -180,12 +174,7 @@ namespace WebserverInitalConfig
if (!profile.FirewallEnabled)
return true;
foreach (INetFwOpenPort p in profile.GloballyOpenPorts)
{
if (p.Protocol == protocol && p.Port == _Port)
return true;
}
return false;
return profile.GloballyOpenPorts.Cast<INetFwOpenPort>().Any(p => p.Protocol == protocol && p.Port == _Port);
}
private NET_FW_IP_PROTOCOL_ _GetProtocol()
-3
View File
@@ -18,13 +18,10 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Runtime.InteropServices;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;
namespace WebserverInitalConfig
{
-2
View File
@@ -19,9 +19,7 @@ using System;
using System.Diagnostics;
using System.IO;
using System.Net;
using System.Net.Mime;
using System.Security.Authentication;
using System.Security.Cryptography.X509Certificates;
namespace WebserverInitalConfig
{
@@ -16,7 +16,6 @@
#endregion
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Allgemeine Informationen über eine Assembly werden über die folgenden