public DocumentDirective[] GetDirectives(string directiveType)
{
ArrayList localDirectiveList = new ArrayList ();
foreach (DictionaryEntry de in directives)
{
if (de.Value is DocumentDirective)
{
if (0 == string.Compare (((DocumentDirective)de.Value).Name, directiveType, true, CultureInfo.InvariantCulture))
localDirectiveList.Add (de.Value);
}
else
foreach (DocumentDirective d in (ArrayList)de.Value)
if (0 == string.Compare (directiveType, d.Name, true, CultureInfo.InvariantCulture))
localDirectiveList.Add (d);
}
return (DocumentDirective[]) localDirectiveList.ToArray (typeof (DocumentDirective));
}