即如果类Foo实现接口IFoo,并且IFoo被定义为必须具有ObserveMeAttribute,则Foo必须在其上定义ObserveMe才能实现IFoo.
编辑:
属性称为EntityTypeAttribute,用于指定视图模型的实体类型,用法如下:
[EntityType(typeof(User))] public class Userviewmodel { ... }
属性用于扩展方法AddModel(T TModel),其中属性从TModel读取,并且它的属性Type entityType用于创建实体存根对象.
属性主要是一种通过使用反射在运行时查找有关类/方法/参数的其他声明性信息的机制.