minor cleanup

This commit is contained in:
Collin M. Barrett 2017-10-15 17:36:18 -05:00
parent 3c2357b5db
commit b91f348a3f
2 changed files with 2 additions and 7 deletions

View file

@ -2,11 +2,9 @@
using FilterLists.Data.Models;
using FilterLists.Data.Repositories.Contracts;
using FilterLists.Services.Contracts;
using JetBrains.Annotations;
namespace FilterLists.Services.Implementations
{
[UsedImplicitly]
public class ListService : IListService
{
private readonly IListRepository _listRepository;

View file

@ -8,12 +8,10 @@ namespace FilterLists.Services.Implementations
{
public class TableService : ITableService
{
private readonly IListRepository _listRepository;
private readonly ITableCsvRepository _tableCsvRepository;
public TableService(IListRepository listRepository, ITableCsvRepository tableCsvRepository)
public TableService(ITableCsvRepository tableCsvRepository)
{
_listRepository = listRepository;
_tableCsvRepository = tableCsvRepository;
}
@ -49,8 +47,7 @@ private static async Task<string> FetchFile(string url, string fileName)
var path = Path.Combine(Directory.GetCurrentDirectory(), "csv");
Directory.CreateDirectory(path);
var file = Path.Combine(path, fileName + ".csv");
using (var fileStream = new FileStream(file, FileMode.Create, FileAccess.Write,
FileShare.None))
using (var fileStream = new FileStream(file, FileMode.Create, FileAccess.Write, FileShare.None))
{
await response.Content.CopyToAsync(fileStream);
}