IMemberCreationService.CreateProperty 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
在指定类上使用指定的属性 (property) 名、属性 (property) 类型和属性 (attribute) 创建一个属性 (property)。
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 数组,其中包含有关要分配给属性 (property) 的所有属性 (attribute) 的信息。
- emitDependencyProperty
- Boolean
为 true
则发出任何与属性关联的依赖项属性;否则为 false
。
- isMetaProperty
- Boolean
为 true
则作为元属性来创建属性;否则为 false
。
- isAttached
- Boolean
为 true
则指示发出的依赖项属性的 IsAttached 属性设置为 true
;否则为 false
。
- isReadOnly
- Boolean
为 true
则创建的属性作为只读属性;为 false
则创建的属性作为读写属性。
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈