first commit
This commit is contained in:
1 parent
a9f02f8595
commit
1f6634add4
83 files changed
+28739
No files matched your search
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PaymentLogs.Repositories
|
||||
{
|
||||
internal abstract class Repo<K, V>
|
||||
{
|
||||
protected Dictionary<K, V> _data = new Dictionary<K, V>();
|
||||
public abstract void Load();
|
||||
public virtual List<V> All()
|
||||
{
|
||||
return _data.Values.ToList();
|
||||
}
|
||||
public virtual V Get(K key) { return _data[key]; }
|
||||
public virtual void Update(K key, V value)
|
||||
{
|
||||
_data[key] = value;
|
||||
}
|
||||
public abstract void Save();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user