protected override void FillAttributes(IList attributes) {
//
// The order that we fill in attributes is critical. The list of attributes will be
// filtered so that matching attributes at the end of the list replace earlier matches
// (last one in wins). Therefore, the two categories of attributes we add must be
// added as follows:
//
// 1. Attributes of the event, from base class to most derived. This way
// derived class attributes replace base class attributes.
//
// 2. Attributes from our base MemberDescriptor. While this seems opposite of what
// we want, MemberDescriptor only has attributes if someone passed in a new
// set in the constructor. Therefore, these attributes always
// supercede existing values.
//
FillMethods();
Debug.Assert(componentClass != null, "Must have a component class for FilterAttributes");
if (realEvent != null) {
FillEventInfoAttribute(realEvent, attributes);
}
else {
Debug.Assert(removeMethod != null, "Null remove method for " + Name);
FillSingleMethodAttribute(removeMethod, attributes);
Debug.Assert(addMethod != null, "Null remove method for " + Name);
FillSingleMethodAttribute(addMethod, attributes);
}
// Include the base attributes. These override all attributes on the actual
// property, so we want to add them last.
//
base.FillAttributes(attributes);
}