Skip to content

Commit

Permalink
Fix warnings reported as errors by ReSharper
Browse files Browse the repository at this point in the history
  • Loading branch information
jonorossi committed Jul 17, 2016
1 parent f22dcbe commit de7d2f2
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 20 deletions.
24 changes: 10 additions & 14 deletions src/Castle.Core.Tests/Castle.Core.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -120,20 +120,16 @@
<HintPath Condition="'$(Configuration)' == 'NET45-Release' or '$(Configuration)' == 'NET45-Debug'">..\..\lib\net45\NLog.dll</HintPath>
</Reference>
</ItemGroup>
<Choose>
<When Condition="'$(Configuration)' == 'NET45-Release' or '$(Configuration)' == 'NET45-Debug'">
<ItemGroup>
<Reference Include="Serilog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\net45\Serilog.dll</HintPath>
</Reference>
<Reference Include="Serilog.Sinks.TextWriter, Version=2.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\net45\Serilog.Sinks.TextWriter.dll</HintPath>
</Reference>
</ItemGroup>
</When>
</Choose>
<ItemGroup>
<Reference Include="Serilog">
<SpecificVersion>False</SpecificVersion>
<HintPath Condition="'$(Configuration)' == 'NET45-Release' or '$(Configuration)' == 'NET45-Debug'">..\..\lib\net45\Serilog.dll</HintPath>
</Reference>
<Reference Include="Serilog.Sinks.TextWriter">
<SpecificVersion>False</SpecificVersion>
<HintPath Condition="'$(Configuration)' == 'NET45-Release' or '$(Configuration)' == 'NET45-Debug'">..\..\lib\net45\Serilog.Sinks.TextWriter.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Reference Include="adodb, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<SpecificVersion>False</SpecificVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ namespace Castle.Components.DictionaryAdapter.Tests
{
using System;
using System.Collections;
using System.Collections.Generic;

public class CreateHashtableStrategy : DictionaryBehaviorAttribute, IDictionaryInitializer,
IDictionaryCreateStrategy
Expand All @@ -29,7 +28,7 @@ public void Initialize(IDictionaryAdapter dictionaryAdapter, object[] behaviors)
object IDictionaryCreateStrategy.Create(IDictionaryAdapter adapter, Type type, IDictionary dictionary)
{
dictionary = dictionary ?? new Hashtable();
return adapter.This.Factory.GetAdapter(type, dictionary, adapter.This.Descriptor); ;
return adapter.This.Factory.GetAdapter(type, dictionary, adapter.This.Descriptor);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ public void InvalidXml()
);
var foo = Create<IFoo>(xml);

#pragma warning disable 219
IFoo dummy;
#pragma warning restore 219
Assert.Throws<KeyNotFoundException>(() =>
dummy = foo.Two);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,9 @@ private void ResetItem()

private void TriggerAutomaticTrim()
{
#pragma warning disable 219
int dummy;
#pragma warning restore 219
for (var i = 0; i < 128; i++)
{
dummy = Dictionary.Count;
Expand Down
4 changes: 3 additions & 1 deletion src/Castle.Core.Tests/GenClasses/ClassWithGenArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ public class SubClassWithGenArgs<T, Z, Y> : ClassWithGenArgs<T, Z>
public override void DoSomething()
{
#pragma warning disable 219
int x = 1 + 10; // Just something to fool the compiler
#pragma warning disable 168
int x = 1 + 10; // Just something to fool the compiler
#pragma warning restore 168
#pragma warning restore 219
base.DoSomething();
}
Expand Down
4 changes: 1 addition & 3 deletions src/Castle.Services.Logging.NLogIntegration/NLogLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@ namespace Castle.Services.Logging.NLogIntegration
{
using System;

using Castle.Core.Logging;

using NLog;

/// <summary>
/// Implementation of <see cref="ILogger" /> for NLog.
/// Implementation of <see cref="Castle.Core.Logging.ILogger" /> for NLog.
/// </summary>
public class NLogLogger : Castle.Core.Logging.ILogger
{
Expand Down

0 comments on commit de7d2f2

Please sign in to comment.