Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What verb would describe the relationship between a C# class and its Attribute?

Considering the following:

[Export]
public class BudgetView : ViewBase, IView
{
    // Members Galore
}

It is clear that you would say BudgetView extends ViewBase, and it implements IView, but what does it to to poor old Export?

Perhaps BudgetView uses Export? Or BudgetView applies Export?

I need this for my documentation. I'm need to be very formal and very detailed.

Edit:

alt text

My UML tool is very restrictive about what I can and cannot do. I cannot make custom stereotypes for instance.

like image 853
Jordan Avatar asked Jan 22 '11 02:01

Jordan


2 Answers

MSDN uses the terminology of "applies." Export is applied to the BudgetView type.

The C# Specification, Version 4 uses this terminology as well. For example, from 1.12 Attributes:

Attributes can be applied by giving their name, along with any arguments, inside square brackets just before the associated declaration. If an attribute’s name ends in Attribute, that part of the name can be omitted when the attribute is referenced.

like image 134
Reed Copsey Avatar answered Oct 01 '22 02:10

Reed Copsey


Perhaps BudgetView is attributed by Export. Or you could use a term from Java and say Export annotates BudgetView.

like image 36
holmes Avatar answered Oct 01 '22 04:10

holmes