Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MetadataExchangeClientMode Enumeration
Collapse the table of content
Expand the table of content

MetadataExchangeClientMode Enumeration

Specifies the exchange mode used to obtain metadata.

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

public enum MetadataExchangeClientMode

Member nameDescription
HttpGetAn HTTP GET request is used.
MetadataExchangeA WS-Transfer Get request is used.

Use the MetadataExchangeClientMode with the System.ServiceModel.Description.MetadataExchangeClient to specify whether metadata is downloaded using an HTTP GET or WS-Transfer Get request.

The following code example shows the use of MetadataExchangeClient to specify a download binding, resolve any contained references to metadata, and download the metadata.

// Get metadata documents.
Console.WriteLine("URI of the metadata documents retreived:");
MetadataExchangeClient metaTransfer 
  = new MetadataExchangeClient(httpGetMetaAddress.Uri, MetadataExchangeClientMode.HttpGet);
metaTransfer.ResolveMetadataReferences = true;
MetadataSet otherDocs = metaTransfer.GetMetadata();
foreach (MetadataSection doc in otherDocs.MetadataSections)
  Console.WriteLine(doc.Dialect + " : " + doc.Identifier);

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft