DiscoveryClientResult クラス
アセンブリ: System.Web.Services (system.web.services.dll 内)


DiscoveryClientProtocol の WriteAll メソッドを使用すると、すべての有効な参照されるドキュメント、および保存されているすべてのドキュメントのマップが格納されているファイルを、ディスクに書き込むことができます。保存されているすべてのドキュメントのマップが格納されているファイルには、DiscoveryClientResult プロパティでまとめられた各ドキュメントの詳細が含まれています。
WriteAll メソッドを使用して参照されるドキュメントおよび参照されるドキュメントのマップをディスクに書き込んだ後で、ReadAll メソッドを呼び出して探索ドキュメントを読み取ることができます。

Imports System Imports System.Web.Services.Discovery Public Class MyDiscoveryClientResult Shared Sub Main() Try Dim myDiscoveryClientProtocol As New DiscoveryClientProtocol() ' Get the collection holding DiscoveryClientResult objects. Dim myDiscoveryClientResultCollection As _ DiscoveryClientResultCollection = _ myDiscoveryClientProtocol.ReadAll("results.discomap") Console.WriteLine("The number of DiscoveryClientResult objects: " _ & myDiscoveryClientResultCollection.Count.ToString()) Console.WriteLine("Displaying the items in the collection:") ' Iterate through the collection and display the properties ' of each DiscoveryClientResult in it. Dim myDiscoveryClientResult As DiscoveryClientResult For Each myDiscoveryClientResult In myDiscoveryClientResultCollection Console.WriteLine( _ "Type of reference in the discovery document: " _ & myDiscoveryClientResult.ReferenceTypeName) Console.WriteLine("Url for the reference: " _ & myDiscoveryClientResult.Url) Console.WriteLine("File for saving the reference: " _ & myDiscoveryClientResult.Filename) Next myDiscoveryClientResult Catch e As Exception Console.WriteLine("Error is " + e.Message) End Try End Sub 'Main End Class 'MyDiscoveryClientResult
using System; using System.Web.Services.Discovery; public class MyDiscoveryClientResult { static void Main() { try { DiscoveryClientProtocol myDiscoveryClientProtocol = new DiscoveryClientProtocol(); // Get the collection holding DiscoveryClientResult objects. DiscoveryClientResultCollection myDiscoveryClientResultCollection = myDiscoveryClientProtocol.ReadAll("results.discomap"); Console.WriteLine("The number of DiscoveryClientResult objects: " + myDiscoveryClientResultCollection.Count); Console.WriteLine("Displaying the items in the collection:"); // Iterate through the collection and display the properties // of each DiscoveryClientResult in it. foreach(DiscoveryClientResult myDiscoveryClientResult in myDiscoveryClientResultCollection) { Console.WriteLine( "Type of reference in the discovery document: " + myDiscoveryClientResult.ReferenceTypeName); Console.WriteLine("Url for the reference: " + myDiscoveryClientResult.Url); Console.WriteLine("File for saving the reference: " + myDiscoveryClientResult.Filename); } } catch(Exception e) { Console.WriteLine("Error is " + e.Message); } } }
#using <System.Web.Services.dll> #using <System.dll> using namespace System; using namespace System::Web::Services::Discovery; int main() { try { DiscoveryClientProtocol^ myDiscoveryClientProtocol = gcnew DiscoveryClientProtocol; // Get the collection holding DiscoveryClientResult objects. DiscoveryClientResultCollection^ myDiscoveryClientResultCollection = myDiscoveryClientProtocol->ReadAll( "results.discomap" ); Console::WriteLine( "The number of DiscoveryClientResult objects: {0}", myDiscoveryClientResultCollection->Count ); Console::WriteLine( "Displaying the items in the collection:" ); // Iterate through the collection and display the properties // of each DiscoveryClientResult in it. System::Collections::IEnumerator^ myEnum = myDiscoveryClientResultCollection->GetEnumerator(); while ( myEnum->MoveNext() ) { DiscoveryClientResult^ myDiscoveryClientResult = safe_cast<DiscoveryClientResult^>(myEnum->Current); Console::WriteLine( "Type of reference in the discovery document: {0}", myDiscoveryClientResult->ReferenceTypeName ); Console::WriteLine( "Url for the reference: {0}", myDiscoveryClientResult->Url ); Console::WriteLine( "File for saving the reference: {0}", myDiscoveryClientResult->Filename ); } } catch ( Exception^ e ) { Console::WriteLine( "Error is {0}", e->Message ); } }
import System.*; import System.Web.Services.Discovery.*; public class MyDiscoveryClientResult { public static void main(String[] args) { try { DiscoveryClientProtocol myDiscoveryClientProtocol = new DiscoveryClientProtocol(); // Get the collection holding DiscoveryClientResult objects. DiscoveryClientResultCollection myDiscoveryClientResultCollection = myDiscoveryClientProtocol.ReadAll("results.discomap"); Console.WriteLine("The number of DiscoveryClientResult objects: " + myDiscoveryClientResultCollection.get_Count()); Console.WriteLine("Displaying the items in the collection:"); DiscoveryClientResult myDiscoveryClientResult = null; // Iterate through the collection and display the properties // of each DiscoveryClientResult in it. for (int iCtr = 0; iCtr < myDiscoveryClientResultCollection. get_Count(); iCtr++) { myDiscoveryClientResult = myDiscoveryClientResultCollection. get_Item(iCtr); Console.WriteLine("Type of reference in the discovery " + "document: " + myDiscoveryClientResult.get_ReferenceTypeName()); Console.WriteLine("Url for the reference: " + myDiscoveryClientResult.get_Url()); Console.WriteLine("File for saving the reference: " + myDiscoveryClientResult.get_Filename()); } } catch (System.Exception e) { Console.WriteLine("Error is " + e.get_Message()); } } //main } //MyDiscoveryClientResult

System.Web.Services.Discovery.DiscoveryClientResult


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


DiscoveryClientResult コンストラクタ ()
アセンブリ: System.Web.Services (system.web.services.dll 内)


' 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)
// 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 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.set_ReferenceTypeName( "System.Web.Services.Discovery.DiscoveryDocumentReference"); // Set the URL for the reference. myDiscoveryClientResult.set_Url( "http://localhost/Discovery/Service1_jsl.asmx?disco"); // Set the name of the file in which the reference is saved. myDiscoveryClientResult.set_Filename("Service1_jsl.disco"); // Add the DiscoveryClientResult to the collection. myDiscoveryClientResultCollection.Add(myDiscoveryClientResult);

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


DiscoveryClientResult コンストラクタ (Type, String, String)
アセンブリ: System.Web.Services (system.web.services.dll 内)

Dim referenceType As Type Dim url As String Dim filename As String Dim instance As New DiscoveryClientResult(referenceType, url, filename)

' 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)
// 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. 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(System.Web.Services. Discovery.DiscoveryDocumentReference.class.ToType(), "http://localhost/Discovery/Service1_jsl.asmx?disco", "Service1_jsl.disco"); // Add the DiscoveryClientResult to the collection. myDiscoveryClientResultCollection.Add(myDiscoveryClientResult);

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


DiscoveryClientResult コンストラクタ

名前 | 説明 |
---|---|
DiscoveryClientResult () | DiscoveryClientResult クラスの新しいインスタンスを初期化します。 |
DiscoveryClientResult (Type, String, String) | DiscoveryClientResult クラスの新しいインスタンスを初期化し、ReferenceTypeName プロパティを referenceType に、Url プロパティを url に、Filename プロパティを filename に設定します。 |

DiscoveryClientResult プロパティ

名前 | 説明 | |
---|---|---|
![]() | Filename | 参照が保存されているファイル名を取得または設定します。 |
![]() | ReferenceTypeName | 探索ドキュメントの参照の種類を表すクラス名。 |
![]() | Url | 参照先の URL を取得または設定します。 |

DiscoveryClientResult メソッド

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 ( Object から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 ( Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 ( Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |

DiscoveryClientResult メンバ
参照されるドキュメントの内容を除く、探索された参照の詳細を表します。このクラスは継承できません。
DiscoveryClientResult データ型で公開されるメンバを以下の表に示します。


名前 | 説明 | |
---|---|---|
![]() | Filename | 参照が保存されているファイル名を取得または設定します。 |
![]() | ReferenceTypeName | 探索ドキュメントの参照の種類を表すクラス名。 |
![]() | Url | 参照先の URL を取得または設定します。 |

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 (Object から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 (Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 (Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |

- DiscoveryClientResultのページへのリンク