mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 22:46:58 +00:00
Version 7.0: WinUI
This commit is contained in:
parent
0820a77dd5
commit
63da15f6a5
32 changed files with 57 additions and 149 deletions
32
FileDbCache/WinUI/FileDbCache.WinUI.cs
Normal file
32
FileDbCache/WinUI/FileDbCache.WinUI.cs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
// XAML Map Control - https://github.com/ClemensFischer/XAML-Map-Control
|
||||
// © 2021 Clemens Fischer
|
||||
// Licensed under the Microsoft Public License (Ms-PL)
|
||||
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MapControl.Caching
|
||||
{
|
||||
public partial class FileDbCache : IImageCache
|
||||
{
|
||||
public Task<Tuple<byte[], DateTime>> GetAsync(string key)
|
||||
{
|
||||
return Task.Run(() =>
|
||||
{
|
||||
var record = GetRecordByKey(key);
|
||||
|
||||
if (record == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return Tuple.Create((byte[])record[0], (DateTime)record[1]);
|
||||
});
|
||||
}
|
||||
|
||||
public Task SetAsync(string key, byte[] buffer, DateTime expiration)
|
||||
{
|
||||
return Task.Run(() => AddOrUpdateRecord(key, buffer, expiration));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
<AssemblyOriginatorKeyFile>..\..\MapControl.snk</AssemblyOriginatorKeyFile>
|
||||
<DelaySign>false</DelaySign>
|
||||
<Product>XAML Map Control</Product>
|
||||
<Version>6.1.0</Version>
|
||||
<Version>7.0.0</Version>
|
||||
<Description>IImageCache implementation based on EzTools FileDb</Description>
|
||||
<Authors>Clemens Fischer</Authors>
|
||||
<Copyright>Copyright © 2021 Clemens Fischer</Copyright>
|
||||
|
|
@ -17,11 +17,7 @@
|
|||
<PackageId>XAML.MapControl.FileDbCache</PackageId>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<DefineConstants>DEBUG;WINUI</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||
<PropertyGroup>
|
||||
<DefineConstants>WINUI</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
@ -31,7 +27,6 @@
|
|||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\Shared\*.cs" />
|
||||
<Compile Include="..\UWP\*.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue