private ICommandDecorator[] GetCommandDecorators(System.Type systemType)
{
System.Collections.ArrayList decorators = new System.Collections.ArrayList();
foreach (Attribute attribute in Attribute.GetCustomAttributes(systemType))
{
if (attribute is ICommandDecorator)
{
decorators.Add(attribute);
}
}
if (decorators.Count > 0)
{
return (ICommandDecorator[])decorators.ToArray(typeof(ICommandDecorator));
}
return null;
}