AttributedModelServices.AddPart(CompositionBatch, Object) 方法

定义

从指定的特性化对象创建一个可组合部件,并将该部件添加到指定的组合批。

public:
[System::Runtime::CompilerServices::Extension]
 static System::ComponentModel::Composition::Primitives::ComposablePart ^ AddPart(System::ComponentModel::Composition::Hosting::CompositionBatch ^ batch, System::Object ^ attributedPart);
public static System.ComponentModel.Composition.Primitives.ComposablePart AddPart (this System.ComponentModel.Composition.Hosting.CompositionBatch batch, object attributedPart);
static member AddPart : System.ComponentModel.Composition.Hosting.CompositionBatch * obj -> System.ComponentModel.Composition.Primitives.ComposablePart
<Extension()>
Public Function AddPart (batch As CompositionBatch, attributedPart As Object) As ComposablePart

参数

batch
CompositionBatch

要添加到的批。

attributedPart
Object

要添加的对象。

返回

新部件。

适用于