mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-04 14:08:32 +00:00
Removed LocationPath property from MapItem and PushPin.
This commit is contained in:
parent
b0ecd850a2
commit
d0d949c9be
17 changed files with 88 additions and 133 deletions
|
|
@ -30,8 +30,8 @@ namespace Caching
|
|||
public FileDbCache(string name, NameValueCollection config)
|
||||
: this(name, config["directory"])
|
||||
{
|
||||
string autoFlush = config["autoFlush"];
|
||||
string autoCleanThreshold = config["autoCleanThreshold"];
|
||||
var autoFlush = config["autoFlush"];
|
||||
var autoCleanThreshold = config["autoCleanThreshold"];
|
||||
|
||||
if (autoFlush != null)
|
||||
{
|
||||
|
|
@ -221,13 +221,13 @@ namespace Caching
|
|||
}
|
||||
|
||||
object value = null;
|
||||
Record record = GetRecord(key);
|
||||
var record = GetRecord(key);
|
||||
|
||||
if (record != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (MemoryStream stream = new MemoryStream((byte[])record[0]))
|
||||
using (var stream = new MemoryStream((byte[])record[0]))
|
||||
{
|
||||
value = formatter.Deserialize(stream);
|
||||
}
|
||||
|
|
@ -296,7 +296,7 @@ namespace Caching
|
|||
|
||||
try
|
||||
{
|
||||
using (MemoryStream stream = new MemoryStream())
|
||||
using (var stream = new MemoryStream())
|
||||
{
|
||||
formatter.Serialize(stream, value);
|
||||
valueBuffer = stream.ToArray();
|
||||
|
|
@ -309,7 +309,7 @@ namespace Caching
|
|||
|
||||
if (valueBuffer != null)
|
||||
{
|
||||
DateTime expires = DateTime.MaxValue;
|
||||
var expires = DateTime.MaxValue;
|
||||
|
||||
if (policy.AbsoluteExpiration != InfiniteAbsoluteExpiration)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -112,10 +112,10 @@ namespace Caching
|
|||
|
||||
if (path != null)
|
||||
{
|
||||
long creationTime = File.GetLastWriteTimeUtc(path).ToBinary();
|
||||
var creationTime = File.GetLastWriteTimeUtc(path).ToBinary();
|
||||
|
||||
using (FileStream fileStream = new FileStream(path, FileMode.Open))
|
||||
using (MemoryStream memoryStream = new MemoryStream((int)(fileStream.Length + 8)))
|
||||
using (var fileStream = new FileStream(path, FileMode.Open))
|
||||
using (var memoryStream = new MemoryStream((int)(fileStream.Length + 8)))
|
||||
{
|
||||
memoryStream.Write(BitConverter.GetBytes(creationTime), 0, 8);
|
||||
fileStream.CopyTo(memoryStream);
|
||||
|
|
@ -180,7 +180,7 @@ namespace Caching
|
|||
{
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
|
||||
using (FileStream fileStream = new FileStream(path, FileMode.Create))
|
||||
using (var fileStream = new FileStream(path, FileMode.Create))
|
||||
{
|
||||
fileStream.Write(buffer, 8, buffer.Length - 8);
|
||||
}
|
||||
|
|
@ -278,7 +278,7 @@ namespace Caching
|
|||
private static string GetFileExtension(byte[] buffer)
|
||||
{
|
||||
string extension = null;
|
||||
DateTime creationTime = DateTime.FromBinary(BitConverter.ToInt64(buffer, 0));
|
||||
var creationTime = DateTime.FromBinary(BitConverter.ToInt64(buffer, 0));
|
||||
|
||||
if (creationTime.Kind == DateTimeKind.Utc && creationTime <= DateTime.UtcNow)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue