Skip to content

Commit da1ff17

Browse files
v 2.1.0.4
1 parent f554a67 commit da1ff17

13 files changed

+131
-111
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ e.g.
5252

5353
Using the HttpModule requires no code writing at all. Just reference the binaries and add the relevant sections to the web.config
5454

55-
Image requests suffixed with querystring parameters will then be processed and **cached to the server - up to 360,000 images** allowing for easy and efficient parsing of following requests.
55+
Image requests suffixed with querystring parameters will then be processed and **cached to the server - up to 12,960,000 images** allowing for easy and efficient parsing of following requests.
5656

5757
The parsing engine for the HttpModule is incredibly flexible and will **allow you to add querystring parameters in any order.**
5858

src/ImageProcessor.Web/Config/ImageProcessorConfig.cs

Lines changed: 44 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ namespace ImageProcessor.Web.Config
1010
#region Using
1111
using System;
1212
using System.Collections.Generic;
13+
using System.IO;
1314
using System.Linq;
15+
using System.Reflection;
16+
using System.Text;
17+
1418
using ImageProcessor.Processors;
1519
#endregion
1620

@@ -234,20 +238,49 @@ private void LoadGraphicsProcessors()
234238
{
235239
if (this.GraphicsProcessors == null)
236240
{
237-
// Build a list of native IGraphicsProcessor instances.
238-
Type type = typeof(IGraphicsProcessor);
239-
IEnumerable<Type> types =
240-
AppDomain.CurrentDomain.GetAssemblies().SelectMany(s => s.GetTypes()).Where(
241-
p => type.IsAssignableFrom(p) && p.IsClass && !p.IsAbstract).ToList();
241+
try
242+
{
243+
// Build a list of native IGraphicsProcessor instances.
244+
Type type = typeof(IGraphicsProcessor);
245+
IEnumerable<Type> types =
246+
AppDomain.CurrentDomain.GetAssemblies()
247+
.SelectMany(s => s.GetTypes())
248+
.Where(p => type.IsAssignableFrom(p) && p.IsClass && !p.IsAbstract)
249+
.ToList();
242250

243-
// Create them and add.
244-
this.GraphicsProcessors =
245-
types.Select(x => (Activator.CreateInstance(x) as IGraphicsProcessor)).ToList();
251+
// Create them and add.
252+
this.GraphicsProcessors =
253+
types.Select(x => (Activator.CreateInstance(x) as IGraphicsProcessor)).ToList();
246254

247-
// Add the available settings.
248-
foreach (IGraphicsProcessor processor in this.GraphicsProcessors)
255+
// Add the available settings.
256+
foreach (IGraphicsProcessor processor in this.GraphicsProcessors)
257+
{
258+
processor.Settings = this.GetPluginSettings(processor.Name);
259+
}
260+
}
261+
catch (ReflectionTypeLoadException ex)
249262
{
250-
processor.Settings = this.GetPluginSettings(processor.Name);
263+
StringBuilder sb = new StringBuilder();
264+
foreach (Exception exception in ex.LoaderExceptions)
265+
{
266+
sb.AppendLine(exception.Message);
267+
if (exception is FileNotFoundException)
268+
{
269+
FileNotFoundException fileNotFoundException = exception as FileNotFoundException;
270+
if (!string.IsNullOrEmpty(fileNotFoundException.FusionLog))
271+
{
272+
sb.AppendLine("Fusion Log:");
273+
sb.AppendLine(fileNotFoundException.FusionLog);
274+
}
275+
}
276+
277+
sb.AppendLine();
278+
}
279+
280+
string errorMessage = sb.ToString();
281+
282+
// Display or log the error based on your application.
283+
throw new Exception(errorMessage);
251284
}
252285
}
253286
}

src/ImageProcessor.Web/ImageProcessor.Web.csproj

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -74,36 +74,23 @@
7474
<SpecificVersion>False</SpecificVersion>
7575
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.14-rc\lib\net40\Microsoft.Threading.Tasks.Extensions.dll</HintPath>
7676
</Reference>
77-
<Reference Include="Microsoft.Threading.Tasks.Extensions.Desktop, Version=1.0.14.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
78-
<SpecificVersion>False</SpecificVersion>
79-
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.14-rc\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll</HintPath>
80-
</Reference>
8177
<Reference Include="System" />
8278
<Reference Include="System.Configuration" />
8379
<Reference Include="System.Core" />
8480
<Reference Include="System.Data.SQLite, Version=1.0.84.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
8581
<SpecificVersion>False</SpecificVersion>
8682
<HintPath>..\packages\System.Data.SQLite.x86.1.0.84.0\lib\net40\System.Data.SQLite.dll</HintPath>
8783
</Reference>
88-
<Reference Include="System.Data.SQLite.Linq, Version=1.0.84.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
89-
<SpecificVersion>False</SpecificVersion>
90-
<HintPath>..\packages\System.Data.SQLite.x86.1.0.84.0\lib\net40\System.Data.SQLite.Linq.dll</HintPath>
91-
</Reference>
9284
<Reference Include="System.Drawing" />
9385
<Reference Include="System.Net" />
9486
<Reference Include="System.Runtime">
95-
<HintPath>..\packages\Microsoft.Bcl.1.0.16-rc\lib\net40\System.Runtime.dll</HintPath>
87+
<HintPath>bin\x86\Release\System.Runtime.dll</HintPath>
9688
</Reference>
97-
<Reference Include="System.Threading.Tasks, Version=2.5.16.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
98-
<HintPath>..\packages\Microsoft.Bcl.1.0.16-rc\lib\net40\System.Threading.Tasks.dll</HintPath>
99-
<SpecificVersion>False</SpecificVersion>
89+
<Reference Include="System.Threading.Tasks">
90+
<HintPath>bin\x86\Release\System.Threading.Tasks.dll</HintPath>
10091
</Reference>
10192
<Reference Include="System.Web" />
102-
<Reference Include="System.Xml.Linq" />
103-
<Reference Include="System.Data.DataSetExtensions" />
104-
<Reference Include="Microsoft.CSharp" />
10593
<Reference Include="System.Data" />
106-
<Reference Include="System.Xml" />
10794
</ItemGroup>
10895
<ItemGroup>
10996
<Compile Include="Caching\CachedImage.cs" />

src/ImageProcessor.Web/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@
3131
//
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
34-
[assembly: AssemblyVersion("2.1.0.0")]
35-
[assembly: AssemblyFileVersion("2.1.0.0")]
34+
[assembly: AssemblyVersion("2.1.0.4")]
35+
[assembly: AssemblyFileVersion("2.1.0.4")]

src/ImageProcessor.Web/app.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<runtime>
4-
<assemblyBinding xmlns:bcl="urn:schemas-microsoft-com:bcl" xmlns="urn:schemas-microsoft-com:asm.v1">
4+
<assemblyBinding xmlns:bcl="urn:schemas-microsoft-com:bcl">
55
<dependentAssembly bcl:name="System.Runtime">
66
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
77
<bindingRedirect oldVersion="0.0.0.0-2.5.16.0" newVersion="2.5.16.0" />
25.4 KB
Binary file not shown.
46.8 KB
Binary file not shown.
46.8 KB
Binary file not shown.
46.8 KB
Binary file not shown.
46.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)