public virtual void AddCustomAttribute(ICustomAttributeProvider provider,
Attribute attribute)
{
object[] attrs = (object[]) customAttributesTable[provider];
if (attrs == null) {
customAttributesTable[provider] = new object[] { attribute };
}
else {
object[] newAttrs = new object[attrs.Length + 1];
Array.Copy(attrs, newAttrs, attrs.Length);
newAttrs[attrs.Length] = attribute;
customAttributesTable[provider] = newAttrs;
}
}