ExportDescriptorProvider.GetExportDescriptors Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για