mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-01-07 01:00:43 +01:00
Update ImageFileCache
This commit is contained in:
parent
08adde21b8
commit
6a0cfe96d8
|
|
@ -32,7 +32,7 @@ namespace MapControl.Caching
|
|||
{
|
||||
if (string.IsNullOrEmpty(directory))
|
||||
{
|
||||
throw new ArgumentException("The directory argument must not be null or empty.", nameof(directory));
|
||||
throw new ArgumentException($"The {nameof(directory)} argument must not be null or empty.", nameof(directory));
|
||||
}
|
||||
|
||||
rootDirectory = directory;
|
||||
|
|
@ -40,7 +40,7 @@ namespace MapControl.Caching
|
|||
Debug.WriteLine($"Created ImageFileCache in {rootDirectory}");
|
||||
}
|
||||
|
||||
public Task Clean()
|
||||
public Task CleanAsync()
|
||||
{
|
||||
return Task.Factory.StartNew(CleanRootDirectory, TaskCreationOptions.LongRunning);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ namespace SampleApplication
|
|||
Activated -= WindowActivated;
|
||||
|
||||
await Task.Delay(2000);
|
||||
await ((ImageFileCache)TileImageLoader.Cache).Clean();
|
||||
await ((ImageFileCache)TileImageLoader.Cache).CleanAsync();
|
||||
}
|
||||
|
||||
private void ResetHeadingButtonClick(object sender, RoutedEventArgs e)
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ namespace SampleApplication
|
|||
Loaded += async (s, e) =>
|
||||
{
|
||||
await Task.Delay(2000);
|
||||
await cache.Clean();
|
||||
await cache.CleanAsync();
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue