mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 22:46:58 +00:00
Version 4.13.1 Cache "no tile" responses.
This commit is contained in:
parent
576dd8e8e7
commit
219171381f
27 changed files with 200 additions and 338 deletions
|
|
@ -7,8 +7,8 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyCompany("Clemens Fischer")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2019 Clemens Fischer")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyVersion("4.13.0")]
|
||||
[assembly: AssemblyFileVersion("4.13.0")]
|
||||
[assembly: AssemblyVersion("4.13.1")]
|
||||
[assembly: AssemblyFileVersion("4.13.1")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
|
|
|||
|
|
@ -121,8 +121,6 @@ namespace MapControl.Caching
|
|||
throw new ArgumentNullException("The parameter key must not be null.");
|
||||
}
|
||||
|
||||
ImageCacheItem imageCacheItem = null;
|
||||
|
||||
try
|
||||
{
|
||||
using (var command = GetItemCommand(key))
|
||||
|
|
@ -131,7 +129,7 @@ namespace MapControl.Caching
|
|||
|
||||
if (reader.Read())
|
||||
{
|
||||
imageCacheItem = new ImageCacheItem
|
||||
return new ImageCacheItem
|
||||
{
|
||||
Expiration = new DateTime((long)reader["expiration"]),
|
||||
Buffer = (byte[])reader["buffer"]
|
||||
|
|
@ -144,7 +142,7 @@ namespace MapControl.Caching
|
|||
Debug.WriteLine("SQLiteCache.Get(\"{0}\"): {1}", key, ex.Message);
|
||||
}
|
||||
|
||||
return imageCacheItem;
|
||||
return null;
|
||||
}
|
||||
|
||||
public override CacheItem GetCacheItem(string key, string regionName = null)
|
||||
|
|
@ -173,9 +171,9 @@ namespace MapControl.Caching
|
|||
|
||||
var imageCacheItem = value as ImageCacheItem;
|
||||
|
||||
if (imageCacheItem == null || imageCacheItem.Buffer == null || imageCacheItem.Buffer.Length == 0)
|
||||
if (imageCacheItem == null)
|
||||
{
|
||||
throw new ArgumentException("The parameter value must be an ImageCacheItem with a non-empty Buffer.");
|
||||
throw new ArgumentException("The parameter value must be a MapControl.Caching.ImageCacheItem instance.");
|
||||
}
|
||||
|
||||
try
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue