IMemberCreationService.CreateProperty 方法

定义

使用指定的属性名称、属性类型和属性在指定类上创建属性。

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

定义字段名称的字符串。

propertyType
Type

Type新属性。

attributes
AttributeInfo[]

一个 AttributeInfo 数组,其中包含要分配给该属性的所有属性的信息。

emitDependencyProperty
Boolean

true 发出与该属性关联的任何依赖项属性;否则,为 false.

isMetaProperty
Boolean

true 将属性创建为元属性;否则,为 false.

isAttached
Boolean

如果指示发出的依赖属性已设置为 则为 ;否则为 < a1/>。

ownerType
Type

声明 Type 依赖属性的函数。

isReadOnly
Boolean

true 将属性创建为只读属性; false 将属性创建为读写属性。

适用于