[System.ComponentModel.DataObject]
2011-09-05 19:12
537 查看
Accidentally,I saw "[System.ComponentModel.DataObject]" before a class or a method was declared, I just don't understand why need it. So I searched & ask my friends, then I got the answer.
It is used to identifies a data operation method exposed by a type, what type of operation the method performs, and whether the method is the default data method. This class cannot be inherited.
It has two constructor methods:
the first one is DataObjectMethodAttribute(DataObjectMethodType):Initializes a new instance of the DataObjectMethodAttribute class and identifies the type of data operation the method performs.
the other one is DataObjectMethodAttribute(DataObjectMethodType, Boolean):Initializes a new instance of the DataObjectMethodAttribute class, identifies the type of data operation the method performs, and identifies whether the method is the
default data method that the data object exposes.
You can use the DataObjectMethodAttribute to identify data operation methods on a type marked with the DataObjectAttribute attribute so that they are more easily identified by callers using reflection.
When the DataObjectMethodAttribute attribute is applied to a method, it describes the type of operation the method performs and indicates whether the method is the default data operation method of a type. Components such as the ObjectDataSource control and
the ObjectDataSourceDesigner class examine the values of this attribute, if present, to help determine which data method to call at run time.
It is used to identifies a data operation method exposed by a type, what type of operation the method performs, and whether the method is the default data method. This class cannot be inherited.
It has two constructor methods:
the first one is DataObjectMethodAttribute(DataObjectMethodType):Initializes a new instance of the DataObjectMethodAttribute class and identifies the type of data operation the method performs.
the other one is DataObjectMethodAttribute(DataObjectMethodType, Boolean):Initializes a new instance of the DataObjectMethodAttribute class, identifies the type of data operation the method performs, and identifies whether the method is the
default data method that the data object exposes.
You can use the DataObjectMethodAttribute to identify data operation methods on a type marked with the DataObjectAttribute attribute so that they are more easily identified by callers using reflection.
When the DataObjectMethodAttribute attribute is applied to a method, it describes the type of operation the method performs and indicates whether the method is the default data operation method of a type. Components such as the ObjectDataSource control and
the ObjectDataSourceDesigner class examine the values of this attribute, if present, to help determine which data method to call at run time.
相关文章推荐
- 第6章 数据注解 System.ComponentModel.DataAnnotations 、注解后台原理、自定义验证ValidationAttribute、IValidatableObject
- using System.ComponentModel.DataAnnotations
- System.ComponentModel.DataAnnotations表示与数据字段和参数关联的数据类型的枚举
- System.ComponentModel.DataAnnotations.Schema 冲突
- System.ComponentModel.DataAnnotations dll中标签的用法
- System.ComponentModel.DataAnnotations 命名空间和RequiredAttribute 类
- “CreateRiaClientFilesTask”任务意外失败。 未能加载文件程序集“System.ComponentModel.DataAnnotations 处理办法
- System.ComponentModel.DataAnnotations.Schema.TableAttribute 同时存在于EntityFramework.dll和System.Componen
- using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin
- using System.ComponentModel.DataAnnotations
- “CreateRiaClientFilesTask”任务意外失败。 未能加载文件程序集“System.ComponentModel.DataAnnot...
- System.ComponentModel.DataAnnotations.Schema 冲突
- System.ComponentModel.DataAnnotations.Schema.TableAttribute 同时存在于EntityFramework.dll和System.ComponentModel.DataAnnotations.dll中
- System.Windows.Forms.Control : Component, IOleControl, IOleObject, IOleInPlaceObject, IOleInPlaceActiveObject....
- The model item passed into the dictionary is of type 'System.Collections.Generic.List`1[BMS.DataAccess.Models.ServiceTyp
- 2.4 The Object Model -- Computed Properties and Aggregate Data with @each(计算的属性和使用@each聚合数据)
- Component object model
- org.springframework.data.mapping.model.MappingException: No id property found for object of type
- 类型“System.Data.Objects.DataClasses.EntityObject”在未被引用的程序集中定义必须添加对程序集“System.Data.Entity"引用
- dhl:类型“System.Data.Objects.DataClasses.EntityObject”在未被引用的程序集中定义必须添加对程序集“System.Data.Entity"引用