WsdlImporter::ImportContract Method (PortType^)
.NET Framework (current version)
Returns a ContractDescription object that represents metadata located by the specified port type information.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
Parameters
- wsdlPortType
-
Type:
System.Web.Services.Description::PortType^
A System.Web.Services.Description::PortType object that represents the desired port type.
Return Value
Type: System.ServiceModel.Description::ContractDescription^A ContractDescription object that represents metadata located by the specified port type information.
| Exception | Condition |
|---|---|
| InvalidOperationException | The WsdlImporter has encountered an error. |
| ArgumentNullException | The port type is null. |
Use the ImportContract method to use a System.Web.Services.Description::PortType object to locate port type information in the metadata and return that information as a ContractDescription object. Check the Errors property to determine whether there are any import errors before using the returned object.
.NET Framework
Available since 3.0
Available since 3.0
Show: