diff --git a/src/ImageProcessor.Web/Caching/CachedImage.cs b/src/ImageProcessor.Web/Caching/CachedImage.cs
index 34316d58ca..1f19d8fdf0 100644
--- a/src/ImageProcessor.Web/Caching/CachedImage.cs
+++ b/src/ImageProcessor.Web/Caching/CachedImage.cs
@@ -14,7 +14,7 @@ namespace ImageProcessor.Web.Caching
///
/// Describes a cached image
///
- internal sealed class CachedImage : IComparable
+ internal sealed class CachedImage
{
///
/// Initializes a new instance of the class.
@@ -49,15 +49,5 @@ namespace ImageProcessor.Web.Caching
/// Gets or sets when the cached image should expire from the cache.
///
public DateTime ExpiresUtc { get; set; }
-
- ///
- ///
- ///
- ///
- ///
- public int CompareTo(CachedImage other)
- {
- return this.ExpiresUtc.CompareTo(other.ExpiresUtc);
- }
}
}
diff --git a/src/ImageProcessor.Web/Caching/DiskCache.cs b/src/ImageProcessor.Web/Caching/DiskCache.cs
index 95100c6400..5c781ad6c8 100644
--- a/src/ImageProcessor.Web/Caching/DiskCache.cs
+++ b/src/ImageProcessor.Web/Caching/DiskCache.cs
@@ -13,8 +13,6 @@ namespace ImageProcessor.Web.Caching
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
- using System.Threading;
- using System.Threading.Tasks;
using System.Web;
using System.Web.Hosting;
using ImageProcessor.Helpers.Extensions;
@@ -44,7 +42,7 @@ namespace ImageProcessor.Web.Caching
///
/// The regular expression to search strings for extension changes.
///
- private static readonly Regex FormatRegex = new Regex(@"format=(jpeg|png|bmp|gif)", RegexOptions.Compiled);
+ private static readonly Regex FormatRegex = new Regex(@"(jpeg|png|bmp|gif)", RegexOptions.RightToLeft | RegexOptions.Compiled);
///
/// The default paths for Cached folders on the server.
@@ -130,21 +128,6 @@ namespace ImageProcessor.Web.Caching
throw new InvalidOperationException("We can only map an absolute back to a relative path if the application path is available.");
}
- ///
- /// Purges any files from the file-system cache in a background thread.
- ///
- internal static void PurgeCachedFolders()
- {
- ThreadStart threadStart = PurgeFolders;
-
- Thread thread = new Thread(threadStart)
- {
- IsBackground = true
- };
-
- thread.Start();
- }
-
///
/// Returns a value indicating whether the original file has been updated.
///
@@ -156,16 +139,18 @@ namespace ImageProcessor.Web.Caching
internal static bool IsUpdatedFile(string imagePath, string cachedImagePath)
{
string key = Path.GetFileNameWithoutExtension(cachedImagePath);
- CachedImage cachedImage;
bool isUpdated = false;
if (File.Exists(imagePath))
{
FileInfo imageFileInfo = new FileInfo(imagePath);
+ CachedImage cachedImage;
if (PersistantDictionary.Instance.TryGetValue(key, out cachedImage))
{
- if (!imageFileInfo.LastWriteTimeUtc.Equals(cachedImage.LastWriteTimeUtc))
+ // Check to see if the last write time is different of whether the
+ // chached image is set to expire.
+ if (imageFileInfo.LastWriteTimeUtc != cachedImage.LastWriteTimeUtc || cachedImage.ExpiresUtc < DateTime.UtcNow.AddDays(-MaxFileCachedDuration))
{
if (PersistantDictionary.Instance.TryRemove(key, out cachedImage))
{
@@ -205,16 +190,13 @@ namespace ImageProcessor.Web.Caching
///
/// Purges any files from the file-system cache in the given folders.
///
- internal static void PurgeFolders()
+ internal static void TrimCachedFolders()
{
// Group each cache folder and clear any expired items or any that exeed
// the maximum allowable count.
- Regex searchTerm = new Regex(@"(jpeg|png|bmp|gif)");
var groups = PersistantDictionary.Instance.ToList()
- .GroupBy(x => searchTerm.Match(x.Value.Path).Value)
+ .GroupBy(x => FormatRegex.Match(x.Value.Path).Value)
.Where(g => g.Count() > MaxFilesCount);
- //.Where(g => g.Count() > MaxFilesCount
- // || g.Select(a => a.Value.ExpiresUtc < DateTime.UtcNow.AddDays(-MaxFileCachedDuration)).Count() > 0);
foreach (var group in groups)
{
@@ -230,11 +212,10 @@ namespace ImageProcessor.Web.Caching
break;
}
- // Delete each CachedImage.
try
{
+ // Remove from the cache and delete each CachedImage.
FileInfo fileInfo = new FileInfo(pair.Value.Path);
- // Remove from the cache.
string key = Path.GetFileNameWithoutExtension(fileInfo.Name);
CachedImage cachedImage;
@@ -252,64 +233,6 @@ namespace ImageProcessor.Web.Caching
}
}
}
-
- //string folder = HostingEnvironment.MapPath(CachePath);
-
- //if (folder != null)
- //{
- // DirectoryInfo directoryInfo = new DirectoryInfo(folder);
-
- // if (directoryInfo.Exists)
- // {
- // List directoryInfos = directoryInfo
- // .EnumerateDirectories("*", SearchOption.TopDirectoryOnly)
- // .ToList();
-
- // Parallel.ForEach(
- // directoryInfos,
- // subDirectoryInfo =>
- // {
- // // Get all the files in the cache ordered by LastAccessTime - oldest first.
- // List fileInfos = subDirectoryInfo.EnumerateFiles("*", SearchOption.TopDirectoryOnly)
- // .OrderBy(x => x.LastAccessTimeUtc).ToList();
-
- // int counter = fileInfos.Count;
-
- // Parallel.ForEach(
- // fileInfos,
- // fileInfo =>
- // {
- // // Delete the file if we are nearing our limit buffer.
- // if (counter >= MaxFilesCount || fileInfo.LastAccessTimeUtc < DateTime.UtcNow.AddDays(-MaxFileCachedDuration))
- // {
- // lock (SyncRoot)
- // {
- // try
- // {
- // // Remove from the cache.
- // string key = Path.GetFileNameWithoutExtension(fileInfo.Name);
- // CachedImage cachedImage;
-
- // if (PersistantDictionary.Instance.TryGetValue(key, out cachedImage))
- // {
- // if (PersistantDictionary.Instance.TryRemove(key, out cachedImage))
- // {
- // fileInfo.Delete();
- // counter -= 1;
- // }
- // }
- // }
- // catch (IOException)
- // {
- // // Do Nothing, skip to the next.
- // // TODO: Should we handle this?
- // }
- // }
- // }
- // });
- // });
- // }
- //}
}
///
@@ -323,16 +246,11 @@ namespace ImageProcessor.Web.Caching
///
private static string ParseExtension(string input)
{
- foreach (Match match in FormatRegex.Matches(input))
- {
- if (match.Success)
- {
- return match.Value.Split('=')[1];
- }
- }
+ Match match = FormatRegex.Match(input);
- return string.Empty;
+ return match.Success ? match.Value : string.Empty;
}
+
#endregion
}
}
diff --git a/src/ImageProcessor.Web/Caching/LockedDictionary.cs b/src/ImageProcessor.Web/Caching/LockedDictionary.cs
index d09f62548f..afa4edab4e 100644
--- a/src/ImageProcessor.Web/Caching/LockedDictionary.cs
+++ b/src/ImageProcessor.Web/Caching/LockedDictionary.cs
@@ -35,7 +35,7 @@ namespace ImageProcessor.Web.Caching
///
/// The value to initialize the LockedDictionary with.
///
- public LockedDictionary(IDictionary val = null)
+ public LockedDictionary(IEnumerable> val = null)
{
if (val != null)
{
diff --git a/src/ImageProcessor.Web/Caching/SQLContext.cs b/src/ImageProcessor.Web/Caching/SQLContext.cs
index fcea2fe333..56aceed876 100644
--- a/src/ImageProcessor.Web/Caching/SQLContext.cs
+++ b/src/ImageProcessor.Web/Caching/SQLContext.cs
@@ -154,7 +154,8 @@ namespace ImageProcessor.Web.Caching
{
using (SQLiteCommand command = new SQLiteCommand(connection))
{
- command.CommandText = string.Format("DELETE FROM names WHERE key = '{0}';", key);
+ command.CommandText = "DELETE FROM names WHERE key = @searchParam;";
+ command.Parameters.Add(new SQLiteParameter("searchParam", key));
command.ExecuteNonQuery();
}
diff --git a/src/ImageProcessor.Web/Helpers/FileCompareLastwritetime.cs b/src/ImageProcessor.Web/Helpers/FileCompareLastwritetime.cs
deleted file mode 100644
index a99eb520df..0000000000
--- a/src/ImageProcessor.Web/Helpers/FileCompareLastwritetime.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-// -----------------------------------------------------------------------
-//
-// Copyright (c) James South.
-// Dual licensed under the MIT or GPL Version 2 licenses.
-//
-// -----------------------------------------------------------------------
-
-namespace ImageProcessor.Web.Helpers
-{
- #region Using
- using System;
- using System.Collections.Generic;
- #endregion
-
- ///
- /// Encapsulates methods to support the comparison of objects for equality.
- ///
- public class FileCompareLastwritetime : IEqualityComparer
- {
- ///
- /// Converts the value of the current object to its equivalent
- /// nearest minute representation.
- ///
- /// An instance of .
- ///
- /// A value of the current object to its equivalent
- /// nearest minute representation.
- ///
- public static DateTime ToMinute(DateTime value)
- {
- return new DateTime(value.Year, value.Month, value.Day, value.Hour, value.Minute, 0, value.Kind).ToUniversalTime();
- }
-
- ///
- /// Determines whether the specified instances of object are equal.
- ///
- ///
- /// The first object to compare.
- ///
- ///
- /// The second object to compare.
- ///
- /// true if the specified objects are equal; otherwise, false.
- public bool Equals(System.IO.FileInfo f1, System.IO.FileInfo f2)
- {
- return ToMinute(f1.LastWriteTimeUtc) == ToMinute(f2.LastWriteTimeUtc);
- }
-
- ///
- /// Returns a hash code for the specified .
- ///
- /// The FileInfo to return the hash code for.
- /// A hash code for the specified .
- public int GetHashCode(System.IO.FileInfo fi)
- {
- return ToMinute(fi.LastWriteTimeUtc).GetHashCode();
- }
- }
-}
diff --git a/src/ImageProcessor.Web/HttpModules/ImageProcessingModule.cs b/src/ImageProcessor.Web/HttpModules/ImageProcessingModule.cs
index e1187e2f34..4e31a0d6b9 100644
--- a/src/ImageProcessor.Web/HttpModules/ImageProcessingModule.cs
+++ b/src/ImageProcessor.Web/HttpModules/ImageProcessingModule.cs
@@ -129,7 +129,7 @@ namespace ImageProcessor.Web.HttpModules
lock (SyncRoot)
{
// Trim the cache.
- DiskCache.PurgeFolders();
+ DiskCache.TrimCachedFolders();
responseStream.CopyTo(memoryStream);
@@ -153,7 +153,7 @@ namespace ImageProcessor.Web.HttpModules
lock (SyncRoot)
{
// Trim the cache.
- DiskCache.PurgeFolders();
+ DiskCache.TrimCachedFolders();
imageFactory.Load(fullPath).AutoProcess().Save(cachedPath);
diff --git a/src/ImageProcessor.Web/ImageFactoryExtensions.cs b/src/ImageProcessor.Web/ImageFactoryExtensions.cs
index 22c2583ab6..a66bfeb432 100644
--- a/src/ImageProcessor.Web/ImageFactoryExtensions.cs
+++ b/src/ImageProcessor.Web/ImageFactoryExtensions.cs
@@ -19,11 +19,6 @@ namespace ImageProcessor.Web
///
public static class ImageFactoryExtensions
{
- ///
- /// The object to lock against.
- ///
- private static readonly object SyncRoot = new object();
-
///
/// Auto processes image files based on any query string parameters added to the image path.
///
@@ -38,22 +33,18 @@ namespace ImageProcessor.Web
{
if (factory.ShouldProcess)
{
- // TODO: This is going to be a bottleneck for speed. Find a faster way.
- //lock (SyncRoot)
- //{
- // Get a list of all graphics processors that have parsed and matched the querystring.
- List list =
- ImageProcessorConfig.Instance.GraphicsProcessors
- .Where(x => x.MatchRegexIndex(factory.QueryString) != int.MaxValue)
- .OrderBy(y => y.SortOrder)
- .ToList();
+ // Get a list of all graphics processors that have parsed and matched the querystring.
+ List list =
+ ImageProcessorConfig.Instance.GraphicsProcessors
+ .Where(x => x.MatchRegexIndex(factory.QueryString) != int.MaxValue)
+ .OrderBy(y => y.SortOrder)
+ .ToList();
- // Loop through and process the image.
- foreach (IGraphicsProcessor graphicsProcessor in list)
- {
- factory.Image = graphicsProcessor.ProcessImage(factory);
- }
- //}
+ // Loop through and process the image.
+ foreach (IGraphicsProcessor graphicsProcessor in list)
+ {
+ factory.Image = graphicsProcessor.ProcessImage(factory);
+ }
}
return factory;
diff --git a/src/ImageProcessor.Web/ImageProcessor.Web.csproj b/src/ImageProcessor.Web/ImageProcessor.Web.csproj
index 808943ab42..405a170815 100644
--- a/src/ImageProcessor.Web/ImageProcessor.Web.csproj
+++ b/src/ImageProcessor.Web/ImageProcessor.Web.csproj
@@ -95,7 +95,6 @@
-
diff --git a/src/ImageProcessor.sln b/src/ImageProcessor.sln
index e2f1c88276..017f6a67bc 100644
--- a/src/ImageProcessor.sln
+++ b/src/ImageProcessor.sln
@@ -9,64 +9,113 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageProcessor.Web", "Image
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageProcessor.Tests", "ImageProcessor.Tests\ImageProcessor.Tests.csproj", "{39911A38-CA06-413C-80AA-39EF60CE984F}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Web.Tests", "Web.Test\Web.Tests.csproj", "{23CE0FC0-9E59-4C93-A604-A4A98A6284D1}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C427A497-74DC-49B1-8420-D6E68354F29B}"
+ ProjectSection(SolutionItems) = preProject
+ Local.testsettings = Local.testsettings
+ EndProjectSection
+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
{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|x86
+ {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.All|Mixed Platforms.Build.0 = All|x86
{3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.All|x86.ActiveCfg = All|x86
{3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.All|x86.Build.0 = All|x86
{3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Debug|Any CPU.ActiveCfg = Release|Any CPU
{3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Debug|Any CPU.Build.0 = Release|Any CPU
+ {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Debug|Mixed Platforms.Build.0 = Debug|x86
{3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Debug|x86.ActiveCfg = Debug|x86
{3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Debug|x86.Build.0 = Debug|x86
{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|x86
+ {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Release|Mixed Platforms.Build.0 = Release|x86
{3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Release|x86.ActiveCfg = Release|x86
{3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Release|x86.Build.0 = Release|x86
{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
{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|x86
+ {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.All|Mixed Platforms.Build.0 = All|x86
{4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.All|x86.ActiveCfg = All|x86
{4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.All|x86.Build.0 = All|x86
{4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.Debug|Any CPU.ActiveCfg = Release|Any CPU
{4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.Debug|Any CPU.Build.0 = Release|Any CPU
+ {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.Debug|Mixed Platforms.Build.0 = Debug|x86
{4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.Debug|x86.ActiveCfg = Debug|x86
{4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.Debug|x86.Build.0 = Debug|x86
{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|x86
+ {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.Release|Mixed Platforms.Build.0 = Release|x86
{4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.Release|x86.ActiveCfg = Release|x86
{4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.Release|x86.Build.0 = Release|x86
{39911A38-CA06-413C-80AA-39EF60CE984F}.All|Any CPU.ActiveCfg = Release|Any CPU
{39911A38-CA06-413C-80AA-39EF60CE984F}.All|Any CPU.Build.0 = Release|Any CPU
+ {39911A38-CA06-413C-80AA-39EF60CE984F}.All|Mixed Platforms.ActiveCfg = Release|x86
+ {39911A38-CA06-413C-80AA-39EF60CE984F}.All|Mixed Platforms.Build.0 = Release|x86
{39911A38-CA06-413C-80AA-39EF60CE984F}.All|x86.ActiveCfg = Release|x86
{39911A38-CA06-413C-80AA-39EF60CE984F}.All|x86.Build.0 = Release|x86
{39911A38-CA06-413C-80AA-39EF60CE984F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{39911A38-CA06-413C-80AA-39EF60CE984F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {39911A38-CA06-413C-80AA-39EF60CE984F}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {39911A38-CA06-413C-80AA-39EF60CE984F}.Debug|Mixed Platforms.Build.0 = Debug|x86
{39911A38-CA06-413C-80AA-39EF60CE984F}.Debug|x86.ActiveCfg = Debug|x86
{39911A38-CA06-413C-80AA-39EF60CE984F}.Debug|x86.Build.0 = Debug|x86
{39911A38-CA06-413C-80AA-39EF60CE984F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{39911A38-CA06-413C-80AA-39EF60CE984F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {39911A38-CA06-413C-80AA-39EF60CE984F}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {39911A38-CA06-413C-80AA-39EF60CE984F}.Release|Mixed Platforms.Build.0 = Release|x86
{39911A38-CA06-413C-80AA-39EF60CE984F}.Release|x86.ActiveCfg = Release|x86
{39911A38-CA06-413C-80AA-39EF60CE984F}.Release|x86.Build.0 = Release|x86
+ {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
+ {23CE0FC0-9E59-4C93-A604-A4A98A6284D1}.All|Mixed Platforms.Build.0 = Release|Any CPU
+ {23CE0FC0-9E59-4C93-A604-A4A98A6284D1}.All|x86.ActiveCfg = Release|Any CPU
+ {23CE0FC0-9E59-4C93-A604-A4A98A6284D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {23CE0FC0-9E59-4C93-A604-A4A98A6284D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {23CE0FC0-9E59-4C93-A604-A4A98A6284D1}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {23CE0FC0-9E59-4C93-A604-A4A98A6284D1}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {23CE0FC0-9E59-4C93-A604-A4A98A6284D1}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {23CE0FC0-9E59-4C93-A604-A4A98A6284D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {23CE0FC0-9E59-4C93-A604-A4A98A6284D1}.Release|Any CPU.Build.0 = Release|Any CPU
+ {23CE0FC0-9E59-4C93-A604-A4A98A6284D1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {23CE0FC0-9E59-4C93-A604-A4A98A6284D1}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {23CE0FC0-9E59-4C93-A604-A4A98A6284D1}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/src/Local.testsettings b/src/Local.testsettings
new file mode 100644
index 0000000000..70736410c0
--- /dev/null
+++ b/src/Local.testsettings
@@ -0,0 +1,10 @@
+
+
+ These are default test settings for a local test run.
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Test/Test/Web.config b/src/Test/Test/Web.config
index cf4f6d2584..7dfdc98c1f 100644
--- a/src/Test/Test/Web.config
+++ b/src/Test/Test/Web.config
@@ -64,7 +64,7 @@
-
+
diff --git a/src/Web.Test/LoadTest1.loadtest b/src/Web.Test/LoadTest1.loadtest
new file mode 100644
index 0000000000..0690f1a847
--- /dev/null
+++ b/src/Web.Test/LoadTest1.loadtest
@@ -0,0 +1,435 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Web.Test/Properties/AssemblyInfo.cs b/src/Web.Test/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000000..a99b120939
--- /dev/null
+++ b/src/Web.Test/Properties/AssemblyInfo.cs
@@ -0,0 +1,35 @@
+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("Web.Test")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Web.Test")]
+[assembly: AssemblyCopyright("Copyright © 2013")]
+[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("fca3a159-343c-449c-a4a7-eb111948088a")]
+
+// 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.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/src/Web.Test/Web.Tests.csproj b/src/Web.Test/Web.Tests.csproj
new file mode 100644
index 0000000000..6b4cc81810
--- /dev/null
+++ b/src/Web.Test/Web.Tests.csproj
@@ -0,0 +1,89 @@
+
+
+
+ Debug
+ AnyCPU
+
+
+ 2.0
+ {23CE0FC0-9E59-4C93-A604-A4A98A6284D1}
+ Library
+ Properties
+ Web.Test
+ Web.Test
+ v4.5
+ 512
+ {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ WebTest
+ 10.0
+ $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
+ $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages
+ False
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+
+
+
+ Always
+
+
+ PreserveNewest
+
+
+
+
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Web.Test/WebTest1.497d23f8-ba06-4350-9f93-8ba9772d5650.rec.webtestresult.REMOVED.git-id b/src/Web.Test/WebTest1.497d23f8-ba06-4350-9f93-8ba9772d5650.rec.webtestresult.REMOVED.git-id
new file mode 100644
index 0000000000..486a5fbcea
--- /dev/null
+++ b/src/Web.Test/WebTest1.497d23f8-ba06-4350-9f93-8ba9772d5650.rec.webtestresult.REMOVED.git-id
@@ -0,0 +1 @@
+0ef62688bafd770fda6994538f8e83a1f632d6c4
\ No newline at end of file
diff --git a/src/Web.Test/WebTest1.webtest b/src/Web.Test/WebTest1.webtest
new file mode 100644
index 0000000000..d150d46e08
--- /dev/null
+++ b/src/Web.Test/WebTest1.webtest
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Web.Test/WebTest1Coded.cs b/src/Web.Test/WebTest1Coded.cs
new file mode 100644
index 0000000000..d22f40c3bb
--- /dev/null
+++ b/src/Web.Test/WebTest1Coded.cs
@@ -0,0 +1,28 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.18033
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Web.Test {
+ using System;
+ using System.Collections.Generic;
+ using System.Text;
+ using Microsoft.VisualStudio.TestTools.WebTesting;
+
+
+ public class WebTest1Coded : WebTest {
+
+ public WebTest1Coded() {
+ this.PreAuthenticate = true;
+ }
+
+ public override IEnumerator GetRequestEnumerator() {
+ yield break;
+ }
+ }
+}