AttributedModelServices.CreatePart 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立可組合的組件。
多載
CreatePart(Object) |
從指定的屬性化物件建立可組合的組件。 |
CreatePart(ComposablePartDefinition, Object) |
使用指定的組件定義,從指定的屬性化物件建立可組合的組件。 |
CreatePart(Object, ReflectionContext) |
使用指定的反映內容,從指定的屬性化物件建立可組合的組件。 |
CreatePart(Object)
從指定的屬性化物件建立可組合的組件。
public:
static System::ComponentModel::Composition::Primitives::ComposablePart ^ CreatePart(System::Object ^ attributedPart);
public static System.ComponentModel.Composition.Primitives.ComposablePart CreatePart (object attributedPart);
static member CreatePart : obj -> System.ComponentModel.Composition.Primitives.ComposablePart
Public Function CreatePart (attributedPart As Object) As ComposablePart
參數
- attributedPart
- Object
屬性化物件。
傳回
建立的組件。
適用於
CreatePart(ComposablePartDefinition, Object)
使用指定的組件定義,從指定的屬性化物件建立可組合的組件。
public:
static System::ComponentModel::Composition::Primitives::ComposablePart ^ CreatePart(System::ComponentModel::Composition::Primitives::ComposablePartDefinition ^ partDefinition, System::Object ^ attributedPart);
public static System.ComponentModel.Composition.Primitives.ComposablePart CreatePart (System.ComponentModel.Composition.Primitives.ComposablePartDefinition partDefinition, object attributedPart);
static member CreatePart : System.ComponentModel.Composition.Primitives.ComposablePartDefinition * obj -> System.ComponentModel.Composition.Primitives.ComposablePart
Public Function CreatePart (partDefinition As ComposablePartDefinition, attributedPart As Object) As ComposablePart
參數
- partDefinition
- ComposablePartDefinition
新組件的定義。
- attributedPart
- Object
屬性化物件。
傳回
建立的組件。
適用於
CreatePart(Object, ReflectionContext)
使用指定的反映內容,從指定的屬性化物件建立可組合的組件。
public:
static System::ComponentModel::Composition::Primitives::ComposablePart ^ CreatePart(System::Object ^ attributedPart, System::Reflection::ReflectionContext ^ reflectionContext);
public static System.ComponentModel.Composition.Primitives.ComposablePart CreatePart (object attributedPart, System.Reflection.ReflectionContext reflectionContext);
static member CreatePart : obj * System.Reflection.ReflectionContext -> System.ComponentModel.Composition.Primitives.ComposablePart
Public Function CreatePart (attributedPart As Object, reflectionContext As ReflectionContext) As ComposablePart
參數
- attributedPart
- Object
屬性化物件。
- reflectionContext
- ReflectionContext
組件的反映內容。
傳回
建立的組件。
例外狀況
reflectionContext
為 null
。
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應