Adding a Shortcut Method - And Removing It
To make it easier, I created this following method:
public void AddAttribute(string name, object value)
{
this.Attributes.Add(new MetadataAttribute(name, value));
}
This made it easier to add methods, but it added overhead. I changed the MetadataAttribute class to add type; however, that would mean an additional change to MetadataElement. So, rather than introducing this for no good reason, I remove it to reduce overall complexity. That is a principal of Steve McConnell's Code Complete: if you don't use it, get rid of it. Added complexity means added maintenance.