Fixed some compile warnings.

pull/4/head
Taloth Saldono 8 years ago
parent 91d91bc673
commit e01b2ef25c

@ -296,7 +296,7 @@ namespace LogentriesCore
WriteDebugMessages("HostName parameter is not defined - trying to get it from System.Environment.MachineName");
m_HostName = "HostName=" + System.Environment.MachineName + " ";
}
catch (InvalidOperationException ex)
catch (InvalidOperationException)
{
// Cannot get host name automatically, so assume that HostName is not used
// and log message is sent without it.

@ -93,7 +93,6 @@ namespace NzbDrone.Api
break;
case Lifetime.PerRequest:
throw new InvalidOperationException("Unable to directly register a per request lifetime.");
break;
default:
throw new ArgumentOutOfRangeException();
}
@ -120,7 +119,6 @@ namespace NzbDrone.Api
break;
case Lifetime.PerRequest:
throw new InvalidOperationException("Unable to directly register a per request lifetime.");
break;
default:
throw new ArgumentOutOfRangeException();
}

@ -100,7 +100,6 @@ namespace NzbDrone.Common.Http.Dispatchers
break;
case "Range":
throw new NotImplementedException();
break;
case "Referer":
webRequest.Referer = header.Value.ToString();
break;
@ -111,7 +110,6 @@ namespace NzbDrone.Common.Http.Dispatchers
throw new NotSupportedException("User-Agent other than Sonarr not allowed.");
case "Proxy-Connection":
throw new NotImplementedException();
break;
default:
webRequest.Headers.Add(header.Key, header.Value.ToString());
break;

@ -14,8 +14,6 @@ namespace NzbDrone.Core.Test.Datastore.Migration
[Test]
public void should_convert_comma_separted_string_to_list()
{
var deviceId = "device_id";
WithTestDb(c =>
{
c.Insert.IntoTable("Notifications").Row(new

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using Moq;
using NUnit.Framework;
using NzbDrone.Core.HealthCheck.Checks;
using NzbDrone.Core.Indexers;
@ -10,17 +11,17 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks
[TestFixture]
public class IndexerCheckFixture : CoreTest<IndexerCheck>
{
private IIndexer _indexer;
private Mock<IIndexer> _indexerMock;
private void GivenIndexer(bool supportsRss, bool supportsSearch)
{
var _indexer = Mocker.GetMock<IIndexer>();
_indexer.SetupGet(s => s.SupportsRss).Returns(supportsRss);
_indexer.SetupGet(s => s.SupportsSearch).Returns(supportsSearch);
_indexerMock = Mocker.GetMock<IIndexer>();
_indexerMock.SetupGet(s => s.SupportsRss).Returns(supportsRss);
_indexerMock.SetupGet(s => s.SupportsSearch).Returns(supportsSearch);
Mocker.GetMock<IIndexerFactory>()
.Setup(s => s.GetAvailableProviders())
.Returns(new List<IIndexer> { _indexer.Object });
.Returns(new List<IIndexer> { _indexerMock.Object });
Mocker.GetMock<IIndexerFactory>()
.Setup(s => s.RssEnabled())
@ -35,14 +36,14 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks
{
Mocker.GetMock<IIndexerFactory>()
.Setup(s => s.RssEnabled())
.Returns(new List<IIndexer> { _indexer });
.Returns(new List<IIndexer> { _indexerMock.Object });
}
private void GivenSearchEnabled()
{
Mocker.GetMock<IIndexerFactory>()
.Setup(s => s.SearchEnabled())
.Returns(new List<IIndexer> { _indexer });
.Returns(new List<IIndexer> { _indexerMock.Object });
}
[Test]

@ -16,7 +16,6 @@ namespace NzbDrone.Core.Test.NotificationTests.Xbmc.Json
private const int TVDB_ID = 5;
private XbmcSettings _settings;
private Series _series;
private string _response;
private List<TvShow> _xbmcSeries;
[SetUp]

@ -16,7 +16,6 @@ namespace NzbDrone.Core.Test.NotificationTests.Xbmc.Json
{
private const int TVDB_ID = 5;
private XbmcSettings _settings;
private Series _series;
private List<TvShow> _xbmcSeries;
[SetUp]

@ -206,7 +206,7 @@ namespace NzbDrone.Core.Download.Clients.NzbVortex
{
_proxy.GetQueue(1, Settings);
}
catch (NzbVortexAuthenticationException ex)
catch (NzbVortexAuthenticationException)
{
return new ValidationFailure("ApiKey", "API Key Incorrect");
}

@ -189,7 +189,7 @@ namespace NzbDrone.Core.Download.Clients.NzbVortex
{
return ProcessRequest(client, request).Content;
}
catch (NzbVortexNotLoggedInException ex)
catch (NzbVortexNotLoggedInException)
{
_logger.Warn("Not logged in response received, reauthenticating and retrying");
request.AddQueryParameter("sessionid", GetSessionId(true, settings));

@ -9,11 +9,13 @@ namespace NzbDrone.Core.Indexers.Exceptions
public IndexerException(IndexerResponse response, string message, params object[] args)
: base(message, args)
{
_indexerResponse = response;
}
public IndexerException(IndexerResponse response, string message)
: base(message)
{
_indexerResponse = response;
}
public IndexerResponse Response

@ -124,8 +124,6 @@ namespace NzbDrone.Core.Indexers.Newznab
return new ValidationFailure(string.Empty, "Unable to connect to indexer, check the log for more details");
}
return null;
}
}
}

@ -80,7 +80,7 @@ namespace NzbDrone.Core.Indexers.Newznab
[FieldDefinition(4, Label = "Additional Parameters", HelpText = "Additional Newznab parameters", Advanced = true)]
public string AdditionalParameters { get; set; }
public NzbDroneValidationResult Validate()
public virtual NzbDroneValidationResult Validate()
{
return new NzbDroneValidationResult(Validator.Validate(this));
}

@ -54,7 +54,7 @@ namespace NzbDrone.Core.Indexers.Torznab
{
private static readonly TorznabSettingsValidator Validator = new TorznabSettingsValidator();
public NzbDroneValidationResult Validate()
public override NzbDroneValidationResult Validate()
{
return new NzbDroneValidationResult(Validator.Validate(this));
}

@ -15,21 +15,21 @@ namespace NzbDrone.Core.Notifications.Plex
//These need to be kept in the same order as XBMC Settings, but we don't want them displayed
[FieldDefinition(2, Label = "Username", Type = FieldType.Hidden)]
public string Username { get; set; }
public new string Username { get; set; }
[FieldDefinition(3, Label = "Password", Type = FieldType.Hidden)]
public string Password { get; set; }
public new string Password { get; set; }
[FieldDefinition(5, Label = "GUI Notification", Type = FieldType.Hidden)]
public bool Notify { get; set; }
public new bool Notify { get; set; }
[FieldDefinition(6, Label = "Update Library", HelpText = "Update Library on Download & Rename?", Type = FieldType.Hidden)]
public bool UpdateLibrary { get; set; }
public new bool UpdateLibrary { get; set; }
[FieldDefinition(7, Label = "Clean Library", HelpText = "Clean Library after update?", Type = FieldType.Hidden)]
public bool CleanLibrary { get; set; }
public new bool CleanLibrary { get; set; }
[FieldDefinition(8, Label = "Always Update", HelpText = "Update Library even when a video is playing?", Type = FieldType.Hidden)]
public bool AlwaysUpdate { get; set; }
public new bool AlwaysUpdate { get; set; }
}
}

Loading…
Cancel
Save