ExportProvider.PartLifecycleTracker Class

Definition

A state machine that tracks an individual instance of a MEF part. Every single instantiated MEF part (including each individual NonShared instance) has an associated instance of this class to track its lifecycle from initialization to disposal.

protected internal abstract class ExportProvider.PartLifecycleTracker : IDisposable
Protected Friend MustInherit Class ExportProvider.PartLifecycleTracker
Implements IDisposable
Inheritance
ExportProvider.PartLifecycleTracker
Implements

Constructors

ExportProvider.PartLifecycleTracker(ExportProvider, String)

Initializes a new instance of the ExportProvider.PartLifecycleTracker class.

Properties

OwningExportProvider

Gets the ExportProvider that owns the lifetime and sharing boundaries for the part to be instantiated.

PartType

Gets the type behind the part.

State

Gets the level of initialization the MEF part has already undergone.

Value

Gets or sets the instantiated part, if applicable and after it has been created. Otherwise null.

Methods

CreateValue()

Instantiates the MEF part and initializes it only so much as executing its importing constructor.

Dispose()

Disposes of the MEF part if it is disposable.

GetValueReadyToExpose()

Gets the instance of the part after fully initializing it.

GetValueReadyToRetrieveExportingMembers()

Gets the instance of the part after instantiating it. Importing properties may not have been satisfied yet.

InvokeOnImportsSatisfied()

Invokes the OnImportsSatisfied method on the part, if applicable.

ReportPartiallyInitializedImport(ExportProvider+PartLifecycleTracker)

Indicates that a MEF import was satisfied with a value that was not completely initialized so that it can be initialized later (before this MEF part is allowed to be observed by the MEF client).

SatisfyImports()

Satisfies importing members on the MEF part itself.

ThrowPartNotInstantiableException()

Throws a CompositionFailedException indicating the part cannot be instantiated.

Applies to