共用方式為


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

要加入的物件。

傳回

新的組件。

適用於