Moved application code to the Application layer

Imported Win10 project
Code cleanup
WIP - Use common UWP services for Win8.1 and Win10
This commit is contained in:
Geoffroy BONNEVILLE
2020-04-06 20:20:45 +02:00
parent e795a8c3c4
commit 56d93a5187
292 changed files with 48614 additions and 837 deletions

View File

@@ -6,21 +6,14 @@ namespace ModernKeePass.Infrastructure.File
{
public class CsvImportFormat: IImportFormat
{
private readonly IFileProxy _fileService;
private const bool HasHeaderRow = true;
private const char Delimiter = ';';
private const char LineDelimiter = '\n';
public CsvImportFormat(IFileProxy fileService)
{
_fileService = fileService;
}
public async Task<List<Dictionary<string, string>>> Import(string path)
public async Task<List<Dictionary<string, string>>> Import(IList<string> fileContents)
{
var parsedResult = new List<Dictionary<string, string>>();
var content = await _fileService.OpenTextFile(path);
foreach (var line in content)
foreach (var line in fileContents)
{
var fields = line.Split(Delimiter);
var recordItem = new Dictionary<string, string>();