Если вы можете обернуть словарь, то почему бы не это:
public class Context<T>
{
private Dictionary<int, T> dictContext;
public String Name { get; private set; }
public Context (String name)
{
this.Name = name;
dictContext = new Dictionary<int, T>();
}
И вы можете добавить всех членов словаря:
public int Count {
get { return dictContext.Count(); }
}
public Dictionary<int, T>.KeyCollection Keys
{
get { return dictContext.Keys; }
}
public Dictionary<int, T>.ValueCollection Values
{
get { return dictContext.Values; }
}
public void Add (int key, T value)
{
dictContext.Add(key, value);
}
public bool Remove (int key)
{
return dictContext.Remove(key);
}
и объявить свой
public void MyFunction ()
{
//do nothing
}
}