IMemberCreationService.CreateProperty 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
使用指定的属性名称、属性类型和属性在指定类上创建属性。
public:
void CreateProperty(System::String ^ className, System::String ^ propertyName, Type ^ propertyType, cli::array <System::Workflow::ComponentModel::Compiler::AttributeInfo ^> ^ attributes, bool emitDependencyProperty, bool isMetaProperty, bool isAttached, Type ^ ownerType, bool isReadOnly);
public void CreateProperty(string className, string propertyName, Type propertyType, System.Workflow.ComponentModel.Compiler.AttributeInfo[] attributes, bool emitDependencyProperty, bool isMetaProperty, bool isAttached, Type ownerType, bool isReadOnly);
abstract member CreateProperty : string * string * Type * System.Workflow.ComponentModel.Compiler.AttributeInfo[] * bool * bool * bool * Type * bool -> unit
Public Sub CreateProperty (className As String, propertyName As String, propertyType As Type, attributes As AttributeInfo(), emitDependencyProperty As Boolean, isMetaProperty As Boolean, isAttached As Boolean, ownerType As Type, isReadOnly As Boolean)
参数
- className
- String
一个字符串,用于定义要添加字段的类的名称。
- propertyName
- String
定义字段名称的字符串。
- attributes
- AttributeInfo[]
一个 AttributeInfo 数组,其中包含要分配给该属性的所有属性的信息。
- emitDependencyProperty
- Boolean
true 发出与该属性关联的任何依赖项属性;否则,为 false.
- isMetaProperty
- Boolean
true 将属性创建为元属性;否则,为 false.
- isAttached
- Boolean
- isReadOnly
- Boolean
true 将属性创建为只读属性; false 将属性创建为读写属性。