共用方式為


DiscoveryClientResult 建構函式

定義

初始化 DiscoveryClientResult 類別的新執行個體。

多載

DiscoveryClientResult()

初始化 DiscoveryClientResult 類別的新執行個體。

DiscoveryClientResult(Type, String, String)

初始化 DiscoveryClientResult 類別的新執行個體,並將 ReferenceTypeName 屬性設定為 referenceTypeUrl 屬性設定為 urlFilename 屬性設定為 filename

DiscoveryClientResult()

初始化 DiscoveryClientResult 類別的新執行個體。

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

範例

// Initialize new instance of the DiscoveryClientResult class.
DiscoveryClientResult^ myDiscoveryClientResult = gcnew DiscoveryClientResult;

// Set the type of reference in the discovery document as 
// DiscoveryDocumentReference.
myDiscoveryClientResult->ReferenceTypeName = "System.Web.Services.Discovery.DiscoveryDocumentReference";

// Set the URL for the reference.
myDiscoveryClientResult->Url = "http://localhost/Discovery/Service1_cs.asmx?disco";

// Set the name of the file in which the reference is saved.
myDiscoveryClientResult->Filename = "Service1_cs.disco";

// Add the DiscoveryClientResult to the collection.
myDiscoveryClientResultCollection->Add( myDiscoveryClientResult );
// Initialize new instance of the DiscoveryClientResult class.
DiscoveryClientResult myDiscoveryClientResult =
    new DiscoveryClientResult();

// Set the type of reference in the discovery document as
// DiscoveryDocumentReference.
myDiscoveryClientResult.ReferenceTypeName =
    "System.Web.Services.Discovery.DiscoveryDocumentReference";

// Set the URL for the reference.
myDiscoveryClientResult.Url =
    "http://localhost/Discovery/Service1_cs.asmx?disco";

// Set the name of the file in which the reference is saved.
myDiscoveryClientResult.Filename = "Service1_cs.disco";

// Add the DiscoveryClientResult to the collection.
myDiscoveryClientResultCollection.Add(myDiscoveryClientResult);
' Initialize a new instance of the DiscoveryClientResult class.
Dim myDiscoveryClientResult As New DiscoveryClientResult()

' Set the type of reference in the discovery document as 
' DiscoveryDocumentReference.
myDiscoveryClientResult.ReferenceTypeName = _
    "System.Web.Services.Discovery.DiscoveryDocumentReference"

' Set the URL for the reference.
myDiscoveryClientResult.Url = _
    "http://localhost/Discovery/Service1_vb.asmx?disco"

' Set the name of the file in which the reference is saved.
myDiscoveryClientResult.Filename = "Service1_vb.disco"

' Add the DiscoveryClientResult to the collection.
myDiscoveryClientResultCollection.Add(myDiscoveryClientResult)

適用於

DiscoveryClientResult(Type, String, String)

初始化 DiscoveryClientResult 類別的新執行個體,並將 ReferenceTypeName 屬性設定為 referenceTypeUrl 屬性設定為 urlFilename 屬性設定為 filename

public:
 DiscoveryClientResult(Type ^ referenceType, System::String ^ url, System::String ^ filename);
public DiscoveryClientResult (Type referenceType, string url, string filename);
new System.Web.Services.Discovery.DiscoveryClientResult : Type * string * string -> System.Web.Services.Discovery.DiscoveryClientResult
Public Sub New (referenceType As Type, url As String, filename As String)

參數

referenceType
Type

類別的名稱,表示探索文件中的參考類型。 設定 ReferenceTypeName 屬性。

url
String

參考的 URL。 設定 Url 屬性。

filename
String

儲存參考的檔案名稱。 設定 Filename 屬性。

範例

// Initialize a new instance of the DiscoveryClientResult class.
DiscoveryClientResult^ myDiscoveryClientResult =
   gcnew DiscoveryClientResult( System::Web::Services::Discovery::DiscoveryDocumentReference::typeid,
   "http://localhost/Discovery/Service1_cs.asmx?disco","Service1_cs.disco" );

// Add the DiscoveryClientResult to the collection.
myDiscoveryClientResultCollection->Add( myDiscoveryClientResult );
// Initialize a new instance of the DiscoveryClientResult class.
DiscoveryClientResult myDiscoveryClientResult =
   new DiscoveryClientResult(
   typeof(System.Web.Services.Discovery.DiscoveryDocumentReference),
   "http://localhost/Discovery/Service1_cs.asmx?disco",
   "Service1_cs.disco");

// Add the DiscoveryClientResult to the collection.
myDiscoveryClientResultCollection.Add(myDiscoveryClientResult);
' Initialize a new instance of the DiscoveryClientResult class.
Dim myDiscoveryClientResult As New DiscoveryClientResult( _
   GetType(System.Web.Services.Discovery.DiscoveryDocumentReference), _
   "http://localhost/Discovery/Service1_vb.asmx?disco", _
   "Service1_vb.disco")

' Add the DiscoveryClientResult to the collection.
myDiscoveryClientResultCollection.Add(myDiscoveryClientResult)

適用於