mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 22:46:58 +00:00
Unified cache implementations
This commit is contained in:
parent
3dc3db1d79
commit
8cb20f0544
8 changed files with 37 additions and 87 deletions
|
|
@ -21,6 +21,21 @@ namespace MapControl.Caching
|
|||
|
||||
private readonly FileDb fileDb = new FileDb() { AutoFlush = true };
|
||||
|
||||
public FileDbCache(string path)
|
||||
{
|
||||
if (string.IsNullOrEmpty(path))
|
||||
{
|
||||
throw new ArgumentException("The path argument must not be null or empty.", nameof(path));
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(Path.GetExtension(path)))
|
||||
{
|
||||
path = Path.Combine(path, "TileCache.fdb");
|
||||
}
|
||||
|
||||
Open(path);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
fileDb.Dispose();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue