Share via


ExportDescriptorProvider.GetExportDescriptors Method

Definition

Retrieves promise export descriptors for the specified export key.

public:
 abstract System::Collections::Generic::IEnumerable<System::Composition::Hosting::Core::ExportDescriptorPromise ^> ^ GetExportDescriptors(System::Composition::Hosting::Core::CompositionContract ^ contract, System::Composition::Hosting::Core::DependencyAccessor ^ descriptorAccessor);
public abstract System.Collections.Generic.IEnumerable<System.Composition.Hosting.Core.ExportDescriptorPromise> GetExportDescriptors (System.Composition.Hosting.Core.CompositionContract contract, System.Composition.Hosting.Core.DependencyAccessor descriptorAccessor);
abstract member GetExportDescriptors : System.Composition.Hosting.Core.CompositionContract * System.Composition.Hosting.Core.DependencyAccessor -> seq<System.Composition.Hosting.Core.ExportDescriptorPromise>
Public MustOverride Function GetExportDescriptors (contract As CompositionContract, descriptorAccessor As DependencyAccessor) As IEnumerable(Of ExportDescriptorPromise)

Parameters

contract
CompositionContract

The export key required by another component.

descriptorAccessor
DependencyAccessor

An accessor for the other descriptors in the composition.

Returns

A collection of promises for new export descriptors.

Remarks

A provider is only queried once for each unique export key. The descriptor accessor can only be queried immediately if the descriptor being promised is an adapter, such as Lazy<T>. Otherwise, dependencies should only be queried within execution of the function provided to the ExportDescriptorPromise. The actual descriptors provided by this method must not close over or reference any aspect of the dependency/promise structure, as this would prevent the structure from being garbage collected.

Applies to