Click or drag to resize

ICompositionHost Interface

Class hosting a CompositionContainer with an AggregateCatalog.

Namespace:  TomsToolbox.Desktop.Composition
Assembly:  TomsToolbox.Desktop (in TomsToolbox.Desktop.dll) Version: 1.0.70.0
Syntax
public interface ICompositionHost : IDisposable

The ICompositionHost type exposes the following members.

Properties
  NameDescription
Public propertyCatalog
Gets the catalog of the container.

[NotNull]

Public propertyContainer
Gets the composition container.

[NotNull]

Top
Extension Methods
  NameDescription
Public Extension MethodAddCatalog(ComposablePartCatalog)Overloaded.
Adds a new catalog to the container.
(Defined by CompositionExtensions.)
Public Extension MethodAddCatalog(Assembly)Overloaded.
Adds a new assembly catalog to the containers aggregate catalog.
(Defined by CompositionExtensions.)
Public Extension MethodAddCatalog(Type)Overloaded.
Adds a new type catalog to the containers aggregate catalog.
(Defined by CompositionExtensions.)
Public Extension MethodComposeExportedValueT (Defined by CompositionExtensions.)
Public Extension MethodGetExportedValueTOverloaded.
Returns the exported object with the contract name derived from the specified type parameter. If there is not exactly one matching exported object, an exception is thrown.

[NotNull]

(Defined by CompositionExtensions.)
Public Extension MethodGetExportedValueT(String)Overloaded.
Returns the exported object with the contract name derived from the specified type parameter. If there is not exactly one matching exported object, an exception is thrown.

[NotNull]

(Defined by CompositionExtensions.)
Public Extension MethodGetExportedValueOrDefaultTOverloaded.
Gets the exported object with the contract name derived from the specified type parameter or the default value for the specified type, or throws an exception if there is more than one matching exported object.

[CanBeNull]

(Defined by CompositionExtensions.)
Public Extension MethodGetExportedValueOrDefaultT(String)Overloaded.
Gets the exported object with the contract name derived from the specified type parameter or the default value for the specified type, or throws an exception if there is more than one matching exported object.

[CanBeNull]

(Defined by CompositionExtensions.)
Public Extension MethodGetExportedValuesTOverloaded.
Gets all the exported objects with the contract name derived from the specified type parameter.

[NotNull, ItemNotNull]

(Defined by CompositionExtensions.)
Public Extension MethodGetExportedValuesT(String)Overloaded.
Gets all the exported objects with the specified contract name.

[NotNull, ItemNotNull]

(Defined by CompositionExtensions.)
Public Extension MethodGetExportsTOverloaded.
Gets all the exports.

[NotNull, ItemNotNull]

(Defined by CompositionExtensions.)
Public Extension MethodGetExportsT(String)Overloaded.
Gets all the exports with the specified contract name.

[NotNull, ItemNotNull]

(Defined by CompositionExtensions.)
Public Extension MethodCode exampleReportNotDisposedObject
Handle reporting of a not disposed object.

Using this pattern is a good practice to avoid code where disposable objects get never disposed.

Calling this method will raise the NotDisposedObject event if any event handler is attached; otherwise it will throw an InvalidOperationException if a debugger is attached. If the application does not run in a debugger and no event handler is attached, calling this method does nothing.

(Defined by Disposable.)
Public Extension MethodSatisfyImportsOnce
Composes the specified part, with recomposition and validation disabled.
(Defined by CompositionExtensions.)
Top
See Also