diff --git a/Caching/FileDbCache/Properties/AssemblyInfo.cs b/Caching/FileDbCache/Properties/AssemblyInfo.cs index 8790eb45..1eb7888d 100644 --- a/Caching/FileDbCache/Properties/AssemblyInfo.cs +++ b/Caching/FileDbCache/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © 2014 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.11.2")] -[assembly: AssemblyFileVersion("1.11.2")] +[assembly: AssemblyVersion("1.11.3")] +[assembly: AssemblyFileVersion("1.11.3")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/Caching/ImageFileCache/Properties/AssemblyInfo.cs b/Caching/ImageFileCache/Properties/AssemblyInfo.cs index 88d8f77c..25370e73 100644 --- a/Caching/ImageFileCache/Properties/AssemblyInfo.cs +++ b/Caching/ImageFileCache/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © 2014 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.11.2")] -[assembly: AssemblyFileVersion("1.11.2")] +[assembly: AssemblyVersion("1.11.3")] +[assembly: AssemblyFileVersion("1.11.3")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/MapControl/Properties/AssemblyInfo.cs b/MapControl/Properties/AssemblyInfo.cs index bcba0afb..b2a431d0 100644 --- a/MapControl/Properties/AssemblyInfo.cs +++ b/MapControl/Properties/AssemblyInfo.cs @@ -15,8 +15,8 @@ using System.Windows; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © 2014 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.11.2")] -[assembly: AssemblyFileVersion("1.11.2")] +[assembly: AssemblyVersion("1.11.3")] +[assembly: AssemblyFileVersion("1.11.3")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/MapControl/TileImageLoader.WPF.cs b/MapControl/TileImageLoader.WPF.cs index 9fa120df..104cb46d 100644 --- a/MapControl/TileImageLoader.WPF.cs +++ b/MapControl/TileImageLoader.WPF.cs @@ -51,6 +51,7 @@ namespace MapControl /// The time interval after which a cached image is updated and rewritten to the cache. /// The default value is one day. This time interval should not be greater than the value /// of the CacheExpiration property. + /// If CacheUpdateAge is less than or equal to TimeSpan.Zero, cached images are never updated. /// public static TimeSpan CacheUpdateAge { get; set; } @@ -98,7 +99,7 @@ namespace MapControl foreach (var tile in tiles) { - dispatcher.BeginInvoke(setImageAction, DispatcherPriority.Render, tile, imageTileSource); + dispatcher.BeginInvoke(setImageAction, tile, imageTileSource); } return; @@ -114,7 +115,7 @@ namespace MapControl foreach (var tile in tiles) { - dispatcher.BeginInvoke(setImageAction, DispatcherPriority.Render, tile, tileSource); + dispatcher.BeginInvoke(setImageAction, tile, tileSource); } return; @@ -130,23 +131,19 @@ namespace MapControl var buffer = Cache.Get(key) as byte[]; var image = CreateImage(buffer); - if (image != null) + if (image == null) { - var creationTime = BitConverter.ToInt64(buffer, 0); - - if (DateTime.FromBinary(creationTime) + CacheUpdateAge < DateTime.UtcNow) - { - dispatcher.Invoke(setImageAction, DispatcherPriority.Render, tile, image); // synchronously before enqueuing - outdatedTiles.Add(tile); // update outdated cache - } - else - { - dispatcher.BeginInvoke(setImageAction, DispatcherPriority.Render, tile, image); - } + pendingTiles.Enqueue(tile); // not yet cached + } + else if (CacheUpdateAge > TimeSpan.Zero && + DateTime.FromBinary(BitConverter.ToInt64(buffer, 0)) + CacheUpdateAge < DateTime.UtcNow) + { + dispatcher.Invoke(setImageAction, tile, image); // synchronously before enqueuing + outdatedTiles.Add(tile); // update outdated cache } else { - pendingTiles.Enqueue(tile); // not yet cached + dispatcher.BeginInvoke(setImageAction, tile, image); } } @@ -202,7 +199,7 @@ namespace MapControl if (image != null || !tile.HasImageSource) // do not set null if tile already has an image (from cache) { - dispatcher.BeginInvoke(setImageAction, DispatcherPriority.Render, tile, image); + dispatcher.BeginInvoke(setImageAction, tile, image); } if (buffer != null && image != null) diff --git a/MapControl/WinRT/Properties/AssemblyInfo.cs b/MapControl/WinRT/Properties/AssemblyInfo.cs index f76f719c..6fa0e30e 100644 --- a/MapControl/WinRT/Properties/AssemblyInfo.cs +++ b/MapControl/WinRT/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © 2014 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.11.2")] -[assembly: AssemblyFileVersion("1.11.2")] +[assembly: AssemblyVersion("1.11.3")] +[assembly: AssemblyFileVersion("1.11.3")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/SampleApps/SilverlightApplication.Web/Properties/AssemblyInfo.cs b/SampleApps/SilverlightApplication.Web/Properties/AssemblyInfo.cs index 7dfa461c..5984ef62 100644 --- a/SampleApps/SilverlightApplication.Web/Properties/AssemblyInfo.cs +++ b/SampleApps/SilverlightApplication.Web/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © 2014 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.11.2")] -[assembly: AssemblyFileVersion("1.11.2")] +[assembly: AssemblyVersion("1.11.3")] +[assembly: AssemblyFileVersion("1.11.3")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/SampleApps/SilverlightApplication/Properties/AssemblyInfo.cs b/SampleApps/SilverlightApplication/Properties/AssemblyInfo.cs index 8efda1a1..430ea902 100644 --- a/SampleApps/SilverlightApplication/Properties/AssemblyInfo.cs +++ b/SampleApps/SilverlightApplication/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © 2014 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.11.2")] -[assembly: AssemblyFileVersion("1.11.2")] +[assembly: AssemblyVersion("1.11.3")] +[assembly: AssemblyFileVersion("1.11.3")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/SampleApps/StoreApplication/Properties/AssemblyInfo.cs b/SampleApps/StoreApplication/Properties/AssemblyInfo.cs index fc8641de..592db174 100644 --- a/SampleApps/StoreApplication/Properties/AssemblyInfo.cs +++ b/SampleApps/StoreApplication/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © 2014 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.11.2")] -[assembly: AssemblyFileVersion("1.11.2")] +[assembly: AssemblyVersion("1.11.3")] +[assembly: AssemblyFileVersion("1.11.3")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/SampleApps/SurfaceApplication/Properties/AssemblyInfo.cs b/SampleApps/SurfaceApplication/Properties/AssemblyInfo.cs index 0698c87c..36f811f1 100644 --- a/SampleApps/SurfaceApplication/Properties/AssemblyInfo.cs +++ b/SampleApps/SurfaceApplication/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © 2014 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.11.2")] -[assembly: AssemblyFileVersion("1.11.2")] +[assembly: AssemblyVersion("1.11.3")] +[assembly: AssemblyFileVersion("1.11.3")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/SampleApps/WpfApplication/Properties/AssemblyInfo.cs b/SampleApps/WpfApplication/Properties/AssemblyInfo.cs index 027f432b..87fb6f63 100644 --- a/SampleApps/WpfApplication/Properties/AssemblyInfo.cs +++ b/SampleApps/WpfApplication/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © 2014 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.11.2")] -[assembly: AssemblyFileVersion("1.11.2")] +[assembly: AssemblyVersion("1.11.3")] +[assembly: AssemblyFileVersion("1.11.3")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)]