From 6206cbe1fe5451bfcb78250421b019790da4729d Mon Sep 17 00:00:00 2001 From: Thomas Broust Date: Wed, 25 Jun 2014 23:59:37 +0200 Subject: [PATCH 1/7] Creates a new Mono project so it can at least build (not yet run) on Xamarin/Mono Former-commit-id: 20d40145d090fe29a8dcc3690a0ecd47e9991ab9 --- .../HttpModules/ImageProcessingModule.cs | 4 +- .../ImageProcessorConsole.csproj | 6 +- src/ImageProcessor_Mono.sln | 132 ++++++++++++++++++ 3 files changed, 137 insertions(+), 5 deletions(-) create mode 100644 src/ImageProcessor_Mono.sln diff --git a/src/ImageProcessor.Web/NET45/HttpModules/ImageProcessingModule.cs b/src/ImageProcessor.Web/NET45/HttpModules/ImageProcessingModule.cs index 22c03bef7..154038d54 100644 --- a/src/ImageProcessor.Web/NET45/HttpModules/ImageProcessingModule.cs +++ b/src/ImageProcessor.Web/NET45/HttpModules/ImageProcessingModule.cs @@ -125,7 +125,7 @@ namespace ImageProcessor.Web.HttpModules preserveExifMetaData = ImageProcessorConfig.Instance.PreserveExifMetaData; } -#if NET45 +#if NET45 && !__MonoCS__ EventHandlerTaskAsyncHelper wrapper = new EventHandlerTaskAsyncHelper(this.PostAuthorizeRequest); context.AddOnPostAuthorizeRequestAsync(wrapper.BeginEventHandler, wrapper.EndEventHandler); #else @@ -194,7 +194,7 @@ namespace ImageProcessor.Web.HttpModules } #endregion -#if NET45 +#if NET45 && !__MonoCS__ /// /// Occurs when the user for the current request has been authorized. diff --git a/src/ImageProcessorConsole/ImageProcessorConsole.csproj b/src/ImageProcessorConsole/ImageProcessorConsole.csproj index 39b66751b..9cf9bf603 100644 --- a/src/ImageProcessorConsole/ImageProcessorConsole.csproj +++ b/src/ImageProcessorConsole/ImageProcessorConsole.csproj @@ -1,5 +1,5 @@  - + Debug @@ -9,7 +9,7 @@ Properties ImageProcessorConsole ImageProcessorConsole - v4.5.1 + v4.5 512 true @@ -51,7 +51,7 @@ - {3b5dd734-fb7a-487d-8ce6-55e7af9aea7e} + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E} ImageProcessor diff --git a/src/ImageProcessor_Mono.sln b/src/ImageProcessor_Mono.sln new file mode 100644 index 000000000..d7e1410a8 --- /dev/null +++ b/src/ImageProcessor_Mono.sln @@ -0,0 +1,132 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +VisualStudioVersion = 12.0.30110.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C427A497-74DC-49B1-8420-D6E68354F29B}" + ProjectSection(SolutionItems) = preProject + ImageProcessor.vsmdi = ImageProcessor.vsmdi + Local.testsettings = Local.testsettings + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{1E656CDE-124D-4FAF-837C-0EF1E192D418}" + ProjectSection(SolutionItems) = preProject + .nuget\NuGet.Config = .nuget\NuGet.Config + .nuget\NuGet.exe = .nuget\NuGet.exe + .nuget\NuGet.targets = .nuget\NuGet.targets + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageProcessor", "ImageProcessor\ImageProcessor.csproj", "{3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test_Website_MVC_NET4", "TestWebsites\NET4\Test_Website_MVC_NET4.csproj", "{30327C08-7574-4D7E-AC95-6A58753C6855}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageProcessor.Web_NET4", "ImageProcessor.Web\NET4\ImageProcessor.Web_NET4.csproj", "{4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageProcessor.Web_NET45", "ImageProcessor.Web\NET45\ImageProcessor.Web_NET45.csproj", "{D011A778-59C8-4BFA-A770-C350216BF161}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageProcessorConsole", "ImageProcessorConsole\ImageProcessorConsole.csproj", "{7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + All|Any CPU = All|Any CPU + All|Mixed Platforms = All|Mixed Platforms + All|x86 = All|x86 + 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 + {30327C08-7574-4D7E-AC95-6A58753C6855}.All|Any CPU.ActiveCfg = All|Any CPU + {30327C08-7574-4D7E-AC95-6A58753C6855}.All|Any CPU.Build.0 = All|Any CPU + {30327C08-7574-4D7E-AC95-6A58753C6855}.All|Mixed Platforms.ActiveCfg = All|x86 + {30327C08-7574-4D7E-AC95-6A58753C6855}.All|Mixed Platforms.Build.0 = All|x86 + {30327C08-7574-4D7E-AC95-6A58753C6855}.All|x86.ActiveCfg = All|x86 + {30327C08-7574-4D7E-AC95-6A58753C6855}.All|x86.Build.0 = All|x86 + {30327C08-7574-4D7E-AC95-6A58753C6855}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {30327C08-7574-4D7E-AC95-6A58753C6855}.Debug|Any CPU.Build.0 = Debug|Any CPU + {30327C08-7574-4D7E-AC95-6A58753C6855}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {30327C08-7574-4D7E-AC95-6A58753C6855}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {30327C08-7574-4D7E-AC95-6A58753C6855}.Debug|x86.ActiveCfg = Debug|x86 + {30327C08-7574-4D7E-AC95-6A58753C6855}.Debug|x86.Build.0 = Debug|x86 + {30327C08-7574-4D7E-AC95-6A58753C6855}.Release|Any CPU.ActiveCfg = Release|Any CPU + {30327C08-7574-4D7E-AC95-6A58753C6855}.Release|Any CPU.Build.0 = Release|Any CPU + {30327C08-7574-4D7E-AC95-6A58753C6855}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {30327C08-7574-4D7E-AC95-6A58753C6855}.Release|Mixed Platforms.Build.0 = Release|x86 + {30327C08-7574-4D7E-AC95-6A58753C6855}.Release|x86.ActiveCfg = Release|x86 + {30327C08-7574-4D7E-AC95-6A58753C6855}.Release|x86.Build.0 = Release|x86 + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.All|Any CPU.ActiveCfg = All|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.All|Any CPU.Build.0 = All|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.All|Mixed Platforms.ActiveCfg = All|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.All|Mixed Platforms.Build.0 = All|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.All|x86.ActiveCfg = All|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Debug|x86.ActiveCfg = Debug|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Release|Any CPU.Build.0 = Release|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Release|x86.ActiveCfg = Release|Any CPU + {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.All|Any CPU.ActiveCfg = All|Any CPU + {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.All|Any CPU.Build.0 = All|Any CPU + {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.All|Mixed Platforms.ActiveCfg = All|Any CPU + {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.All|Mixed Platforms.Build.0 = All|Any CPU + {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.All|x86.ActiveCfg = All|Any CPU + {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.Debug|x86.ActiveCfg = Debug|Any CPU + {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.Release|Any CPU.Build.0 = Release|Any CPU + {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.Release|x86.ActiveCfg = Release|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.All|Any CPU.ActiveCfg = Release|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.All|Any CPU.Build.0 = Release|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.All|Mixed Platforms.ActiveCfg = Release|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.All|Mixed Platforms.Build.0 = Release|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.All|x86.ActiveCfg = Release|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Debug|x86.ActiveCfg = Debug|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Release|Any CPU.Build.0 = Release|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Release|x86.ActiveCfg = Release|Any CPU + {D011A778-59C8-4BFA-A770-C350216BF161}.All|Any CPU.ActiveCfg = Release|Any CPU + {D011A778-59C8-4BFA-A770-C350216BF161}.All|Any CPU.Build.0 = Release|Any CPU + {D011A778-59C8-4BFA-A770-C350216BF161}.All|Mixed Platforms.ActiveCfg = Release|Any CPU + {D011A778-59C8-4BFA-A770-C350216BF161}.All|Mixed Platforms.Build.0 = Release|Any CPU + {D011A778-59C8-4BFA-A770-C350216BF161}.All|x86.ActiveCfg = Release|Any CPU + {D011A778-59C8-4BFA-A770-C350216BF161}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D011A778-59C8-4BFA-A770-C350216BF161}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D011A778-59C8-4BFA-A770-C350216BF161}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {D011A778-59C8-4BFA-A770-C350216BF161}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {D011A778-59C8-4BFA-A770-C350216BF161}.Debug|x86.ActiveCfg = Debug|Any CPU + {D011A778-59C8-4BFA-A770-C350216BF161}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D011A778-59C8-4BFA-A770-C350216BF161}.Release|Any CPU.Build.0 = Release|Any CPU + {D011A778-59C8-4BFA-A770-C350216BF161}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {D011A778-59C8-4BFA-A770-C350216BF161}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {D011A778-59C8-4BFA-A770-C350216BF161}.Release|x86.ActiveCfg = Release|Any CPU + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + EndGlobalSection + GlobalSection(MonoDevelopProperties) = preSolution + StartupItem = ImageProcessor\ImageProcessor.csproj + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(TestCaseManagementSettings) = postSolution + CategoryFile = ImageProcessor.vsmdi + EndGlobalSection +EndGlobal From 3875036f6e3d04e8517ab49e453b3f12c5b2813b Mon Sep 17 00:00:00 2001 From: Thomas Broust Date: Wed, 25 Jun 2014 23:59:58 +0200 Subject: [PATCH 2/7] Ignores Xamarin files Former-commit-id: a5fdb13a32938d01d2d6574a5e51a2299add2921 --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 6b6928926..2fc43e4a1 100644 --- a/.gitignore +++ b/.gitignore @@ -64,6 +64,9 @@ local.properties .builds **/*.dotCover +# Xamarin +*.userprefs + ## TODO: If you have NuGet Package Restore enabled, uncomment this packages/ From 23f91da72ac6380f1d5abefc0fd9afa029d8c67a Mon Sep 17 00:00:00 2001 From: Thomas Broust Date: Thu, 26 Jun 2014 00:08:55 +0200 Subject: [PATCH 3/7] Removes MVC test project from Mono solution because of heavy dependencies Former-commit-id: 48a7184792fe62dc50526dbe7f6da27084527169 --- src/ImageProcessor_Mono.sln | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/ImageProcessor_Mono.sln b/src/ImageProcessor_Mono.sln index d7e1410a8..7d47a2ca6 100644 --- a/src/ImageProcessor_Mono.sln +++ b/src/ImageProcessor_Mono.sln @@ -18,8 +18,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{1E656C EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageProcessor", "ImageProcessor\ImageProcessor.csproj", "{3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test_Website_MVC_NET4", "TestWebsites\NET4\Test_Website_MVC_NET4.csproj", "{30327C08-7574-4D7E-AC95-6A58753C6855}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageProcessor.Web_NET4", "ImageProcessor.Web\NET4\ImageProcessor.Web_NET4.csproj", "{4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageProcessor.Web_NET45", "ImageProcessor.Web\NET45\ImageProcessor.Web_NET45.csproj", "{D011A778-59C8-4BFA-A770-C350216BF161}" @@ -39,24 +37,6 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {30327C08-7574-4D7E-AC95-6A58753C6855}.All|Any CPU.ActiveCfg = All|Any CPU - {30327C08-7574-4D7E-AC95-6A58753C6855}.All|Any CPU.Build.0 = All|Any CPU - {30327C08-7574-4D7E-AC95-6A58753C6855}.All|Mixed Platforms.ActiveCfg = All|x86 - {30327C08-7574-4D7E-AC95-6A58753C6855}.All|Mixed Platforms.Build.0 = All|x86 - {30327C08-7574-4D7E-AC95-6A58753C6855}.All|x86.ActiveCfg = All|x86 - {30327C08-7574-4D7E-AC95-6A58753C6855}.All|x86.Build.0 = All|x86 - {30327C08-7574-4D7E-AC95-6A58753C6855}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {30327C08-7574-4D7E-AC95-6A58753C6855}.Debug|Any CPU.Build.0 = Debug|Any CPU - {30327C08-7574-4D7E-AC95-6A58753C6855}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {30327C08-7574-4D7E-AC95-6A58753C6855}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {30327C08-7574-4D7E-AC95-6A58753C6855}.Debug|x86.ActiveCfg = Debug|x86 - {30327C08-7574-4D7E-AC95-6A58753C6855}.Debug|x86.Build.0 = Debug|x86 - {30327C08-7574-4D7E-AC95-6A58753C6855}.Release|Any CPU.ActiveCfg = Release|Any CPU - {30327C08-7574-4D7E-AC95-6A58753C6855}.Release|Any CPU.Build.0 = Release|Any CPU - {30327C08-7574-4D7E-AC95-6A58753C6855}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {30327C08-7574-4D7E-AC95-6A58753C6855}.Release|Mixed Platforms.Build.0 = Release|x86 - {30327C08-7574-4D7E-AC95-6A58753C6855}.Release|x86.ActiveCfg = Release|x86 - {30327C08-7574-4D7E-AC95-6A58753C6855}.Release|x86.Build.0 = Release|x86 {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.All|Any CPU.ActiveCfg = All|Any CPU {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.All|Any CPU.Build.0 = All|Any CPU {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.All|Mixed Platforms.ActiveCfg = All|Any CPU From 87a19b80bf973f062c6b8620ebf128c49c0b1b96 Mon Sep 17 00:00:00 2001 From: James South Date: Thu, 26 Jun 2014 22:30:08 +0100 Subject: [PATCH 4/7] Separating Unit Tests Hopefully rebuilding the projects will fix the AppVeyor issues. Former-commit-id: f0ef9f41ee166cf5da75ccfe17459e49ef63ae80 --- .../ImageProcessor.UnitTests.csproj | 282 ++++++++++-------- .../Properties/AssemblyInfo.cs | 36 +++ src/ImageProcessor.UnitTests/packages.config | 2 +- .../ImageProcessor.Web.UnitTests.csproj | 106 +++++++ .../Properties/AssemblyInfo.cs | 36 +++ .../RegularExpressionUnitTests.cs | 26 +- .../packages.config | 4 + src/ImageProcessor.sln | 182 +++++------ src/packages/repositories.config | 2 + 9 files changed, 458 insertions(+), 218 deletions(-) create mode 100644 src/ImageProcessor.UnitTests/Properties/AssemblyInfo.cs create mode 100644 src/ImageProcessor.Web.UnitTests/ImageProcessor.Web.UnitTests.csproj create mode 100644 src/ImageProcessor.Web.UnitTests/Properties/AssemblyInfo.cs rename src/{ImageProcessor.UnitTests => ImageProcessor.Web.UnitTests}/RegularExpressionUnitTests.cs (87%) create mode 100644 src/ImageProcessor.Web.UnitTests/packages.config diff --git a/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj b/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj index afce9a1d2..2be742cb4 100644 --- a/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj +++ b/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj @@ -1,178 +1,215 @@  - + Debug AnyCPU - {03CA9055-F997-428C-BF28-F50F991777C6} + {633B1C4C-4823-47BE-9A01-A665F3118C8C} Library + Properties ImageProcessor.UnitTests ImageProcessor.UnitTests - - + v4.0 + 512 + {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages + False + UnitTest ..\ true - v4.5 + true full false - bin\Debug - DEBUG; + bin\Debug\ + DEBUG;TRACE prompt 4 - false - false - full + pdbonly true - bin\Release + bin\Release\ + TRACE prompt 4 - false - false - - ..\packages\NUnit.2.6.3\lib\nunit.framework.dll - - + + + + + + + + + + - + - - - {d011a778-59c8-4bfa-a770-c350216bf161} - ImageProcessor.Web_NET45 - - - {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E} - ImageProcessor - + - - + + Images\1182076_e8c402e938_z.jpg + + + Images\bus.jpg + + Images\Chrysanthemum.jpg - PreserveNewest - - + + + Images\circle.png + + + Images\cmyk.jpg + + + Images\cmyk.png + + + Images\color-vision-test.gif + + Images\Desert.jpg - PreserveNewest - - + + + Images\emma.jpg + + + Images\falahill_design__160p.jpg + + + Images\fid11246.jpg + + + Images\fid9141.jpg + + + Images\header_1.jpg + + Images\Hydrangeas.jpg - PreserveNewest - - + + Images\Jellyfish.jpg - PreserveNewest - - + + + Images\jrt.jpg + + Images\Koala.jpg - PreserveNewest - - + + Images\Lighthouse.jpg - PreserveNewest - - + + + Images\lomo.jpg + + + Images\meter.gif + + + Images\negative.png + + + Images\negative2.png + + Images\Penguins-200.jpg - PreserveNewest - - + + Images\Penguins-8.png - PreserveNewest - - + + Images\Penguins.bmp - PreserveNewest - - + + Images\Penguins.gif - PreserveNewest - - + + Images\Penguins.jpg - PreserveNewest - - + + Images\Penguins.png - PreserveNewest - - + + Images\Penguins.tif - PreserveNewest - - - Images\Tulips.jpg - PreserveNewest - - - Images\bus.jpg - PreserveNewest - - - Images\cmyk.jpg - PreserveNewest - - - Images\cmyk.png - PreserveNewest - - - Images\jrt.jpg - PreserveNewest - - - Images\meter.gif - PreserveNewest - - + + Images\rocks.jpg - PreserveNewest - - + + Images\rotate.jpg - PreserveNewest - - + + Images\sample1.jpg - PreserveNewest - - + + Images\srgb.jpg - PreserveNewest - - + + Images\srgb.png - PreserveNewest - - + + Images\text.png - PreserveNewest - - + + Images\thor.jpg - PreserveNewest - - + + + Images\Tulips.jpg + + Images\udendørs-374.jpg - PreserveNewest - - + + Images\udendørs.jpg - PreserveNewest - + + + Images\war_horse_quad.jpg + + + Images\WP_000009.jpg + - + + + {3b5dd734-fb7a-487d-8ce6-55e7af9aea7e} + ImageProcessor + + + + + + + False + + + False + + + False + + + False + + + + + + @@ -180,4 +217,11 @@ + \ No newline at end of file diff --git a/src/ImageProcessor.UnitTests/Properties/AssemblyInfo.cs b/src/ImageProcessor.UnitTests/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..fb042a1d3 --- /dev/null +++ b/src/ImageProcessor.UnitTests/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("ImageProcessor.UnitTests2")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ImageProcessor.UnitTests2")] +[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("3003f5a6-eb11-4eee-bfaa-448deb3a31d9")] + +// 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/ImageProcessor.UnitTests/packages.config b/src/ImageProcessor.UnitTests/packages.config index 5a3253fcb..a18b325a4 100644 --- a/src/ImageProcessor.UnitTests/packages.config +++ b/src/ImageProcessor.UnitTests/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/src/ImageProcessor.Web.UnitTests/ImageProcessor.Web.UnitTests.csproj b/src/ImageProcessor.Web.UnitTests/ImageProcessor.Web.UnitTests.csproj new file mode 100644 index 000000000..17c54d202 --- /dev/null +++ b/src/ImageProcessor.Web.UnitTests/ImageProcessor.Web.UnitTests.csproj @@ -0,0 +1,106 @@ + + + + Debug + AnyCPU + {961340C8-8C93-401D-A0A2-FF9EC61E5260} + Library + Properties + ImageProcessor.Web.UnitTests + ImageProcessor.Web.UnitTests + v4.5.1 + 512 + {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages + False + UnitTest + ..\ + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + ..\packages\NUnit.2.6.3\lib\nunit.framework.dll + + + + + + + + + + + + + + + + + + + + + + {d011a778-59c8-4bfa-a770-c350216bf161} + ImageProcessor.Web_NET45 + + + {3b5dd734-fb7a-487d-8ce6-55e7af9aea7e} + ImageProcessor + + + + + + + False + + + False + + + False + + + False + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + \ No newline at end of file diff --git a/src/ImageProcessor.Web.UnitTests/Properties/AssemblyInfo.cs b/src/ImageProcessor.Web.UnitTests/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..db6aa3c94 --- /dev/null +++ b/src/ImageProcessor.Web.UnitTests/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("ImageProcessor.Web.UnitTests")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ImageProcessor.Web.UnitTests")] +[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("74919969-6a75-4d26-b1b8-0626aa10af6d")] + +// 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/ImageProcessor.UnitTests/RegularExpressionUnitTests.cs b/src/ImageProcessor.Web.UnitTests/RegularExpressionUnitTests.cs similarity index 87% rename from src/ImageProcessor.UnitTests/RegularExpressionUnitTests.cs rename to src/ImageProcessor.Web.UnitTests/RegularExpressionUnitTests.cs index 417e94f8c..c41454563 100644 --- a/src/ImageProcessor.UnitTests/RegularExpressionUnitTests.cs +++ b/src/ImageProcessor.Web.UnitTests/RegularExpressionUnitTests.cs @@ -8,7 +8,7 @@ // // -------------------------------------------------------------------------------------------------------------------- -namespace ImageProcessor.UnitTests +namespace ImageProcessor.Web.UnitTests { using System.Drawing; using ImageProcessor.Imaging; @@ -31,7 +31,7 @@ namespace ImageProcessor.UnitTests const string Querystring = "alpha=56"; const int Expected = 56; - Web.Processors.Alpha alpha = new Web.Processors.Alpha(); + Processors.Alpha alpha = new Processors.Alpha(); alpha.MatchRegexIndex(Querystring); int actual = alpha.Processor.DynamicParameter; @@ -48,7 +48,7 @@ namespace ImageProcessor.UnitTests const string Querystring = "brightness=56"; const int Expected = 56; - Web.Processors.Brightness brightness = new Web.Processors.Brightness(); + Processors.Brightness brightness = new Processors.Brightness(); brightness.MatchRegexIndex(Querystring); int actual = brightness.Processor.DynamicParameter; @@ -65,7 +65,7 @@ namespace ImageProcessor.UnitTests const string Querystring = "contrast=56"; const int Expected = 56; - Web.Processors.Contrast contrast = new Web.Processors.Contrast(); + Processors.Contrast contrast = new Processors.Contrast(); contrast.MatchRegexIndex(Querystring); int actual = contrast.Processor.DynamicParameter; @@ -82,7 +82,7 @@ namespace ImageProcessor.UnitTests const string Querystring = "crop=0,0,150,300"; CropLayer expected = new CropLayer(0, 0, 150, 300, CropMode.Pixels); - Web.Processors.Crop crop = new Web.Processors.Crop(); + Processors.Crop crop = new Processors.Crop(); crop.MatchRegexIndex(Querystring); CropLayer actual = crop.Processor.DynamicParameter; @@ -99,7 +99,7 @@ namespace ImageProcessor.UnitTests const string Querystring = "filter=lomograph"; IMatrixFilter expected = MatrixFilters.Lomograph; - Web.Processors.Filter filter = new Web.Processors.Filter(); + Processors.Filter filter = new Processors.Filter(); filter.MatchRegexIndex(Querystring); IMatrixFilter actual = filter.Processor.DynamicParameter; @@ -116,7 +116,7 @@ namespace ImageProcessor.UnitTests const string Querystring = "format=gif"; ISupportedImageFormat expected = new GifFormat(); - Web.Processors.Format format = new Web.Processors.Format(); + Processors.Format format = new Processors.Format(); format.MatchRegexIndex(Querystring); ISupportedImageFormat actual = format.Processor.DynamicParameter; @@ -133,7 +133,7 @@ namespace ImageProcessor.UnitTests const string Querystring = "quality=56"; const int Expected = 56; - Web.Processors.Quality quality = new Web.Processors.Quality(); + Processors.Quality quality = new Processors.Quality(); quality.MatchRegexIndex(Querystring); int actual = quality.Processor.DynamicParameter; @@ -150,7 +150,7 @@ namespace ImageProcessor.UnitTests const string Querystring = "width=300"; ResizeLayer expected = new ResizeLayer(new Size(300, 0)); - Web.Processors.Resize resize = new Web.Processors.Resize(); + Processors.Resize resize = new Processors.Resize(); resize.MatchRegexIndex(Querystring); ResizeLayer actual = resize.Processor.DynamicParameter; @@ -167,7 +167,7 @@ namespace ImageProcessor.UnitTests const string Querystring = "rotate=270"; const int Expected = 270; - Web.Processors.Rotate rotate = new Web.Processors.Rotate(); + Processors.Rotate rotate = new Processors.Rotate(); rotate.MatchRegexIndex(Querystring); int actual = rotate.Processor.DynamicParameter; @@ -183,7 +183,7 @@ namespace ImageProcessor.UnitTests { const string Querystring = "roundedcorners=30"; RoundedCornerLayer expected = new RoundedCornerLayer(30, true, true, true, true); - Web.Processors.RoundedCorners roundedCorners = new Web.Processors.RoundedCorners(); + Processors.RoundedCorners roundedCorners = new Processors.RoundedCorners(); roundedCorners.MatchRegexIndex(Querystring); RoundedCornerLayer actual = roundedCorners.Processor.DynamicParameter; @@ -202,12 +202,12 @@ namespace ImageProcessor.UnitTests Color expectedHex = ColorTranslator.FromHtml("#" + "6aa6cc"); Color expectedRgba = Color.FromArgb(255, 106, 166, 204); - Web.Processors.Tint tint = new Web.Processors.Tint(); + Processors.Tint tint = new Processors.Tint(); tint.MatchRegexIndex(HexQuerystring); Color actualHex = tint.Processor.DynamicParameter; Assert.AreEqual(expectedHex, actualHex); - tint = new Web.Processors.Tint(); + tint = new Processors.Tint(); tint.MatchRegexIndex(RgbaQuerystring); Color actualRgba = tint.Processor.DynamicParameter; Assert.AreEqual(expectedRgba, actualRgba); diff --git a/src/ImageProcessor.Web.UnitTests/packages.config b/src/ImageProcessor.Web.UnitTests/packages.config new file mode 100644 index 000000000..139d5138c --- /dev/null +++ b/src/ImageProcessor.Web.UnitTests/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/ImageProcessor.sln b/src/ImageProcessor.sln index 186a446c7..a12d17c68 100644 --- a/src/ImageProcessor.sln +++ b/src/ImageProcessor.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -VisualStudioVersion = 12.0.30110.0 +# Visual Studio 2013 +VisualStudioVersion = 12.0.30501.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C427A497-74DC-49B1-8420-D6E68354F29B}" ProjectSection(SolutionItems) = preProject @@ -32,7 +32,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test_Website_Webforms_NET45 EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageProcessorConsole", "ImageProcessorConsole\ImageProcessorConsole.csproj", "{7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageProcessor.UnitTests", "ImageProcessor.UnitTests\ImageProcessor.UnitTests.csproj", "{03CA9055-F997-428C-BF28-F50F991777C6}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageProcessor.Web.UnitTests", "ImageProcessor.Web.UnitTests\ImageProcessor.Web.UnitTests.csproj", "{961340C8-8C93-401D-A0A2-FF9EC61E5260}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageProcessor.UnitTests", "ImageProcessor.UnitTests\ImageProcessor.UnitTests.csproj", "{633B1C4C-4823-47BE-9A01-A665F3118C8C}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -47,24 +49,21 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {03CA9055-F997-428C-BF28-F50F991777C6}.All|Any CPU.ActiveCfg = Debug|Any CPU - {03CA9055-F997-428C-BF28-F50F991777C6}.All|Any CPU.Build.0 = Debug|Any CPU - {03CA9055-F997-428C-BF28-F50F991777C6}.All|Mixed Platforms.ActiveCfg = Debug|Any CPU - {03CA9055-F997-428C-BF28-F50F991777C6}.All|Mixed Platforms.Build.0 = Debug|Any CPU - {03CA9055-F997-428C-BF28-F50F991777C6}.All|x86.ActiveCfg = Debug|Any CPU - {03CA9055-F997-428C-BF28-F50F991777C6}.All|x86.Build.0 = Debug|Any CPU - {03CA9055-F997-428C-BF28-F50F991777C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {03CA9055-F997-428C-BF28-F50F991777C6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {03CA9055-F997-428C-BF28-F50F991777C6}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {03CA9055-F997-428C-BF28-F50F991777C6}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {03CA9055-F997-428C-BF28-F50F991777C6}.Debug|x86.ActiveCfg = Debug|Any CPU - {03CA9055-F997-428C-BF28-F50F991777C6}.Debug|x86.Build.0 = Debug|Any CPU - {03CA9055-F997-428C-BF28-F50F991777C6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {03CA9055-F997-428C-BF28-F50F991777C6}.Release|Any CPU.Build.0 = Release|Any CPU - {03CA9055-F997-428C-BF28-F50F991777C6}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {03CA9055-F997-428C-BF28-F50F991777C6}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {03CA9055-F997-428C-BF28-F50F991777C6}.Release|x86.ActiveCfg = Release|Any CPU - {03CA9055-F997-428C-BF28-F50F991777C6}.Release|x86.Build.0 = Release|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.All|Any CPU.ActiveCfg = All|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.All|Any CPU.Build.0 = All|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.All|Mixed Platforms.ActiveCfg = All|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.All|Mixed Platforms.Build.0 = All|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.All|x86.ActiveCfg = All|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Debug|x86.ActiveCfg = Debug|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Release|Any CPU.Build.0 = Release|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Release|x86.ActiveCfg = Release|Any CPU {23CE0FC0-9E59-4C93-A604-A4A98A6284D1}.All|Any CPU.ActiveCfg = Release|Any CPU {23CE0FC0-9E59-4C93-A604-A4A98A6284D1}.All|Any CPU.Build.0 = Release|Any CPU {23CE0FC0-9E59-4C93-A604-A4A98A6284D1}.All|Mixed Platforms.ActiveCfg = Release|Any CPU @@ -97,21 +96,21 @@ Global {30327C08-7574-4D7E-AC95-6A58753C6855}.Release|Mixed Platforms.Build.0 = Release|x86 {30327C08-7574-4D7E-AC95-6A58753C6855}.Release|x86.ActiveCfg = Release|x86 {30327C08-7574-4D7E-AC95-6A58753C6855}.Release|x86.Build.0 = Release|x86 - {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.All|Any CPU.ActiveCfg = All|Any CPU - {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.All|Any CPU.Build.0 = All|Any CPU - {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.All|Mixed Platforms.ActiveCfg = All|Any CPU - {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.All|Mixed Platforms.Build.0 = All|Any CPU - {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.All|x86.ActiveCfg = All|Any CPU - {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Debug|x86.ActiveCfg = Debug|Any CPU - {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Release|Any CPU.Build.0 = Release|Any CPU - {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Release|x86.ActiveCfg = Release|Any CPU + {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.All|Any CPU.ActiveCfg = Release|Any CPU + {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.All|Any CPU.Build.0 = Release|Any CPU + {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.All|Mixed Platforms.ActiveCfg = Release|Any CPU + {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.All|Mixed Platforms.Build.0 = Release|Any CPU + {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.All|x86.ActiveCfg = Release|Any CPU + {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Debug|x86.ActiveCfg = Debug|Any CPU + {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Release|Any CPU.Build.0 = Release|Any CPU + {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Release|x86.ActiveCfg = Release|Any CPU {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.All|Any CPU.ActiveCfg = All|Any CPU {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.All|Any CPU.Build.0 = All|Any CPU {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.All|Mixed Platforms.ActiveCfg = All|Any CPU @@ -127,36 +126,6 @@ Global {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.Release|Mixed Platforms.Build.0 = Release|Any CPU {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.Release|x86.ActiveCfg = Release|Any CPU - {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.All|Any CPU.ActiveCfg = Release|Any CPU - {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.All|Any CPU.Build.0 = Release|Any CPU - {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.All|Mixed Platforms.ActiveCfg = Release|Any CPU - {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.All|Mixed Platforms.Build.0 = Release|Any CPU - {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.All|x86.ActiveCfg = Release|Any CPU - {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Debug|x86.ActiveCfg = Debug|Any CPU - {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Release|Any CPU.Build.0 = Release|Any CPU - {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Release|x86.ActiveCfg = Release|Any CPU - {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.All|Any CPU.ActiveCfg = Release|Any CPU - {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.All|Any CPU.Build.0 = Release|Any CPU - {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.All|Mixed Platforms.ActiveCfg = Release|Any CPU - {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.All|Mixed Platforms.Build.0 = Release|Any CPU - {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.All|x86.ActiveCfg = Release|Any CPU - {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Debug|x86.ActiveCfg = Debug|Any CPU - {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Release|Any CPU.Build.0 = Release|Any CPU - {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Release|x86.ActiveCfg = Release|Any CPU {D011A778-59C8-4BFA-A770-C350216BF161}.All|Any CPU.ActiveCfg = Release|Any CPU {D011A778-59C8-4BFA-A770-C350216BF161}.All|Any CPU.Build.0 = Release|Any CPU {D011A778-59C8-4BFA-A770-C350216BF161}.All|Mixed Platforms.ActiveCfg = Release|Any CPU @@ -172,30 +141,73 @@ Global {D011A778-59C8-4BFA-A770-C350216BF161}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {D011A778-59C8-4BFA-A770-C350216BF161}.Release|Mixed Platforms.Build.0 = Release|Any CPU {D011A778-59C8-4BFA-A770-C350216BF161}.Release|x86.ActiveCfg = Release|Any CPU - {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.All|Any CPU.ActiveCfg = Release|Any CPU - {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.All|Any CPU.Build.0 = Release|Any CPU - {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.All|Mixed Platforms.ActiveCfg = Release|Any CPU - {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.All|Mixed Platforms.Build.0 = Release|Any CPU - {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.All|x86.ActiveCfg = Release|Any CPU - {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Debug|x86.ActiveCfg = Debug|Any CPU - {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Release|Any CPU.Build.0 = Release|Any CPU - {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Release|x86.ActiveCfg = Release|Any CPU + {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.All|Any CPU.ActiveCfg = Release|Any CPU + {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.All|Any CPU.Build.0 = Release|Any CPU + {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.All|Mixed Platforms.ActiveCfg = Release|Any CPU + {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.All|Mixed Platforms.Build.0 = Release|Any CPU + {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.All|x86.ActiveCfg = Release|Any CPU + {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Debug|x86.ActiveCfg = Debug|Any CPU + {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Release|Any CPU.Build.0 = Release|Any CPU + {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Release|x86.ActiveCfg = Release|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.All|Any CPU.ActiveCfg = Release|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.All|Any CPU.Build.0 = Release|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.All|Mixed Platforms.ActiveCfg = Release|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.All|Mixed Platforms.Build.0 = Release|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.All|x86.ActiveCfg = Release|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Debug|x86.ActiveCfg = Debug|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Release|Any CPU.Build.0 = Release|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Release|x86.ActiveCfg = Release|Any CPU + {961340C8-8C93-401D-A0A2-FF9EC61E5260}.All|Any CPU.ActiveCfg = Release|Any CPU + {961340C8-8C93-401D-A0A2-FF9EC61E5260}.All|Any CPU.Build.0 = Release|Any CPU + {961340C8-8C93-401D-A0A2-FF9EC61E5260}.All|Mixed Platforms.ActiveCfg = Release|Any CPU + {961340C8-8C93-401D-A0A2-FF9EC61E5260}.All|Mixed Platforms.Build.0 = Release|Any CPU + {961340C8-8C93-401D-A0A2-FF9EC61E5260}.All|x86.ActiveCfg = Release|Any CPU + {961340C8-8C93-401D-A0A2-FF9EC61E5260}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {961340C8-8C93-401D-A0A2-FF9EC61E5260}.Debug|Any CPU.Build.0 = Debug|Any CPU + {961340C8-8C93-401D-A0A2-FF9EC61E5260}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {961340C8-8C93-401D-A0A2-FF9EC61E5260}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {961340C8-8C93-401D-A0A2-FF9EC61E5260}.Debug|x86.ActiveCfg = Debug|Any CPU + {961340C8-8C93-401D-A0A2-FF9EC61E5260}.Release|Any CPU.ActiveCfg = Release|Any CPU + {961340C8-8C93-401D-A0A2-FF9EC61E5260}.Release|Any CPU.Build.0 = Release|Any CPU + {961340C8-8C93-401D-A0A2-FF9EC61E5260}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {961340C8-8C93-401D-A0A2-FF9EC61E5260}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {961340C8-8C93-401D-A0A2-FF9EC61E5260}.Release|x86.ActiveCfg = Release|Any CPU + {633B1C4C-4823-47BE-9A01-A665F3118C8C}.All|Any CPU.ActiveCfg = Release|Any CPU + {633B1C4C-4823-47BE-9A01-A665F3118C8C}.All|Any CPU.Build.0 = Release|Any CPU + {633B1C4C-4823-47BE-9A01-A665F3118C8C}.All|Mixed Platforms.ActiveCfg = Release|Any CPU + {633B1C4C-4823-47BE-9A01-A665F3118C8C}.All|Mixed Platforms.Build.0 = Release|Any CPU + {633B1C4C-4823-47BE-9A01-A665F3118C8C}.All|x86.ActiveCfg = Release|Any CPU + {633B1C4C-4823-47BE-9A01-A665F3118C8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {633B1C4C-4823-47BE-9A01-A665F3118C8C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {633B1C4C-4823-47BE-9A01-A665F3118C8C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {633B1C4C-4823-47BE-9A01-A665F3118C8C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {633B1C4C-4823-47BE-9A01-A665F3118C8C}.Debug|x86.ActiveCfg = Debug|Any CPU + {633B1C4C-4823-47BE-9A01-A665F3118C8C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {633B1C4C-4823-47BE-9A01-A665F3118C8C}.Release|Any CPU.Build.0 = Release|Any CPU + {633B1C4C-4823-47BE-9A01-A665F3118C8C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {633B1C4C-4823-47BE-9A01-A665F3118C8C}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {633B1C4C-4823-47BE-9A01-A665F3118C8C}.Release|x86.ActiveCfg = Release|Any CPU EndGlobalSection - GlobalSection(NestedProjects) = preSolution + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution StartupItem = ImageProcessorConsole\ImageProcessorConsole.csproj EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = ImageProcessor.vsmdi EndGlobalSection diff --git a/src/packages/repositories.config b/src/packages/repositories.config index 73ccce20c..14108b962 100644 --- a/src/packages/repositories.config +++ b/src/packages/repositories.config @@ -1,6 +1,8 @@  + + From 3e7d407a6b2484d7488fc85c1391cf1a885cfabb Mon Sep 17 00:00:00 2001 From: James South Date: Thu, 26 Jun 2014 22:59:30 +0100 Subject: [PATCH 5/7] Moving Images in unit test Former-commit-id: d234e49fa19a8cad56ff39752410124b941c238f --- .../ImageFactoryUnitTests.cs | 2 +- .../ImageProcessor.UnitTests.csproj | 133 ++---------------- .../Images/Chrysanthemum.jpg.REMOVED.git-id | 1 + .../Images/Desert.jpg.REMOVED.git-id | 1 + .../Images/Penguins.bmp.REMOVED.git-id | 1 + .../Images/Penguins.gif.REMOVED.git-id | 1 + .../Images/cmyk.png.REMOVED.git-id | 1 + 7 files changed, 14 insertions(+), 126 deletions(-) create mode 100644 src/ImageProcessor.UnitTests/Images/Chrysanthemum.jpg.REMOVED.git-id create mode 100644 src/ImageProcessor.UnitTests/Images/Desert.jpg.REMOVED.git-id create mode 100644 src/ImageProcessor.UnitTests/Images/Penguins.bmp.REMOVED.git-id create mode 100644 src/ImageProcessor.UnitTests/Images/Penguins.gif.REMOVED.git-id create mode 100644 src/ImageProcessor.UnitTests/Images/cmyk.png.REMOVED.git-id diff --git a/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs b/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs index 940702f9c..a63f95ff2 100644 --- a/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs +++ b/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs @@ -42,7 +42,7 @@ namespace ImageProcessor.UnitTests [TestCase("Penguins.gif", "image/gif")] public void TestLoadImageFromFile(string fileName, string expectedMime) { - var testPhoto = Path.Combine(this.localPath, string.Format("Images/{0}", fileName)); + string testPhoto = Path.Combine(this.localPath, string.Format("../../Images/{0}", fileName)); using (ImageFactory imageFactory = new ImageFactory()) { imageFactory.Load(testPhoto); diff --git a/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj b/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj index 2be742cb4..81516b4b6 100644 --- a/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj +++ b/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj @@ -59,137 +59,20 @@ - - - Images\1182076_e8c402e938_z.jpg - - - Images\bus.jpg - - - Images\Chrysanthemum.jpg - - - Images\circle.png - - - Images\cmyk.jpg - - - Images\cmyk.png - - - Images\color-vision-test.gif - - - Images\Desert.jpg - - - Images\emma.jpg - - - Images\falahill_design__160p.jpg - - - Images\fid11246.jpg - - - Images\fid9141.jpg - - - Images\header_1.jpg - - - Images\Hydrangeas.jpg - - - Images\Jellyfish.jpg - - - Images\jrt.jpg - - - Images\Koala.jpg - - - Images\Lighthouse.jpg - - - Images\lomo.jpg - - - Images\meter.gif - - - Images\negative.png - - - Images\negative2.png - - - Images\Penguins-200.jpg - - - Images\Penguins-8.png - - - Images\Penguins.bmp - - - Images\Penguins.gif - - - Images\Penguins.jpg - - - Images\Penguins.png - - - Images\Penguins.tif - - - Images\rocks.jpg - - - Images\rotate.jpg - - - Images\sample1.jpg - - - Images\srgb.jpg - - - Images\srgb.png - - - Images\text.png - - - Images\thor.jpg - - - Images\Tulips.jpg - - - Images\udendørs-374.jpg - - - Images\udendørs.jpg - - - Images\war_horse_quad.jpg - - - Images\WP_000009.jpg - - {3b5dd734-fb7a-487d-8ce6-55e7af9aea7e} ImageProcessor + + + + + + + + diff --git a/src/ImageProcessor.UnitTests/Images/Chrysanthemum.jpg.REMOVED.git-id b/src/ImageProcessor.UnitTests/Images/Chrysanthemum.jpg.REMOVED.git-id new file mode 100644 index 000000000..d067665c9 --- /dev/null +++ b/src/ImageProcessor.UnitTests/Images/Chrysanthemum.jpg.REMOVED.git-id @@ -0,0 +1 @@ +757c2a628dd03b1cbe4b3ef07c153897a702b57a \ No newline at end of file diff --git a/src/ImageProcessor.UnitTests/Images/Desert.jpg.REMOVED.git-id b/src/ImageProcessor.UnitTests/Images/Desert.jpg.REMOVED.git-id new file mode 100644 index 000000000..228aac3ab --- /dev/null +++ b/src/ImageProcessor.UnitTests/Images/Desert.jpg.REMOVED.git-id @@ -0,0 +1 @@ +0b88c91336ff8073f34d21ccd683a01f0e0995da \ No newline at end of file diff --git a/src/ImageProcessor.UnitTests/Images/Penguins.bmp.REMOVED.git-id b/src/ImageProcessor.UnitTests/Images/Penguins.bmp.REMOVED.git-id new file mode 100644 index 000000000..74f69293c --- /dev/null +++ b/src/ImageProcessor.UnitTests/Images/Penguins.bmp.REMOVED.git-id @@ -0,0 +1 @@ +8150b46ab27c62ba51aaba551eef3f1a30f08de9 \ No newline at end of file diff --git a/src/ImageProcessor.UnitTests/Images/Penguins.gif.REMOVED.git-id b/src/ImageProcessor.UnitTests/Images/Penguins.gif.REMOVED.git-id new file mode 100644 index 000000000..ce873d473 --- /dev/null +++ b/src/ImageProcessor.UnitTests/Images/Penguins.gif.REMOVED.git-id @@ -0,0 +1 @@ +6ad3b846d4697584ff601ac481b14a4d3bbb5736 \ No newline at end of file diff --git a/src/ImageProcessor.UnitTests/Images/cmyk.png.REMOVED.git-id b/src/ImageProcessor.UnitTests/Images/cmyk.png.REMOVED.git-id new file mode 100644 index 000000000..aeca7b93c --- /dev/null +++ b/src/ImageProcessor.UnitTests/Images/cmyk.png.REMOVED.git-id @@ -0,0 +1 @@ +db4d55a332254cd6b41336c06f207682bf5a966f \ No newline at end of file From 08cdd55a8857a96e0a8805475764a95a85e8c059 Mon Sep 17 00:00:00 2001 From: James South Date: Thu, 26 Jun 2014 23:31:00 +0100 Subject: [PATCH 6/7] No client profile in NET 4.5+ http://msdn.microsoft.com/en-us/library/cc656912(v=vs.110).aspx Former-commit-id: 21b920437b0cea826af52764ff5dfcd4932310ea --- src/ImageProcessorConsole/App.config | 6 +++--- src/ImageProcessorConsole/ImageProcessorConsole.csproj | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/ImageProcessorConsole/App.config b/src/ImageProcessorConsole/App.config index 9c05822ff..d1428ad71 100644 --- a/src/ImageProcessorConsole/App.config +++ b/src/ImageProcessorConsole/App.config @@ -1,6 +1,6 @@ - + - + - \ No newline at end of file + diff --git a/src/ImageProcessorConsole/ImageProcessorConsole.csproj b/src/ImageProcessorConsole/ImageProcessorConsole.csproj index df60cf14b..fba366b0c 100644 --- a/src/ImageProcessorConsole/ImageProcessorConsole.csproj +++ b/src/ImageProcessorConsole/ImageProcessorConsole.csproj @@ -1,5 +1,5 @@  - + Debug @@ -12,7 +12,8 @@ v4.5 512 true - Client + + AnyCPU From 8aa0dbd9b5cb1b1a101544c4825aa900d91fbd91 Mon Sep 17 00:00:00 2001 From: James South Date: Fri, 27 Jun 2014 12:20:41 +0100 Subject: [PATCH 7/7] Hopefully fixing reflection load exceptions. Former-commit-id: b37a505bdd3c631aed1dfbd3d53894a95ff1d713 --- build/Build.bat | 2 +- .../ImageProcessorConfiguration.cs | 9 ++-- .../Common/Extensions/AssemblyExtensions.cs | 41 +++++++++++++++++++ .../ImageProcessorBootstrapper.cs | 6 +-- src/ImageProcessor/ImageProcessor.csproj | 1 + 5 files changed, 50 insertions(+), 9 deletions(-) create mode 100644 src/ImageProcessor/Common/Extensions/AssemblyExtensions.cs diff --git a/build/Build.bat b/build/Build.bat index 0f1c369bb..513d111e3 100644 --- a/build/Build.bat +++ b/build/Build.bat @@ -8,7 +8,7 @@ ECHO Building ImageProcessor %version%, ImageProcess.Web %webversion% and ImageP ECHO Installing the Microsoft.Bcl.Build package before anything else, otherwise you'd have to run build.cmd twice SET nuGetFolder=%CD%\..\src\packages\ -..\src\.nuget\NuGet.exe install ..\src\ImageProcessor.Web\NET45\packages.config -OutputDirectory %nuGetFolder% +..\src\.nuget\NuGet.exe install ..\src\ImageProcessor.Web\NET4\packages.config -OutputDirectory %nuGetFolder% ECHO Removing _BuildOutput directory so everything is nice and clean RD _BuildOutput /q /s diff --git a/src/ImageProcessor.Web/NET45/Configuration/ImageProcessorConfiguration.cs b/src/ImageProcessor.Web/NET45/Configuration/ImageProcessorConfiguration.cs index be4966966..89bcf39d7 100644 --- a/src/ImageProcessor.Web/NET45/Configuration/ImageProcessorConfiguration.cs +++ b/src/ImageProcessor.Web/NET45/Configuration/ImageProcessorConfiguration.cs @@ -10,18 +10,17 @@ // -------------------------------------------------------------------------------------------------------------------- namespace ImageProcessor.Web.Configuration { - #region Using using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Web.Compilation; + + using ImageProcessor.Common.Extensions; using ImageProcessor.Processors; using ImageProcessor.Web.Processors; - #endregion - /// /// Encapsulates methods to allow the retrieval of ImageProcessor settings. /// @@ -301,8 +300,8 @@ namespace ImageProcessor.Web.Configuration // Build a list of native IGraphicsProcessor instances. List availableTypes = BuildManager.GetReferencedAssemblies() .Cast() - .SelectMany(s => s.GetTypes()) - .Where(t => t != null && type.IsAssignableFrom(t) && t.IsClass && !t.IsAbstract) + .SelectMany(s => s.GetLoadableTypes()) + .Where(t => type.IsAssignableFrom(t) && t.IsClass && !t.IsAbstract) .ToList(); // Create them and add. diff --git a/src/ImageProcessor/Common/Extensions/AssemblyExtensions.cs b/src/ImageProcessor/Common/Extensions/AssemblyExtensions.cs new file mode 100644 index 000000000..763697ef0 --- /dev/null +++ b/src/ImageProcessor/Common/Extensions/AssemblyExtensions.cs @@ -0,0 +1,41 @@ + +namespace ImageProcessor.Common.Extensions +{ + using System; + using System.Collections.Generic; + using System.Linq; + using System.Reflection; + + /// + /// Encapsulates a series of time saving extension methods to the class. + /// + public static class AssemblyExtensions + { + /// + /// Gets a collection of loadable types from the given assembly. + /// Adapted from + /// + /// + /// The to load the types from. + /// + /// + /// The loadable . + /// + public static IEnumerable GetLoadableTypes(this Assembly assembly) + { + if (assembly == null) + { + throw new ArgumentNullException("assembly"); + } + + try + { + return assembly.GetTypes(); + } + catch (ReflectionTypeLoadException ex) + { + return ex.Types.Where(t => t != null); + } + } + } +} diff --git a/src/ImageProcessor/Configuration/ImageProcessorBootstrapper.cs b/src/ImageProcessor/Configuration/ImageProcessorBootstrapper.cs index e1d59b7f6..e6a7f1962 100644 --- a/src/ImageProcessor/Configuration/ImageProcessorBootstrapper.cs +++ b/src/ImageProcessor/Configuration/ImageProcessorBootstrapper.cs @@ -13,8 +13,8 @@ namespace ImageProcessor.Configuration using System; using System.Collections.Generic; using System.Linq; - using ImageProcessor.Common.Exceptions; + using ImageProcessor.Common.Extensions; using ImageProcessor.Imaging.Formats; /// @@ -65,8 +65,8 @@ namespace ImageProcessor.Configuration Type type = typeof(ISupportedImageFormat); List availableTypes = AppDomain.CurrentDomain .GetAssemblies() - .SelectMany(s => s.GetTypes()) - .Where(t => t != null && type.IsAssignableFrom(t) && t.IsClass && !t.IsAbstract) + .SelectMany(s => s.GetLoadableTypes()) + .Where(t => type.IsAssignableFrom(t) && t.IsClass && !t.IsAbstract) .ToList(); this.SupportedImageFormats = availableTypes diff --git a/src/ImageProcessor/ImageProcessor.csproj b/src/ImageProcessor/ImageProcessor.csproj index 34f818362..4521b06eb 100644 --- a/src/ImageProcessor/ImageProcessor.csproj +++ b/src/ImageProcessor/ImageProcessor.csproj @@ -59,6 +59,7 @@ +