I want users of my LayoutManager class to be able to write this:
LayoutManager layoutManager = new LayoutManager();
layoutManager.AddMainContentView("customers", "intro",
new View { Title = "Customers Intro", Content = "This is customers intro." });
But what syntax do I need to fill this dictionary in a dictionary in AddMainContentView() below?
public class LayoutManager
{
private Dictionary<string, Dictionary<string, object>> _mainContentViews = new Dictionary<string, Dictionary<string, object>>();
public Dictionary<string, Dictionary<string, object>> MainContentViews
{
get { return _mainContentViews; }
set { _mainContentViews = value; }
}
public void AddMainContentView(string moduleKey, string viewKey, object view)
{
//_mainContentViews.Add(moduleKey, new Dictionary<string, object>(viewKey, view));
//_mainContentViews.Add(moduleKey, viewKey, view);
_mainContentViews.Add(moduleKey, ???);
}
...
}