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
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기