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
true 表示所發出的依賴性質為 IsAttachedtrue;否則, false。
- isReadOnly
- Boolean
true 將該屬性建立為唯讀屬性; false 將該屬性建立為讀寫屬性。