Commit 1553a334 authored by Brickner_cp's avatar Brickner_cp

Code Analysis

parent 8e7ca0a9
...@@ -20,6 +20,9 @@ namespace PcapDotNet.Core.Extensions ...@@ -20,6 +20,9 @@ namespace PcapDotNet.Core.Extensions
/// <returns>The network interface found according to the given device or null if none is found.</returns> /// <returns>The network interface found according to the given device or null if none is found.</returns>
public static NetworkInterface GetNetworkInterface(this LivePacketDevice livePacketDevice) public static NetworkInterface GetNetworkInterface(this LivePacketDevice livePacketDevice)
{ {
if (livePacketDevice == null)
throw new ArgumentNullException("livePacketDevice");
foreach (NetworkInterface networkInterface in NetworkInterface.GetAllNetworkInterfaces()) foreach (NetworkInterface networkInterface in NetworkInterface.GetAllNetworkInterfaces())
{ {
if (@"rpcap://\Device\NPF_" + networkInterface.Id == livePacketDevice.Name) if (@"rpcap://\Device\NPF_" + networkInterface.Id == livePacketDevice.Name)
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<DocumentationFile>..\..\bin\Debug\PcapDotNet.Core.Extensions.XML</DocumentationFile> <DocumentationFile>..\..\bin\Debug\PcapDotNet.Core.Extensions.XML</DocumentationFile>
<RunCodeAnalysis>false</RunCodeAnalysis> <RunCodeAnalysis>true</RunCodeAnalysis>
<CodeAnalysisRuleSet>..\PcapDotNet.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>..\PcapDotNet.ruleset</CodeAnalysisRuleSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<DocumentationFile>..\..\bin\Release\PcapDotNet.Core.Extensions.XML</DocumentationFile> <DocumentationFile>..\..\bin\Release\PcapDotNet.Core.Extensions.XML</DocumentationFile>
<RunCodeAnalysis>false</RunCodeAnalysis> <RunCodeAnalysis>true</RunCodeAnalysis>
<CodeAnalysisRuleSet>..\PcapDotNet.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>..\PcapDotNet.ruleset</CodeAnalysisRuleSet>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment