WsdlImporter.ImportContract(PortType) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
傳回 ContractDescription 物件,這個物件表示由已指定連接埠類型資訊所找到的中繼資料。
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
參數
傳回
ContractDescription 物件,這個物件表示由已指定連接埠類型資訊所找到的中繼資料。
例外狀況
連接埠類型為 null
。
備註
使用 ImportContract 方法,即可使用 System.Web.Services.Description.PortType 物件在中繼資料中找出連接埠類型資訊,並將該繫結資訊當做 ContractDescription 物件傳回。 使用傳回的物件之前,請先檢查 Errors 屬性以判斷是否有任何匯入錯誤。
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應