public void DefineSection(string name, Action action)
{
if (string.IsNullOrWhiteSpace(name))
{
throw new ArgumentNullException("name", "Section name is required");
}
if (Sections.ContainsKey(name))
{
throw new ArgumentException(string.Format("Section '{0}' already defined", name), "name");
}
Sections.Add(name, action);
}