CompositionContext.TryGetExport Método

Definição

Sobrecargas

TryGetExport(CompositionContract, Object)

Retornará a exportação que corresponde ao contrato especificado ou retornará null se nenhuma correspondência for encontrada.Returns the export that matches the specified contract, or returns null if no match is found.

TryGetExport(Type, Object)

Retornará a exportação que corresponde ao tipo especificado ou retornará null se nenhuma correspondência for encontrada.Returns the export that matches the specified type, or returns null if no match is found.

TryGetExport(Type, String, Object)

Retornará a exportação que corresponde ao nome e tipo do contrato especificado ou retornará null se nenhuma correspondência for encontrada.Returns the export that matches the specified contract name and type, or returns null if no match is found.

TryGetExport<TExport>(TExport)

Retornará a exportação que corresponde ao parâmetro de tipo genérico especificado, ou retornará null, se nenhuma correspondência for encontrada.Returns the export that matches the specified generic type parameter, or returns null if no match is found.

TryGetExport<TExport>(String, TExport)

Retornará a exportação que corresponde ao parâmetro de tipo genérico e ao nome do contrato especificados ou retornará null se nenhuma correspondência for encontrada.Returns the export that matches the specified generic type parameter and contract name, or returns null if no match is found.

TryGetExport(CompositionContract, Object)

Retornará a exportação que corresponde ao contrato especificado ou retornará null se nenhuma correspondência for encontrada.Returns the export that matches the specified contract, or returns null if no match is found.

public:
 abstract bool TryGetExport(System::Composition::Hosting::Core::CompositionContract ^ contract, [Runtime::InteropServices::Out] System::Object ^ % export);
public abstract bool TryGetExport (System.Composition.Hosting.Core.CompositionContract contract, out object export);
abstract member TryGetExport : System.Composition.Hosting.Core.CompositionContract * obj -> bool
Public MustOverride Function TryGetExport (contract As CompositionContract, ByRef export As Object) As Boolean

Parâmetros

contract
CompositionContract

O contrato a ser correspondido.The contract to match.

export
Object

Quando este método retorna, contém a exportação correspondente ou null.When this method returns, contains the matched export or null.

Retornos

Boolean

true se uma exportação foi encontrada; do contrário, false.true if an export was found; otherwise, false.

Exceções

Nenhuma exportação foi encontrada para contract.No export was found for contract.

Aplica-se a

TryGetExport(Type, Object)

Retornará a exportação que corresponde ao tipo especificado ou retornará null se nenhuma correspondência for encontrada.Returns the export that matches the specified type, or returns null if no match is found.

public:
 bool TryGetExport(Type ^ exportType, [Runtime::InteropServices::Out] System::Object ^ % export);
public bool TryGetExport (Type exportType, out object export);
member this.TryGetExport : Type * obj -> bool
Public Function TryGetExport (exportType As Type, ByRef export As Object) As Boolean

Parâmetros

exportType
Type

O tipo a ser comparado.The type to match.

export
Object

Quando este método retorna, contém a exportação correspondente ou null.When this method returns, contains the matched export or null.

Retornos

Boolean

true se uma exportação foi encontrada; do contrário, false.true if an export was found; otherwise, false.

Exceções

Nenhuma exportação foi encontrada para contract.No export was found for contract.

Aplica-se a

TryGetExport(Type, String, Object)

Retornará a exportação que corresponde ao nome e tipo do contrato especificado ou retornará null se nenhuma correspondência for encontrada.Returns the export that matches the specified contract name and type, or returns null if no match is found.

public:
 bool TryGetExport(Type ^ exportType, System::String ^ contractName, [Runtime::InteropServices::Out] System::Object ^ % export);
public bool TryGetExport (Type exportType, string contractName, out object export);
member this.TryGetExport : Type * string * obj -> bool
Public Function TryGetExport (exportType As Type, contractName As String, ByRef export As Object) As Boolean

Parâmetros

exportType
Type

O tipo a ser comparado.The type to match.

contractName
String

O nome a ser comparado.The name to match.

export
Object

Quando este método retorna, contém a exportação correspondente ou null.When this method returns, contains the matched export or null.

Retornos

Boolean

true se uma exportação foi encontrada; do contrário, false.true if an export was found; otherwise, false.

Exceções

Nenhuma exportação foi encontrada para contract.No export was found for contract.

Aplica-se a

TryGetExport<TExport>(TExport)

Retornará a exportação que corresponde ao parâmetro de tipo genérico especificado, ou retornará null, se nenhuma correspondência for encontrada.Returns the export that matches the specified generic type parameter, or returns null if no match is found.

public:
generic <typename TExport>
 bool TryGetExport([Runtime::InteropServices::Out] TExport % export);
public bool TryGetExport<TExport> (out TExport export);
member this.TryGetExport : 'Export -> bool
Public Function TryGetExport(Of TExport) (ByRef export As TExport) As Boolean

Parâmetros de tipo

TExport

O tipo a ser comparado.The type to match.

Parâmetros

export
TExport

Quando este método retorna, contém a exportação correspondente ou null.When this method returns, contains the matched export or null.

Retornos

Boolean

true se uma exportação foi encontrada; do contrário, false.true if an export was found; otherwise, false.

Exceções

Nenhuma exportação foi encontrada para contract.No export was found for contract.

Aplica-se a

TryGetExport<TExport>(String, TExport)

Retornará a exportação que corresponde ao parâmetro de tipo genérico e ao nome do contrato especificados ou retornará null se nenhuma correspondência for encontrada.Returns the export that matches the specified generic type parameter and contract name, or returns null if no match is found.

public:
generic <typename TExport>
 bool TryGetExport(System::String ^ contractName, [Runtime::InteropServices::Out] TExport % export);
public bool TryGetExport<TExport> (string contractName, out TExport export);
member this.TryGetExport : string * 'Export -> bool
Public Function TryGetExport(Of TExport) (contractName As String, ByRef export As TExport) As Boolean

Parâmetros de tipo

TExport

O tipo a ser comparado.The type to match.

Parâmetros

contractName
String

O nome a ser comparado.The name to match.

export
TExport

Quando este método retorna, contém a exportação correspondente ou null.When this method returns, contains the matched export or null.

Retornos

Boolean

true se uma exportação foi encontrada; do contrário, false.true if an export was found; otherwise, false.

Exceções

Nenhuma exportação foi encontrada para contract.No export was found for contract.

Aplica-se a