mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 14:37:01 +00:00
Version 7.0: WinUI
This commit is contained in:
parent
0820a77dd5
commit
63da15f6a5
32 changed files with 57 additions and 149 deletions
|
|
@ -1,32 +0,0 @@
|
|||
// 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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;WINDOWS_UWP</DefineConstants>
|
||||
<DefineConstants>DEBUG;UWP</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
<DebugType>none</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>WINDOWS_UWP</DefineConstants>
|
||||
<DefineConstants>UWP</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
|
|
@ -43,7 +43,9 @@
|
|||
<Compile Include="..\Shared\FileDbCache.cs">
|
||||
<Link>FileDbCache.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="FileDbCache.UWP.cs" />
|
||||
<Compile Include="..\WinUI\FileDbCache.WinUI.cs">
|
||||
<Link>FileDbCache.WinUI.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="Properties\FileDbCache.UWP.rd.xml" />
|
||||
</ItemGroup>
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyCompany("Clemens Fischer")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2021 Clemens Fischer")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyVersion("6.1.0")]
|
||||
[assembly: AssemblyFileVersion("6.1.0")]
|
||||
[assembly: AssemblyVersion("7.0.0")]
|
||||
[assembly: AssemblyFileVersion("7.0.0")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue