Renamed type to more descriptive name
This commit is contained in:
@@ -10,7 +10,7 @@ public class BookmarksRepository : IBookmarksRepository, IDisposable
|
||||
|
||||
private uint _autoIncrementedId;
|
||||
private readonly string _filePath;
|
||||
private List<PasswordStore> _cache;
|
||||
private List<Bookmark> _cache;
|
||||
private bool _cacheAhead;
|
||||
|
||||
public BookmarksRepository()
|
||||
@@ -41,14 +41,14 @@ public class BookmarksRepository : IBookmarksRepository, IDisposable
|
||||
|
||||
private void ReadAllFromFile()
|
||||
{
|
||||
var items = new List<PasswordStore>();
|
||||
var items = new List<Bookmark>();
|
||||
|
||||
if (File.Exists(_filePath))
|
||||
{
|
||||
try
|
||||
{
|
||||
string json = File.ReadAllText(_filePath);
|
||||
items = JsonSerializer.Deserialize<List<PasswordStore>>(json) ?? new List<PasswordStore>();
|
||||
items = JsonSerializer.Deserialize<List<Bookmark>>(json) ?? new List<Bookmark>();
|
||||
}
|
||||
catch (JsonException e)
|
||||
{
|
||||
@@ -68,7 +68,7 @@ public class BookmarksRepository : IBookmarksRepository, IDisposable
|
||||
_cacheAhead = false;
|
||||
}
|
||||
|
||||
public List<PasswordStore> GetAll()
|
||||
public List<Bookmark> GetAll()
|
||||
{
|
||||
return _cache;
|
||||
}
|
||||
@@ -98,7 +98,7 @@ public class BookmarksRepository : IBookmarksRepository, IDisposable
|
||||
}
|
||||
}
|
||||
|
||||
public void Create(PasswordStore item)
|
||||
public void Create(Bookmark item)
|
||||
{
|
||||
item.ID = ++_autoIncrementedId;
|
||||
_cache.Add(item);
|
||||
|
||||
Reference in New Issue
Block a user