Επεξεργασία

Κοινή χρήση μέσω


WsdlImporter.ImportContract(PortType) Method

Definition

Returns a ContractDescription object that represents metadata located by the specified port type information.

public:
 System::ServiceModel::Description::ContractDescription ^ ImportContract(System::Web::Services::Description::PortType ^ wsdlPortType);
public System.ServiceModel.Description.ContractDescription ImportContract (System.Web.Services.Description.PortType wsdlPortType);
member this.ImportContract : System.Web.Services.Description.PortType -> System.ServiceModel.Description.ContractDescription
Public Function ImportContract (wsdlPortType As PortType) As ContractDescription

Parameters

wsdlPortType
PortType

A PortType object that represents the desired port type.

Returns

A ContractDescription object that represents metadata located by the specified port type information.

Exceptions

The WsdlImporter has encountered an error.

The port type is null.

Remarks

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.

Applies to