开发者

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

Considering the following:

[Export]
public class BudgetView : ViewBase, IView
{
    // Members G开发者_如何学运维alore
}

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:

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

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


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.


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


I would have to say:

BudgetView declares Export


A dotnet attribute is similar to a uml stereotype

<<Export>> 
BudgetView
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜