diff --git a/build.ps1 b/build.ps1 index b7ce1cfac..639b28320 100644 --- a/build.ps1 +++ b/build.ps1 @@ -35,21 +35,18 @@ Function CleanFolder($path) Write-Host Removing XMLDoc files get-childitem $path -File -Filter *.xml -Recurse | foreach ($_) {remove-item $_.fullname} - get-childitem $path -File -Filter *.transform -Recurse | foreach ($_) {remove-item $_.fullname} - + get-childitem $path -File -Filter *.transform -Recurse | foreach ($_) {remove-item $_.fullname} - get-childitem $path -File -Filter *.dll.config -Recurse | foreach ($_) {remove-item $_.fullname} + get-childitem $path -File -Filter *.dll.config -Recurse | foreach ($_) {remove-item $_.fullname} Write-Host Removing FluentValidation.Resources files get-childitem $path -File -Filter FluentValidation.resources.dll -recurse | foreach ($_) {remove-item $_.fullname} - get-childitem $path -File -Filter app.config -Recurse | foreach ($_) {remove-item $_.fullname} - + get-childitem $path -File -Filter app.config -Recurse | foreach ($_) {remove-item $_.fullname} Write-Host Removing .less files get-childitem $path -File -Filter *.less -Recurse | foreach ($_) {remove-item $_.fullname} - Write-Host Removing NuGet Remove-Item -Recurse -Force "$path\NuGet" @@ -84,20 +81,23 @@ Function PackageMono() get-childitem $outputFolderMono -File -Filter *.pdb -Recurse | foreach ($_) {remove-item $_.fullname} Write-Host Removing Service helpers - get-childitem $outputFolderMono -File -Filter ServiceUninstall.* -Recurse | foreach ($_) {remove-item $_.fullname} - get-childitem $outputFolderMono -File -Filter ServiceInstall.* -Recurse | foreach ($_) {remove-item $_.fullname} + get-childitem $outputFolderMono -File -Filter ServiceUninstall.* -Recurse | foreach ($_) {remove-item $_.fullname} + get-childitem $outputFolderMono -File -Filter ServiceInstall.* -Recurse | foreach ($_) {remove-item $_.fullname} Write-Host Removing native windows binaries Sqlite, MediaInfo - get-childitem $outputFolderMono -File -Filter sqlite3.* -Recurse | foreach ($_) {remove-item $_.fullname} - get-childitem $outputFolderMono -File -Filter MediaInfo.* -Recurse | foreach ($_) {remove-item $_.fullname} + get-childitem $outputFolderMono -File -Filter sqlite3.* -Recurse | foreach ($_) {remove-item $_.fullname} + get-childitem $outputFolderMono -File -Filter MediaInfo.* -Recurse | foreach ($_) {remove-item $_.fullname} Write-Host "Adding MediaInfoDotNet.dll.config (for dllmap)" Copy-Item "$sourceFolder\MediaInfoDotNet.dll.config" $outputFolderMono Write-Host Renaming NzbDrone.Console.exe to NzbDrone.exe - Get-ChildItem $outputFolderMono -File -Filter "NzbDrone.exe*" -Recurse | foreach ($_) {remove-item $_.fullname} + Get-ChildItem $outputFolderMono -File -Filter "NzbDrone.exe*" -Recurse | foreach ($_) {remove-item $_.fullname} - Get-ChildItem $outputFolderMono -File -Filter "NzbDrone.Console.exe*" -Recurse | foreach ($_) { + Write-Host Removing NzbDrone.Windows + get-childitem $outputFolderMono -File -Filter NzbDrone.Windows.* -Recurse | foreach ($_) {remove-item $_.fullname} + + Get-ChildItem $outputFolderMono -File -Filter "NzbDrone.Console.exe*" -Recurse | foreach ($_) { $newName = $_.fullname -Replace ".Console","" Rename-Item $_.fullname $newName @@ -108,12 +108,11 @@ Function PackageMono() Write-Host "##teamcity[progressFinish 'Creating Mono Package']" } - Function AddJsonNet() { - get-childitem $outputFolder -File -Filter Newtonsoft.Json.* -Recurse | foreach ($_) {remove-item $_.fullname} - Copy-Item .\src\packages\Newtonsoft.Json.5.*\lib\net35\*.dll -Destination $outputFolder - Copy-Item .\src\packages\Newtonsoft.Json.5.*\lib\net35\*.dll -Destination $outputFolder\NzbDrone.Update + get-childitem $outputFolder -File -Filter Newtonsoft.Json.* -Recurse | foreach ($_) {remove-item $_.fullname} + Copy-Item .\src\packages\Newtonsoft.Json.5.*\lib\net35\*.dll -Destination $outputFolder + Copy-Item .\src\packages\Newtonsoft.Json.5.*\lib\net35\*.dll -Destination $outputFolder\NzbDrone.Update } Function PackageTests() @@ -127,8 +126,7 @@ Function PackageTests() Remove-Item -Recurse -Force $testPackageFolder -ErrorAction Continue } - - Get-ChildItem -Recurse -Directory | Where-Object {$_.FullName -like $testSearchPattern} | foreach($_){ + Get-ChildItem -Recurse -Directory | Where-Object {$_.FullName -like $testSearchPattern} | foreach($_){ Copy-Item -Recurse ($_.FullName + "\*") $testPackageFolder -ErrorAction Ignore } @@ -149,7 +147,6 @@ Function PackageTests() Write-Host "##teamcity[progressFinish 'Creating Test Package']" } - Function RunGrunt() { Write-Host "##teamcity[progressStart 'Running Grunt']" @@ -174,7 +171,14 @@ Function CheckExitCode() } } +Function CleanupWindowsPackage() +{ + Write-Host Removing NzbDrone.Mono + get-childitem $outputFolder -File -Filter NzbDrone.Mono.* -Recurse | foreach ($_) {remove-item $_.fullname} +} + Build RunGrunt PackageMono PackageTests +CleanupWindowsPackage diff --git a/src/Libraries/Mono.Posix.dll b/src/Libraries/Mono.Posix.dll new file mode 100644 index 000000000..8e219445f Binary files /dev/null and b/src/Libraries/Mono.Posix.dll differ diff --git a/src/NzbDrone.Api.Test/DirectoryLookupServiceFixture.cs b/src/NzbDrone.Api.Test/DirectoryLookupServiceFixture.cs index 849773ddb..3fbdac946 100644 --- a/src/NzbDrone.Api.Test/DirectoryLookupServiceFixture.cs +++ b/src/NzbDrone.Api.Test/DirectoryLookupServiceFixture.cs @@ -6,6 +6,7 @@ using Moq; using NUnit.Framework; using NzbDrone.Api.Directories; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Test.Common; namespace NzbDrone.Api.Test diff --git a/src/NzbDrone.Api/Directories/DirectoryLookupService.cs b/src/NzbDrone.Api/Directories/DirectoryLookupService.cs index 38c6b38e4..6f372d0e9 100644 --- a/src/NzbDrone.Api/Directories/DirectoryLookupService.cs +++ b/src/NzbDrone.Api/Directories/DirectoryLookupService.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; using NzbDrone.Common; +using NzbDrone.Common.Disk; namespace NzbDrone.Api.Directories { diff --git a/src/NzbDrone.Api/Frontend/Mappers/IndexHtmlMapper.cs b/src/NzbDrone.Api/Frontend/Mappers/IndexHtmlMapper.cs index 46af86380..501e0b6fc 100644 --- a/src/NzbDrone.Api/Frontend/Mappers/IndexHtmlMapper.cs +++ b/src/NzbDrone.Api/Frontend/Mappers/IndexHtmlMapper.cs @@ -3,6 +3,7 @@ using System.Text.RegularExpressions; using Nancy; using NLog; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Common.EnvironmentInfo; using NzbDrone.Core.Configuration; diff --git a/src/NzbDrone.Api/Frontend/Mappers/LogFileMapper.cs b/src/NzbDrone.Api/Frontend/Mappers/LogFileMapper.cs index f251fff97..9d293ee65 100644 --- a/src/NzbDrone.Api/Frontend/Mappers/LogFileMapper.cs +++ b/src/NzbDrone.Api/Frontend/Mappers/LogFileMapper.cs @@ -1,6 +1,7 @@ using System.IO; using NLog; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Common.EnvironmentInfo; namespace NzbDrone.Api.Frontend.Mappers diff --git a/src/NzbDrone.Api/Frontend/Mappers/MediaCoverMapper.cs b/src/NzbDrone.Api/Frontend/Mappers/MediaCoverMapper.cs index 3fe35324b..f6864b06a 100644 --- a/src/NzbDrone.Api/Frontend/Mappers/MediaCoverMapper.cs +++ b/src/NzbDrone.Api/Frontend/Mappers/MediaCoverMapper.cs @@ -1,6 +1,7 @@ using System.IO; using NLog; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Common.EnvironmentInfo; namespace NzbDrone.Api.Frontend.Mappers diff --git a/src/NzbDrone.Api/Frontend/Mappers/StaticResourceMapper.cs b/src/NzbDrone.Api/Frontend/Mappers/StaticResourceMapper.cs index da9fac532..5dbd3b734 100644 --- a/src/NzbDrone.Api/Frontend/Mappers/StaticResourceMapper.cs +++ b/src/NzbDrone.Api/Frontend/Mappers/StaticResourceMapper.cs @@ -1,6 +1,7 @@ using System.IO; using NLog; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Common.EnvironmentInfo; namespace NzbDrone.Api.Frontend.Mappers diff --git a/src/NzbDrone.Api/Frontend/Mappers/StaticResourceMapperBase.cs b/src/NzbDrone.Api/Frontend/Mappers/StaticResourceMapperBase.cs index 4cc42f49f..1dd542692 100644 --- a/src/NzbDrone.Api/Frontend/Mappers/StaticResourceMapperBase.cs +++ b/src/NzbDrone.Api/Frontend/Mappers/StaticResourceMapperBase.cs @@ -3,6 +3,7 @@ using NLog; using Nancy; using Nancy.Responses; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Common.EnvironmentInfo; namespace NzbDrone.Api.Frontend.Mappers diff --git a/src/NzbDrone.Api/Logs/LogFileModule.cs b/src/NzbDrone.Api/Logs/LogFileModule.cs index 4fe48d21e..b896e6020 100644 --- a/src/NzbDrone.Api/Logs/LogFileModule.cs +++ b/src/NzbDrone.Api/Logs/LogFileModule.cs @@ -2,6 +2,7 @@ using System.IO; using System.Linq; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Common.EnvironmentInfo; namespace NzbDrone.Api.Logs diff --git a/src/NzbDrone.App.Test/ContainerFixture.cs b/src/NzbDrone.App.Test/ContainerFixture.cs index d542b9dee..7c9dcba5b 100644 --- a/src/NzbDrone.App.Test/ContainerFixture.cs +++ b/src/NzbDrone.App.Test/ContainerFixture.cs @@ -27,7 +27,7 @@ namespace NzbDrone.App.Test } [Test] - public void should_be_able_to_resolve_downlodclients() + public void should_be_able_to_resolve_downloadclients() { MainAppContainerBuilder.BuildContainer(args).Resolve<IEnumerable<IDownloadClient>>().Should().NotBeEmpty(); } diff --git a/src/NzbDrone.App.Test/NzbDrone.Host.Test.csproj b/src/NzbDrone.App.Test/NzbDrone.Host.Test.csproj index 274499d34..badd7903b 100644 --- a/src/NzbDrone.App.Test/NzbDrone.Host.Test.csproj +++ b/src/NzbDrone.App.Test/NzbDrone.Host.Test.csproj @@ -97,6 +97,10 @@ </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(SolutionDir)\.nuget\nuget.targets" /> + <PropertyGroup> + <PostBuildEvent>xcopy /s /y "$(SolutionDir)\..\_output\NzbDrone.Mono.*" "$(TargetDir)" +xcopy /s /y "$(SolutionDir)\..\_output\NzbDrone.Windows.*" "$(TargetDir)"</PostBuildEvent> + </PropertyGroup> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> diff --git a/src/NzbDrone.Common.Test/DiskProviderTests/DiskProviderFixture.cs b/src/NzbDrone.Common.Test/DiskProviderTests/DiskProviderFixtureBase.cs similarity index 97% rename from src/NzbDrone.Common.Test/DiskProviderTests/DiskProviderFixture.cs rename to src/NzbDrone.Common.Test/DiskProviderTests/DiskProviderFixtureBase.cs index e759bdf10..90ab30574 100644 --- a/src/NzbDrone.Common.Test/DiskProviderTests/DiskProviderFixture.cs +++ b/src/NzbDrone.Common.Test/DiskProviderTests/DiskProviderFixtureBase.cs @@ -3,12 +3,12 @@ using System.IO; using System.Linq; using FluentAssertions; using NUnit.Framework; +using NzbDrone.Common.Disk; using NzbDrone.Test.Common; namespace NzbDrone.Common.Test.DiskProviderTests { - [TestFixture] - public class DiskProviderFixture : TestBase<DiskProvider> + public class DiskProviderFixtureBase<TSubject> : TestBase<TSubject> where TSubject : class, IDiskProvider { DirectoryInfo _binFolder; DirectoryInfo _binFolderCopy; @@ -91,7 +91,6 @@ namespace NzbDrone.Common.Test.DiskProviderTests VerifyCopy(); } - [Test] public void CopyFolder_should_overwrite_existing_folder() { @@ -126,7 +125,6 @@ namespace NzbDrone.Common.Test.DiskProviderTests VerifyMove(); } - [Test] public void move_read_only_file() { @@ -142,9 +140,6 @@ namespace NzbDrone.Common.Test.DiskProviderTests Subject.MoveFile(source, destination); } - - - [Test] public void empty_folder_should_return_folder_modified_date() { @@ -161,12 +156,11 @@ namespace NzbDrone.Common.Test.DiskProviderTests Directory.CreateDirectory(testDir); TestLogger.Info("Path is: {0}", testFile); - Subject.WriteAllText(testFile, "Test"); Subject.GetLastFolderWrite(SandboxFolder).Should().BeOnOrAfter(DateTime.UtcNow.AddMinutes(-1)); - Subject.GetLastFolderWrite(SandboxFolder).Should().BeBefore(DateTime.UtcNow); + Subject.GetLastFolderWrite(SandboxFolder).Should().BeBefore(DateTime.UtcNow.AddMinutes(1)); } [Test] @@ -189,7 +183,6 @@ namespace NzbDrone.Common.Test.DiskProviderTests Subject.IsFileLocked(testFile).Should().BeFalse(); } - [Test] public void should_return_true_for_unlocked_file() { @@ -202,7 +195,6 @@ namespace NzbDrone.Common.Test.DiskProviderTests } } - [Test] public void should_be_able_to_set_permission_from_parrent() { @@ -212,7 +204,6 @@ namespace NzbDrone.Common.Test.DiskProviderTests Subject.InheritFolderPermissions(testFile); } - [Test] [Explicit] public void check_last_write() diff --git a/src/NzbDrone.Common.Test/DiskProviderTests/FreeSpaceFixture.cs b/src/NzbDrone.Common.Test/DiskProviderTests/FreeSpaceFixture.cs deleted file mode 100644 index b29f60180..000000000 --- a/src/NzbDrone.Common.Test/DiskProviderTests/FreeSpaceFixture.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System.IO; -using FluentAssertions; -using NUnit.Framework; -using NzbDrone.Test.Common; - -namespace NzbDrone.Common.Test.DiskProviderTests -{ - [TestFixture] - public class FreeSpaceFixture : TestBase<DiskProvider> - { - [Test] - public void should_get_free_space_for_folder() - { - var path = @"C:\".AsOsAgnostic(); - - Subject.GetAvailableSpace(path).Should().NotBe(0); - } - - [Test] - public void should_get_free_space_for_folder_that_doesnt_exist() - { - var path = @"C:\".AsOsAgnostic(); - - Subject.GetAvailableSpace(Path.Combine(path, "invalidFolder")).Should().NotBe(0); - } - - - [Test] - public void should_get_free_space_for_drive_that_doesnt_exist() - { - WindowsOnly(); - - Assert.Throws<DirectoryNotFoundException>(() => Subject.GetAvailableSpace("J:\\").Should().NotBe(0)); - } - - [Test] - public void should_be_able_to_check_space_on_ramdrive() - { - LinuxOnly(); - Subject.GetAvailableSpace("/run/").Should().NotBe(0); - } - } -} diff --git a/src/NzbDrone.Core.Test/ProviderTests/DiskProviderTests/FreeDiskSpaceFixture.cs b/src/NzbDrone.Common.Test/DiskProviderTests/FreeSpaceFixtureBase.cs similarity index 51% rename from src/NzbDrone.Core.Test/ProviderTests/DiskProviderTests/FreeDiskSpaceFixture.cs rename to src/NzbDrone.Common.Test/DiskProviderTests/FreeSpaceFixtureBase.cs index 849cf820a..4917c4457 100644 --- a/src/NzbDrone.Core.Test/ProviderTests/DiskProviderTests/FreeDiskSpaceFixture.cs +++ b/src/NzbDrone.Common.Test/DiskProviderTests/FreeSpaceFixtureBase.cs @@ -2,15 +2,44 @@ using System.IO; using FluentAssertions; using NUnit.Framework; -using NzbDrone.Common; -using NzbDrone.Core.Test.Framework; +using NzbDrone.Common.Disk; using NzbDrone.Test.Common; -namespace NzbDrone.Core.Test.ProviderTests.DiskProviderTests +namespace NzbDrone.Common.Test.DiskProviderTests { - [TestFixture] - public class FreeDiskSpaceFixture : CoreTest<DiskProvider> + public abstract class FreeSpaceFixtureBase<TSubject> : TestBase<TSubject> where TSubject : class, IDiskProvider { + [Test] + public void should_get_free_space_for_folder() + { + var path = @"C:\".AsOsAgnostic(); + + Subject.GetAvailableSpace(path).Should().NotBe(0); + } + + [Test] + public void should_get_free_space_for_folder_that_doesnt_exist() + { + var path = @"C:\".AsOsAgnostic(); + + Subject.GetAvailableSpace(Path.Combine(path, "invalidFolder")).Should().NotBe(0); + } + + [Test] + public void should_get_free_space_for_drive_that_doesnt_exist() + { + WindowsOnly(); + + Assert.Throws<DirectoryNotFoundException>(() => Subject.GetAvailableSpace("J:\\").Should().NotBe(0)); + } + + [Test] + public void should_be_able_to_check_space_on_ramdrive() + { + LinuxOnly(); + Subject.GetAvailableSpace("/run/").Should().NotBe(0); + } + [Test] public void should_return_free_disk_space() { diff --git a/src/NzbDrone.Common.Test/DiskProviderTests/IsParentFixture.cs b/src/NzbDrone.Common.Test/DiskProviderTests/IsParentFixtureBase.cs similarity index 87% rename from src/NzbDrone.Common.Test/DiskProviderTests/IsParentFixture.cs rename to src/NzbDrone.Common.Test/DiskProviderTests/IsParentFixtureBase.cs index f3ede03eb..7ae8c326f 100644 --- a/src/NzbDrone.Common.Test/DiskProviderTests/IsParentFixture.cs +++ b/src/NzbDrone.Common.Test/DiskProviderTests/IsParentFixtureBase.cs @@ -1,11 +1,11 @@ using FluentAssertions; using NUnit.Framework; +using NzbDrone.Common.Disk; using NzbDrone.Test.Common; namespace NzbDrone.Common.Test.DiskProviderTests { - [TestFixture] - public class IsParentFixture : TestBase<DiskProvider> + public class IsParentFixtureBase<TSubject> : TestBase<TSubject> where TSubject : class, IDiskProvider { private string _parent = @"C:\Test".AsOsAgnostic(); diff --git a/src/NzbDrone.Common.Test/NzbDrone.Common.Test.csproj b/src/NzbDrone.Common.Test/NzbDrone.Common.Test.csproj index dcdca41b2..e59fb8bf9 100644 --- a/src/NzbDrone.Common.Test/NzbDrone.Common.Test.csproj +++ b/src/NzbDrone.Common.Test/NzbDrone.Common.Test.csproj @@ -62,14 +62,14 @@ <Compile Include="CacheTests\CachedManagerFixture.cs" /> <Compile Include="CacheTests\CachedFixture.cs" /> <Compile Include="ConfigFileProviderTest.cs" /> - <Compile Include="DiskProviderTests\FreeSpaceFixture.cs" /> - <Compile Include="DiskProviderTests\IsParentFixture.cs" /> + <Compile Include="DiskProviderTests\FreeSpaceFixtureBase.cs" /> + <Compile Include="DiskProviderTests\IsParentFixtureBase.cs" /> <Compile Include="EnsureTest\PathExtensionFixture.cs" /> <Compile Include="EnvironmentTests\StartupArgumentsFixture.cs" /> <Compile Include="EnvironmentTests\EnvironmentProviderTest.cs" /> <Compile Include="ReflectionExtensions.cs" /> <Compile Include="PathExtensionFixture.cs" /> - <Compile Include="DiskProviderTests\DiskProviderFixture.cs" /> + <Compile Include="DiskProviderTests\DiskProviderFixtureBase.cs" /> <Compile Include="EnvironmentProviderTest.cs" /> <Compile Include="ProcessProviderTests.cs" /> <Compile Include="ReflectionTests\ReflectionExtensionFixture.cs" /> diff --git a/src/NzbDrone.Common/Composition/ContainerBuilderBase.cs b/src/NzbDrone.Common/Composition/ContainerBuilderBase.cs index d2041c6de..1286d4b70 100644 --- a/src/NzbDrone.Common/Composition/ContainerBuilderBase.cs +++ b/src/NzbDrone.Common/Composition/ContainerBuilderBase.cs @@ -67,6 +67,5 @@ namespace NzbDrone.Common.Composition Container.RegisterAllAsSingleton(contractType, implementations); } } - } -} \ No newline at end of file +} diff --git a/src/NzbDrone.Common/DiskProvider.cs b/src/NzbDrone.Common/Disk/DiskProviderBase.cs similarity index 67% rename from src/NzbDrone.Common/DiskProvider.cs rename to src/NzbDrone.Common/Disk/DiskProviderBase.cs index 13379c91c..a6242f6ef 100644 --- a/src/NzbDrone.Common/DiskProvider.cs +++ b/src/NzbDrone.Common/Disk/DiskProviderBase.cs @@ -9,46 +9,9 @@ using NzbDrone.Common.EnsureThat; using NzbDrone.Common.EnvironmentInfo; using NzbDrone.Common.Instrumentation; -namespace NzbDrone.Common +namespace NzbDrone.Common.Disk { - public interface IDiskProvider - { - DateTime GetLastFolderWrite(string path); - DateTime GetLastFileWrite(string path); - void EnsureFolder(string path); - bool FolderExists(string path); - bool FileExists(string path); - bool FileExists(string path, bool caseSensitive); - string[] GetDirectories(string path); - string[] GetFiles(string path, SearchOption searchOption); - long GetFolderSize(string path); - long GetFileSize(string path); - void CreateFolder(string path); - void CopyFolder(string source, string destination); - void MoveFolder(string source, string destination); - void DeleteFile(string path); - void MoveFile(string source, string destination); - void DeleteFolder(string path, bool recursive); - void InheritFolderPermissions(string filename); - long? GetAvailableSpace(string path); - string ReadAllText(string filePath); - void WriteAllText(string filename, string contents); - void FileSetLastWriteTimeUtc(string path, DateTime dateTime); - void FolderSetLastWriteTimeUtc(string path, DateTime dateTime); - bool IsFileLocked(string path); - string GetPathRoot(string path); - string GetParentFolder(string path); - void SetPermissions(string filename, WellKnownSidType accountSid, FileSystemRights rights, AccessControlType controlType); - bool IsParent(string parentPath, string childPath); - void SetFolderWriteTime(string path, DateTime time); - FileAttributes GetFileAttributes(string path); - void EmptyFolder(string path); - string[] GetFixedDrives(); - long? GetTotalSize(string path); - string GetVolumeLabel(string path); - } - - public class DiskProvider : IDiskProvider + public abstract class DiskProviderBase : IDiskProvider { enum TransferAction { @@ -56,15 +19,13 @@ namespace NzbDrone.Common Move } - [DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Auto)] - [return: MarshalAs(UnmanagedType.Bool)] - static extern bool GetDiskFreeSpaceEx(string lpDirectoryName, - out ulong lpFreeBytesAvailable, - out ulong lpTotalNumberOfBytes, - out ulong lpTotalNumberOfFreeBytes); - private static readonly Logger Logger = NzbDroneLogger.GetLogger(); + public abstract long? GetAvailableSpace(string path); + public abstract void InheritFolderPermissions(string filename); + public abstract void SetFilePermissions(string path, string mask); + public abstract long? GetTotalSize(string path); + public DateTime GetLastFolderWrite(string path) { Ensure.That(path, () => path).IsValidPath(); @@ -272,51 +233,6 @@ namespace NzbDrone.Common Directory.Delete(path, recursive); } - public void InheritFolderPermissions(string filename) - { - Ensure.That(filename, () => filename).IsValidPath(); - - try - { - var fs = File.GetAccessControl(filename); - fs.SetAccessRuleProtection(false, false); - File.SetAccessControl(filename, fs); - } - catch (NotImplementedException) - { - if (!OsInfo.IsLinux) - { - throw; - } - } - } - - public long? GetAvailableSpace(string path) - { - Ensure.That(path, () => path).IsValidPath(); - - var root = GetPathRoot(path); - - if (!FolderExists(root)) - throw new DirectoryNotFoundException(root); - - if (OsInfo.IsLinux) - { - try - { - return GetDriveInfoLinux(path).AvailableFreeSpace; - } - catch (InvalidOperationException e) - { - Logger.ErrorException("Couldn't get free space for " + path, e); - } - - return null; - } - - return DriveFreeSpaceEx(root); - } - public string ReadAllText(string filePath) { Ensure.That(filePath, () => filePath).IsValidPath(); @@ -394,7 +310,6 @@ namespace NzbDrone.Common InheritanceFlags.ContainerInherit | InheritanceFlags.ObjectInherit, PropagationFlags.None, controlType); - directorySecurity.AddAccessRule(accessRule); directoryInfo.SetAccessControl(directorySecurity); } @@ -466,32 +381,6 @@ namespace NzbDrone.Common return (DriveInfo.GetDrives().Where(x => x.DriveType == DriveType.Fixed).Select(x => x.Name)).ToArray(); } - public long? GetTotalSize(string path) - { - Ensure.That(path, () => path).IsValidPath(); - - var root = GetPathRoot(path); - - if (!FolderExists(root)) - throw new DirectoryNotFoundException(root); - - if (OsInfo.IsLinux) - { - try - { - return GetDriveInfoLinux(path).TotalSize; - } - catch (InvalidOperationException e) - { - Logger.ErrorException("Couldn't get total space for " + path, e); - } - - return null; - } - - return DriveTotalSizeEx(root); - } - public string GetVolumeLabel(string path) { var driveInfo = DriveInfo.GetDrives().SingleOrDefault(d => d.Name == path); @@ -503,58 +392,5 @@ namespace NzbDrone.Common return driveInfo.VolumeLabel; } - - private static long DriveFreeSpaceEx(string folderName) - { - Ensure.That(folderName, () => folderName).IsValidPath(); - - if (!folderName.EndsWith("\\")) - { - folderName += '\\'; - } - - ulong free = 0; - ulong dummy1 = 0; - ulong dummy2 = 0; - - if (GetDiskFreeSpaceEx(folderName, out free, out dummy1, out dummy2)) - { - return (long)free; - } - - return 0; - } - - private static long DriveTotalSizeEx(string folderName) - { - Ensure.That(folderName, () => folderName).IsValidPath(); - - if (!folderName.EndsWith("\\")) - { - folderName += '\\'; - } - - ulong total = 0; - ulong dummy1 = 0; - ulong dummy2 = 0; - - if (GetDiskFreeSpaceEx(folderName, out dummy1, out total, out dummy2)) - { - return (long)total; - } - - return 0; - } - - private DriveInfo GetDriveInfoLinux(string path) - { - var drives = DriveInfo.GetDrives(); - - return - drives.Where(drive => - drive.IsReady && path.StartsWith(drive.Name, StringComparison.CurrentCultureIgnoreCase)) - .OrderByDescending(drive => drive.Name.Length) - .First(); - } } -} \ No newline at end of file +} diff --git a/src/NzbDrone.Common/Disk/IDiskProvider.cs b/src/NzbDrone.Common/Disk/IDiskProvider.cs new file mode 100644 index 000000000..a5a635dc2 --- /dev/null +++ b/src/NzbDrone.Common/Disk/IDiskProvider.cs @@ -0,0 +1,50 @@ +using System; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices; +using System.Security.AccessControl; +using System.Security.Principal; +using NLog; +using NzbDrone.Common.EnsureThat; +using NzbDrone.Common.EnvironmentInfo; +using NzbDrone.Common.Instrumentation; + +namespace NzbDrone.Common.Disk +{ + public interface IDiskProvider + { + DateTime GetLastFolderWrite(string path); + DateTime GetLastFileWrite(string path); + void EnsureFolder(string path); + bool FolderExists(string path); + bool FileExists(string path); + bool FileExists(string path, bool caseSensitive); + string[] GetDirectories(string path); + string[] GetFiles(string path, SearchOption searchOption); + long GetFolderSize(string path); + long GetFileSize(string path); + void CreateFolder(string path); + void CopyFolder(string source, string destination); + void MoveFolder(string source, string destination); + void DeleteFile(string path); + void MoveFile(string source, string destination); + void DeleteFolder(string path, bool recursive); + void InheritFolderPermissions(string filename); + long? GetAvailableSpace(string path); + string ReadAllText(string filePath); + void WriteAllText(string filename, string contents); + void FileSetLastWriteTimeUtc(string path, DateTime dateTime); + void FolderSetLastWriteTimeUtc(string path, DateTime dateTime); + bool IsFileLocked(string path); + string GetPathRoot(string path); + string GetParentFolder(string path); + void SetPermissions(string filename, WellKnownSidType accountSid, FileSystemRights rights, AccessControlType controlType); + bool IsParent(string parentPath, string childPath); + void SetFolderWriteTime(string path, DateTime time); + FileAttributes GetFileAttributes(string path); + void EmptyFolder(string path); + string[] GetFixedDrives(); + long? GetTotalSize(string path); + string GetVolumeLabel(string path); + } +} \ No newline at end of file diff --git a/src/NzbDrone.Common/EnvironmentInfo/AppFolderFactory.cs b/src/NzbDrone.Common/EnvironmentInfo/AppFolderFactory.cs new file mode 100644 index 000000000..c49d4864b --- /dev/null +++ b/src/NzbDrone.Common/EnvironmentInfo/AppFolderFactory.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Security.AccessControl; +using System.Security.Principal; +using System.Text; +using NLog; +using NzbDrone.Common.Disk; +using NzbDrone.Common.Instrumentation; + +namespace NzbDrone.Common.EnvironmentInfo +{ + public interface IAppFolderFactory + { + void Register(); + } + + public class AppFolderFactory : IAppFolderFactory + { + private readonly IAppFolderInfo _appFolderInfo; + private readonly IDiskProvider _diskProvider; + private readonly Logger _logger; + + public AppFolderFactory(IAppFolderInfo appFolderInfo, IDiskProvider diskProvider) + { + _appFolderInfo = appFolderInfo; + _diskProvider = diskProvider; + _logger = NzbDroneLogger.GetLogger(this); + } + + public void Register() + { + _diskProvider.EnsureFolder(_appFolderInfo.AppDataFolder); + + if (!OsInfo.IsLinux) + { + SetPermissions(); + } + } + + private void SetPermissions() + { + try + { + _diskProvider.SetPermissions(_appFolderInfo.AppDataFolder, WellKnownSidType.WorldSid, FileSystemRights.FullControl, AccessControlType.Allow); + } + catch (Exception ex) + { + _logger.WarnException("Coudn't set app folder permission", ex); + } + } + } +} diff --git a/src/NzbDrone.Common/EnvironmentInfo/AppFolderInfo.cs b/src/NzbDrone.Common/EnvironmentInfo/AppFolderInfo.cs index a7273a2af..3bf7876f3 100644 --- a/src/NzbDrone.Common/EnvironmentInfo/AppFolderInfo.cs +++ b/src/NzbDrone.Common/EnvironmentInfo/AppFolderInfo.cs @@ -4,6 +4,7 @@ using System.Reflection; using System.Security.AccessControl; using System.Security.Principal; using NLog; +using NzbDrone.Common.Disk; using NzbDrone.Common.Instrumentation; namespace NzbDrone.Common.EnvironmentInfo @@ -17,22 +18,15 @@ namespace NzbDrone.Common.EnvironmentInfo public class AppFolderInfo : IAppFolderInfo { - private readonly IDiskProvider _diskProvider; - private readonly Logger _logger; private readonly Environment.SpecialFolder DATA_SPECIAL_FOLDER = Environment.SpecialFolder.CommonApplicationData; - - public AppFolderInfo(IDiskProvider diskProvider, IStartupContext startupContext) + public AppFolderInfo(IStartupContext startupContext) { - _diskProvider = diskProvider; - if (OsInfo.IsLinux) { DATA_SPECIAL_FOLDER = Environment.SpecialFolder.ApplicationData; } - _logger = NzbDroneLogger.GetLogger(this); - if (startupContext.Args.ContainsKey(StartupContext.APPDATA)) { AppDataFolder = startupContext.Args[StartupContext.APPDATA]; @@ -42,29 +36,8 @@ namespace NzbDrone.Common.EnvironmentInfo AppDataFolder = Path.Combine(Environment.GetFolderPath(DATA_SPECIAL_FOLDER, Environment.SpecialFolderOption.None), "NzbDrone"); } - _diskProvider.EnsureFolder(AppDataFolder); - StartUpFolder = new FileInfo(Assembly.GetExecutingAssembly().Location).Directory.FullName; TempFolder = Path.GetTempPath(); - - diskProvider.EnsureFolder(AppDataFolder); - - if (!OsInfo.IsLinux) - { - SetPermissions(); - } - } - - private void SetPermissions() - { - try - { - _diskProvider.SetPermissions(AppDataFolder, WellKnownSidType.WorldSid, FileSystemRights.FullControl, AccessControlType.Allow); - } - catch (Exception ex) - { - _logger.WarnException("Coudn't set app folder permission", ex); - } } public string AppDataFolder { get; private set; } diff --git a/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfo.cs b/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfo.cs index a4192a8a3..7f81d23fd 100644 --- a/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfo.cs +++ b/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfo.cs @@ -37,8 +37,6 @@ namespace NzbDrone.Common.EnvironmentInfo static RuntimeInfo() { IsProduction = InternalIsProduction(); - - } public bool IsAdmin diff --git a/src/NzbDrone.Common/Instrumentation/LogTargets.cs b/src/NzbDrone.Common/Instrumentation/LogTargets.cs index 4f028aa60..31c8c6e09 100644 --- a/src/NzbDrone.Common/Instrumentation/LogTargets.cs +++ b/src/NzbDrone.Common/Instrumentation/LogTargets.cs @@ -11,7 +11,7 @@ namespace NzbDrone.Common.Instrumentation { public static void Register(IStartupContext startupContext, bool updateApp, bool inConsole) { - var appFolderInfo = new AppFolderInfo(new DiskProvider(), startupContext); + var appFolderInfo = new AppFolderInfo(startupContext); LogManager.Configuration = new LoggingConfiguration(); @@ -55,8 +55,7 @@ namespace NzbDrone.Common.Instrumentation LogManager.Configuration.LoggingRules.Add(loggingRule); } - - const string FileLogLayout = @"${date:format=yy-M-d HH\:mm\:ss.f}|${level}|${logger}|${message}${onexception:inner=${newline}${newline}${exception:format=ToString}${newline}}"; + const string FILE_LOG_LAYOUT = @"${date:format=yy-M-d HH\:mm\:ss.f}|${level}|${logger}|${message}${onexception:inner=${newline}${newline}${exception:format=ToString}${newline}}"; private static void RegisterAppFile(IAppFolderInfo appFolderInfo) { @@ -73,7 +72,7 @@ namespace NzbDrone.Common.Instrumentation fileTarget.MaxArchiveFiles = 5; fileTarget.EnableFileDelete = true; fileTarget.ArchiveNumbering = ArchiveNumberingMode.Rolling; - fileTarget.Layout = FileLogLayout; + fileTarget.Layout = FILE_LOG_LAYOUT; var loggingRule = new LoggingRule("*", LogLevel.Info, fileTarget); @@ -81,8 +80,6 @@ namespace NzbDrone.Common.Instrumentation LogManager.Configuration.LoggingRules.Add(loggingRule); } - - private static void RegisterUpdateFile(IAppFolderInfo appFolderInfo) { var fileTarget = new FileTarget(); @@ -94,7 +91,7 @@ namespace NzbDrone.Common.Instrumentation fileTarget.ConcurrentWrites = false; fileTarget.ConcurrentWriteAttemptDelay = 50; fileTarget.ConcurrentWriteAttempts = 100; - fileTarget.Layout = FileLogLayout; + fileTarget.Layout = FILE_LOG_LAYOUT; var loggingRule = new LoggingRule("*", LogLevel.Trace, fileTarget); @@ -104,7 +101,6 @@ namespace NzbDrone.Common.Instrumentation private static void RegisterExceptron() { - var exceptronTarget = new ExceptronTarget(); var rule = new LoggingRule("*", LogLevel.Warn, exceptronTarget); @@ -112,7 +108,6 @@ namespace NzbDrone.Common.Instrumentation LogManager.Configuration.LoggingRules.Add(rule); } - private static void RegisterLoggly() { var logglyTarger = new LogglyTarget(); @@ -122,6 +117,5 @@ namespace NzbDrone.Common.Instrumentation LogManager.Configuration.AddTarget("LogglyLogger", logglyTarger); LogManager.Configuration.LoggingRules.Add(rule); } - } } \ No newline at end of file diff --git a/src/NzbDrone.Common/NzbDrone.Common.csproj b/src/NzbDrone.Common/NzbDrone.Common.csproj index 883ece0a3..6ce3ba94c 100644 --- a/src/NzbDrone.Common/NzbDrone.Common.csproj +++ b/src/NzbDrone.Common/NzbDrone.Common.csproj @@ -67,6 +67,7 @@ <Compile Include="Composition\IContainer.cs" /> <Compile Include="Composition\ContainerBuilderBase.cs" /> <Compile Include="DateTimeExtensions.cs" /> + <Compile Include="Disk\DiskProviderBase.cs" /> <Compile Include="EnsureThat\Ensure.cs" /> <Compile Include="EnsureThat\EnsureBoolExtensions.cs" /> <Compile Include="EnsureThat\EnsureCollectionExtensions.cs" /> @@ -85,6 +86,7 @@ <Compile Include="EnsureThat\ExpressionExtensions.cs" /> <Compile Include="EnsureThat\Param.cs" /> <Compile Include="EnsureThat\Resources\ExceptionMessages.Designer.cs" /> + <Compile Include="EnvironmentInfo\AppFolderFactory.cs" /> <Compile Include="EnvironmentInfo\BuildInfo.cs" /> <Compile Include="EnvironmentInfo\StartupContext.cs" /> <Compile Include="EnvironmentInfo\RuntimeInfo.cs" /> @@ -121,7 +123,7 @@ <Compile Include="HttpProvider.cs" /> <Compile Include="ConsoleService.cs" /> <Compile Include="PathExtensions.cs" /> - <Compile Include="DiskProvider.cs" /> + <Compile Include="Disk\IDiskProvider.cs" /> <Compile Include="EnvironmentInfo\AppFolderInfo.cs" /> <Compile Include="Model\ProcessInfo.cs" /> <Compile Include="Processes\ProcessProvider.cs" /> diff --git a/src/NzbDrone.Core.Test/Download/DownloadClientTests/BlackholeProviderFixture.cs b/src/NzbDrone.Core.Test/Download/DownloadClientTests/BlackholeProviderFixture.cs index 9de3178b9..2b0639019 100644 --- a/src/NzbDrone.Core.Test/Download/DownloadClientTests/BlackholeProviderFixture.cs +++ b/src/NzbDrone.Core.Test/Download/DownloadClientTests/BlackholeProviderFixture.cs @@ -3,6 +3,7 @@ using System.Net; using Moq; using NUnit.Framework; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Core.Configuration; using NzbDrone.Core.Download.Clients; using NzbDrone.Core.Parser.Model; diff --git a/src/NzbDrone.Core.Test/Download/DownloadClientTests/PneumaticProviderFixture.cs b/src/NzbDrone.Core.Test/Download/DownloadClientTests/PneumaticProviderFixture.cs index cfac3a99a..dfb27a5f7 100644 --- a/src/NzbDrone.Core.Test/Download/DownloadClientTests/PneumaticProviderFixture.cs +++ b/src/NzbDrone.Core.Test/Download/DownloadClientTests/PneumaticProviderFixture.cs @@ -4,6 +4,7 @@ using System.Net; using Moq; using NUnit.Framework; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Core.Configuration; using NzbDrone.Core.Download.Clients; using NzbDrone.Core.Parser.Model; diff --git a/src/NzbDrone.Core.Test/Framework/CoreTest.cs b/src/NzbDrone.Core.Test/Framework/CoreTest.cs index 933fa4c5e..8e84294f7 100644 --- a/src/NzbDrone.Core.Test/Framework/CoreTest.cs +++ b/src/NzbDrone.Core.Test/Framework/CoreTest.cs @@ -1,6 +1,7 @@ using System.IO; using NUnit.Framework; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Test.Common; namespace NzbDrone.Core.Test.Framework @@ -22,12 +23,11 @@ namespace NzbDrone.Core.Test.Framework Mocker.SetConstant<IHttpProvider>(new HttpProvider(TestLogger)); } - protected void UseRealDisk() - { - Mocker.SetConstant<IDiskProvider>(new DiskProvider()); - WithTempAsAppPath(); - } - +// protected void UseRealDisk() +// { +// Mocker.SetConstant<IDiskProvider>(new DiskProvider()); +// WithTempAsAppPath(); +// } } public abstract class CoreTest<TSubject> : CoreTest where TSubject : class diff --git a/src/NzbDrone.Core.Test/MediaCoverTests/CoverExistsSpecificationFixture.cs b/src/NzbDrone.Core.Test/MediaCoverTests/CoverExistsSpecificationFixture.cs index b720e5516..62add23d1 100644 --- a/src/NzbDrone.Core.Test/MediaCoverTests/CoverExistsSpecificationFixture.cs +++ b/src/NzbDrone.Core.Test/MediaCoverTests/CoverExistsSpecificationFixture.cs @@ -3,6 +3,7 @@ using FluentAssertions; using Moq; using NUnit.Framework; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Core.MediaCover; using NzbDrone.Core.Test.Framework; using NzbDrone.Test.Common; diff --git a/src/NzbDrone.Core.Test/MediaCoverTests/MediaCoverServiceFixture.cs b/src/NzbDrone.Core.Test/MediaCoverTests/MediaCoverServiceFixture.cs index a157164b3..f06a50f77 100644 --- a/src/NzbDrone.Core.Test/MediaCoverTests/MediaCoverServiceFixture.cs +++ b/src/NzbDrone.Core.Test/MediaCoverTests/MediaCoverServiceFixture.cs @@ -4,6 +4,7 @@ using FluentAssertions; using Moq; using NUnit.Framework; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Common.EnvironmentInfo; using NzbDrone.Core.MediaCover; using NzbDrone.Core.Test.Framework; @@ -17,7 +18,7 @@ namespace NzbDrone.Core.Test.MediaCoverTests [SetUp] public void Setup() { - Mocker.SetConstant<IAppFolderInfo>(new AppFolderInfo(new DiskProvider(), Mocker.Resolve<IStartupContext>())); + Mocker.SetConstant<IAppFolderInfo>(new AppFolderInfo(Mocker.Resolve<IStartupContext>())); } [Test] diff --git a/src/NzbDrone.Core.Test/MediaFiles/DownloadedEpisodesImportServiceFixture.cs b/src/NzbDrone.Core.Test/MediaFiles/DownloadedEpisodesImportServiceFixture.cs index ddfcc9bbc..90208c4f5 100644 --- a/src/NzbDrone.Core.Test/MediaFiles/DownloadedEpisodesImportServiceFixture.cs +++ b/src/NzbDrone.Core.Test/MediaFiles/DownloadedEpisodesImportServiceFixture.cs @@ -5,6 +5,7 @@ using FizzWare.NBuilder; using Moq; using NUnit.Framework; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Core.Configuration; using NzbDrone.Core.MediaFiles; using NzbDrone.Core.MediaFiles.Commands; diff --git a/src/NzbDrone.Core.Test/MediaFiles/EpisodeFileMovingServiceTests/MoveEpisodeFileFixture.cs b/src/NzbDrone.Core.Test/MediaFiles/EpisodeFileMovingServiceTests/MoveEpisodeFileFixture.cs index a1682fef0..b0a6db570 100644 --- a/src/NzbDrone.Core.Test/MediaFiles/EpisodeFileMovingServiceTests/MoveEpisodeFileFixture.cs +++ b/src/NzbDrone.Core.Test/MediaFiles/EpisodeFileMovingServiceTests/MoveEpisodeFileFixture.cs @@ -6,6 +6,7 @@ using FizzWare.NBuilder; using Moq; using NUnit.Framework; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Core.MediaFiles; using NzbDrone.Core.Organizer; using NzbDrone.Core.Parser.Model; diff --git a/src/NzbDrone.Core.Test/MediaFiles/EpisodeImport/Specifications/FreeSpaceSpecificationFixture.cs b/src/NzbDrone.Core.Test/MediaFiles/EpisodeImport/Specifications/FreeSpaceSpecificationFixture.cs index 4f1f545a4..664f56b8b 100644 --- a/src/NzbDrone.Core.Test/MediaFiles/EpisodeImport/Specifications/FreeSpaceSpecificationFixture.cs +++ b/src/NzbDrone.Core.Test/MediaFiles/EpisodeImport/Specifications/FreeSpaceSpecificationFixture.cs @@ -6,6 +6,7 @@ using FluentAssertions; using Moq; using NUnit.Framework; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Core.MediaFiles.EpisodeImport.Specifications; using NzbDrone.Core.Parser.Model; using NzbDrone.Core.Test.Framework; diff --git a/src/NzbDrone.Core.Test/MediaFiles/EpisodeImport/Specifications/NotInUseSpecificationFixture.cs b/src/NzbDrone.Core.Test/MediaFiles/EpisodeImport/Specifications/NotInUseSpecificationFixture.cs index 7887e40aa..3cac9c319 100644 --- a/src/NzbDrone.Core.Test/MediaFiles/EpisodeImport/Specifications/NotInUseSpecificationFixture.cs +++ b/src/NzbDrone.Core.Test/MediaFiles/EpisodeImport/Specifications/NotInUseSpecificationFixture.cs @@ -3,6 +3,7 @@ using FluentAssertions; using Moq; using NUnit.Framework; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Core.MediaFiles.EpisodeImport.Specifications; using NzbDrone.Core.Parser.Model; using NzbDrone.Core.Test.Framework; diff --git a/src/NzbDrone.Core.Test/MediaFiles/EpisodeImport/Specifications/NotUnpackingSpecificationFixture.cs b/src/NzbDrone.Core.Test/MediaFiles/EpisodeImport/Specifications/NotUnpackingSpecificationFixture.cs index db8afed53..ba39c485e 100644 --- a/src/NzbDrone.Core.Test/MediaFiles/EpisodeImport/Specifications/NotUnpackingSpecificationFixture.cs +++ b/src/NzbDrone.Core.Test/MediaFiles/EpisodeImport/Specifications/NotUnpackingSpecificationFixture.cs @@ -4,6 +4,7 @@ using FluentAssertions; using Moq; using NUnit.Framework; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Core.Configuration; using NzbDrone.Core.MediaFiles.EpisodeImport.Specifications; using NzbDrone.Core.Parser.Model; diff --git a/src/NzbDrone.Core.Test/MediaFiles/MediaFileTableCleanupServiceFixture.cs b/src/NzbDrone.Core.Test/MediaFiles/MediaFileTableCleanupServiceFixture.cs index 343a03158..8fbdd09a5 100644 --- a/src/NzbDrone.Core.Test/MediaFiles/MediaFileTableCleanupServiceFixture.cs +++ b/src/NzbDrone.Core.Test/MediaFiles/MediaFileTableCleanupServiceFixture.cs @@ -5,6 +5,7 @@ using FizzWare.NBuilder; using Moq; using NUnit.Framework; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Core.MediaFiles; using NzbDrone.Core.MediaFiles.Commands; using NzbDrone.Core.Test.Framework; diff --git a/src/NzbDrone.Core.Test/MediaFiles/MediaInfo/VideoFileInfoReaderFixture.cs b/src/NzbDrone.Core.Test/MediaFiles/MediaInfo/VideoFileInfoReaderFixture.cs index dbf6aba36..c5b6a97b4 100644 --- a/src/NzbDrone.Core.Test/MediaFiles/MediaInfo/VideoFileInfoReaderFixture.cs +++ b/src/NzbDrone.Core.Test/MediaFiles/MediaInfo/VideoFileInfoReaderFixture.cs @@ -3,6 +3,7 @@ using FluentAssertions; using Moq; using NUnit.Framework; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Core.MediaFiles.MediaInfo; using NzbDrone.Core.Test.Framework; using NzbDrone.Test.Common.Categories; diff --git a/src/NzbDrone.Core.Test/MediaFiles/UpgradeMediaFileServiceFixture.cs b/src/NzbDrone.Core.Test/MediaFiles/UpgradeMediaFileServiceFixture.cs index 84761a0a5..f13e960cf 100644 --- a/src/NzbDrone.Core.Test/MediaFiles/UpgradeMediaFileServiceFixture.cs +++ b/src/NzbDrone.Core.Test/MediaFiles/UpgradeMediaFileServiceFixture.cs @@ -5,6 +5,7 @@ using Marr.Data; using Moq; using NUnit.Framework; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Core.MediaFiles; using NzbDrone.Core.Parser.Model; using NzbDrone.Core.Test.Framework; diff --git a/src/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj b/src/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj index dd0723b87..326789038 100644 --- a/src/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj +++ b/src/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj @@ -208,7 +208,6 @@ <Compile Include="DecisionEngineTests\HistorySpecificationFixture.cs" /> <Compile Include="DecisionEngineTests\UpgradeDiskSpecificationFixture.cs" /> <Compile Include="DecisionEngineTests\QualityUpgradeSpecificationFixture.cs" /> - <Compile Include="ProviderTests\DiskProviderTests\FreeDiskSpaceFixture.cs" /> <Compile Include="NotificationTests\ProwlProviderTest.cs" /> <Compile Include="ProviderTests\DiskProviderTests\ArchiveProviderFixture.cs" /> <Compile Include="MediaFiles\DownloadedEpisodesImportServiceFixture.cs" /> diff --git a/src/NzbDrone.Core.Test/ProviderTests/DiskScanProviderTests/GetVideoFilesFixture.cs b/src/NzbDrone.Core.Test/ProviderTests/DiskScanProviderTests/GetVideoFilesFixture.cs index bb2bb4f93..e238435ac 100644 --- a/src/NzbDrone.Core.Test/ProviderTests/DiskScanProviderTests/GetVideoFilesFixture.cs +++ b/src/NzbDrone.Core.Test/ProviderTests/DiskScanProviderTests/GetVideoFilesFixture.cs @@ -4,6 +4,7 @@ using FluentAssertions; using Moq; using NUnit.Framework; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Core.MediaFiles; using NzbDrone.Core.Test.Framework; diff --git a/src/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/CleanupFixture.cs b/src/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/CleanupFixture.cs index 76823f8c7..ba42b585a 100644 --- a/src/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/CleanupFixture.cs +++ b/src/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/CleanupFixture.cs @@ -3,6 +3,7 @@ using System.IO; using Moq; using NUnit.Framework; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Core.Configuration; using NzbDrone.Core.MediaFiles; using NzbDrone.Core.Test.Framework; diff --git a/src/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/DeleteDirectoryFixture.cs b/src/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/DeleteDirectoryFixture.cs index aa68c1139..974792c15 100644 --- a/src/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/DeleteDirectoryFixture.cs +++ b/src/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/DeleteDirectoryFixture.cs @@ -5,6 +5,7 @@ using System.IO; using Moq; using NUnit.Framework; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Core.Configuration; using NzbDrone.Core.MediaFiles; using NzbDrone.Core.Test.Framework; diff --git a/src/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/DeleteFileFixture.cs b/src/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/DeleteFileFixture.cs index 49f5c6582..f9f6c44d5 100644 --- a/src/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/DeleteFileFixture.cs +++ b/src/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/DeleteFileFixture.cs @@ -4,6 +4,7 @@ using System; using Moq; using NUnit.Framework; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Core.Configuration; using NzbDrone.Core.MediaFiles; using NzbDrone.Core.Test.Framework; diff --git a/src/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/EmptyFixture.cs b/src/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/EmptyFixture.cs index a15ec60da..641bf8183 100644 --- a/src/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/EmptyFixture.cs +++ b/src/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/EmptyFixture.cs @@ -5,6 +5,7 @@ using System.IO; using Moq; using NUnit.Framework; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Core.Configuration; using NzbDrone.Core.MediaFiles; using NzbDrone.Core.Test.Framework; diff --git a/src/NzbDrone.Core.Test/RootFolderTests/FreeSpaceOnDrivesFixture.cs b/src/NzbDrone.Core.Test/RootFolderTests/FreeSpaceOnDrivesFixture.cs index a7f2310c3..31b0d0da0 100644 --- a/src/NzbDrone.Core.Test/RootFolderTests/FreeSpaceOnDrivesFixture.cs +++ b/src/NzbDrone.Core.Test/RootFolderTests/FreeSpaceOnDrivesFixture.cs @@ -7,6 +7,7 @@ using FluentAssertions; using Moq; using NUnit.Framework; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Core.RootFolders; using NzbDrone.Core.Test.Framework; using NzbDrone.Test.Common; diff --git a/src/NzbDrone.Core.Test/RootFolderTests/RootFolderServiceFixture.cs b/src/NzbDrone.Core.Test/RootFolderTests/RootFolderServiceFixture.cs index 7e09f1519..f63b60cd5 100644 --- a/src/NzbDrone.Core.Test/RootFolderTests/RootFolderServiceFixture.cs +++ b/src/NzbDrone.Core.Test/RootFolderTests/RootFolderServiceFixture.cs @@ -5,6 +5,7 @@ using FluentAssertions; using Moq; using NUnit.Framework; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Core.RootFolders; using NzbDrone.Core.Test.Framework; using NzbDrone.Test.Common; diff --git a/src/NzbDrone.Core.Test/UpdateTests/UpdateServiceFixture.cs b/src/NzbDrone.Core.Test/UpdateTests/UpdateServiceFixture.cs index 09b0b2746..810dc8661 100644 --- a/src/NzbDrone.Core.Test/UpdateTests/UpdateServiceFixture.cs +++ b/src/NzbDrone.Core.Test/UpdateTests/UpdateServiceFixture.cs @@ -4,6 +4,7 @@ using FluentAssertions; using Moq; using NUnit.Framework; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Common.EnvironmentInfo; using NzbDrone.Common.Model; using NzbDrone.Common.Processes; @@ -128,12 +129,10 @@ namespace NzbDrone.Core.Test.UpdateTests updateSubFolder.Exists.Should().BeFalse(); - Mocker.Resolve<DiskProvider>(); Mocker.SetConstant<IArchiveService>(Mocker.Resolve<ArchiveService>()); Subject.Execute(new ApplicationUpdateCommand()); - updateSubFolder.Refresh(); updateSubFolder.Exists.Should().BeTrue(); diff --git a/src/NzbDrone.Core/Datastore/DbFactory.cs b/src/NzbDrone.Core/Datastore/DbFactory.cs index 9fcb6e673..21f10784e 100644 --- a/src/NzbDrone.Core/Datastore/DbFactory.cs +++ b/src/NzbDrone.Core/Datastore/DbFactory.cs @@ -71,8 +71,6 @@ namespace NzbDrone.Core.Datastore } } - - _migrationController.MigrateToLatest(connectionString, migrationType); return new Database(() => diff --git a/src/NzbDrone.Core/DiskSpace/DiskSpaceService.cs b/src/NzbDrone.Core/DiskSpace/DiskSpaceService.cs index c9cb8ad10..b57dac3e7 100644 --- a/src/NzbDrone.Core/DiskSpace/DiskSpaceService.cs +++ b/src/NzbDrone.Core/DiskSpace/DiskSpaceService.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using NLog; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Core.Configuration; using NzbDrone.Core.Tv; diff --git a/src/NzbDrone.Core/Download/Clients/PneumaticClient.cs b/src/NzbDrone.Core/Download/Clients/PneumaticClient.cs index f536965b2..8ebc5b409 100644 --- a/src/NzbDrone.Core/Download/Clients/PneumaticClient.cs +++ b/src/NzbDrone.Core/Download/Clients/PneumaticClient.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.IO; using NLog; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Common.Instrumentation; using NzbDrone.Core.Configuration; using NzbDrone.Core.Organizer; diff --git a/src/NzbDrone.Core/Instrumentation/DeleteLogFilesService.cs b/src/NzbDrone.Core/Instrumentation/DeleteLogFilesService.cs index 657f8f7da..25ae79cad 100644 --- a/src/NzbDrone.Core/Instrumentation/DeleteLogFilesService.cs +++ b/src/NzbDrone.Core/Instrumentation/DeleteLogFilesService.cs @@ -1,6 +1,7 @@ using System.IO; using NLog; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Common.EnvironmentInfo; using NzbDrone.Core.Instrumentation.Commands; using NzbDrone.Core.Messaging.Commands; diff --git a/src/NzbDrone.Core/MediaCover/CoverAlreadyExistsSpecification.cs b/src/NzbDrone.Core/MediaCover/CoverAlreadyExistsSpecification.cs index 587df4392..c8ba77f23 100644 --- a/src/NzbDrone.Core/MediaCover/CoverAlreadyExistsSpecification.cs +++ b/src/NzbDrone.Core/MediaCover/CoverAlreadyExistsSpecification.cs @@ -1,5 +1,6 @@ using NLog; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Common.Serializer; namespace NzbDrone.Core.MediaCover diff --git a/src/NzbDrone.Core/MediaCover/MediaCoverService.cs b/src/NzbDrone.Core/MediaCover/MediaCoverService.cs index 243b9d87f..cb81150b4 100644 --- a/src/NzbDrone.Core/MediaCover/MediaCoverService.cs +++ b/src/NzbDrone.Core/MediaCover/MediaCoverService.cs @@ -4,6 +4,7 @@ using System.IO; using System.Net; using NLog; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Common.EnvironmentInfo; using NzbDrone.Core.Configuration; using NzbDrone.Core.Messaging.Events; diff --git a/src/NzbDrone.Core/MediaFiles/DiskScanService.cs b/src/NzbDrone.Core/MediaFiles/DiskScanService.cs index c5478ccf1..6c237fa6d 100644 --- a/src/NzbDrone.Core/MediaFiles/DiskScanService.cs +++ b/src/NzbDrone.Core/MediaFiles/DiskScanService.cs @@ -2,6 +2,7 @@ using System.Linq; using NLog; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Core.Configuration; using NzbDrone.Core.Instrumentation; using NzbDrone.Core.MediaFiles.Commands; diff --git a/src/NzbDrone.Core/MediaFiles/DownloadedEpisodesImportService.cs b/src/NzbDrone.Core/MediaFiles/DownloadedEpisodesImportService.cs index eba7b84ac..174693c7c 100644 --- a/src/NzbDrone.Core/MediaFiles/DownloadedEpisodesImportService.cs +++ b/src/NzbDrone.Core/MediaFiles/DownloadedEpisodesImportService.cs @@ -4,6 +4,7 @@ using System.IO; using System.Linq; using NLog; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Core.Configuration; using NzbDrone.Core.MediaFiles.Commands; using NzbDrone.Core.MediaFiles.EpisodeImport; diff --git a/src/NzbDrone.Core/MediaFiles/EpisodeFileMovingService.cs b/src/NzbDrone.Core/MediaFiles/EpisodeFileMovingService.cs index 0c08c7595..60bd7ed13 100644 --- a/src/NzbDrone.Core/MediaFiles/EpisodeFileMovingService.cs +++ b/src/NzbDrone.Core/MediaFiles/EpisodeFileMovingService.cs @@ -3,6 +3,7 @@ using System.IO; using System.Linq; using NLog; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Common.EnsureThat; using NzbDrone.Common.EnvironmentInfo; using NzbDrone.Core.Messaging.Events; diff --git a/src/NzbDrone.Core/MediaFiles/EpisodeImport/ImportApprovedEpisodes.cs b/src/NzbDrone.Core/MediaFiles/EpisodeImport/ImportApprovedEpisodes.cs index 92b0bd059..c9fe15e58 100644 --- a/src/NzbDrone.Core/MediaFiles/EpisodeImport/ImportApprovedEpisodes.cs +++ b/src/NzbDrone.Core/MediaFiles/EpisodeImport/ImportApprovedEpisodes.cs @@ -4,6 +4,7 @@ using System.IO; using System.Linq; using NLog; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Core.MediaFiles.Events; using NzbDrone.Core.Messaging.Events; diff --git a/src/NzbDrone.Core/MediaFiles/EpisodeImport/ImportDecisionMaker.cs b/src/NzbDrone.Core/MediaFiles/EpisodeImport/ImportDecisionMaker.cs index bd81e797d..56e49d2c2 100644 --- a/src/NzbDrone.Core/MediaFiles/EpisodeImport/ImportDecisionMaker.cs +++ b/src/NzbDrone.Core/MediaFiles/EpisodeImport/ImportDecisionMaker.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using NLog; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Core.DecisionEngine; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; diff --git a/src/NzbDrone.Core/MediaFiles/EpisodeImport/Specifications/FreeSpaceSpecification.cs b/src/NzbDrone.Core/MediaFiles/EpisodeImport/Specifications/FreeSpaceSpecification.cs index a981fc9f7..282c954a4 100644 --- a/src/NzbDrone.Core/MediaFiles/EpisodeImport/Specifications/FreeSpaceSpecification.cs +++ b/src/NzbDrone.Core/MediaFiles/EpisodeImport/Specifications/FreeSpaceSpecification.cs @@ -2,6 +2,7 @@ using System.IO; using NLog; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Core.Parser.Model; namespace NzbDrone.Core.MediaFiles.EpisodeImport.Specifications diff --git a/src/NzbDrone.Core/MediaFiles/EpisodeImport/Specifications/NotInUseSpecification.cs b/src/NzbDrone.Core/MediaFiles/EpisodeImport/Specifications/NotInUseSpecification.cs index 1da911a60..b27b8e89d 100644 --- a/src/NzbDrone.Core/MediaFiles/EpisodeImport/Specifications/NotInUseSpecification.cs +++ b/src/NzbDrone.Core/MediaFiles/EpisodeImport/Specifications/NotInUseSpecification.cs @@ -1,5 +1,6 @@ using NLog; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Core.Parser.Model; namespace NzbDrone.Core.MediaFiles.EpisodeImport.Specifications diff --git a/src/NzbDrone.Core/MediaFiles/EpisodeImport/Specifications/NotUnpackingSpecification.cs b/src/NzbDrone.Core/MediaFiles/EpisodeImport/Specifications/NotUnpackingSpecification.cs index 2445e0701..50279a4e2 100644 --- a/src/NzbDrone.Core/MediaFiles/EpisodeImport/Specifications/NotUnpackingSpecification.cs +++ b/src/NzbDrone.Core/MediaFiles/EpisodeImport/Specifications/NotUnpackingSpecification.cs @@ -2,6 +2,7 @@ using System.IO; using NLog; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Common.EnvironmentInfo; using NzbDrone.Core.Configuration; using NzbDrone.Core.Parser.Model; diff --git a/src/NzbDrone.Core/MediaFiles/MediaFileTableCleanupService.cs b/src/NzbDrone.Core/MediaFiles/MediaFileTableCleanupService.cs index 4b67befab..4a7af0d36 100644 --- a/src/NzbDrone.Core/MediaFiles/MediaFileTableCleanupService.cs +++ b/src/NzbDrone.Core/MediaFiles/MediaFileTableCleanupService.cs @@ -2,6 +2,7 @@ using System; using System.Linq; using NLog; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Core.MediaFiles.Commands; using NzbDrone.Core.Messaging.Commands; using NzbDrone.Core.Tv; diff --git a/src/NzbDrone.Core/MediaFiles/MediaInfo/VideoFileInfoReader.cs b/src/NzbDrone.Core/MediaFiles/MediaInfo/VideoFileInfoReader.cs index 85ccdb263..8429a4dbc 100644 --- a/src/NzbDrone.Core/MediaFiles/MediaInfo/VideoFileInfoReader.cs +++ b/src/NzbDrone.Core/MediaFiles/MediaInfo/VideoFileInfoReader.cs @@ -3,6 +3,7 @@ using System.IO; using MediaInfoLib; using NLog; using NzbDrone.Common; +using NzbDrone.Common.Disk; namespace NzbDrone.Core.MediaFiles.MediaInfo { diff --git a/src/NzbDrone.Core/MediaFiles/RecycleBinProvider.cs b/src/NzbDrone.Core/MediaFiles/RecycleBinProvider.cs index 460baa818..4c5140c9a 100644 --- a/src/NzbDrone.Core/MediaFiles/RecycleBinProvider.cs +++ b/src/NzbDrone.Core/MediaFiles/RecycleBinProvider.cs @@ -2,6 +2,7 @@ using System.IO; using NLog; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Common.EnvironmentInfo; using NzbDrone.Common.Instrumentation; using NzbDrone.Core.Configuration; diff --git a/src/NzbDrone.Core/MediaFiles/UpgradeMediaFileService.cs b/src/NzbDrone.Core/MediaFiles/UpgradeMediaFileService.cs index 494c4ba10..87bd5349a 100644 --- a/src/NzbDrone.Core/MediaFiles/UpgradeMediaFileService.cs +++ b/src/NzbDrone.Core/MediaFiles/UpgradeMediaFileService.cs @@ -1,6 +1,7 @@ using System.Linq; using NLog; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Core.Parser.Model; namespace NzbDrone.Core.MediaFiles diff --git a/src/NzbDrone.Core/Parser/ParsingService.cs b/src/NzbDrone.Core/Parser/ParsingService.cs index 0134bbe4a..37b450154 100644 --- a/src/NzbDrone.Core/Parser/ParsingService.cs +++ b/src/NzbDrone.Core/Parser/ParsingService.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using NLog; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Core.DataAugmentation.Scene; using NzbDrone.Core.IndexerSearch.Definitions; using NzbDrone.Core.Parser.Model; diff --git a/src/NzbDrone.Core/RootFolders/RootFolderService.cs b/src/NzbDrone.Core/RootFolders/RootFolderService.cs index 8b3ab07c1..b659f809d 100644 --- a/src/NzbDrone.Core/RootFolders/RootFolderService.cs +++ b/src/NzbDrone.Core/RootFolders/RootFolderService.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.IO; using NLog; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Common.Instrumentation; using NzbDrone.Core.Configuration; using NzbDrone.Core.Tv; diff --git a/src/NzbDrone.Core/Update/InstallUpdateService.cs b/src/NzbDrone.Core/Update/InstallUpdateService.cs index 34c233e5c..1df980c20 100644 --- a/src/NzbDrone.Core/Update/InstallUpdateService.cs +++ b/src/NzbDrone.Core/Update/InstallUpdateService.cs @@ -2,6 +2,7 @@ using System.IO; using NLog; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Common.EnvironmentInfo; using NzbDrone.Common.Processes; using NzbDrone.Core.Messaging.Commands; diff --git a/src/NzbDrone.Host/Bootstrap.cs b/src/NzbDrone.Host/Bootstrap.cs index 96ebc1ab6..7909ea526 100644 --- a/src/NzbDrone.Host/Bootstrap.cs +++ b/src/NzbDrone.Host/Bootstrap.cs @@ -17,6 +17,8 @@ namespace NzbDrone.Host public static void Start(StartupContext startupContext, IUserAlert userAlert, Action<IContainer> startCallback = null) { + LogTargets.Register(startupContext, false, true); + try { GlobalExceptionHandlers.Register(); @@ -30,6 +32,7 @@ namespace NzbDrone.Host } _container = MainAppContainerBuilder.BuildContainer(startupContext); + _container.Resolve<IAppFolderFactory>().Register(); var appMode = GetApplicationMode(startupContext); @@ -51,7 +54,6 @@ namespace NzbDrone.Host } } - private static void Start(ApplicationModes applicationModes) { if (!IsInUtilityMode(applicationModes)) diff --git a/src/NzbDrone.Host/MainAppContainerBuilder.cs b/src/NzbDrone.Host/MainAppContainerBuilder.cs index 4f85b35ec..ce7d53216 100644 --- a/src/NzbDrone.Host/MainAppContainerBuilder.cs +++ b/src/NzbDrone.Host/MainAppContainerBuilder.cs @@ -1,4 +1,7 @@ -using Nancy.Bootstrapper; +using System; +using System.Collections.Generic; +using System.Linq; +using Nancy.Bootstrapper; using NzbDrone.Api; using NzbDrone.Common.Composition; using NzbDrone.Common.EnvironmentInfo; @@ -12,13 +15,31 @@ namespace NzbDrone.Host { public static IContainer BuildContainer(StartupContext args) { - return new MainAppContainerBuilder(args).Container; + var assemblies = new List<String> + { + "NzbDrone.Host", + "NzbDrone.Common", + "NzbDrone.Core", + "NzbDrone.Api", + "NzbDrone.SignalR" + }; + + if (OsInfo.IsWindows) + { + assemblies.Add("NzbDrone.Windows"); + } + + else + { + assemblies.Add("NzbDrone.Mono"); + } + + return new MainAppContainerBuilder(args, assemblies.ToArray()).Container; } - private MainAppContainerBuilder(StartupContext args) - : base(args, "NzbDrone.Host", "NzbDrone.Common", "NzbDrone.Core", "NzbDrone.Api", "NzbDrone.SignalR") + private MainAppContainerBuilder(StartupContext args, string[] assemblies) + : base(args, assemblies) { - AutoRegisterImplementations<NzbDronePersistentConnection>(); Container.Register(typeof(IBasicRepository<NamingConfig>), typeof(BasicRepository<NamingConfig>)); diff --git a/src/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj b/src/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj index 13f3b7d4e..e6f80bd8a 100644 --- a/src/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj +++ b/src/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj @@ -157,6 +157,10 @@ </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(SolutionDir)\.nuget\nuget.targets" /> + <PropertyGroup> + <PostBuildEvent>xcopy /s /y "$(SolutionDir)\..\_output\NzbDrone.Mono.*" "$(TargetDir)" +xcopy /s /y "$(SolutionDir)\..\_output\NzbDrone.Windows.*" "$(TargetDir)"</PostBuildEvent> + </PropertyGroup> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> diff --git a/src/NzbDrone.Mono.Test/DiskProviderTests/DiskProviderFixture.cs b/src/NzbDrone.Mono.Test/DiskProviderTests/DiskProviderFixture.cs new file mode 100644 index 000000000..aac55c5df --- /dev/null +++ b/src/NzbDrone.Mono.Test/DiskProviderTests/DiskProviderFixture.cs @@ -0,0 +1,14 @@ +using NUnit.Framework; +using NzbDrone.Common.Test.DiskProviderTests; + +namespace NzbDrone.Mono.Test.DiskProviderTests +{ + [TestFixture] + public class DiskProviderFixture : DiskProviderFixtureBase<DiskProvider> + { + public DiskProviderFixture() + { + LinuxOnly(); + } + } +} diff --git a/src/NzbDrone.Mono.Test/DiskProviderTests/FreeSpaceFixture.cs b/src/NzbDrone.Mono.Test/DiskProviderTests/FreeSpaceFixture.cs new file mode 100644 index 000000000..247a0801d --- /dev/null +++ b/src/NzbDrone.Mono.Test/DiskProviderTests/FreeSpaceFixture.cs @@ -0,0 +1,14 @@ +using NUnit.Framework; +using NzbDrone.Common.Test.DiskProviderTests; + +namespace NzbDrone.Mono.Test.DiskProviderTests +{ + [TestFixture] + public class FreeSpaceFixture : FreeSpaceFixtureBase<DiskProvider> + { + public FreeSpaceFixture() + { + LinuxOnly(); + } + } +} diff --git a/src/NzbDrone.Mono.Test/DiskProviderTests/IsParentFixture.cs b/src/NzbDrone.Mono.Test/DiskProviderTests/IsParentFixture.cs new file mode 100644 index 000000000..179727ffb --- /dev/null +++ b/src/NzbDrone.Mono.Test/DiskProviderTests/IsParentFixture.cs @@ -0,0 +1,14 @@ +using NUnit.Framework; +using NzbDrone.Common.Test.DiskProviderTests; + +namespace NzbDrone.Mono.Test.DiskProviderTests +{ + [TestFixture] + public class IsParentFixtureFixture : IsParentFixtureBase<DiskProvider> + { + public IsParentFixtureFixture() + { + LinuxOnly(); + } + } +} diff --git a/src/NzbDrone.Mono.Test/NzbDrone.Mono.Test.csproj b/src/NzbDrone.Mono.Test/NzbDrone.Mono.Test.csproj new file mode 100644 index 000000000..4d31659ea --- /dev/null +++ b/src/NzbDrone.Mono.Test/NzbDrone.Mono.Test.csproj @@ -0,0 +1,100 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{40D72824-7D02-4A77-9106-8FE0EEA2B997}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>NzbDrone.Mono.Test</RootNamespace> + <AssemblyName>NzbDrone.Mono.Test</AssemblyName> + <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir> + <RestorePackages>true</RestorePackages> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\x86\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>x86</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> + <OutputPath>bin\x86\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <Optimize>true</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x86</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <ItemGroup> + <Reference Include="nunit.framework"> + <HintPath>..\packages\NUnit.2.6.2\lib\nunit.framework.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Core" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Data" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="DiskProviderTests\DiskProviderFixture.cs" /> + <Compile Include="DiskProviderTests\FreeSpaceFixture.cs" /> + <Compile Include="DiskProviderTests\IsParentFixture.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <None Include="packages.config" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\NzbDrone.Common.Test\NzbDrone.Common.Test.csproj"> + <Project>{bec74619-ddbb-4fba-b517-d3e20afc9997}</Project> + <Name>NzbDrone.Common.Test</Name> + </ProjectReference> + <ProjectReference Include="..\NzbDrone.Common\NzbDrone.Common.csproj"> + <Project>{f2be0fdf-6e47-4827-a420-dd4ef82407f8}</Project> + <Name>NzbDrone.Common</Name> + </ProjectReference> + <ProjectReference Include="..\NzbDrone.Mono\NzbDrone.Mono.csproj"> + <Project>{15ad7579-a314-4626-b556-663f51d97cd1}</Project> + <Name>NzbDrone.Mono</Name> + </ProjectReference> + <ProjectReference Include="..\NzbDrone.Test.Common\NzbDrone.Test.Common.csproj"> + <Project>{caddfce0-7509-4430-8364-2074e1eefca2}</Project> + <Name>NzbDrone.Test.Common</Name> + </ProjectReference> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file diff --git a/src/NzbDrone.Mono.Test/Properties/AssemblyInfo.cs b/src/NzbDrone.Mono.Test/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..a2dbbc810 --- /dev/null +++ b/src/NzbDrone.Mono.Test/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("NzbDrone.Mono.Test")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("NzbDrone.Mono.Test")] +[assembly: AssemblyCopyright("Copyright © 2014")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("45299d3c-34ff-48ca-9093-de2f037c38ac")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/NzbDrone.Mono.Test/packages.config b/src/NzbDrone.Mono.Test/packages.config new file mode 100644 index 000000000..5c3ca54dd --- /dev/null +++ b/src/NzbDrone.Mono.Test/packages.config @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="NUnit" version="2.6.2" targetFramework="net40" /> +</packages> \ No newline at end of file diff --git a/src/NzbDrone.Mono/DiskProvider.cs b/src/NzbDrone.Mono/DiskProvider.cs new file mode 100644 index 000000000..58c6f7d20 --- /dev/null +++ b/src/NzbDrone.Mono/DiskProvider.cs @@ -0,0 +1,96 @@ +using System; +using System.IO; +using System.Linq; +using Mono.Unix.Native; +using NLog; +using NzbDrone.Common.Disk; +using NzbDrone.Common.EnsureThat; +using NzbDrone.Common.Instrumentation; + +namespace NzbDrone.Mono +{ + public class DiskProvider : DiskProviderBase + { + private static readonly Logger Logger = NzbDroneLogger.GetLogger(); + + public override long? GetAvailableSpace(string path) + { + Ensure.That(path, () => path).IsValidPath(); + + var root = GetPathRoot(path); + + if (!FolderExists(root)) + throw new DirectoryNotFoundException(root); + + try + { + return GetDriveInfoLinux(path).AvailableFreeSpace; + } + catch (InvalidOperationException e) + { + Logger.ErrorException("Couldn't get free space for " + path, e); + } + + return null; + } + + public override void InheritFolderPermissions(string filename) + { + Ensure.That(filename, () => filename).IsValidPath(); + + try + { + var fs = File.GetAccessControl(filename); + fs.SetAccessRuleProtection(false, false); + File.SetAccessControl(filename, fs); + } + catch (NotImplementedException) + { + } + } + + public override void SetFilePermissions(string path, string mask) + { + var filePermissions = NativeConvert.FromOctalPermissionString(mask); + + if (Syscall.chmod(path, filePermissions) < 0) + { + var error = Stdlib.GetLastError(); + + throw new Exception("Error setting file permissions: " + error); + } + } + + public override long? GetTotalSize(string path) + { + Ensure.That(path, () => path).IsValidPath(); + + var root = GetPathRoot(path); + + if (!FolderExists(root)) + throw new DirectoryNotFoundException(root); + + try + { + return GetDriveInfoLinux(path).TotalSize; + } + catch (InvalidOperationException e) + { + Logger.ErrorException("Couldn't get total space for " + path, e); + } + + return null; + } + + private DriveInfo GetDriveInfoLinux(string path) + { + var drives = DriveInfo.GetDrives(); + + return + drives.Where(drive => + drive.IsReady && path.StartsWith(drive.Name, StringComparison.CurrentCultureIgnoreCase)) + .OrderByDescending(drive => drive.Name.Length) + .First(); + } + } +} diff --git a/src/NzbDrone.Mono/NzbDrone.Mono.csproj b/src/NzbDrone.Mono/NzbDrone.Mono.csproj new file mode 100644 index 000000000..a5364e8ce --- /dev/null +++ b/src/NzbDrone.Mono/NzbDrone.Mono.csproj @@ -0,0 +1,95 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{15AD7579-A314-4626-B556-663F51D97CD1}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>NzbDrone.Mono</RootNamespace> + <AssemblyName>NzbDrone.Mono</AssemblyName> + <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <TargetFrameworkProfile /> + <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir> + <RestorePackages>true</RestorePackages> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>..\..\_output\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>..\..\_output\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>x86</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> + <OutputPath>..\..\_output\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <Optimize>true</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x86</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <ItemGroup> + <Reference Include="Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\Libraries\Mono.Posix.dll</HintPath> + </Reference> + <Reference Include="NLog, Version=2.1.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\packages\NLog.2.1.0\lib\net40\NLog.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Core" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Data" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="DiskProvider.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <WCFMetadata Include="Service References\" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\NzbDrone.Common\NzbDrone.Common.csproj"> + <Project>{f2be0fdf-6e47-4827-a420-dd4ef82407f8}</Project> + <Name>NzbDrone.Common</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <None Include="packages.config" /> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file diff --git a/src/NzbDrone.Mono/Properties/AssemblyInfo.cs b/src/NzbDrone.Mono/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..6a7d1a9dc --- /dev/null +++ b/src/NzbDrone.Mono/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("NzbDrone.Mono")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("NzbDrone.Mono")] +[assembly: AssemblyCopyright("Copyright © 2014")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("01493ea5-494f-43bf-be18-8ae4d0708fc6")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/NzbDrone.Mono/packages.config b/src/NzbDrone.Mono/packages.config new file mode 100644 index 000000000..d5e3be0f3 --- /dev/null +++ b/src/NzbDrone.Mono/packages.config @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="NLog" version="2.1.0" targetFramework="net40" /> +</packages> \ No newline at end of file diff --git a/src/NzbDrone.Test.Common/AutoMoq/AutoMoqer.cs b/src/NzbDrone.Test.Common/AutoMoq/AutoMoqer.cs index 35f24ff92..2c7e4b4f7 100644 --- a/src/NzbDrone.Test.Common/AutoMoq/AutoMoqer.cs +++ b/src/NzbDrone.Test.Common/AutoMoq/AutoMoqer.cs @@ -3,12 +3,15 @@ using System; using System.Collections.Generic; using System.Diagnostics; +using System.IO; using System.Linq; using System.Linq.Expressions; +using System.Reflection; using System.Runtime.CompilerServices; using Microsoft.Practices.Unity; using Moq; using Moq.Language.Flow; +using NzbDrone.Common.EnvironmentInfo; using NzbDrone.Test.Common.AutoMoq.Unity; [assembly: InternalsVisibleTo("AutoMoq.Tests")] @@ -132,6 +135,8 @@ namespace NzbDrone.Test.Common.AutoMoq this.container = container; container.RegisterInstance(this); + RegisterPlatformLibrary(container); + registeredMocks = new Dictionary<Type, object>(); AddTheAutoMockingContainerExtensionToTheContainer(container); } @@ -164,6 +169,23 @@ namespace NzbDrone.Test.Common.AutoMoq return typeof(T); } + private void RegisterPlatformLibrary(IUnityContainer container) + { + var assemblyName = "NzbDrone.Windows"; + + if (OsInfo.IsLinux) + { + assemblyName = "NzbDrone.Mono"; + } + + if (!File.Exists(assemblyName + ".dll")) + { + return; + } + + Assembly.Load(assemblyName); + } + #endregion } } \ No newline at end of file diff --git a/src/NzbDrone.Update.Test/InstallUpdateServiceFixture.cs b/src/NzbDrone.Update.Test/InstallUpdateServiceFixture.cs index b7a4515ee..2e240decd 100644 --- a/src/NzbDrone.Update.Test/InstallUpdateServiceFixture.cs +++ b/src/NzbDrone.Update.Test/InstallUpdateServiceFixture.cs @@ -3,6 +3,7 @@ using System.IO; using FluentAssertions; using NUnit.Framework; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Common.EnvironmentInfo; using NzbDrone.Test.Common; using NzbDrone.Update.UpdateEngine; diff --git a/src/NzbDrone.Update/UpdateContainerBuilder.cs b/src/NzbDrone.Update/UpdateContainerBuilder.cs index 5f99a618c..f9d59d69f 100644 --- a/src/NzbDrone.Update/UpdateContainerBuilder.cs +++ b/src/NzbDrone.Update/UpdateContainerBuilder.cs @@ -1,19 +1,38 @@ -using NzbDrone.Common.Composition; +using System; +using System.Collections.Generic; +using NzbDrone.Common.Composition; using NzbDrone.Common.EnvironmentInfo; namespace NzbDrone.Update { public class UpdateContainerBuilder : ContainerBuilderBase { - private UpdateContainerBuilder(IStartupContext startupContext) - : base(startupContext, "NzbDrone.Update", "NzbDrone.Common") + private UpdateContainerBuilder(IStartupContext startupContext, string[] assemblies) + : base(startupContext, assemblies) { } public static IContainer Build(IStartupContext startupContext) { - return new UpdateContainerBuilder(startupContext).Container; + var assemblies = new List<String> + { + "NzbDrone.Update", + "NzbDrone.Common" + }; + + if (OsInfo.IsWindows) + { + assemblies.Add("NzbDrone.Windows"); + } + + else + { + assemblies.Add("NzbDrone.Mono"); + } + + return new UpdateContainerBuilder(startupContext, assemblies.ToArray()).Container; } } -} \ No newline at end of file +} + \ No newline at end of file diff --git a/src/NzbDrone.Update/UpdateEngine/BackupAndRestore.cs b/src/NzbDrone.Update/UpdateEngine/BackupAndRestore.cs index 91552105c..3787b25d3 100644 --- a/src/NzbDrone.Update/UpdateEngine/BackupAndRestore.cs +++ b/src/NzbDrone.Update/UpdateEngine/BackupAndRestore.cs @@ -1,5 +1,6 @@ using NLog; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Common.EnvironmentInfo; namespace NzbDrone.Update.UpdateEngine diff --git a/src/NzbDrone.Update/UpdateEngine/InstallUpdateService.cs b/src/NzbDrone.Update/UpdateEngine/InstallUpdateService.cs index 0323360cc..0e6001677 100644 --- a/src/NzbDrone.Update/UpdateEngine/InstallUpdateService.cs +++ b/src/NzbDrone.Update/UpdateEngine/InstallUpdateService.cs @@ -2,6 +2,7 @@ using System; using System.IO; using NLog; using NzbDrone.Common; +using NzbDrone.Common.Disk; using NzbDrone.Common.EnvironmentInfo; namespace NzbDrone.Update.UpdateEngine diff --git a/src/NzbDrone.Windows.Test/DiskProviderTests/DiskProviderFixture.cs b/src/NzbDrone.Windows.Test/DiskProviderTests/DiskProviderFixture.cs new file mode 100644 index 000000000..68b2d1f0c --- /dev/null +++ b/src/NzbDrone.Windows.Test/DiskProviderTests/DiskProviderFixture.cs @@ -0,0 +1,14 @@ +using NUnit.Framework; +using NzbDrone.Common.Test.DiskProviderTests; + +namespace NzbDrone.Windows.Test.DiskProviderTests +{ + [TestFixture] + public class DiskProviderFixture : DiskProviderFixtureBase<DiskProvider> + { + public DiskProviderFixture() + { + WindowsOnly(); + } + } +} diff --git a/src/NzbDrone.Windows.Test/DiskProviderTests/FreeSpaceFixture.cs b/src/NzbDrone.Windows.Test/DiskProviderTests/FreeSpaceFixture.cs new file mode 100644 index 000000000..a642b49a9 --- /dev/null +++ b/src/NzbDrone.Windows.Test/DiskProviderTests/FreeSpaceFixture.cs @@ -0,0 +1,14 @@ +using NUnit.Framework; +using NzbDrone.Common.Test.DiskProviderTests; + +namespace NzbDrone.Windows.Test.DiskProviderTests +{ + [TestFixture] + public class FreeSpaceFixture : FreeSpaceFixtureBase<DiskProvider> + { + public FreeSpaceFixture() + { + WindowsOnly(); + } + } +} diff --git a/src/NzbDrone.Windows.Test/DiskProviderTests/IsParentFixture.cs b/src/NzbDrone.Windows.Test/DiskProviderTests/IsParentFixture.cs new file mode 100644 index 000000000..00b6aa4c2 --- /dev/null +++ b/src/NzbDrone.Windows.Test/DiskProviderTests/IsParentFixture.cs @@ -0,0 +1,14 @@ +using NUnit.Framework; +using NzbDrone.Common.Test.DiskProviderTests; + +namespace NzbDrone.Windows.Test.DiskProviderTests +{ + [TestFixture] + public class IsParentFixtureFixture : IsParentFixtureBase<DiskProvider> + { + public IsParentFixtureFixture() + { + WindowsOnly(); + } + } +} diff --git a/src/NzbDrone.Windows.Test/NzbDrone.Windows.Test.csproj b/src/NzbDrone.Windows.Test/NzbDrone.Windows.Test.csproj new file mode 100644 index 000000000..098c95b80 --- /dev/null +++ b/src/NzbDrone.Windows.Test/NzbDrone.Windows.Test.csproj @@ -0,0 +1,101 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{80B51429-7A0E-46D6-BEE3-C80DCB1C4EAA}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>NzbDrone.Windows.Test</RootNamespace> + <AssemblyName>NzbDrone.Windows.Test</AssemblyName> + <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir> + <RestorePackages>true</RestorePackages> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\x86\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>x86</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> + <OutputPath>bin\x86\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <Optimize>true</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x86</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <ItemGroup> + <Reference Include="nunit.framework, Version=2.6.2.12296, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\packages\NUnit.2.6.2\lib\nunit.framework.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Core" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Data" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="DiskProviderTests\IsParentFixture.cs" /> + <Compile Include="DiskProviderTests\DiskProviderFixture.cs" /> + <Compile Include="DiskProviderTests\FreeSpaceFixture.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\NzbDrone.Common.Test\NzbDrone.Common.Test.csproj"> + <Project>{bec74619-ddbb-4fba-b517-d3e20afc9997}</Project> + <Name>NzbDrone.Common.Test</Name> + </ProjectReference> + <ProjectReference Include="..\NzbDrone.Common\NzbDrone.Common.csproj"> + <Project>{f2be0fdf-6e47-4827-a420-dd4ef82407f8}</Project> + <Name>NzbDrone.Common</Name> + </ProjectReference> + <ProjectReference Include="..\NzbDrone.Test.Common\NzbDrone.Test.Common.csproj"> + <Project>{caddfce0-7509-4430-8364-2074e1eefca2}</Project> + <Name>NzbDrone.Test.Common</Name> + </ProjectReference> + <ProjectReference Include="..\NzbDrone.Windows\NzbDrone.Windows.csproj"> + <Project>{911284d3-f130-459e-836c-2430b6fbf21d}</Project> + <Name>NzbDrone.Windows</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <None Include="packages.config" /> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file diff --git a/src/NzbDrone.Windows.Test/Properties/AssemblyInfo.cs b/src/NzbDrone.Windows.Test/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..238a3d68a --- /dev/null +++ b/src/NzbDrone.Windows.Test/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("NzbDrone.Windows.Test")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("NzbDrone.Windows.Test")] +[assembly: AssemblyCopyright("Copyright © 2014")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("372cb8dc-5cdf-4fe4-9e1d-725827889bc7")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/NzbDrone.Windows.Test/packages.config b/src/NzbDrone.Windows.Test/packages.config new file mode 100644 index 000000000..5c3ca54dd --- /dev/null +++ b/src/NzbDrone.Windows.Test/packages.config @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="NUnit" version="2.6.2" targetFramework="net40" /> +</packages> \ No newline at end of file diff --git a/src/NzbDrone.Windows/DiskProvider.cs b/src/NzbDrone.Windows/DiskProvider.cs new file mode 100644 index 000000000..27b9debc4 --- /dev/null +++ b/src/NzbDrone.Windows/DiskProvider.cs @@ -0,0 +1,103 @@ +using System; +using System.IO; +using System.Runtime.InteropServices; +using NLog; +using NzbDrone.Common.Disk; +using NzbDrone.Common.EnsureThat; +using NzbDrone.Common.EnvironmentInfo; +using NzbDrone.Common.Instrumentation; + +namespace NzbDrone.Windows +{ + public class DiskProvider : DiskProviderBase + { + private static readonly Logger Logger = NzbDroneLogger.GetLogger(); + + [DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Auto)] + [return: MarshalAs(UnmanagedType.Bool)] + static extern bool GetDiskFreeSpaceEx(string lpDirectoryName, + out ulong lpFreeBytesAvailable, + out ulong lpTotalNumberOfBytes, + out ulong lpTotalNumberOfFreeBytes); + + public override long? GetAvailableSpace(string path) + { + Ensure.That(path, () => path).IsValidPath(); + + var root = GetPathRoot(path); + + if (!FolderExists(root)) + throw new DirectoryNotFoundException(root); + + return DriveFreeSpaceEx(root); + } + + public override void InheritFolderPermissions(string filename) + { + Ensure.That(filename, () => filename).IsValidPath(); + + var fs = File.GetAccessControl(filename); + fs.SetAccessRuleProtection(false, false); + File.SetAccessControl(filename, fs); + } + + public override void SetFilePermissions(string path, string mask) + { + throw new NotImplementedException(); + } + + public override long? GetTotalSize(string path) + { + Ensure.That(path, () => path).IsValidPath(); + + var root = GetPathRoot(path); + + if (!FolderExists(root)) + throw new DirectoryNotFoundException(root); + + return DriveTotalSizeEx(root); + } + + private static long DriveFreeSpaceEx(string folderName) + { + Ensure.That(folderName, () => folderName).IsValidPath(); + + if (!folderName.EndsWith("\\")) + { + folderName += '\\'; + } + + ulong free = 0; + ulong dummy1 = 0; + ulong dummy2 = 0; + + if (GetDiskFreeSpaceEx(folderName, out free, out dummy1, out dummy2)) + { + return (long)free; + } + + return 0; + } + + private static long DriveTotalSizeEx(string folderName) + { + Ensure.That(folderName, () => folderName).IsValidPath(); + + if (!folderName.EndsWith("\\")) + { + folderName += '\\'; + } + + ulong total = 0; + ulong dummy1 = 0; + ulong dummy2 = 0; + + if (GetDiskFreeSpaceEx(folderName, out dummy1, out total, out dummy2)) + { + return (long)total; + } + + return 0; + } + } +} diff --git a/src/NzbDrone.Windows/NzbDrone.Windows.csproj b/src/NzbDrone.Windows/NzbDrone.Windows.csproj new file mode 100644 index 000000000..607f09a4e --- /dev/null +++ b/src/NzbDrone.Windows/NzbDrone.Windows.csproj @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{911284D3-F130-459E-836C-2430B6FBF21D}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>NzbDrone.Windows</RootNamespace> + <AssemblyName>NzbDrone.Windows</AssemblyName> + <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir> + <RestorePackages>true</RestorePackages> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>..\..\_output\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> + <DebugSymbols>true</DebugSymbols> + <OutputPath>..\..\_output\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>x86</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> + <OutputPath>..\..\_output\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <Optimize>true</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x86</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <ItemGroup> + <Reference Include="NLog"> + <HintPath>..\packages\NLog.2.1.0\lib\net40\NLog.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Core" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Data" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="DiskProvider.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <None Include="packages.config" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\NzbDrone.Common\NzbDrone.Common.csproj"> + <Project>{f2be0fdf-6e47-4827-a420-dd4ef82407f8}</Project> + <Name>NzbDrone.Common</Name> + </ProjectReference> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file diff --git a/src/NzbDrone.Windows/Properties/AssemblyInfo.cs b/src/NzbDrone.Windows/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..8a24ac703 --- /dev/null +++ b/src/NzbDrone.Windows/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("NzbDrone.Windows")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("NzbDrone.Windows")] +[assembly: AssemblyCopyright("Copyright © 2014")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("cea28fa9-43d0-4682-99f2-d364377adbdf")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/NzbDrone.Windows/packages.config b/src/NzbDrone.Windows/packages.config new file mode 100644 index 000000000..d5e3be0f3 --- /dev/null +++ b/src/NzbDrone.Windows/packages.config @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="NLog" version="2.1.0" targetFramework="net40" /> +</packages> \ No newline at end of file diff --git a/src/NzbDrone.sln b/src/NzbDrone.sln index c6f82ef3f..6607c1c36 100644 --- a/src/NzbDrone.sln +++ b/src/NzbDrone.sln @@ -66,108 +66,316 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.SignalR.Ow EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "External", "External", "{F6E3A728-AE77-4D02-BAC8-82FBC1402DDA}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NzbDrone.Mono", "NzbDrone.Mono\NzbDrone.Mono.csproj", "{15AD7579-A314-4626-B556-663F51D97CD1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NzbDrone.Windows", "NzbDrone.Windows\NzbDrone.Windows.csproj", "{911284D3-F130-459E-836C-2430B6FBF21D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Platform", "Platform", "{0F0D4998-8F5D-4467-A909-BB192C4B3B4B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Platform", "Platform", "{4EACDBBC-BCD7-4765-A57B-3E08331E4749}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NzbDrone.Windows.Test", "NzbDrone.Windows.Test\NzbDrone.Windows.Test.csproj", "{80B51429-7A0E-46D6-BEE3-C80DCB1C4EAA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NzbDrone.Mono.Test", "NzbDrone.Mono.Test\NzbDrone.Mono.Test.csproj", "{40D72824-7D02-4A77-9106-8FE0EEA2B997}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|Mixed Platforms = Debug|Mixed Platforms Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|Mixed Platforms = Release|Mixed Platforms Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D12F7F2F-8A3C-415F-88FA-6DD061A84869}.Debug|Any CPU.ActiveCfg = Debug|x86 + {D12F7F2F-8A3C-415F-88FA-6DD061A84869}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {D12F7F2F-8A3C-415F-88FA-6DD061A84869}.Debug|Mixed Platforms.Build.0 = Debug|x86 {D12F7F2F-8A3C-415F-88FA-6DD061A84869}.Debug|x86.ActiveCfg = Debug|x86 {D12F7F2F-8A3C-415F-88FA-6DD061A84869}.Debug|x86.Build.0 = Debug|x86 + {D12F7F2F-8A3C-415F-88FA-6DD061A84869}.Release|Any CPU.ActiveCfg = Release|x86 + {D12F7F2F-8A3C-415F-88FA-6DD061A84869}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {D12F7F2F-8A3C-415F-88FA-6DD061A84869}.Release|Mixed Platforms.Build.0 = Release|x86 {D12F7F2F-8A3C-415F-88FA-6DD061A84869}.Release|x86.ActiveCfg = Release|x86 {D12F7F2F-8A3C-415F-88FA-6DD061A84869}.Release|x86.Build.0 = Release|x86 + {FF5EE3B6-913B-47CE-9CEB-11C51B4E1205}.Debug|Any CPU.ActiveCfg = Debug|x86 + {FF5EE3B6-913B-47CE-9CEB-11C51B4E1205}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {FF5EE3B6-913B-47CE-9CEB-11C51B4E1205}.Debug|Mixed Platforms.Build.0 = Debug|x86 {FF5EE3B6-913B-47CE-9CEB-11C51B4E1205}.Debug|x86.ActiveCfg = Debug|x86 {FF5EE3B6-913B-47CE-9CEB-11C51B4E1205}.Debug|x86.Build.0 = Debug|x86 + {FF5EE3B6-913B-47CE-9CEB-11C51B4E1205}.Release|Any CPU.ActiveCfg = Release|x86 + {FF5EE3B6-913B-47CE-9CEB-11C51B4E1205}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {FF5EE3B6-913B-47CE-9CEB-11C51B4E1205}.Release|Mixed Platforms.Build.0 = Release|x86 {FF5EE3B6-913B-47CE-9CEB-11C51B4E1205}.Release|x86.ActiveCfg = Release|x86 {FF5EE3B6-913B-47CE-9CEB-11C51B4E1205}.Release|x86.Build.0 = Release|x86 + {193ADD3B-792B-4173-8E4C-5A3F8F0237F0}.Debug|Any CPU.ActiveCfg = Debug|x86 + {193ADD3B-792B-4173-8E4C-5A3F8F0237F0}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {193ADD3B-792B-4173-8E4C-5A3F8F0237F0}.Debug|Mixed Platforms.Build.0 = Debug|x86 {193ADD3B-792B-4173-8E4C-5A3F8F0237F0}.Debug|x86.ActiveCfg = Debug|x86 {193ADD3B-792B-4173-8E4C-5A3F8F0237F0}.Debug|x86.Build.0 = Debug|x86 + {193ADD3B-792B-4173-8E4C-5A3F8F0237F0}.Release|Any CPU.ActiveCfg = Release|x86 + {193ADD3B-792B-4173-8E4C-5A3F8F0237F0}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {193ADD3B-792B-4173-8E4C-5A3F8F0237F0}.Release|Mixed Platforms.Build.0 = Release|x86 {193ADD3B-792B-4173-8E4C-5A3F8F0237F0}.Release|x86.ActiveCfg = Release|x86 {193ADD3B-792B-4173-8E4C-5A3F8F0237F0}.Release|x86.Build.0 = Release|x86 + {C0EA1A40-91AD-4EEB-BD16-2DDDEBD20AE5}.Debug|Any CPU.ActiveCfg = Debug|x86 + {C0EA1A40-91AD-4EEB-BD16-2DDDEBD20AE5}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {C0EA1A40-91AD-4EEB-BD16-2DDDEBD20AE5}.Debug|Mixed Platforms.Build.0 = Debug|x86 {C0EA1A40-91AD-4EEB-BD16-2DDDEBD20AE5}.Debug|x86.ActiveCfg = Debug|x86 {C0EA1A40-91AD-4EEB-BD16-2DDDEBD20AE5}.Debug|x86.Build.0 = Debug|x86 + {C0EA1A40-91AD-4EEB-BD16-2DDDEBD20AE5}.Release|Any CPU.ActiveCfg = Release|x86 + {C0EA1A40-91AD-4EEB-BD16-2DDDEBD20AE5}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {C0EA1A40-91AD-4EEB-BD16-2DDDEBD20AE5}.Release|Mixed Platforms.Build.0 = Release|x86 {C0EA1A40-91AD-4EEB-BD16-2DDDEBD20AE5}.Release|x86.ActiveCfg = Release|x86 {C0EA1A40-91AD-4EEB-BD16-2DDDEBD20AE5}.Release|x86.Build.0 = Release|x86 + {FAFB5948-A222-4CF6-AD14-026BE7564802}.Debug|Any CPU.ActiveCfg = Debug|x86 + {FAFB5948-A222-4CF6-AD14-026BE7564802}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {FAFB5948-A222-4CF6-AD14-026BE7564802}.Debug|Mixed Platforms.Build.0 = Debug|x86 {FAFB5948-A222-4CF6-AD14-026BE7564802}.Debug|x86.ActiveCfg = Debug|x86 {FAFB5948-A222-4CF6-AD14-026BE7564802}.Debug|x86.Build.0 = Debug|x86 + {FAFB5948-A222-4CF6-AD14-026BE7564802}.Release|Any CPU.ActiveCfg = Release|x86 + {FAFB5948-A222-4CF6-AD14-026BE7564802}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {FAFB5948-A222-4CF6-AD14-026BE7564802}.Release|Mixed Platforms.Build.0 = Release|x86 {FAFB5948-A222-4CF6-AD14-026BE7564802}.Release|x86.ActiveCfg = Release|x86 {FAFB5948-A222-4CF6-AD14-026BE7564802}.Release|x86.Build.0 = Release|x86 + {4CCC53CD-8D5E-4CC4-97D2-5C9312AC2BD7}.Debug|Any CPU.ActiveCfg = Debug|x86 + {4CCC53CD-8D5E-4CC4-97D2-5C9312AC2BD7}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {4CCC53CD-8D5E-4CC4-97D2-5C9312AC2BD7}.Debug|Mixed Platforms.Build.0 = Debug|x86 {4CCC53CD-8D5E-4CC4-97D2-5C9312AC2BD7}.Debug|x86.ActiveCfg = Debug|x86 {4CCC53CD-8D5E-4CC4-97D2-5C9312AC2BD7}.Debug|x86.Build.0 = Debug|x86 + {4CCC53CD-8D5E-4CC4-97D2-5C9312AC2BD7}.Release|Any CPU.ActiveCfg = Release|x86 + {4CCC53CD-8D5E-4CC4-97D2-5C9312AC2BD7}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {4CCC53CD-8D5E-4CC4-97D2-5C9312AC2BD7}.Release|Mixed Platforms.Build.0 = Release|x86 {4CCC53CD-8D5E-4CC4-97D2-5C9312AC2BD7}.Release|x86.ActiveCfg = Release|x86 {4CCC53CD-8D5E-4CC4-97D2-5C9312AC2BD7}.Release|x86.Build.0 = Release|x86 + {35388E8E-0CDB-4A84-AD16-E4B6EFDA5D97}.Debug|Any CPU.ActiveCfg = Debug|x86 + {35388E8E-0CDB-4A84-AD16-E4B6EFDA5D97}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {35388E8E-0CDB-4A84-AD16-E4B6EFDA5D97}.Debug|Mixed Platforms.Build.0 = Debug|x86 {35388E8E-0CDB-4A84-AD16-E4B6EFDA5D97}.Debug|x86.ActiveCfg = Debug|x86 {35388E8E-0CDB-4A84-AD16-E4B6EFDA5D97}.Debug|x86.Build.0 = Debug|x86 + {35388E8E-0CDB-4A84-AD16-E4B6EFDA5D97}.Release|Any CPU.ActiveCfg = Release|x86 + {35388E8E-0CDB-4A84-AD16-E4B6EFDA5D97}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {35388E8E-0CDB-4A84-AD16-E4B6EFDA5D97}.Release|Mixed Platforms.Build.0 = Release|x86 {35388E8E-0CDB-4A84-AD16-E4B6EFDA5D97}.Release|x86.ActiveCfg = Release|x86 {35388E8E-0CDB-4A84-AD16-E4B6EFDA5D97}.Release|x86.Build.0 = Release|x86 + {F2BE0FDF-6E47-4827-A420-DD4EF82407F8}.Debug|Any CPU.ActiveCfg = Debug|x86 + {F2BE0FDF-6E47-4827-A420-DD4EF82407F8}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {F2BE0FDF-6E47-4827-A420-DD4EF82407F8}.Debug|Mixed Platforms.Build.0 = Debug|x86 {F2BE0FDF-6E47-4827-A420-DD4EF82407F8}.Debug|x86.ActiveCfg = Debug|x86 {F2BE0FDF-6E47-4827-A420-DD4EF82407F8}.Debug|x86.Build.0 = Debug|x86 + {F2BE0FDF-6E47-4827-A420-DD4EF82407F8}.Release|Any CPU.ActiveCfg = Release|x86 + {F2BE0FDF-6E47-4827-A420-DD4EF82407F8}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {F2BE0FDF-6E47-4827-A420-DD4EF82407F8}.Release|Mixed Platforms.Build.0 = Release|x86 {F2BE0FDF-6E47-4827-A420-DD4EF82407F8}.Release|x86.ActiveCfg = Release|x86 {F2BE0FDF-6E47-4827-A420-DD4EF82407F8}.Release|x86.Build.0 = Release|x86 + {BEC74619-DDBB-4FBA-B517-D3E20AFC9997}.Debug|Any CPU.ActiveCfg = Debug|x86 + {BEC74619-DDBB-4FBA-B517-D3E20AFC9997}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {BEC74619-DDBB-4FBA-B517-D3E20AFC9997}.Debug|Mixed Platforms.Build.0 = Debug|x86 {BEC74619-DDBB-4FBA-B517-D3E20AFC9997}.Debug|x86.ActiveCfg = Debug|x86 {BEC74619-DDBB-4FBA-B517-D3E20AFC9997}.Debug|x86.Build.0 = Debug|x86 + {BEC74619-DDBB-4FBA-B517-D3E20AFC9997}.Release|Any CPU.ActiveCfg = Release|x86 + {BEC74619-DDBB-4FBA-B517-D3E20AFC9997}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {BEC74619-DDBB-4FBA-B517-D3E20AFC9997}.Release|Mixed Platforms.Build.0 = Release|x86 {BEC74619-DDBB-4FBA-B517-D3E20AFC9997}.Release|x86.ActiveCfg = Release|x86 {BEC74619-DDBB-4FBA-B517-D3E20AFC9997}.Release|x86.Build.0 = Release|x86 + {CADDFCE0-7509-4430-8364-2074E1EEFCA2}.Debug|Any CPU.ActiveCfg = Debug|x86 + {CADDFCE0-7509-4430-8364-2074E1EEFCA2}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {CADDFCE0-7509-4430-8364-2074E1EEFCA2}.Debug|Mixed Platforms.Build.0 = Debug|x86 {CADDFCE0-7509-4430-8364-2074E1EEFCA2}.Debug|x86.ActiveCfg = Debug|x86 {CADDFCE0-7509-4430-8364-2074E1EEFCA2}.Debug|x86.Build.0 = Debug|x86 + {CADDFCE0-7509-4430-8364-2074E1EEFCA2}.Release|Any CPU.ActiveCfg = Release|x86 + {CADDFCE0-7509-4430-8364-2074E1EEFCA2}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {CADDFCE0-7509-4430-8364-2074E1EEFCA2}.Release|Mixed Platforms.Build.0 = Release|x86 {CADDFCE0-7509-4430-8364-2074E1EEFCA2}.Release|x86.ActiveCfg = Release|x86 {CADDFCE0-7509-4430-8364-2074E1EEFCA2}.Release|x86.Build.0 = Release|x86 + {6BCE712F-846D-4846-9D1B-A66B858DA755}.Debug|Any CPU.ActiveCfg = Debug|x86 + {6BCE712F-846D-4846-9D1B-A66B858DA755}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {6BCE712F-846D-4846-9D1B-A66B858DA755}.Debug|Mixed Platforms.Build.0 = Debug|x86 {6BCE712F-846D-4846-9D1B-A66B858DA755}.Debug|x86.ActiveCfg = Debug|x86 {6BCE712F-846D-4846-9D1B-A66B858DA755}.Debug|x86.Build.0 = Debug|x86 + {6BCE712F-846D-4846-9D1B-A66B858DA755}.Release|Any CPU.ActiveCfg = Release|x86 + {6BCE712F-846D-4846-9D1B-A66B858DA755}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {6BCE712F-846D-4846-9D1B-A66B858DA755}.Release|Mixed Platforms.Build.0 = Release|x86 {6BCE712F-846D-4846-9D1B-A66B858DA755}.Release|x86.ActiveCfg = Release|x86 {6BCE712F-846D-4846-9D1B-A66B858DA755}.Release|x86.Build.0 = Release|x86 + {700D0B95-95CD-43F3-B6C9-FAA0FC1358D4}.Debug|Any CPU.ActiveCfg = Debug|x86 + {700D0B95-95CD-43F3-B6C9-FAA0FC1358D4}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {700D0B95-95CD-43F3-B6C9-FAA0FC1358D4}.Debug|Mixed Platforms.Build.0 = Debug|x86 {700D0B95-95CD-43F3-B6C9-FAA0FC1358D4}.Debug|x86.ActiveCfg = Debug|x86 {700D0B95-95CD-43F3-B6C9-FAA0FC1358D4}.Debug|x86.Build.0 = Debug|x86 + {700D0B95-95CD-43F3-B6C9-FAA0FC1358D4}.Release|Any CPU.ActiveCfg = Release|x86 + {700D0B95-95CD-43F3-B6C9-FAA0FC1358D4}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {700D0B95-95CD-43F3-B6C9-FAA0FC1358D4}.Release|Mixed Platforms.Build.0 = Release|x86 {700D0B95-95CD-43F3-B6C9-FAA0FC1358D4}.Release|x86.ActiveCfg = Release|x86 {700D0B95-95CD-43F3-B6C9-FAA0FC1358D4}.Release|x86.Build.0 = Release|x86 + {FD286DF8-2D3A-4394-8AD5-443FADE55FB2}.Debug|Any CPU.ActiveCfg = Debug|x86 + {FD286DF8-2D3A-4394-8AD5-443FADE55FB2}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {FD286DF8-2D3A-4394-8AD5-443FADE55FB2}.Debug|Mixed Platforms.Build.0 = Debug|x86 {FD286DF8-2D3A-4394-8AD5-443FADE55FB2}.Debug|x86.ActiveCfg = Debug|x86 {FD286DF8-2D3A-4394-8AD5-443FADE55FB2}.Debug|x86.Build.0 = Debug|x86 + {FD286DF8-2D3A-4394-8AD5-443FADE55FB2}.Release|Any CPU.ActiveCfg = Release|x86 + {FD286DF8-2D3A-4394-8AD5-443FADE55FB2}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {FD286DF8-2D3A-4394-8AD5-443FADE55FB2}.Release|Mixed Platforms.Build.0 = Release|x86 {FD286DF8-2D3A-4394-8AD5-443FADE55FB2}.Release|x86.ActiveCfg = Release|x86 {FD286DF8-2D3A-4394-8AD5-443FADE55FB2}.Release|x86.Build.0 = Release|x86 + {3DCA7B58-B8B3-49AC-9D9E-56F4A0460976}.Debug|Any CPU.ActiveCfg = Debug|x86 + {3DCA7B58-B8B3-49AC-9D9E-56F4A0460976}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {3DCA7B58-B8B3-49AC-9D9E-56F4A0460976}.Debug|Mixed Platforms.Build.0 = Debug|x86 {3DCA7B58-B8B3-49AC-9D9E-56F4A0460976}.Debug|x86.ActiveCfg = Debug|x86 {3DCA7B58-B8B3-49AC-9D9E-56F4A0460976}.Debug|x86.Build.0 = Debug|x86 + {3DCA7B58-B8B3-49AC-9D9E-56F4A0460976}.Release|Any CPU.ActiveCfg = Release|x86 + {3DCA7B58-B8B3-49AC-9D9E-56F4A0460976}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {3DCA7B58-B8B3-49AC-9D9E-56F4A0460976}.Release|Mixed Platforms.Build.0 = Release|x86 {3DCA7B58-B8B3-49AC-9D9E-56F4A0460976}.Release|x86.ActiveCfg = Release|x86 {3DCA7B58-B8B3-49AC-9D9E-56F4A0460976}.Release|x86.Build.0 = Release|x86 + {D18A5DEB-5102-4775-A1AF-B75DAAA8907B}.Debug|Any CPU.ActiveCfg = Debug|x86 + {D18A5DEB-5102-4775-A1AF-B75DAAA8907B}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {D18A5DEB-5102-4775-A1AF-B75DAAA8907B}.Debug|Mixed Platforms.Build.0 = Debug|x86 {D18A5DEB-5102-4775-A1AF-B75DAAA8907B}.Debug|x86.ActiveCfg = Debug|x86 {D18A5DEB-5102-4775-A1AF-B75DAAA8907B}.Debug|x86.Build.0 = Debug|x86 + {D18A5DEB-5102-4775-A1AF-B75DAAA8907B}.Release|Any CPU.ActiveCfg = Release|x86 + {D18A5DEB-5102-4775-A1AF-B75DAAA8907B}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {D18A5DEB-5102-4775-A1AF-B75DAAA8907B}.Release|Mixed Platforms.Build.0 = Release|x86 {D18A5DEB-5102-4775-A1AF-B75DAAA8907B}.Release|x86.ActiveCfg = Release|x86 {D18A5DEB-5102-4775-A1AF-B75DAAA8907B}.Release|x86.Build.0 = Release|x86 + {F6FC6BE7-0847-4817-A1ED-223DC647C3D7}.Debug|Any CPU.ActiveCfg = Debug|x86 + {F6FC6BE7-0847-4817-A1ED-223DC647C3D7}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {F6FC6BE7-0847-4817-A1ED-223DC647C3D7}.Debug|Mixed Platforms.Build.0 = Debug|x86 {F6FC6BE7-0847-4817-A1ED-223DC647C3D7}.Debug|x86.ActiveCfg = Debug|x86 {F6FC6BE7-0847-4817-A1ED-223DC647C3D7}.Debug|x86.Build.0 = Debug|x86 + {F6FC6BE7-0847-4817-A1ED-223DC647C3D7}.Release|Any CPU.ActiveCfg = Release|x86 + {F6FC6BE7-0847-4817-A1ED-223DC647C3D7}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {F6FC6BE7-0847-4817-A1ED-223DC647C3D7}.Release|Mixed Platforms.Build.0 = Release|x86 {F6FC6BE7-0847-4817-A1ED-223DC647C3D7}.Release|x86.ActiveCfg = Release|x86 {F6FC6BE7-0847-4817-A1ED-223DC647C3D7}.Release|x86.Build.0 = Release|x86 + {CBF6B8B0-A015-413A-8C86-01238BB45770}.Debug|Any CPU.ActiveCfg = Debug|x86 + {CBF6B8B0-A015-413A-8C86-01238BB45770}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {CBF6B8B0-A015-413A-8C86-01238BB45770}.Debug|Mixed Platforms.Build.0 = Debug|x86 {CBF6B8B0-A015-413A-8C86-01238BB45770}.Debug|x86.ActiveCfg = Debug|x86 {CBF6B8B0-A015-413A-8C86-01238BB45770}.Debug|x86.Build.0 = Debug|x86 + {CBF6B8B0-A015-413A-8C86-01238BB45770}.Release|Any CPU.ActiveCfg = Release|x86 + {CBF6B8B0-A015-413A-8C86-01238BB45770}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {CBF6B8B0-A015-413A-8C86-01238BB45770}.Release|Mixed Platforms.Build.0 = Release|x86 {CBF6B8B0-A015-413A-8C86-01238BB45770}.Release|x86.ActiveCfg = Release|x86 {CBF6B8B0-A015-413A-8C86-01238BB45770}.Release|x86.Build.0 = Release|x86 + {8CEFECD0-A6C2-498F-98B1-3FBE5820F9AB}.Debug|Any CPU.ActiveCfg = Debug|x86 + {8CEFECD0-A6C2-498F-98B1-3FBE5820F9AB}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {8CEFECD0-A6C2-498F-98B1-3FBE5820F9AB}.Debug|Mixed Platforms.Build.0 = Debug|x86 {8CEFECD0-A6C2-498F-98B1-3FBE5820F9AB}.Debug|x86.ActiveCfg = Debug|x86 {8CEFECD0-A6C2-498F-98B1-3FBE5820F9AB}.Debug|x86.Build.0 = Debug|x86 + {8CEFECD0-A6C2-498F-98B1-3FBE5820F9AB}.Release|Any CPU.ActiveCfg = Release|x86 + {8CEFECD0-A6C2-498F-98B1-3FBE5820F9AB}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {8CEFECD0-A6C2-498F-98B1-3FBE5820F9AB}.Release|Mixed Platforms.Build.0 = Release|x86 {8CEFECD0-A6C2-498F-98B1-3FBE5820F9AB}.Release|x86.ActiveCfg = Release|x86 {8CEFECD0-A6C2-498F-98B1-3FBE5820F9AB}.Release|x86.Build.0 = Release|x86 + {B1784698-592E-4132-BDFA-9817409E3A96}.Debug|Any CPU.ActiveCfg = Debug|x86 + {B1784698-592E-4132-BDFA-9817409E3A96}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {B1784698-592E-4132-BDFA-9817409E3A96}.Debug|Mixed Platforms.Build.0 = Debug|x86 {B1784698-592E-4132-BDFA-9817409E3A96}.Debug|x86.ActiveCfg = Debug|x86 {B1784698-592E-4132-BDFA-9817409E3A96}.Debug|x86.Build.0 = Debug|x86 + {B1784698-592E-4132-BDFA-9817409E3A96}.Release|Any CPU.ActiveCfg = Release|x86 + {B1784698-592E-4132-BDFA-9817409E3A96}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {B1784698-592E-4132-BDFA-9817409E3A96}.Release|Mixed Platforms.Build.0 = Release|x86 {B1784698-592E-4132-BDFA-9817409E3A96}.Release|x86.ActiveCfg = Release|x86 {B1784698-592E-4132-BDFA-9817409E3A96}.Release|x86.Build.0 = Release|x86 + {95C11A9E-56ED-456A-8447-2C89C1139266}.Debug|Any CPU.ActiveCfg = Debug|x86 + {95C11A9E-56ED-456A-8447-2C89C1139266}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {95C11A9E-56ED-456A-8447-2C89C1139266}.Debug|Mixed Platforms.Build.0 = Debug|x86 {95C11A9E-56ED-456A-8447-2C89C1139266}.Debug|x86.ActiveCfg = Debug|x86 {95C11A9E-56ED-456A-8447-2C89C1139266}.Debug|x86.Build.0 = Debug|x86 + {95C11A9E-56ED-456A-8447-2C89C1139266}.Release|Any CPU.ActiveCfg = Release|x86 + {95C11A9E-56ED-456A-8447-2C89C1139266}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {95C11A9E-56ED-456A-8447-2C89C1139266}.Release|Mixed Platforms.Build.0 = Release|x86 {95C11A9E-56ED-456A-8447-2C89C1139266}.Release|x86.ActiveCfg = Release|x86 {95C11A9E-56ED-456A-8447-2C89C1139266}.Release|x86.Build.0 = Release|x86 + {7C2CC69F-5CA0-4E5C-85CB-983F9F6C3B36}.Debug|Any CPU.ActiveCfg = Debug|x86 + {7C2CC69F-5CA0-4E5C-85CB-983F9F6C3B36}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {7C2CC69F-5CA0-4E5C-85CB-983F9F6C3B36}.Debug|Mixed Platforms.Build.0 = Debug|x86 {7C2CC69F-5CA0-4E5C-85CB-983F9F6C3B36}.Debug|x86.ActiveCfg = Debug|x86 {7C2CC69F-5CA0-4E5C-85CB-983F9F6C3B36}.Debug|x86.Build.0 = Debug|x86 + {7C2CC69F-5CA0-4E5C-85CB-983F9F6C3B36}.Release|Any CPU.ActiveCfg = Release|x86 + {7C2CC69F-5CA0-4E5C-85CB-983F9F6C3B36}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {7C2CC69F-5CA0-4E5C-85CB-983F9F6C3B36}.Release|Mixed Platforms.Build.0 = Release|x86 {7C2CC69F-5CA0-4E5C-85CB-983F9F6C3B36}.Release|x86.ActiveCfg = Release|x86 {7C2CC69F-5CA0-4E5C-85CB-983F9F6C3B36}.Release|x86.Build.0 = Release|x86 + {CC26800D-F67E-464B-88DE-8EB1A0C227A3}.Debug|Any CPU.ActiveCfg = Debug|x86 + {CC26800D-F67E-464B-88DE-8EB1A0C227A3}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {CC26800D-F67E-464B-88DE-8EB1A0C227A3}.Debug|Mixed Platforms.Build.0 = Debug|x86 {CC26800D-F67E-464B-88DE-8EB1A0C227A3}.Debug|x86.ActiveCfg = Debug|x86 {CC26800D-F67E-464B-88DE-8EB1A0C227A3}.Debug|x86.Build.0 = Debug|x86 + {CC26800D-F67E-464B-88DE-8EB1A0C227A3}.Release|Any CPU.ActiveCfg = Release|x86 + {CC26800D-F67E-464B-88DE-8EB1A0C227A3}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {CC26800D-F67E-464B-88DE-8EB1A0C227A3}.Release|Mixed Platforms.Build.0 = Release|x86 {CC26800D-F67E-464B-88DE-8EB1A0C227A3}.Release|x86.ActiveCfg = Release|x86 {CC26800D-F67E-464B-88DE-8EB1A0C227A3}.Release|x86.Build.0 = Release|x86 + {1B9A82C4-BCA1-4834-A33E-226F17BE070B}.Debug|Any CPU.ActiveCfg = Debug|x86 + {1B9A82C4-BCA1-4834-A33E-226F17BE070B}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {1B9A82C4-BCA1-4834-A33E-226F17BE070B}.Debug|Mixed Platforms.Build.0 = Debug|x86 {1B9A82C4-BCA1-4834-A33E-226F17BE070B}.Debug|x86.ActiveCfg = Debug|x86 {1B9A82C4-BCA1-4834-A33E-226F17BE070B}.Debug|x86.Build.0 = Debug|x86 + {1B9A82C4-BCA1-4834-A33E-226F17BE070B}.Release|Any CPU.ActiveCfg = Release|x86 + {1B9A82C4-BCA1-4834-A33E-226F17BE070B}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {1B9A82C4-BCA1-4834-A33E-226F17BE070B}.Release|Mixed Platforms.Build.0 = Release|x86 {1B9A82C4-BCA1-4834-A33E-226F17BE070B}.Release|x86.ActiveCfg = Release|x86 {1B9A82C4-BCA1-4834-A33E-226F17BE070B}.Release|x86.Build.0 = Release|x86 + {2B8C6DAD-4D85-41B1-83FD-248D9F347522}.Debug|Any CPU.ActiveCfg = Debug|x86 + {2B8C6DAD-4D85-41B1-83FD-248D9F347522}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {2B8C6DAD-4D85-41B1-83FD-248D9F347522}.Debug|Mixed Platforms.Build.0 = Debug|x86 {2B8C6DAD-4D85-41B1-83FD-248D9F347522}.Debug|x86.ActiveCfg = Debug|x86 {2B8C6DAD-4D85-41B1-83FD-248D9F347522}.Debug|x86.Build.0 = Debug|x86 + {2B8C6DAD-4D85-41B1-83FD-248D9F347522}.Release|Any CPU.ActiveCfg = Release|x86 + {2B8C6DAD-4D85-41B1-83FD-248D9F347522}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {2B8C6DAD-4D85-41B1-83FD-248D9F347522}.Release|Mixed Platforms.Build.0 = Release|x86 {2B8C6DAD-4D85-41B1-83FD-248D9F347522}.Release|x86.ActiveCfg = Release|x86 {2B8C6DAD-4D85-41B1-83FD-248D9F347522}.Release|x86.Build.0 = Release|x86 + {15AD7579-A314-4626-B556-663F51D97CD1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {15AD7579-A314-4626-B556-663F51D97CD1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {15AD7579-A314-4626-B556-663F51D97CD1}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {15AD7579-A314-4626-B556-663F51D97CD1}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {15AD7579-A314-4626-B556-663F51D97CD1}.Debug|x86.ActiveCfg = Debug|x86 + {15AD7579-A314-4626-B556-663F51D97CD1}.Debug|x86.Build.0 = Debug|x86 + {15AD7579-A314-4626-B556-663F51D97CD1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {15AD7579-A314-4626-B556-663F51D97CD1}.Release|Any CPU.Build.0 = Release|Any CPU + {15AD7579-A314-4626-B556-663F51D97CD1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {15AD7579-A314-4626-B556-663F51D97CD1}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {15AD7579-A314-4626-B556-663F51D97CD1}.Release|x86.ActiveCfg = Release|x86 + {15AD7579-A314-4626-B556-663F51D97CD1}.Release|x86.Build.0 = Release|x86 + {911284D3-F130-459E-836C-2430B6FBF21D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {911284D3-F130-459E-836C-2430B6FBF21D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {911284D3-F130-459E-836C-2430B6FBF21D}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {911284D3-F130-459E-836C-2430B6FBF21D}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {911284D3-F130-459E-836C-2430B6FBF21D}.Debug|x86.ActiveCfg = Debug|x86 + {911284D3-F130-459E-836C-2430B6FBF21D}.Debug|x86.Build.0 = Debug|x86 + {911284D3-F130-459E-836C-2430B6FBF21D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {911284D3-F130-459E-836C-2430B6FBF21D}.Release|Any CPU.Build.0 = Release|Any CPU + {911284D3-F130-459E-836C-2430B6FBF21D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {911284D3-F130-459E-836C-2430B6FBF21D}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {911284D3-F130-459E-836C-2430B6FBF21D}.Release|x86.ActiveCfg = Release|x86 + {911284D3-F130-459E-836C-2430B6FBF21D}.Release|x86.Build.0 = Release|x86 + {80B51429-7A0E-46D6-BEE3-C80DCB1C4EAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {80B51429-7A0E-46D6-BEE3-C80DCB1C4EAA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {80B51429-7A0E-46D6-BEE3-C80DCB1C4EAA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {80B51429-7A0E-46D6-BEE3-C80DCB1C4EAA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {80B51429-7A0E-46D6-BEE3-C80DCB1C4EAA}.Debug|x86.ActiveCfg = Debug|x86 + {80B51429-7A0E-46D6-BEE3-C80DCB1C4EAA}.Debug|x86.Build.0 = Debug|x86 + {80B51429-7A0E-46D6-BEE3-C80DCB1C4EAA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {80B51429-7A0E-46D6-BEE3-C80DCB1C4EAA}.Release|Any CPU.Build.0 = Release|Any CPU + {80B51429-7A0E-46D6-BEE3-C80DCB1C4EAA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {80B51429-7A0E-46D6-BEE3-C80DCB1C4EAA}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {80B51429-7A0E-46D6-BEE3-C80DCB1C4EAA}.Release|x86.ActiveCfg = Release|x86 + {80B51429-7A0E-46D6-BEE3-C80DCB1C4EAA}.Release|x86.Build.0 = Release|x86 + {40D72824-7D02-4A77-9106-8FE0EEA2B997}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {40D72824-7D02-4A77-9106-8FE0EEA2B997}.Debug|Any CPU.Build.0 = Debug|Any CPU + {40D72824-7D02-4A77-9106-8FE0EEA2B997}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {40D72824-7D02-4A77-9106-8FE0EEA2B997}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {40D72824-7D02-4A77-9106-8FE0EEA2B997}.Debug|x86.ActiveCfg = Debug|x86 + {40D72824-7D02-4A77-9106-8FE0EEA2B997}.Debug|x86.Build.0 = Debug|x86 + {40D72824-7D02-4A77-9106-8FE0EEA2B997}.Release|Any CPU.ActiveCfg = Release|Any CPU + {40D72824-7D02-4A77-9106-8FE0EEA2B997}.Release|Any CPU.Build.0 = Release|Any CPU + {40D72824-7D02-4A77-9106-8FE0EEA2B997}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {40D72824-7D02-4A77-9106-8FE0EEA2B997}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {40D72824-7D02-4A77-9106-8FE0EEA2B997}.Release|x86.ActiveCfg = Release|x86 + {40D72824-7D02-4A77-9106-8FE0EEA2B997}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -182,6 +390,7 @@ Global {CBF6B8B0-A015-413A-8C86-01238BB45770} = {57A04B72-8088-4F75-A582-1158CF8291F7} {8CEFECD0-A6C2-498F-98B1-3FBE5820F9AB} = {57A04B72-8088-4F75-A582-1158CF8291F7} {CC26800D-F67E-464B-88DE-8EB1A0C227A3} = {57A04B72-8088-4F75-A582-1158CF8291F7} + {4EACDBBC-BCD7-4765-A57B-3E08331E4749} = {57A04B72-8088-4F75-A582-1158CF8291F7} {FAFB5948-A222-4CF6-AD14-026BE7564802} = {47697CDB-27B6-4B05-B4F8-0CBE6F6EDF97} {CADDFCE0-7509-4430-8364-2074E1EEFCA2} = {47697CDB-27B6-4B05-B4F8-0CBE6F6EDF97} {6BCE712F-846D-4846-9D1B-A66B858DA755} = {F9E67978-5CD6-4A5F-827B-4249711C0B02} @@ -192,6 +401,10 @@ Global {1B9A82C4-BCA1-4834-A33E-226F17BE070B} = {F6E3A728-AE77-4D02-BAC8-82FBC1402DDA} {2B8C6DAD-4D85-41B1-83FD-248D9F347522} = {F6E3A728-AE77-4D02-BAC8-82FBC1402DDA} {F6FC6BE7-0847-4817-A1ED-223DC647C3D7} = {F6E3A728-AE77-4D02-BAC8-82FBC1402DDA} + {911284D3-F130-459E-836C-2430B6FBF21D} = {0F0D4998-8F5D-4467-A909-BB192C4B3B4B} + {15AD7579-A314-4626-B556-663F51D97CD1} = {0F0D4998-8F5D-4467-A909-BB192C4B3B4B} + {80B51429-7A0E-46D6-BEE3-C80DCB1C4EAA} = {4EACDBBC-BCD7-4765-A57B-3E08331E4749} + {40D72824-7D02-4A77-9106-8FE0EEA2B997} = {4EACDBBC-BCD7-4765-A57B-3E08331E4749} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EnterpriseLibraryConfigurationToolBinariesPath = packages\Unity.2.1.505.0\lib\NET35;packages\Unity.2.1.505.2\lib\NET35