Export (0) Print
Expand All

CompositionHost Class

.NET Framework 4.5

Assembles a lightweight composition container from specified providers.

System.Object
  System.Composition.CompositionContext
    System.Composition.Hosting.CompositionHost

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

public sealed class CompositionHost : CompositionContext, 
	IDisposable

The CompositionHost type exposes the following members.

  NameDescription
Public methodStatic memberCreateCompositionHost(IEnumerable<ExportDescriptorProvider>)Creates the composition host with the specified collection of providers.
Public methodStatic memberCreateCompositionHost(ExportDescriptorProvider[])Creates the composition host with the specified array of providers.
Public methodDisposeReleases the host and any globally shared parts.
Public methodEqualsDetermines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodGetExport(Type)Returns the export that matches the specified type. (Inherited from CompositionContext.)
Public methodGetExport(CompositionContract)Returns the export that matches the specified contract. (Inherited from CompositionContext.)
Public methodGetExport(Type, String)Returns the export that matches the specified name and type. (Inherited from CompositionContext.)
Public methodGetExport<TExport>()Returns the export that matches the specified generic type parameter. (Inherited from CompositionContext.)
Public methodGetExport<TExport>(String)Returns the export that matches the specified generic type parameter and contract name. (Inherited from CompositionContext.)
Public methodGetExports(Type)Returns a collection of all exports that match the specified type. (Inherited from CompositionContext.)
Public methodGetExports(Type, String)Returns all exports that match the specified contract name and type. (Inherited from CompositionContext.)
Public methodGetExports<TExport>()Returns all exports that match the specified generic type parameter. (Inherited from CompositionContext.)
Public methodGetExports<TExport>(String)Returns all exports that match the specified generic type parameter and contract name. (Inherited from CompositionContext.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodTryGetExport(Type, Object)Returns the export that matches the specified type, or returns null if no match is found. (Inherited from CompositionContext.)
Public methodTryGetExport(CompositionContract, Object)Retrieves the specified export from the composition context. (Overrides CompositionContext.TryGetExport(CompositionContract, Object).)
Public methodTryGetExport(Type, String, Object)Returns the export that matches the specified contract name and type, or returns null if no match is found. (Inherited from CompositionContext.)
Public methodTryGetExport<TExport>(TExport)Returns the export that matches the specified generic type parameter, or returns null if no match is found. (Inherited from CompositionContext.)
Public methodTryGetExport<TExport>(String, TExport)Returns the export that matches the specified generic type parameter and contract name, or returns null if no match is found. (Inherited from CompositionContext.)
Top

  NameDescription
Public Extension MethodSatisfyImports(Object)Overloaded. Satisfies the imports of the specified object from the specified context. (Defined by CompositionContextExtensions.)
Public Extension MethodSatisfyImports(Object, AttributedModelProvider)Overloaded. Satisfies the imports of the specified object from the specified context, using the specified conventions. (Defined by CompositionContextExtensions.)
Top

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