From 177f88303c6ab25602bf26bc257aeabad59d7d09 Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Sun, 17 Feb 2013 08:23:53 -0800 Subject: [PATCH] ignore WithReadDb() calls in mono --- NzbDrone.Core.Test/Framework/SqlCeTest.cs | 5 +++++ .../Instrumentation/LogInjectionModule.cs | 2 +- NzbDrone.Core/Jobs/AppRestartJob.cs | 11 +---------- NzbDrone.Core/Jobs/JobProvider.cs | 2 +- SqlCe/NzbDrone.SqlCe.dll | Bin 4096 -> 4096 bytes 5 files changed, 8 insertions(+), 12 deletions(-) diff --git a/NzbDrone.Core.Test/Framework/SqlCeTest.cs b/NzbDrone.Core.Test/Framework/SqlCeTest.cs index 031c97f7f..c8a2f1bf6 100644 --- a/NzbDrone.Core.Test/Framework/SqlCeTest.cs +++ b/NzbDrone.Core.Test/Framework/SqlCeTest.cs @@ -82,6 +82,11 @@ namespace NzbDrone.Core.Test.Framework protected void WithRealDb() { + if (EnvironmentProvider.IsMono) + { + throw new IgnoreException("SqlCe is not supported in mono."); + } + _db = GetEmptyDatabase(); Mocker.SetConstant(Db); } diff --git a/NzbDrone.Core/Instrumentation/LogInjectionModule.cs b/NzbDrone.Core/Instrumentation/LogInjectionModule.cs index 24d9cf51d..d3df3a016 100644 --- a/NzbDrone.Core/Instrumentation/LogInjectionModule.cs +++ b/NzbDrone.Core/Instrumentation/LogInjectionModule.cs @@ -22,7 +22,7 @@ namespace NzbDrone.Core.Instrumentation private static object GetLogger(Type type) { - const string STRING_TO_REMOVE = "SyntikX"; + const string STRING_TO_REMOVE = "NzbDrone"; var loggerName = type.FullName; if (loggerName.StartsWith(STRING_TO_REMOVE)) diff --git a/NzbDrone.Core/Jobs/AppRestartJob.cs b/NzbDrone.Core/Jobs/AppRestartJob.cs index 69fdee10b..2db8c3bb3 100644 --- a/NzbDrone.Core/Jobs/AppRestartJob.cs +++ b/NzbDrone.Core/Jobs/AppRestartJob.cs @@ -1,7 +1,5 @@ using System; using System.Linq; -using System.Diagnostics; -using System.IO; using NLog; using NzbDrone.Common; using NzbDrone.Core.Model.Notification; @@ -10,19 +8,12 @@ namespace NzbDrone.Core.Jobs { public class AppRestartJob : IJob { - private readonly EnvironmentProvider _environmentProvider; - private readonly ProcessProvider _processProvider; - private readonly ServiceProvider _serviceProvider; private readonly IISProvider _iisProvider; private static readonly Logger logger = LogManager.GetCurrentClassLogger(); - public AppRestartJob(EnvironmentProvider environmentProvider, ProcessProvider processProvider, - ServiceProvider serviceProvider, IISProvider iisProvider) + public AppRestartJob(IISProvider iisProvider) { - _environmentProvider = environmentProvider; - _processProvider = processProvider; - _serviceProvider = serviceProvider; _iisProvider = iisProvider; } diff --git a/NzbDrone.Core/Jobs/JobProvider.cs b/NzbDrone.Core/Jobs/JobProvider.cs index 544a7c342..812f91e7c 100644 --- a/NzbDrone.Core/Jobs/JobProvider.cs +++ b/NzbDrone.Core/Jobs/JobProvider.cs @@ -261,7 +261,7 @@ namespace NzbDrone.Core.Jobs return; } - var settings = All().Where(j => j.TypeName == queueItem.JobType.ToString()).Single(); + var settings = All().Single(j => j.TypeName == queueItem.JobType.ToString()); using (_notification = new ProgressNotification(jobImplementation.Name)) { diff --git a/SqlCe/NzbDrone.SqlCe.dll b/SqlCe/NzbDrone.SqlCe.dll index 87aa47a56d16ada8d3609b5d3efbcbc486269098..3ba22d8e7369adce6d0d05cde306b77a72b5747e 100644 GIT binary patch delta 85 zcmZorXi%8Y!Muz?abve3n?Qkew(zx9M~^j!uH18e$8&7*8MYHTK*>M`AYcMw8Ab+% lHL5_&&cF~9>=G>Hl``$-MSZ_b8-n-h9_4wx`2f2E2LROK9LN9w delta 85 zcmZorXi%8Y!8}o4VPm%;n}E&DB~G@I+Fo1c9&9-@bLzUuXV^~Y03`z%fPe{zWf&P4 l)~Et8I|D;duuE{>nLkzMol@L7;?$08Un;qD^8t1T4glfL9XS91