private void ValidateAttributes(CodeAttributeDeclarationCollection attributes) {
if (attributes.Count == 0) return;
IEnumerator en = attributes.GetEnumerator();
while (en.MoveNext()) {
CodeAttributeDeclaration current = (CodeAttributeDeclaration)en.Current;
ValidateTypeName(current,"Name",current.Name);
ValidateTypeReference(current.AttributeType);
foreach (CodeAttributeArgument arg in current.Arguments) {
ValidateAttributeArgument(arg);
}
}
}