Export (0) Print
Expand All

CompositionContext Class

.NET Framework 4.5

Provides methods to retrieve exports from the composition.

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

public abstract class CompositionContext

The CompositionContext type exposes the following members.

  NameDescription
Protected methodCompositionContextInitializes a new instance of the CompositionContext class.
Top

  NameDescription
Public methodEqualsDetermines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetExport(Type)Returns the export that matches the specified type.
Public methodGetExport(CompositionContract)Returns the export that matches the specified contract.
Public methodGetExport(Type, String)Returns the export that matches the specified name and type.
Public methodGetExport<TExport>()Returns the export that matches the specified generic type parameter.
Public methodGetExport<TExport>(String)Returns the export that matches the specified generic type parameter and contract name.
Public methodGetExports(Type)Returns a collection of all exports that match the specified type.
Public methodGetExports(Type, String)Returns all exports that match the specified contract name and type.
Public methodGetExports<TExport>()Returns all exports that match the specified generic type parameter.
Public methodGetExports<TExport>(String)Returns all exports that match the specified generic type parameter and contract name.
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (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.
Public methodTryGetExport(CompositionContract, Object)Returns the export that matches the specified contract, or returns null if no match is found.
Public methodTryGetExport(Type, String, Object)Returns the export that matches the specified contract name and type, or returns null if no match is found.
Public methodTryGetExport<TExport>(TExport)Returns the export that matches the specified generic type parameter, or returns null if no match is found.
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.
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:
© 2015 Microsoft