Sdílet prostřednictvím


ContractReference Konstruktory

Definice

Inicializuje novou instanci ContractReference třídy.

Přetížení

ContractReference()

Inicializuje novou instanci ContractReference třídy pomocí výchozích hodnot.

ContractReference(String)

Inicializuje novou instanci ContractReference třídy pomocí zadaného odkazu na popis služby.

ContractReference(String, String)

Inicializuje novou instanci ContractReference třídy pomocí zadaných odkazů na popis služby a webové služby XML implementuje popis služby.

ContractReference()

Inicializuje novou instanci ContractReference třídy pomocí výchozích hodnot.

public:
 ContractReference();
public ContractReference ();
Public Sub New ()

Příklady

Následující příklad kódu vytvoří novou instanci 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()

Poznámky

Pomocí tohoto konstruktoru ContractReference vytvořte a inicializujete novou instanci třídy pomocí výchozích hodnot.

Platí pro

ContractReference(String)

Inicializuje novou instanci ContractReference třídy pomocí zadaného odkazu na popis služby.

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)

Parametry

href
String

Adresa URL popisu služby. Inicializuje Ref hodnotu vlastnosti.

Příklady

// 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")

Poznámky

Tento konstruktor použijte k vytvoření a inicializaci nové instance ContractReference třídy pomocí zadaného názvu odkazu.

Následující tabulka uvádí počáteční hodnoty vlastností pro instanci ContractReference.

Vlastnost Počáteční hodnota
Ref Parametr href , který představuje název odkazu.

Platí pro

ContractReference(String, String)

Inicializuje novou instanci ContractReference třídy pomocí zadaných odkazů na popis služby a webové služby XML implementuje popis služby.

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)

Parametry

href
String

Adresa URL popisu služby. Inicializuje Ref hodnotu vlastnosti.

docRef
String

Adresa URL webové služby XML implementuje popis služby na adrese href. Inicializuje DocRef hodnotu vlastnosti.

Příklady

// 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")

Poznámky

Pomocí tohoto konstruktoru ContractReference vytvořte a inicializujete novou instanci třídy pomocí zadaného názvu odkazu a docRef.

Následující tabulka uvádí počáteční hodnoty vlastností pro instanci ContractReference.

Vlastnost Počáteční hodnota
Ref Parametr href , který představuje název odkazu.
DocRef Parametr docRef , který představuje DocRef.

Platí pro