private void AssertNameIsNotNull(string name, ComponentModel model)
{
if (name == null)
{
var message = String.Format("The configuration nodes within 'methods' " +
"for the component '{0}' does not have a name. You can either name " +
"the node as the method name or provide an attribute 'name'", model.Name);
throw new Exception(message);
}
}