mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
Minor code refactor Main page now correctly shows save page even when opening a DB from Explorer
37 lines
929 B
C#
37 lines
929 B
C#
using System;
|
|
using System.Collections.ObjectModel;
|
|
using System.Threading.Tasks;
|
|
using ModernKeePass.Interfaces;
|
|
using Windows.Storage;
|
|
using System.Collections.Generic;
|
|
|
|
namespace ModernKeePassApp.Test.Mock
|
|
{
|
|
class RecentServiceMock : IRecentService
|
|
{
|
|
private Dictionary<string, IStorageItem> _recentItems = new Dictionary<string, IStorageItem>();
|
|
|
|
public int EntryCount => 0;
|
|
|
|
public void Add(IStorageItem file, string metadata)
|
|
{
|
|
_recentItems.Add(metadata, file);
|
|
}
|
|
|
|
public void ClearAll()
|
|
{
|
|
_recentItems.Clear();
|
|
}
|
|
|
|
public ObservableCollection<IRecentItem> GetAllFiles(bool removeIfNonExistant = true)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public Task<IStorageItem> GetFileAsync(string token)
|
|
{
|
|
return Task.Run(() => _recentItems[token]);
|
|
}
|
|
}
|
|
}
|