다음을 통해 공유


CompositionBatch Class

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Represents a set of ComposablePart objects which will be added or removed from the container in a single transactional composition.

Inheritance Hierarchy

System.Object
  System.ComponentModel.Composition.Hosting.CompositionBatch

Namespace:  System.ComponentModel.Composition.Hosting
Assembly:  System.ComponentModel.Composition (in System.ComponentModel.Composition.dll)

Syntax

'Declaration
Public Class CompositionBatch
public class CompositionBatch

The CompositionBatch type exposes the following members.

Constructors

  Name Description
Public method CompositionBatch() Initializes a new instance of the CompositionBatch class.
Public method CompositionBatch(IEnumerable<ComposablePart>, IEnumerable<ComposablePart>) Initializes a new instance of the CompositionBatch class with the specified parts for addition and removal.

Top

Properties

  Name Description
Public property PartsToAdd Gets the collection of ComposablePart objects to be added.
Public property PartsToRemove Gets the collection of ComposablePart objects to be removed.

Top

Methods

  Name Description
Public method AddExport Adds the specified export to the CompositionBatch object.
Public method AddPart Adds the specified part to the CompositionBatch object.
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method RemovePart Puts the specified part on the list of parts to remove.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Extension Methods

  Name Description
Public Extension Method AddExportedValue<T>(T) Overloaded. Creates a part from the specified value and adds it to the specified batch. (Defined by AttributedModelServices.)
Public Extension Method AddExportedValue<T>(String, T) Overloaded. Creates a part from the specified value and adds it to the specified batch with the specified contract name. (Defined by AttributedModelServices.)
Public Extension Method AddPart Creates a composable part from the specified attributed object, and adds it to the specified composition batch. (Defined by AttributedModelServices.)

Top

Version Information

Silverlight

Supported in: 5, 4

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.