blob: 26aab7f04565927d07451d25e8d9c068fafa5696 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
using System.Collections;
namespace momoney.database.transactions
{
public class Context : IContext
{
readonly IDictionary items;
public Context(IDictionary items)
{
this.items = items;
}
public bool contains<T>(IKey<T> key)
{
return key.is_found_in(items);
}
public void add<T>(IKey<T> key, T value)
{
key.add_value_to(items, value);
}
public T value_for<T>(IKey<T> key)
{
return key.parse_from(items);
}
public void remove<T>(IKey<T> key)
{
key.remove_from(items);
}
}
}
|