This documentation is archived and is not being maintained.

MetadataResolver.Resolve Method (Generic IEnumerable, Uri, MetadataExchangeClientMode)

Resolves a metadata address into the ServiceEndpoint objects for the specified contracts using the specified address and transfer mode.

Namespace: System.ServiceModel.Description
Assembly: System.ServiceModel (in system.servicemodel.dll)

public static ServiceEndpointCollection Resolve (
	IEnumerable<ContractDescription> contracts,
	Uri address,
	MetadataExchangeClientMode mode
)
public static ServiceEndpointCollection Resolve (
	IEnumerable<ContractDescription> contracts, 
	Uri address, 
	MetadataExchangeClientMode mode
)
public static function Resolve (
	contracts : IEnumerable<ContractDescription>, 
	address : Uri, 
	mode : MetadataExchangeClientMode
) : ServiceEndpointCollection
Not applicable.

Parameters

contracts

The contracts for which to download and resolve metadata.

address

The metadata address.

mode

The mode of retrieval.

Return Value

A collection of ServiceEndpoint objects for the specified contract.

Exception typeCondition

ArgumentNullException

The address or contracts collection is a null reference (Nothing in Visual Basic).

ArgumentException

contracts is empty, at least one member of contracts is null, or contracts contains more than one contract with the same name and namespace.

The default settings on the System.ServiceModel.Description.MetadataExchangeClient are used to retrieve the metadata.

If you want to download metadata but not resolve the information into ServiceEndpoint objects, use the System.ServiceModel.Description.MetadataExchangeClient directly.

NoteNote:

An empty collection is returned if no endpoints were imported or if no endpoints matched the contract. If an empty collection is returned, a warning trace is written.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0
Show: