AttributedModelServices.CreatePart 方法

定义

创建可组合部件。

重载

CreatePart(Object)

从指定的特性化对象创建一个可组合部件。

CreatePart(ComposablePartDefinition, Object)

通过指定的部件定义,从指定的特性化对象创建一个可组合部件。

CreatePart(Object, ReflectionContext)

通过指定的反射上下文,从指定的特性化对象创建一个可组合部件。

CreatePart(Object)

Source:
AttributedModelServices.cs
Source:
AttributedModelServices.cs
Source:
AttributedModelServices.cs

从指定的特性化对象创建一个可组合部件。

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)

Source:
AttributedModelServices.cs
Source:
AttributedModelServices.cs
Source:
AttributedModelServices.cs

通过指定的部件定义,从指定的特性化对象创建一个可组合部件。

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)

Source:
AttributedModelServices.cs
Source:
AttributedModelServices.cs
Source:
AttributedModelServices.cs

通过指定的反射上下文,从指定的特性化对象创建一个可组合部件。

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

适用于