WIP Clean Architecture

Windows 8.1 App Uses keepasslib v2.44 (temporarily)
This commit is contained in:
Geoffroy BONNEVILLE
2020-03-24 13:01:14 +01:00
parent 34cd4ca3d8
commit 7e44d47065
290 changed files with 4084 additions and 36416 deletions

View File

@@ -0,0 +1,37 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using ModernKeePass.Application.Common.Interfaces;
using ModernKeePass.Domain.Interfaces;
namespace ModernKeePass.Application.Services
{
public class FileService: IFileService
{
private readonly IFileProxy _fileProxy;
public FileService(IFileProxy fileProxy)
{
_fileProxy = fileProxy;
}
public Task<byte[]> OpenBinaryFile(string path)
{
return _fileProxy.OpenBinaryFile(path);
}
public Task WriteBinaryContentsToFile(string path, byte[] contents)
{
return _fileProxy.WriteBinaryContentsToFile(path, contents);
}
public Task<IList<string>> OpenTextFile(string path)
{
return _fileProxy.OpenTextFile(path);
}
public void ReleaseFile(string path)
{
_fileProxy.ReleaseFile(path);
}
}
}