LifetimeContext.TryGetExport(CompositionContract, Object) 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 a contract instance from the composition context.
public:
override bool TryGetExport(System::Composition::Hosting::Core::CompositionContract ^ contract, [Runtime::InteropServices::Out] System::Object ^ % export);
public override bool TryGetExport (System.Composition.Hosting.Core.CompositionContract contract, out object export);
override this.TryGetExport : System.Composition.Hosting.Core.CompositionContract * obj -> bool
Public Overrides Function TryGetExport (contract As CompositionContract, ByRef export As Object) As Boolean
Parameters
- contract
- CompositionContract
The contract.
- export
- Object
After this method returns, contains the contract instance if available; otherwise, null
.
Returns
true
if the instance was retrieved; otherwise, false
.
Exceptions
No export was found for contract
.
Applies to
Col·laboreu amb nosaltres a GitHub
La font d'aquest contingut es pot trobar al GitHub, on també podeu crear i revisar problemes i sol·licituds d'extracció. Per obtenir més informació, consulteu la nostra guia per a col·laboradors.