Cleanup Multiple Compiler Warnings

This commit is contained in:
Qstick 2019-08-07 22:08:03 -04:00 committed by Mark McDowall
parent fa8b8cebf9
commit 0c1ce66053
31 changed files with 23 additions and 71 deletions

View File

@ -50,10 +50,6 @@
<Reference Include="FluentAssertions.Core, Version=4.19.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.4.19.0\lib\net40\FluentAssertions.Core.dll</HintPath>
</Reference>
<Reference Include="Moq, Version=4.0.10827.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\packages\FluentAssertions.4.19.0\lib\net45\FluentAssertions.Core.dll</HintPath>
</Reference>
<Reference Include="Moq, Version=4.0.10827.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL" />
<Reference Include="nunit.framework, Version=3.6.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.6.0\lib\net45\nunit.framework.dll</HintPath>

View File

@ -75,9 +75,6 @@
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="Omu.ValueInjecter">
<HintPath>..\packages\ValueInjecter.2.3.3\lib\net35\Omu.ValueInjecter.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\NzbDrone.Common\Properties\SharedAssemblyInfo.cs">

View File

@ -49,9 +49,6 @@
<Reference Include="FluentAssertions.Core, Version=4.19.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.4.19.0\lib\net45\FluentAssertions.Core.dll</HintPath>
</Reference>
<Reference Include="Moq, Version=4.0.10827.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<HintPath>..\packages\Moq.4.0.10827\lib\NET40\Moq.dll</HintPath>
</Reference>
<Reference Include="Moq, Version=4.0.10827.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<HintPath>..\packages\Moq.4.0.10827\lib\NET40\Moq.dll</HintPath>
<Private>True</Private>

View File

@ -31,7 +31,7 @@ namespace NzbDrone.Automation.Test
LogManager.Configuration.LoggingRules.Add(new LoggingRule("*", NLog.LogLevel.Trace, consoleTarget));
}
[TestFixtureSetUp]
[OneTimeSetUp]
public void SmokeTestSetup()
{
driver = new FirefoxDriver();
@ -56,7 +56,7 @@ namespace NzbDrone.Automation.Test
.Select(e => e.Text);
}
[TestFixtureTearDown]
[OneTimeTearDown]
public void SmokeTestTearDown()
{
_runner.KillAll();

View File

@ -46,9 +46,6 @@
<Reference Include="FluentAssertions.Core, Version=4.19.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.4.19.0\lib\net45\FluentAssertions.Core.dll</HintPath>
</Reference>
<Reference Include="Moq, Version=4.0.10827.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<HintPath>..\packages\Moq.4.0.10827\lib\NET40\Moq.dll</HintPath>
</Reference>
<Reference Include="Moq, Version=4.0.10827.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<HintPath>..\packages\Moq.4.0.10827\lib\NET40\Moq.dll</HintPath>
<Private>True</Private>

View File

@ -82,9 +82,6 @@
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="Owin">
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
</Reference>
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
</Reference>

View File

@ -15,7 +15,7 @@ namespace NzbDrone.Core.Test.Datastore.Converters
{
var i = 5;
Subject.ToDB(5).Should().Be(5);
Subject.ToDB(i).Should().Be(5);
}
[Test]

View File

@ -18,8 +18,6 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Aggregation.Aggregators
private Mock<IAugmentQuality> _fileExtensionAugmenter;
private Mock<IAugmentQuality> _nameAugmenter;
private IEnumerable<IAugmentQuality> _qualityAugmenters;
[SetUp]
public void Setup()
{

View File

@ -75,13 +75,6 @@
</Reference>
<Reference Include="Moq, Version=4.0.10827.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<HintPath>..\packages\Moq.4.0.10827\lib\NET40\Moq.dll</HintPath>
</Reference>
<Reference Include="Moq, Version=4.0.10827.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<HintPath>..\packages\Moq.4.0.10827\lib\NET40\Moq.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NCrunch.Framework, Version=3.2.0.3, Culture=neutral, PublicKeyToken=01d101bf6f3e0aea, processorArchitecture=MSIL">
<HintPath>..\packages\NCrunch.Framework.3.2.0.3\lib\NCrunch.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">

View File

@ -2,7 +2,6 @@ using System.Collections.Generic;
using FizzWare.NBuilder;
using FluentAssertions;
using NUnit.Framework;
using NzbDrone.Core.MediaFiles;
using NzbDrone.Core.Organizer;
using NzbDrone.Core.Test.Framework;
using NzbDrone.Core.Tv;
@ -14,7 +13,6 @@ namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests
{
private Series _series;
private Episode _episode;
private EpisodeFile _episodeFile;
private NamingConfig _namingConfig;
[SetUp]

View File

@ -20,7 +20,7 @@ namespace NzbDrone.Core.Test.TvTests
private List<Episode> _deletedEpisodes;
private Tuple<Series, List<Episode>> _gameOfThrones;
[TestFixtureSetUp]
[OneTimeSetUp]
public void TestFixture()
{
UseRealHttp();

View File

@ -160,7 +160,7 @@ namespace NzbDrone.Core.Download.Clients.Hadouken
}
catch (DownloadClientAuthenticationException ex)
{
_logger.ErrorException(ex.Message, ex);
_logger.Error(ex, ex.Message);
return new NzbDroneValidationFailure("Password", "Authentication failed");
}
@ -176,7 +176,7 @@ namespace NzbDrone.Core.Download.Clients.Hadouken
}
catch (Exception ex)
{
_logger.ErrorException(ex.Message, ex);
_logger.Error(ex, ex.Message);
return new NzbDroneValidationFailure(String.Empty, "Failed to get the list of torrents: " + ex.Message);
}

View File

@ -21,7 +21,6 @@ namespace NzbDrone.Core.Download.Clients.Hadouken
public class HadoukenProxy : IHadoukenProxy
{
private static int _callId;
private readonly IHttpClient _httpClient;
private readonly Logger _logger;
@ -147,7 +146,7 @@ namespace NzbDrone.Core.Download.Clients.Hadouken
}
catch(Exception ex)
{
_logger.ErrorException("Failed to map Hadouken torrent data.", ex);
_logger.Error(ex, "Failed to map Hadouken torrent data.");
}
return torrent;

View File

@ -73,7 +73,7 @@ namespace NzbDrone.Core.Extras.Metadata
{
_aggregationService.Augment(localEpisode, false);
}
catch (AugmentingFailedException ex)
catch (AugmentingFailedException)
{
_logger.Debug("Unable to parse extra file: {0}", possibleMetadataFile);
continue;

View File

@ -58,7 +58,7 @@ namespace NzbDrone.Core.Extras.Others
{
_aggregationService.Augment(localEpisode, false);
}
catch (AugmentingFailedException ex)
catch (AugmentingFailedException)
{
_logger.Debug("Unable to parse extra file: {0}", possibleExtraFile);
continue;

View File

@ -53,7 +53,7 @@ namespace NzbDrone.Core.Extras.Subtitles
{
_aggregationService.Augment(localEpisode, false);
}
catch (AugmentingFailedException ex)
catch (AugmentingFailedException)
{
_logger.Debug("Unable to parse extra file: {0}", possibleSubtitleFile);
continue;

View File

@ -51,7 +51,7 @@ namespace NzbDrone.Core.Messaging.Commands
_logger.Error(ex, "Thread aborted");
Thread.ResetAbort();
}
catch (OperationCanceledException ex)
catch (OperationCanceledException)
{
_logger.Trace("Stopped one command execution pipeline");
}

View File

@ -68,7 +68,7 @@ namespace NzbDrone.Core.Notifications.Plex.PlexTv
{
throw new NzbDroneClientException(ex.Response.StatusCode, "Unable to connect to plex.tv");
}
catch (WebException ex)
catch (WebException)
{
throw new NzbDroneClientException(HttpStatusCode.BadRequest, "Unable to connect to plex.tv");
}

View File

@ -5,7 +5,6 @@ using NzbDrone.Common.Instrumentation.Extensions;
using NzbDrone.Core.Messaging.Commands;
using NzbDrone.Core.Messaging.Events;
using NzbDrone.Core.Organizer;
using NzbDrone.Core.RootFolders;
using NzbDrone.Core.Tv.Commands;
using NzbDrone.Core.Tv.Events;
@ -17,7 +16,6 @@ namespace NzbDrone.Core.Tv
private readonly IBuildFileNames _filenameBuilder;
private readonly IDiskProvider _diskProvider;
private readonly IDiskTransferService _diskTransferService;
private readonly IRootFolderService _rootFolderService;
private readonly IEventAggregator _eventAggregator;
private readonly Logger _logger;

View File

@ -96,9 +96,6 @@
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.5.3\lib\net45\NLog.dll</HintPath>
</Reference>
<Reference Include="NLog.Extensions.Logging, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.Extensions.Logging.1.1.0\lib\net462\NLog.Extensions.Logging.dll</HintPath>
</Reference>
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
</Reference>

View File

@ -37,7 +37,7 @@ namespace NzbDrone.Host.Owin.MiddleWare
context.Response.Headers.Add(_versionHeader);
await Next.Invoke(context);
}
catch (Exception ex)
catch (Exception)
{
Logger.Debug("Unable to set version header");
}

View File

@ -2,7 +2,6 @@
using NUnit.Framework;
using Sonarr.Http.Extensions;
using RestSharp;
using Sonarr.Http.Extensions;
namespace NzbDrone.Integration.Test
{

View File

@ -62,9 +62,6 @@
<Reference Include="Microsoft.Owin.Hosting, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.Hosting.3.1.0\lib\net45\Microsoft.Owin.Hosting.dll</HintPath>
</Reference>
<Reference Include="Moq, Version=4.0.10827.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<HintPath>..\packages\Moq.4.0.10827\lib\NET40\Moq.dll</HintPath>
</Reference>
<Reference Include="Moq, Version=4.0.10827.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<HintPath>..\packages\Moq.4.0.10827\lib\NET40\Moq.dll</HintPath>
<Private>True</Private>

View File

@ -58,9 +58,6 @@
<Reference Include="Microsoft.Practices.Unity.Configuration, Version=2.1.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Unity.2.1.505.2\lib\NET35\Microsoft.Practices.Unity.Configuration.dll</HintPath>
</Reference>
<Reference Include="Moq, Version=4.0.10827.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<HintPath>..\packages\Moq.4.0.10827\lib\NET40\Moq.dll</HintPath>
</Reference>
<Reference Include="Moq, Version=4.0.10827.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<HintPath>..\packages\Moq.4.0.10827\lib\NET40\Moq.dll</HintPath>
<Private>True</Private>

View File

@ -48,9 +48,6 @@
<Reference Include="FluentAssertions.Core, Version=4.19.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.4.19.0\lib\net45\FluentAssertions.Core.dll</HintPath>
</Reference>
<Reference Include="Moq, Version=4.0.10827.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<HintPath>..\packages\Moq.4.0.10827\lib\NET40\Moq.dll</HintPath>
</Reference>
<Reference Include="Moq, Version=4.0.10827.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<HintPath>..\packages\Moq.4.0.10827\lib\NET40\Moq.dll</HintPath>
<Private>True</Private>

View File

@ -23,7 +23,6 @@ namespace Sonarr.Api.V3.EpisodeFiles
{
private readonly IMediaFileService _mediaFileService;
private readonly IDeleteMediaFiles _mediaFileDeletionService;
private readonly IRecycleBinProvider _recycleBinProvider;
private readonly ISeriesService _seriesService;
private readonly IUpgradableSpecification _upgradableSpecification;

View File

@ -15,11 +15,11 @@ namespace Sonarr.Api.V3.Profiles.Release
{
_releaseProfileService = releaseProfileService;
GetResourceById = Get;
GetResourceById = GetReleaseProfile;
GetResourceAll = GetAll;
CreateResource = Create;
UpdateResource = Update;
DeleteResource = Delete;
DeleteResource = DeleteReleaseProfile;
SharedValidator.Custom(restriction =>
{
@ -32,7 +32,7 @@ namespace Sonarr.Api.V3.Profiles.Release
});
}
private ReleaseProfileResource Get(int id)
private ReleaseProfileResource GetReleaseProfile(int id)
{
return _releaseProfileService.Get(id).ToResource();
}
@ -52,7 +52,7 @@ namespace Sonarr.Api.V3.Profiles.Release
_releaseProfileService.Update(resource.ToModel());
}
private void Delete(int id)
private void DeleteReleaseProfile(int id)
{
_releaseProfileService.Delete(id);
}

View File

@ -13,11 +13,11 @@ namespace Sonarr.Api.V3.Tags
{
_tagService = tagService;
GetResourceById = Get;
GetResourceById = GetTagDetails;
GetResourceAll = GetAll;
}
private TagDetailsResource Get(int id)
private TagDetailsResource GetTagDetails(int id)
{
return _tagService.Details(id).ToResource();
}

View File

@ -17,14 +17,14 @@ namespace Sonarr.Api.V3.Tags
{
_tagService = tagService;
GetResourceById = Get;
GetResourceById = GetTag;
GetResourceAll = GetAll;
CreateResource = Create;
UpdateResource = Update;
DeleteResource = Delete;
DeleteResource = DeleteTag;
}
private TagResource Get(int id)
private TagResource GetTag(int id)
{
return _tagService.GetTag(id).ToResource();
}
@ -44,7 +44,7 @@ namespace Sonarr.Api.V3.Tags
_tagService.Update(resource.ToModel());
}
private void Delete(int id)
private void DeleteTag(int id)
{
_tagService.Delete(id);
}

View File

@ -1,7 +1,6 @@
using System.IO;
using NLog;
using NzbDrone.Common.Disk;
using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Core.Backup;
namespace Sonarr.Http.Frontend.Mappers
@ -9,7 +8,6 @@ namespace Sonarr.Http.Frontend.Mappers
public class BackupFileMapper : StaticResourceMapperBase
{
private readonly IBackupService _backupService;
private readonly IAppFolderInfo _appFolderInfo;
public BackupFileMapper(IBackupService backupService, IDiskProvider diskProvider, Logger logger)
: base(diskProvider, logger)

View File

@ -91,7 +91,6 @@ namespace Sonarr.Http
break;
case Lifetime.PerRequest:
throw new InvalidOperationException("Unable to directly register a per request lifetime.");
break;
default:
throw new ArgumentOutOfRangeException();
}
@ -118,7 +117,6 @@ namespace Sonarr.Http
break;
case Lifetime.PerRequest:
throw new InvalidOperationException("Unable to directly register a per request lifetime.");
break;
default:
throw new ArgumentOutOfRangeException();
}