Upravit

Sdílet prostřednictvím


ContractReference Constructors

Definition

Initializes a new instance of the ContractReference class.

Overloads

ContractReference()

Initializes a new instance of the ContractReference class using default values.

ContractReference(String)

Initializes a new instance of the ContractReference class using the supplied reference to a Service Description.

ContractReference(String, String)

Initializes a new instance of the ContractReference class using the supplied references to a service description and a XML Web service implementing the service description.

ContractReference()

Initializes a new instance of the ContractReference class using default values.

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

Examples

The following code example creates a new instance of 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()

Remarks

Use this constructor to create and initialize a new instance of the ContractReference class using default values.

Applies to

ContractReference(String)

Initializes a new instance of the ContractReference class using the supplied reference to a Service Description.

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)

Parameters

href
String

The URL for a Service Description. Initializes the Ref property value.

Examples

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

Remarks

Use this constructor to create and initialize a new instance of the ContractReference class using the specified reference name.

The following table shows initial property values for an instance of ContractReference.

Property Initial Value
Ref The href parameter that represents the reference name.

Applies to

ContractReference(String, String)

Initializes a new instance of the ContractReference class using the supplied references to a service description and a XML Web service implementing the service description.

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)

Parameters

href
String

The URL for a service description. Initializes the Ref property value.

docRef
String

The URL for a XML Web service implementing the service description at href. Initializes the DocRef property value.

Examples

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

Remarks

Use this constructor to create and initialize a new instance of the ContractReference class using the specified reference name and docRef.

The following table shows initial property values for an instance of ContractReference.

Property Initial Value
Ref The href parameter that represents the reference name.
DocRef The docRef parameter that represents the DocRef.

Applies to