ContractReference 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 ContractReference 類別的新執行個體。
多載
ContractReference() |
使用預設值,初始化 ContractReference 類別的新執行個體。 |
ContractReference(String) |
使用提供的服務描述的參考,初始化 ContractReference 類別的新執行個體。 |
ContractReference(String, String) |
使用提供的服務描述的參考和實作服務描述的 XML Web Service,初始化 ContractReference 類別的新執行個體。 |
ContractReference()
使用預設值,初始化 ContractReference 類別的新執行個體。
public:
ContractReference();
public ContractReference ();
Public Sub New ()
範例
下列程式碼範例會建立 的新實例 ContractReference 。
// Call the Constructor of ContractReference.
ContractReference^ myContractReference = gcnew ContractReference;
// Call the Constructor of ContractReference.
ContractReference myContractReference = new ContractReference();
' Call the Constructor of ContractReference.
Dim myContractReference As New ContractReference()
備註
使用此建構函式,使用預設值建立和初始化 類別的新實例 ContractReference 。
適用於
ContractReference(String)
使用提供的服務描述的參考,初始化 ContractReference 類別的新執行個體。
public:
ContractReference(System::String ^ href);
public ContractReference (string href);
new System.Web.Services.Discovery.ContractReference : string -> System.Web.Services.Discovery.ContractReference
Public Sub New (href As String)
參數
範例
// Create a ContractReference using a reference to a service description.
ContractReference^ myContractReference = gcnew ContractReference(
"http://localhost/Service1::asmx?wsdl" );
// Create a ContractReference using a reference to a service description.
ContractReference myContractReference = new ContractReference
("http://localhost/Service1.asmx?wsdl");
'Create a ContractReference using a reference to a service description.
Dim myContractReference As _
New ContractReference("http://localhost/Service1.asmx?wsdl")
備註
使用此建構函式,使用指定的參考名稱來建立和初始化 類別的新實例 ContractReference 。
下表顯示 實例 ContractReference 的初始屬性值。
屬性 | 初始值 |
---|---|
Ref |
href 表示參考名稱的參數。 |
適用於
ContractReference(String, String)
使用提供的服務描述的參考和實作服務描述的 XML Web Service,初始化 ContractReference 類別的新執行個體。
public:
ContractReference(System::String ^ href, System::String ^ docRef);
public ContractReference (string href, string docRef);
new System.Web.Services.Discovery.ContractReference : string * string -> System.Web.Services.Discovery.ContractReference
Public Sub New (href As String, docRef As String)
參數
範例
// Create a ContractReference using a service description and
// an XML Web service.
ContractReference^ myContractReference = gcnew ContractReference(
"http://localhost/Service1::asmx?wsdl","http://localhost/Service1::asmx" );
// Create a ContractReference using a service description and
// an XML Web service.
ContractReference myContractReference = new ContractReference
("http://localhost/Service1.asmx?wsdl",
"http://localhost/Service1.asmx");
' Create a ContractReference using a service description
' and an XML Web service.
Dim myContractReference As New ContractReference _
("http://localhost/Service1.asmx?wsdl", _
"http://localhost/Service1.asmx")
備註
使用此建構函式,使用指定的參考名稱和 docRef
,建立和初始化 類別的新實例 ContractReference 。
下表顯示 實例 ContractReference 的初始屬性值。
屬性 | 初始值 |
---|---|
Ref |
href 表示參考名稱的參數。 |
DocRef |
docRef 表示 DocRef 的參數。 |