Browse Source

Updating SQLite reference

Former-commit-id: 8e31db667907a1edf981ffee4db94385c0006f06
af/merge-core
James South 13 years ago
parent
commit
ed6a03e0bf
  1. 21
      src/ImageProcessor.Web/Caching/CachedImage.cs
  2. 8
      src/ImageProcessor.Web/Caching/DiskCache.cs
  3. 5
      src/ImageProcessor.Web/Caching/SQLContext.cs
  4. 14
      src/ImageProcessor.Web/ImageProcessor.Web.csproj
  5. 2
      src/ImageProcessor.Web/packages.config
  6. 1
      src/ImageProcessor.Web/x64/SQLite.Interop.dll.REMOVED.git-id
  7. 1
      src/ImageProcessor.Web/x86/SQLite.Interop.dll.REMOVED.git-id
  8. 2
      src/Test/Test/Web.config
  9. 1
      src/packages/System.Data.SQLite.1.0.84.0/System.Data.SQLite.1.0.84.0.nupkg.REMOVED.git-id
  10. 6
      src/packages/System.Data.SQLite.1.0.84.0/System.Data.SQLite.1.0.84.0.nuspec
  11. 1
      src/packages/System.Data.SQLite.1.0.84.0/content/net20/x64/SQLite.Interop.dll.REMOVED.git-id
  12. 1
      src/packages/System.Data.SQLite.1.0.84.0/content/net20/x86/SQLite.Interop.dll.REMOVED.git-id
  13. 1
      src/packages/System.Data.SQLite.1.0.84.0/content/net40/x64/SQLite.Interop.dll.REMOVED.git-id
  14. 1
      src/packages/System.Data.SQLite.1.0.84.0/content/net40/x86/SQLite.Interop.dll.REMOVED.git-id
  15. 1
      src/packages/System.Data.SQLite.1.0.84.0/content/net45/x64/SQLite.Interop.dll.REMOVED.git-id
  16. 1
      src/packages/System.Data.SQLite.1.0.84.0/content/net45/x86/SQLite.Interop.dll.REMOVED.git-id
  17. 0
      src/packages/System.Data.SQLite.1.0.84.0/lib/net20/System.Data.SQLite.Linq.dll.REMOVED.git-id
  18. 1
      src/packages/System.Data.SQLite.1.0.84.0/lib/net20/System.Data.SQLite.dll.REMOVED.git-id
  19. 0
      src/packages/System.Data.SQLite.1.0.84.0/lib/net40/System.Data.SQLite.Linq.dll.REMOVED.git-id
  20. 1
      src/packages/System.Data.SQLite.1.0.84.0/lib/net40/System.Data.SQLite.dll.REMOVED.git-id
  21. 0
      src/packages/System.Data.SQLite.1.0.84.0/lib/net45/System.Data.SQLite.Linq.dll.REMOVED.git-id
  22. 1
      src/packages/System.Data.SQLite.1.0.84.0/lib/net45/System.Data.SQLite.dll.REMOVED.git-id
  23. 36
      src/packages/System.Data.SQLite.1.0.84.0/tools/install.ps1
  24. 1
      src/packages/System.Data.SQLite.x86.1.0.84.0/System.Data.SQLite.x86.1.0.84.0.nupkg.REMOVED.git-id
  25. 1
      src/packages/System.Data.SQLite.x86.1.0.84.0/lib/net20/System.Data.SQLite.dll.REMOVED.git-id
  26. 1
      src/packages/System.Data.SQLite.x86.1.0.84.0/lib/net40/System.Data.SQLite.dll.REMOVED.git-id
  27. 1
      src/packages/System.Data.SQLite.x86.1.0.84.0/lib/net45/System.Data.SQLite.dll.REMOVED.git-id

21
src/ImageProcessor.Web/Caching/CachedImage.cs

@ -14,34 +14,43 @@ namespace ImageProcessor.Web.Caching
/// <summary>
/// Describes a cached image
/// </summary>
internal sealed class CachedImage
internal sealed class CachedImage
{
/// <summary>
/// Initializes a new instance of the <see cref="CachedImage"/> class.
/// </summary>
/// <param name="path">
/// The value of the cached item.
/// The value of the cached image.
/// </param>
/// <param name="naxAge">
/// The maximum age in days cached image.
/// </param>
/// <param name="lastWriteTimeUtc">
/// The last write time of the cached item.
/// The last write time of the cached image.
/// </param>
/// <param name="expiresTimeUtc">
/// The expires time.
/// </param>
public CachedImage(string path, DateTime lastWriteTimeUtc, DateTime expiresTimeUtc)
public CachedImage(string path, int maxAge, DateTime lastWriteTimeUtc, DateTime expiresTimeUtc)
{
this.Path = path;
this.MaxAge = maxAge;
this.LastWriteTimeUtc = lastWriteTimeUtc;
this.ExpiresUtc = expiresTimeUtc;
}
/// <summary>
/// Gets or sets the value of the cached image
/// Gets or sets the value of the cached image.
/// </summary>
public string Path { get; set; }
/// <summary>
/// Gets or sets the last write time of the cached image
/// The maximum age of the cached image in days.
/// </summary>
public int MaxAge { get; set; }
/// <summary>
/// Gets or sets the last write time of the cached image.
/// </summary>
public DateTime LastWriteTimeUtc { get; set; }

8
src/ImageProcessor.Web/Caching/DiskCache.cs

@ -105,7 +105,7 @@ namespace ImageProcessor.Web.Caching
{
string key = Path.GetFileNameWithoutExtension(cachedPath);
DateTime expires = DateTime.UtcNow.AddDays(MaxFileCachedDuration).ToUniversalTime();
CachedImage cachedImage = new CachedImage(cachedPath, lastWriteTimeUtc, expires);
CachedImage cachedImage = new CachedImage(cachedPath, MaxFileCachedDuration, lastWriteTimeUtc, expires);
PersistantDictionary.Instance.Add(key, cachedImage);
}
@ -149,8 +149,10 @@ namespace ImageProcessor.Web.Caching
if (PersistantDictionary.Instance.TryGetValue(key, out cachedImage))
{
// 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))
// cached image is set to expire or if the max age is different.
if (imageFileInfo.LastWriteTimeUtc != cachedImage.LastWriteTimeUtc
|| cachedImage.ExpiresUtc < DateTime.UtcNow.AddDays(-MaxFileCachedDuration)
|| cachedImage.MaxAge != MaxFileCachedDuration)
{
if (PersistantDictionary.Instance.TryRemove(key, out cachedImage))
{

5
src/ImageProcessor.Web/Caching/SQLContext.cs

@ -69,6 +69,7 @@ namespace ImageProcessor.Web.Caching
command.CommandText = @"CREATE TABLE names
(Key TEXT,
Path TEXT,
MaxAge INTEGER,
LastWriteTimeUtc TEXT,
ExpiresUtc TEXT,
PRIMARY KEY (Key),
@ -107,12 +108,13 @@ namespace ImageProcessor.Web.Caching
{
using (SQLiteCommand command = new SQLiteCommand(connection))
{
command.CommandText = "INSERT INTO names VALUES(?, ?, ?, ?)";
command.CommandText = "INSERT INTO names VALUES(?, ?, ?, ?, ?)";
SQLiteParameter[] parameters = new[]
{
new SQLiteParameter("Key", key),
new SQLiteParameter("Path", image.Path),
new SQLiteParameter("MaxAge", image.MaxAge),
new SQLiteParameter("LastWriteTimeUtc", image.LastWriteTimeUtc),
new SQLiteParameter("ExpiresUtc", image.ExpiresUtc)
};
@ -198,6 +200,7 @@ namespace ImageProcessor.Web.Caching
string key = reader["Key"].ToString();
CachedImage image = new CachedImage(
reader["Path"].ToString(),
int.Parse(reader["MaxAge"].ToString()),
DateTime.Parse(reader["LastWriteTimeUtc"].ToString()).ToUniversalTime(),
DateTime.Parse(reader["ExpiresUtc"].ToString()).ToUniversalTime());

14
src/ImageProcessor.Web/ImageProcessor.Web.csproj

@ -69,13 +69,13 @@
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Data.SQLite, Version=1.0.84.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<Reference Include="System.Data.SQLite, Version=1.0.84.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\System.Data.SQLite.x86.1.0.84.0\lib\net40\System.Data.SQLite.dll</HintPath>
<HintPath>..\packages\System.Data.SQLite.1.0.84.0\lib\net40\System.Data.SQLite.dll</HintPath>
</Reference>
<Reference Include="System.Data.SQLite.Linq, Version=1.0.84.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\System.Data.SQLite.x86.1.0.84.0\lib\net40\System.Data.SQLite.Linq.dll</HintPath>
<HintPath>..\packages\System.Data.SQLite.1.0.84.0\lib\net40\System.Data.SQLite.Linq.dll</HintPath>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.Web" />
@ -106,6 +106,14 @@
<Name>ImageProcessor</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="x64\SQLite.Interop.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="x86\SQLite.Interop.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>

2
src/ImageProcessor.Web/packages.config

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="System.Data.SQLite.x86" version="1.0.84.0" targetFramework="net40" />
<package id="System.Data.SQLite" version="1.0.84.0" targetFramework="net40" />
</packages>

1
src/ImageProcessor.Web/x64/SQLite.Interop.dll.REMOVED.git-id

@ -0,0 +1 @@
cb352e8236b42cc560ee62583a5b8e0d14d87851

1
src/ImageProcessor.Web/x86/SQLite.Interop.dll.REMOVED.git-id

@ -0,0 +1 @@
1838fba8df03d11c4b76a63b922448593bc908ce

2
src/Test/Test/Web.config

@ -64,7 +64,7 @@
<add url="http://images.mymovies.net"/>
</whiteList>
</security>
<cache virtualPath="~/cache" maxDays="10"/>
<cache virtualPath="~/cache" maxDays="56"/>
<processing>
<plugins>
<plugin name="Resize">

1
src/packages/System.Data.SQLite.1.0.84.0/System.Data.SQLite.1.0.84.0.nupkg.REMOVED.git-id

@ -0,0 +1 @@
ab8fbbdbc303e4e566b544198a6a7ff562cbdf15

6
src/packages/System.Data.SQLite.x86.1.0.84.0/System.Data.SQLite.x86.1.0.84.0.nuspec → src/packages/System.Data.SQLite.1.0.84.0/System.Data.SQLite.1.0.84.0.nuspec

@ -1,16 +1,16 @@
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>System.Data.SQLite.x86</id>
<id>System.Data.SQLite</id>
<version>1.0.84.0</version>
<title>System.Data.SQLite.x86</title>
<title>System.Data.SQLite (x86/x64)</title>
<authors>SQLite Development Team</authors>
<owners>SQLite Development Team</owners>
<licenseUrl>http://www.sqlite.org/copyright.html</licenseUrl>
<projectUrl>http://system.data.sqlite.org/</projectUrl>
<iconUrl>http://system.data.sqlite.org/images/sqlite32.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>The official SQLite database engine combined with a complete ADO.NET provider all rolled into a single mixed-mode assembly for x86.</description>
<description>The official SQLite database engine for both x86 and x64 along with the ADO.NET provider.</description>
<releaseNotes />
<copyright>Public Domain</copyright>
<language>en-US</language>

1
src/packages/System.Data.SQLite.1.0.84.0/content/net20/x64/SQLite.Interop.dll.REMOVED.git-id

@ -0,0 +1 @@
860c0e580744e6c434db8d7d468f8fc15e2a41be

1
src/packages/System.Data.SQLite.1.0.84.0/content/net20/x86/SQLite.Interop.dll.REMOVED.git-id

@ -0,0 +1 @@
6f6fd4f437e4579f5d8cd489c0d3095a7f0ebb8c

1
src/packages/System.Data.SQLite.1.0.84.0/content/net40/x64/SQLite.Interop.dll.REMOVED.git-id

@ -0,0 +1 @@
cb352e8236b42cc560ee62583a5b8e0d14d87851

1
src/packages/System.Data.SQLite.1.0.84.0/content/net40/x86/SQLite.Interop.dll.REMOVED.git-id

@ -0,0 +1 @@
1838fba8df03d11c4b76a63b922448593bc908ce

1
src/packages/System.Data.SQLite.1.0.84.0/content/net45/x64/SQLite.Interop.dll.REMOVED.git-id

@ -0,0 +1 @@
26efb8ce39cf9b09e440c00d2639233402b2a154

1
src/packages/System.Data.SQLite.1.0.84.0/content/net45/x86/SQLite.Interop.dll.REMOVED.git-id

@ -0,0 +1 @@
b937604acdc489ab2c0b89e0aaf075672e536b70

0
src/packages/System.Data.SQLite.x86.1.0.84.0/lib/net20/System.Data.SQLite.Linq.dll.REMOVED.git-id → src/packages/System.Data.SQLite.1.0.84.0/lib/net20/System.Data.SQLite.Linq.dll.REMOVED.git-id

1
src/packages/System.Data.SQLite.1.0.84.0/lib/net20/System.Data.SQLite.dll.REMOVED.git-id

@ -0,0 +1 @@
7bae8574bfe9fbff66f60d60987008756be04acd

0
src/packages/System.Data.SQLite.x86.1.0.84.0/lib/net40/System.Data.SQLite.Linq.dll.REMOVED.git-id → src/packages/System.Data.SQLite.1.0.84.0/lib/net40/System.Data.SQLite.Linq.dll.REMOVED.git-id

1
src/packages/System.Data.SQLite.1.0.84.0/lib/net40/System.Data.SQLite.dll.REMOVED.git-id

@ -0,0 +1 @@
1ee930f18b364964b44e591dd81f3ce1a3615bac

0
src/packages/System.Data.SQLite.x86.1.0.84.0/lib/net45/System.Data.SQLite.Linq.dll.REMOVED.git-id → src/packages/System.Data.SQLite.1.0.84.0/lib/net45/System.Data.SQLite.Linq.dll.REMOVED.git-id

1
src/packages/System.Data.SQLite.1.0.84.0/lib/net45/System.Data.SQLite.dll.REMOVED.git-id

@ -0,0 +1 @@
aa5827973b95175e31ab254ee946d7d67c914383

36
src/packages/System.Data.SQLite.1.0.84.0/tools/install.ps1

@ -0,0 +1,36 @@
###############################################################################
#
# install.ps1 --
#
# Written by Joe Mistachkin.
# Released to the public domain, use at your own risk!
#
###############################################################################
param($installPath, $toolsPath, $package, $project)
$platformNames = "x86", "x64"
$fileName = "SQLite.Interop.dll"
$propertyName = "CopyToOutputDirectory"
foreach($platformName in $platformNames) {
$folder = $project.ProjectItems.Item($platformName)
if ($folder -eq $null) {
continue
}
$item = $folder.ProjectItems.Item($fileName)
if ($item -eq $null) {
continue
}
$property = $item.Properties.Item($propertyName)
if ($property -eq $null) {
continue
}
$property.Value = 1
}

1
src/packages/System.Data.SQLite.x86.1.0.84.0/System.Data.SQLite.x86.1.0.84.0.nupkg.REMOVED.git-id

@ -1 +0,0 @@
2db1579b36b2d81adf041533845e9a72ea6c2393

1
src/packages/System.Data.SQLite.x86.1.0.84.0/lib/net20/System.Data.SQLite.dll.REMOVED.git-id

@ -1 +0,0 @@
168e4329b21098e36b1c1af6e0c8728d5e9c589e

1
src/packages/System.Data.SQLite.x86.1.0.84.0/lib/net40/System.Data.SQLite.dll.REMOVED.git-id

@ -1 +0,0 @@
f60b588d3ff22ae8b1f51d710a44a037683ce81d

1
src/packages/System.Data.SQLite.x86.1.0.84.0/lib/net45/System.Data.SQLite.dll.REMOVED.git-id

@ -1 +0,0 @@
c62d000052745e37933833a3b764eb47ece9673f
Loading…
Cancel
Save