WsdlImporter Constructor (MetadataSet^)

 

Initializes a new instance of the WsdlImporter class.

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

public:
WsdlImporter(
	MetadataSet^ metadata
)

Parameters

metadata
Type: System.ServiceModel.Description::MetadataSet^

A collection of metadata documents from which to extract contract, endpoint, and binding information.

Use the WsdlImporter constructor to create a WsdlImporter object from a set of metadata documents.

The following code example shows the most common use of WsdlImporter class with the MetadataResolver class.

   MetadataExchangeClient mexClient = new MetadataExchangeClient(metadataAddress);
   mexClient.ResolveMetadataReferences = true;
   MetadataSet metaDocs = mexClient.GetMetadata();

WsdlImporter importer = new WsdlImporter(metaDocs);
   ServiceContractGenerator generator = new ServiceContractGenerator();

.NET Framework
Available since 3.0
Return to top
Show: