MetadataResolver.BeginResolve Método

Definição

Inicia uma chamada assíncrona que resolve um endereço de metadados em uma coleção de objetos ServiceEndpoint para esse serviço.Begins an asynchronous call that resolves a metadata address into a collection of ServiceEndpoint objects for that service.

Sobrecargas

BeginResolve(IEnumerable<ContractDescription>, EndpointAddress, AsyncCallback, Object)

Inicia uma chamada assíncrona que resolve um endereço de metadados nos objetos ServiceEndpoint para os contratos especificados, usando o endereço especificado e o representante e o estado assíncrono.Begins an asynchronous call that resolves a metadata address into the ServiceEndpoint objects for the specified contracts, using the specified address and asynchronous state and delegate.

BeginResolve(Type, EndpointAddress, AsyncCallback, Object)

Inicia uma chamada assíncrona que resolve um endereço de metadados nos objetos ServiceEndpoint para o contrato especificado, usando o endereço especificado e o representante e o estado assíncrono.Begins an asynchronous call that resolves a metadata address into the ServiceEndpoint objects for the specified contract using the specified address and asynchronous state and delegate.

BeginResolve(IEnumerable<ContractDescription>, EndpointAddress, MetadataExchangeClient, AsyncCallback, Object)

Inicia uma chamada assíncrona que resolve um endereço de metadados nos objetos ServiceEndpoint para os contratos especificados, usando o endereço especificado, MetadataExchangeClient e o representante e o estado assíncrono.Begins an asynchronous call that resolves a metadata address into the ServiceEndpoint objects for the specified contracts, using the specified address, MetadataExchangeClient, asynchronous state and delegate.

BeginResolve(IEnumerable<ContractDescription>, Uri, MetadataExchangeClientMode, AsyncCallback, Object)

Inicia uma chamada assíncrona que resolve um endereço de metadados nos objetos ServiceEndpoint para os contratos especificados, usando o endereço especificado, o valor MetadataExchangeClientMode e o representante e o estado assíncrono.Begins an asynchronous call that resolves a metadata address into the ServiceEndpoint objects for the specified contracts, using the specified address, MetadataExchangeClientMode value, asynchronous state and delegate.

BeginResolve(Type, Uri, MetadataExchangeClientMode, AsyncCallback, Object)

Inicia uma chamada assíncrona que resolve um endereço de metadados nos objetos ServiceEndpoint para o contrato especificado, usando o endereço especificado, MetadataExchangeClientMode e o representante e o estado assíncrono.Begins an asynchronous call that resolves a metadata address into the ServiceEndpoint objects for the specified contract, using the specified address, MetadataExchangeClientMode, asynchronous state and delegate.

BeginResolve(IEnumerable<ContractDescription>, Uri, MetadataExchangeClientMode, MetadataExchangeClient, AsyncCallback, Object)

Inicia uma chamada assíncrona que resolve um endereço de metadados nos objetos ServiceEndpoint para os contratos especificados, usando o endereço especificado, MetadataExchangeClient, MetadataExchangeClientMode e o representante e o estado assíncrono.Begins an asynchronous call that resolves a metadata address into the ServiceEndpoint objects for the specified contracts, using the specified address, MetadataExchangeClient, MetadataExchangeClientMode, asynchronous state, and delegate.

Comentários

Esses métodos iniciam versões assíncronas dos Resolve métodos.These methods begin asynchronous versions of the Resolve methods.

BeginResolve(IEnumerable<ContractDescription>, EndpointAddress, AsyncCallback, Object)

Inicia uma chamada assíncrona que resolve um endereço de metadados nos objetos ServiceEndpoint para os contratos especificados, usando o endereço especificado e o representante e o estado assíncrono.Begins an asynchronous call that resolves a metadata address into the ServiceEndpoint objects for the specified contracts, using the specified address and asynchronous state and delegate.

public:
 static IAsyncResult ^ BeginResolve(System::Collections::Generic::IEnumerable<System::ServiceModel::Description::ContractDescription ^> ^ contracts, System::ServiceModel::EndpointAddress ^ address, AsyncCallback ^ callback, System::Object ^ asyncState);
public static IAsyncResult BeginResolve (System.Collections.Generic.IEnumerable<System.ServiceModel.Description.ContractDescription> contracts, System.ServiceModel.EndpointAddress address, AsyncCallback callback, object asyncState);
static member BeginResolve : seq<System.ServiceModel.Description.ContractDescription> * System.ServiceModel.EndpointAddress * AsyncCallback * obj -> IAsyncResult
Public Shared Function BeginResolve (contracts As IEnumerable(Of ContractDescription), address As EndpointAddress, callback As AsyncCallback, asyncState As Object) As IAsyncResult

Parâmetros

contracts
IEnumerable<ContractDescription>

Os contratos para os quais metadados serão baixados e resolvidos.The contracts for which to download and resolve metadata.

address
EndpointAddress

O endereço dos metadados.The metadata address.

callback
AsyncCallback

O representante de retorno de chamada assíncrona que é invocado quando a chamada é concluída.The asynchronous callback delegate invoked when the call is complete.

asyncState
Object

O estado associado à chamada assíncrona.The state associated with the asynchronous call.

Retornos

IAsyncResult

O IAsyncResult que faz referência à operação de resolução assíncrona.The IAsyncResult that references the asynchronous resolve operation.

Exceções

O endereço, contrato ou retorno de chamada é null.The address, contract, or callback is null.

contracts está vazio, pelo menos um membro de contracts é null ou contracts contém mais de um contrato com o mesmo nome e namespace.contracts is empty, at least one member of contracts is null, or contracts contains more than one contract with the same name and namespace.

Comentários

As configurações padrão no System.ServiceModel.Description.MetadataExchangeClient são usadas para recuperar os metadados e o padrão System.ServiceModel.Description.MetadataExchangeClientMode é MetadataExchangeClientMode.MetadataExchange .The default settings on the System.ServiceModel.Description.MetadataExchangeClient are used to retrieve the metadata and the default System.ServiceModel.Description.MetadataExchangeClientMode is MetadataExchangeClientMode.MetadataExchange.

Para baixar metadados, mas não resolver as informações em ServiceEndpoint objetos, use o System.ServiceModel.Description.MetadataExchangeClient diretamente.To download metadata but not resolve the information into ServiceEndpoint objects, use the System.ServiceModel.Description.MetadataExchangeClient directly.

Observação

Uma coleção vazia é retornada se nenhum ponto de extremidade foi importado ou se nenhum ponto de extremidade correspondeu ao contrato.An empty collection is returned if no endpoints were imported or if no endpoints matched the contract. Se uma coleção vazia for retornada, um rastreamento de aviso será gravado.If an empty collection is returned, a warning trace is written.

Aplica-se a

BeginResolve(Type, EndpointAddress, AsyncCallback, Object)

Inicia uma chamada assíncrona que resolve um endereço de metadados nos objetos ServiceEndpoint para o contrato especificado, usando o endereço especificado e o representante e o estado assíncrono.Begins an asynchronous call that resolves a metadata address into the ServiceEndpoint objects for the specified contract using the specified address and asynchronous state and delegate.

public:
 static IAsyncResult ^ BeginResolve(Type ^ contract, System::ServiceModel::EndpointAddress ^ address, AsyncCallback ^ callback, System::Object ^ asyncState);
public static IAsyncResult BeginResolve (Type contract, System.ServiceModel.EndpointAddress address, AsyncCallback callback, object asyncState);
static member BeginResolve : Type * System.ServiceModel.EndpointAddress * AsyncCallback * obj -> IAsyncResult
Public Shared Function BeginResolve (contract As Type, address As EndpointAddress, callback As AsyncCallback, asyncState As Object) As IAsyncResult

Parâmetros

contract
Type

O contrato para o qual metadados serão baixados e resolvidos.The contract for which to download and resolve metadata.

address
EndpointAddress

O endereço dos metadados.The metadata address.

callback
AsyncCallback

O representante de retorno de chamada assíncrona que é invocado quando a chamada é concluída.The asynchronous callback delegate invoked when the call is complete.

asyncState
Object

O estado associado à chamada assíncrona.The state associated with the asynchronous call.

Retornos

IAsyncResult

O IAsyncResult que faz referência à operação de resolução assíncrona.The IAsyncResult that references the asynchronous resolve operation.

Exceções

O endereço, contrato ou retorno de chamada é null.The address, contract, or callback is null.

Comentários

As configurações padrão no System.ServiceModel.Description.MetadataExchangeClient são usadas para recuperar os metadados e o padrão System.ServiceModel.Description.MetadataExchangeClientMode é MetadataExchangeClientMode.MetadataExchange .The default settings on the System.ServiceModel.Description.MetadataExchangeClient are used to retrieve the metadata and the default System.ServiceModel.Description.MetadataExchangeClientMode is MetadataExchangeClientMode.MetadataExchange.

Para baixar metadados, mas não resolver as informações em ServiceEndpoint objetos, use o System.ServiceModel.Description.MetadataExchangeClient diretamente.To download metadata but not resolve the information into ServiceEndpoint objects, use the System.ServiceModel.Description.MetadataExchangeClient directly.

Observação

Uma coleção vazia é retornada se nenhum ponto de extremidade foi importado ou se nenhum ponto de extremidade correspondeu ao contrato.An empty collection is returned if no endpoints were imported or if no endpoints matched the contract. Se uma coleção vazia for retornada, um rastreamento de aviso será gravado.If an empty collection is returned, a warning trace is written.

Esse método requer que você especifique um tipo de contrato.This method requires that you specify a contract type. Você pode especificar o contrato declarando a interface do serviço no código do cliente ou usando um cliente WCF gerado pelo Svcutil.exe.You can specify the contract by declaring the service interface in the client code or by using a WCF client generated by Svcutil.exe. Se a interface for alterada (adicionando uma nova operação, por exemplo), você deverá atualizar a interface no código do cliente ou gerar um novo cliente WCF.If the interface changes (adding a new operation, for example) you must update the interface in the client code or generate a new WCF client. Se você não fizer isso, uma exceção será lançada.If you do not, an exception is thrown. Por exemplo, você tem um serviço que implementa um contrato de serviço chamado ICalculator que define Add (), sub (), mult () e div ().For example, you have a service that implements a service contract called ICalculator that defines Add(), Sub(), Mult(), and Div(). Você cria um aplicativo cliente e gera o cliente WCF.You create a client application and generate WCF client. Em seguida, você adiciona um método a ICalculator chamado Echo ().You then add a method to ICalculator called Echo(). Se você escrever um aplicativo que chama Resolve(Type, EndpointAddress) sem gerar um novo cliente WCF, obterá a seguinte exceção.If you then write an application that calls Resolve(Type, EndpointAddress) without generating a new WCF client you get the following exception.

Unhandled Exception: System.ServiceModel.Description.WsdlImporter+WsdlImportException: Cannot locate operation Echo in Contract ICalculator.Unhandled Exception: System.ServiceModel.Description.WsdlImporter+WsdlImportException: Cannot locate operation Echo in Contract ICalculator.

Aplica-se a

BeginResolve(IEnumerable<ContractDescription>, EndpointAddress, MetadataExchangeClient, AsyncCallback, Object)

Inicia uma chamada assíncrona que resolve um endereço de metadados nos objetos ServiceEndpoint para os contratos especificados, usando o endereço especificado, MetadataExchangeClient e o representante e o estado assíncrono.Begins an asynchronous call that resolves a metadata address into the ServiceEndpoint objects for the specified contracts, using the specified address, MetadataExchangeClient, asynchronous state and delegate.

public:
 static IAsyncResult ^ BeginResolve(System::Collections::Generic::IEnumerable<System::ServiceModel::Description::ContractDescription ^> ^ contracts, System::ServiceModel::EndpointAddress ^ address, System::ServiceModel::Description::MetadataExchangeClient ^ client, AsyncCallback ^ callback, System::Object ^ asyncState);
public static IAsyncResult BeginResolve (System.Collections.Generic.IEnumerable<System.ServiceModel.Description.ContractDescription> contracts, System.ServiceModel.EndpointAddress address, System.ServiceModel.Description.MetadataExchangeClient client, AsyncCallback callback, object asyncState);
static member BeginResolve : seq<System.ServiceModel.Description.ContractDescription> * System.ServiceModel.EndpointAddress * System.ServiceModel.Description.MetadataExchangeClient * AsyncCallback * obj -> IAsyncResult
Public Shared Function BeginResolve (contracts As IEnumerable(Of ContractDescription), address As EndpointAddress, client As MetadataExchangeClient, callback As AsyncCallback, asyncState As Object) As IAsyncResult

Parâmetros

contracts
IEnumerable<ContractDescription>

Os contratos para os quais metadados serão baixados e resolvidos.The contracts for which to download and resolve metadata.

address
EndpointAddress

O endereço dos metadados.The metadata address.

client
MetadataExchangeClient

O MetadataExchangeClient usado para recuperar os metadados.The MetadataExchangeClient used to retrieve the metadata.

callback
AsyncCallback

O representante de retorno de chamada assíncrona que é invocado quando a chamada é concluída.The asynchronous callback delegate invoked when the call is complete.

asyncState
Object

O estado associado à chamada assíncrona.The state associated with the asynchronous call.

Retornos

IAsyncResult

O IAsyncResult que faz referência à operação de resolução assíncrona.The IAsyncResult that references the asynchronous resolve operation.

Exceções

O endereço, contrato, cliente ou retorno de chamada é null.The address, contract, client, or callback is null.

contracts está vazio, pelo menos um membro de contracts é nulo ou contracts contém mais de um contrato com o mesmo nome e namespace.contracts is empty, at least one member of contracts is null, or contracts contains more than one contract with the same name and namespace.

Comentários

O valor padrão System.ServiceModel.Description.MetadataExchangeClientMode é MetadataExchangeClientMode.MetadataExchange.The default System.ServiceModel.Description.MetadataExchangeClientMode is MetadataExchangeClientMode.MetadataExchange.

Para baixar metadados, mas não resolver as informações em ServiceEndpoint objetos, use o System.ServiceModel.Description.MetadataExchangeClient diretamente.To download metadata but not resolve the information into ServiceEndpoint objects, use the System.ServiceModel.Description.MetadataExchangeClient directly.

Observação

Uma coleção vazia é retornada se nenhum ponto de extremidade foi importado ou se nenhum ponto de extremidade correspondeu ao contrato.An empty collection is returned if no endpoints were imported or if no endpoints matched the contract. Se uma coleção vazia for retornada, um rastreamento de aviso será gravado.If an empty collection is returned, a warning trace is written.

Aplica-se a

BeginResolve(IEnumerable<ContractDescription>, Uri, MetadataExchangeClientMode, AsyncCallback, Object)

Inicia uma chamada assíncrona que resolve um endereço de metadados nos objetos ServiceEndpoint para os contratos especificados, usando o endereço especificado, o valor MetadataExchangeClientMode e o representante e o estado assíncrono.Begins an asynchronous call that resolves a metadata address into the ServiceEndpoint objects for the specified contracts, using the specified address, MetadataExchangeClientMode value, asynchronous state and delegate.

public:
 static IAsyncResult ^ BeginResolve(System::Collections::Generic::IEnumerable<System::ServiceModel::Description::ContractDescription ^> ^ contracts, Uri ^ address, System::ServiceModel::Description::MetadataExchangeClientMode mode, AsyncCallback ^ callback, System::Object ^ asyncState);
public static IAsyncResult BeginResolve (System.Collections.Generic.IEnumerable<System.ServiceModel.Description.ContractDescription> contracts, Uri address, System.ServiceModel.Description.MetadataExchangeClientMode mode, AsyncCallback callback, object asyncState);
static member BeginResolve : seq<System.ServiceModel.Description.ContractDescription> * Uri * System.ServiceModel.Description.MetadataExchangeClientMode * AsyncCallback * obj -> IAsyncResult
Public Shared Function BeginResolve (contracts As IEnumerable(Of ContractDescription), address As Uri, mode As MetadataExchangeClientMode, callback As AsyncCallback, asyncState As Object) As IAsyncResult

Parâmetros

contracts
IEnumerable<ContractDescription>

Os contratos para os quais metadados serão baixados e resolvidos.The contracts for which to download and resolve metadata.

address
Uri

O endereço dos metadados.The metadata address.

mode
MetadataExchangeClientMode

O modo de recuperação.The mode of retrieval.

callback
AsyncCallback

O representante de retorno de chamada assíncrona que é invocado quando a chamada é concluída.The asynchronous callback delegate invoked when the call is complete.

asyncState
Object

O estado associado à chamada assíncrona.The state associated with the asynchronous call.

Retornos

IAsyncResult

O IAsyncResult que faz referência à operação de resolução assíncrona.The IAsyncResult that references the asynchronous resolve operation.

Exceções

O endereço, contrato ou retorno de chamada é null.The address, contract, or callback is null.

contracts está vazio, pelo menos um membro de contracts é nulo ou contracts contém mais de um contrato com o mesmo nome e namespace.contracts is empty, at least one member of contracts is null, or contracts contains more than one contract with the same name and namespace.

Comentários

As configurações padrão no System.ServiceModel.Description.MetadataExchangeClient são usadas para recuperar os metadados.The default settings on the System.ServiceModel.Description.MetadataExchangeClient are used to retrieve the metadata.

Para baixar metadados, mas não resolver as informações em ServiceEndpoint objetos, use o System.ServiceModel.Description.MetadataExchangeClient diretamente.To download metadata but not resolve the information into ServiceEndpoint objects, use the System.ServiceModel.Description.MetadataExchangeClient directly.

Observação

Uma coleção vazia é retornada se nenhum ponto de extremidade foi importado ou se nenhum ponto de extremidade correspondeu ao contrato.An empty collection is returned if no endpoints were imported or if no endpoints matched the contract. Se uma coleção vazia for retornada, um rastreamento de aviso será gravado.If an empty collection is returned, a warning trace is written.

Aplica-se a

BeginResolve(Type, Uri, MetadataExchangeClientMode, AsyncCallback, Object)

Inicia uma chamada assíncrona que resolve um endereço de metadados nos objetos ServiceEndpoint para o contrato especificado, usando o endereço especificado, MetadataExchangeClientMode e o representante e o estado assíncrono.Begins an asynchronous call that resolves a metadata address into the ServiceEndpoint objects for the specified contract, using the specified address, MetadataExchangeClientMode, asynchronous state and delegate.

public:
 static IAsyncResult ^ BeginResolve(Type ^ contract, Uri ^ address, System::ServiceModel::Description::MetadataExchangeClientMode mode, AsyncCallback ^ callback, System::Object ^ asyncState);
public static IAsyncResult BeginResolve (Type contract, Uri address, System.ServiceModel.Description.MetadataExchangeClientMode mode, AsyncCallback callback, object asyncState);
static member BeginResolve : Type * Uri * System.ServiceModel.Description.MetadataExchangeClientMode * AsyncCallback * obj -> IAsyncResult
Public Shared Function BeginResolve (contract As Type, address As Uri, mode As MetadataExchangeClientMode, callback As AsyncCallback, asyncState As Object) As IAsyncResult

Parâmetros

contract
Type

O contrato para o qual metadados serão baixados e resolvidos.The contract for which to download and resolve metadata.

address
Uri

O endereço dos metadados.The metadata address.

mode
MetadataExchangeClientMode

O modo de recuperação.The mode of retrieval.

callback
AsyncCallback

O representante de retorno de chamada assíncrona que é invocado quando a chamada é concluída.The asynchronous callback delegate invoked when the call is complete.

asyncState
Object

O estado associado à chamada assíncrona.The state associated with the asynchronous call.

Retornos

IAsyncResult

O IAsyncResult que faz referência à operação de resolução assíncrona.The IAsyncResult that references the asynchronous resolve operation.

Exceções

O endereço, contrato ou retorno de chamada é null.The address, contract, or callback is null.

Comentários

As configurações padrão no System.ServiceModel.Description.MetadataExchangeClient são usadas para recuperar os metadados.The default settings on the System.ServiceModel.Description.MetadataExchangeClient are used to retrieve the metadata.

Para baixar metadados, mas não resolver as informações em ServiceEndpoint objetos, use o System.ServiceModel.Description.MetadataExchangeClient diretamente.To download metadata but not resolve the information into ServiceEndpoint objects, use the System.ServiceModel.Description.MetadataExchangeClient directly.

Observação

Uma coleção vazia é retornada se nenhum ponto de extremidade foi importado ou se nenhum ponto de extremidade correspondeu ao contrato.An empty collection is returned if no endpoints were imported or if no endpoints matched the contract. Se uma coleção vazia for retornada, um rastreamento de aviso será gravado.If an empty collection is returned, a warning trace is written.

Aplica-se a

BeginResolve(IEnumerable<ContractDescription>, Uri, MetadataExchangeClientMode, MetadataExchangeClient, AsyncCallback, Object)

Inicia uma chamada assíncrona que resolve um endereço de metadados nos objetos ServiceEndpoint para os contratos especificados, usando o endereço especificado, MetadataExchangeClient, MetadataExchangeClientMode e o representante e o estado assíncrono.Begins an asynchronous call that resolves a metadata address into the ServiceEndpoint objects for the specified contracts, using the specified address, MetadataExchangeClient, MetadataExchangeClientMode, asynchronous state, and delegate.

public:
 static IAsyncResult ^ BeginResolve(System::Collections::Generic::IEnumerable<System::ServiceModel::Description::ContractDescription ^> ^ contracts, Uri ^ address, System::ServiceModel::Description::MetadataExchangeClientMode mode, System::ServiceModel::Description::MetadataExchangeClient ^ client, AsyncCallback ^ callback, System::Object ^ asyncState);
public static IAsyncResult BeginResolve (System.Collections.Generic.IEnumerable<System.ServiceModel.Description.ContractDescription> contracts, Uri address, System.ServiceModel.Description.MetadataExchangeClientMode mode, System.ServiceModel.Description.MetadataExchangeClient client, AsyncCallback callback, object asyncState);
static member BeginResolve : seq<System.ServiceModel.Description.ContractDescription> * Uri * System.ServiceModel.Description.MetadataExchangeClientMode * System.ServiceModel.Description.MetadataExchangeClient * AsyncCallback * obj -> IAsyncResult
Public Shared Function BeginResolve (contracts As IEnumerable(Of ContractDescription), address As Uri, mode As MetadataExchangeClientMode, client As MetadataExchangeClient, callback As AsyncCallback, asyncState As Object) As IAsyncResult

Parâmetros

contracts
IEnumerable<ContractDescription>

Os contratos para os quais metadados serão baixados e resolvidos.The contracts for which to download and resolve metadata.

address
Uri

O endereço dos metadados.The metadata address.

mode
MetadataExchangeClientMode

O modo de recuperação.The mode of retrieval.

client
MetadataExchangeClient

O MetadataExchangeClient usado para recuperar os metadados.The MetadataExchangeClient used to retrieve the metadata.

callback
AsyncCallback

O representante de retorno de chamada assíncrona que é invocado quando a chamada é concluída.The asynchronous callback delegate invoked when the call is complete.

asyncState
Object

O estado associado à chamada assíncrona.The state associated with the asynchronous call.

Retornos

IAsyncResult

O IAsyncResult que faz referência à operação de resolução assíncrona.The IAsyncResult that references the asynchronous resolve operation.

Exceções

O endereço, contrato ou retorno de chamada é null.The address, contract, or callback is null.

contracts está vazio, pelo menos um membro de contracts é nulo ou contracts contém mais de um contrato com o mesmo nome e namespace.contracts is empty, at least one member of contracts is null, or contracts contains more than one contract with the same name and namespace.

Comentários

Para baixar metadados, mas não resolver as informações em ServiceEndpoint objetos, use o System.ServiceModel.Description.MetadataExchangeClient diretamente.To download metadata but not resolve the information into ServiceEndpoint objects, use the System.ServiceModel.Description.MetadataExchangeClient directly.

Observação

Uma coleção vazia é retornada se nenhum ponto de extremidade foi importado ou se nenhum ponto de extremidade correspondeu ao contrato.An empty collection is returned if no endpoints were imported or if no endpoints matched the contract. Se uma coleção vazia for retornada, um rastreamento de aviso será gravado.If an empty collection is returned, a warning trace is written.

Aplica-se a