AttributedModelServices.CreatePart 方法

定義

建立一個可組合的零件。

多載

名稱 Description
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

這是角色的反射背景。

傳回

被創造的部分。

例外狀況

reflectionContextnull

適用於