private static void SetupManagedComponent(ManagementInfo info, Object instance)
{
Object[] componentAtt =
instance.GetType().GetCustomAttributes(
typeof(ManagedComponentAttribute), true );
if (componentAtt == null || componentAtt.Length == 0)
{
throw new StandardComponentException("Standard component must use ManagedComponentAttribute attribute.");
}
ManagedComponentAttribute compAtt = componentAtt[0] as ManagedComponentAttribute;
info.Description = compAtt.Description;
}