Unified cache implementations

This commit is contained in:
Clemens 2021-06-30 14:17:54 +02:00
parent 3dc3db1d79
commit 8cb20f0544
8 changed files with 37 additions and 87 deletions

View file

@ -8,7 +8,6 @@ using System.IO;
using System.Runtime.InteropServices.WindowsRuntime;
using System.Text;
using System.Threading.Tasks;
using Windows.Storage;
using Windows.Storage.Streams;
namespace MapControl.Caching
@ -19,11 +18,6 @@ namespace MapControl.Caching
private readonly string rootDirectory;
public ImageFileCache(StorageFolder folder)
: this(folder.Path)
{
}
public ImageFileCache(string directory)
{
if (string.IsNullOrEmpty(directory))

View file

@ -5,7 +5,6 @@
using System;
using System.Runtime.InteropServices.WindowsRuntime;
using System.Threading.Tasks;
using Windows.Storage;
#if WINDOWS_UWP
using Windows.UI.Core;
using Windows.UI.Xaml.Media;
@ -19,12 +18,12 @@ namespace MapControl
public partial class TileImageLoader
{
/// <summary>
/// Default StorageFolder where an IImageCache instance may save cached data,
/// i.e. ApplicationData.Current.TemporaryFolder.
/// Default folder path where an IImageCache instance may save cached data,
/// i.e. Windows.Storage.ApplicationData.Current.TemporaryFolder.Path.
/// </summary>
public static StorageFolder DefaultCacheFolder
public static string DefaultCacheFolder
{
get { return ApplicationData.Current.TemporaryFolder; }
get { return Windows.Storage.ApplicationData.Current.TemporaryFolder.Path; }
}
/// <summary>