/// <summary>
/// Sets a custom attribute using a custom attribute type.
/// </summary>
/// <param name="attributeType">Attribute type.</param>
public void SetCustomAttribute(Type attributeType)
{
if (attributeType == null)
{
throw new ArgumentNullException("attributeType");
}
ConstructorInfo ci = attributeType.GetConstructor(Type.EmptyTypes);
CustomAttributeBuilder caBuilder = new CustomAttributeBuilder(ci, new object[0]);
_typeBuilder.SetCustomAttribute(caBuilder);
}