mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-05 00:20:16 -04:00
Created a Settings Service
Created a Recent Service Created a Resources Service Code refactor Updated tests
This commit is contained in:
14
ModernKeePass/Interfaces/IRecent.cs
Normal file
14
ModernKeePass/Interfaces/IRecent.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Threading.Tasks;
|
||||
using Windows.Storage;
|
||||
|
||||
namespace ModernKeePass.Interfaces
|
||||
{
|
||||
public interface IRecent
|
||||
{
|
||||
int EntryCount { get; }
|
||||
Task<IStorageItem> GetFileAsync(string token);
|
||||
ObservableCollection<IRecentItem> GetAllFiles(bool removeIfNonExistant = true);
|
||||
void Add(IStorageItem file, string metadata);
|
||||
}
|
||||
}
|
11
ModernKeePass/Interfaces/IRecentItem.cs
Normal file
11
ModernKeePass/Interfaces/IRecentItem.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using Windows.Storage;
|
||||
|
||||
namespace ModernKeePass.Interfaces
|
||||
{
|
||||
public interface IRecentItem
|
||||
{
|
||||
StorageFile DatabaseFile { get; }
|
||||
string Token { get; }
|
||||
string Name { get; }
|
||||
}
|
||||
}
|
7
ModernKeePass/Interfaces/IResource.cs
Normal file
7
ModernKeePass/Interfaces/IResource.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace ModernKeePass.Interfaces
|
||||
{
|
||||
public interface IResource
|
||||
{
|
||||
string GetResourceValue(string key);
|
||||
}
|
||||
}
|
8
ModernKeePass/Interfaces/ISettings.cs
Normal file
8
ModernKeePass/Interfaces/ISettings.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace ModernKeePass.Interfaces
|
||||
{
|
||||
public interface ISettings
|
||||
{
|
||||
T GetSetting<T>(string property);
|
||||
void PutSetting<T>(string property, T value);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user